Data processing methods, apparatus, equipment and readable storage media

CN122569758APending Publication Date: 2026-08-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0002]用户可以通过业务设备运行跨平台应用,从而通过跨平台应用向输入法应用发送调用指令,输入法应用则可以对调用指令进行响应,进而执行调用指令所对应的输入法任务,其中,由于跨平台应用是基于自绘跨平台框架所开发的,所以跨平台应用和多种不同平台的输入法应用之间可能无法完全兼容,使得跨平台应用和多种不同平台的输入法应用之间的交互存在差异,进而导致跨平台应用与输入法应用之间可能存在集成不畅、交互不友好等适配问题,进而影响输入法应用的使用效果

Benefits of technology

[0075]In this embodiment, input method information can be obtained through an abstracted adaptation layer component in cross-platform applications. The adaptation layer component can extract features from the input method information to obtain input method identification features that uniquely identify the input method application. If an input method plugin is matched through the input method identification features, the input method plugin can be registered. Since the input method plugin can detect the input method status, when the input method status matches the lifecycle behavior, a first invocation instruction can be generated in the adaptation layer component. The first invocation instruction is then sent to the input method application through the adaptation layer component so that the input method service can execute the input method task according to the first invocation instruction. Since the first invocation command can be generated through the cooperation of the input method plugin and the adaptation layer component, and the input method plugin is matched with the input method application (meaning input method applications on different platforms can register different input method plugins), an accurate first invocation command adapted to the input method application can be generated. This allows the input method application to accurately execute the corresponding input method tasks. Furthermore, the input method application can generate lifecycle messages indicating the execution status of the input method tasks based on the first invocation command and send these lifecycle messages back to the adaptation layer component. The adaptation layer component can then accurately execute interactive tasks for the input method application based on the lifecycle messages. Therefore, it can effectively support cross-platform applications and the interaction between input method applications on multiple different platforms, enhancing the uniformity of adaptation between cross-platform applications and input method applications on multiple different platforms. This allows for compatibility between input method applications on different platforms within cross-platform applications based on the functions provided by different input method plugins, thereby improving the usability of input method applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122569758A_ABST
    Figure CN122569758A_ABST
Patent Text Reader

Abstract

This application discloses a data processing method, apparatus, device, and readable storage medium. The method includes: extracting features from input method information through an adaptation layer component in a cross-platform application to obtain input method identification features; registering the matching input method plugin if an input method plugin matching the input method identification features exists in the plugin set; obtaining the input method state corresponding to the input method application through the adaptation layer component and transmitting the input method state to the input method plugin; generating a first invocation instruction in the adaptation layer component if the input method plugin generates a detection result indicating that the input method state matches a first input method lifecycle behavior; sending the first invocation instruction to the input method application through the input method service; and generating a lifecycle message indicating the execution state of the input method task based on the first invocation instruction in the input method application. Using this application, interaction between cross-platform applications and input method applications on different platforms can be compatible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and readable storage medium. Background Technology

[0002] Users can run cross-platform applications on their devices, and then send invocation commands to input method applications through these cross-platform applications. The input method applications can then respond to the invocation commands and execute the corresponding input method tasks. However, since cross-platform applications are developed based on a self-drawn cross-platform framework, they may not be fully compatible with input method applications on various different platforms. This can lead to differences in the interaction between cross-platform applications and input method applications on different platforms, resulting in integration problems, unfriendly interactions, and other adaptation issues that may affect the usability of the input method applications. Summary of the Invention

[0003] This application provides a data processing method, apparatus, device, and readable storage medium that can effectively support the interaction between cross-platform applications and input method applications on different platforms, thereby improving the usability of input method applications.

[0004] One embodiment of this application provides a data processing method, including:

[0005] Input method information is obtained through the adaptation layer component in cross-platform applications; the input method information is provided by the input method application.

[0006] The input method information is feature extracted by the adaptation layer component to obtain the input method identification feature corresponding to the input method information. If there is an input method plugin in the plugin set that matches the input method identification feature, the matching input method plugin is registered.

[0007] The system obtains the input method status corresponding to the input method application through the adaptation layer component and transmits the input method status to the registered input method plugin.

[0008] If the input method plugin generates a detection result indicating that the input method state matches the first input method lifecycle behavior, the input method plugin transmits the detection result back to the adaptation layer component. In the adaptation layer component, a first invocation instruction is generated based on the detection result, and the first invocation instruction is transmitted to the input method service.

[0009] The input method service sends a first invocation command to the input method application. In the input method application, a lifecycle message indicating the execution status of the input method task is generated based on the first invocation command. The lifecycle message is used to be called back to the adaptation layer component and to instruct the adaptation layer component to perform interactive tasks for the input method application.

[0010] The methods also include:

[0011] Create the input method interaction interface corresponding to the input method application; the input method interaction interface contains the common interaction elements corresponding to the input method application.

[0012] An initial adaptation layer component is created in the development platform where the cross-platform application resides, based on the input method interaction interface; the initial adaptation layer component is used to interact with the input method application through the input method interaction interface;

[0013] The application interaction information of cross-platform applications is encapsulated into the initial adaptation layer component to obtain the adaptation layer component; the adaptation layer component is used to interact with cross-platform applications through the application interaction information.

[0014] This includes obtaining input method information through the adaptation layer component in cross-platform applications, including:

[0015] The information retrieval command is transmitted to the input method service through the adaptation layer component in the cross-platform application. The input method service then transmits the information retrieval command to the input method application, which in turn retrieves the input method name, input method version, and operating system information corresponding to the operating system.

[0016] The input method service obtains the input method name, input method version, and operating system information provided by the input method application, and identifies the input method name, input method version, and operating system information as the input method information corresponding to the input method application.

[0017] Input method information is transmitted to the adaptation layer components in cross-platform applications through the input method service.

[0018] Specifically, the adaptation layer component extracts features from the input method information to obtain the input method identifier features corresponding to the input method information, including:

[0019] The adaptation layer component generates a hash object for input method information, divides the input method information into blocks, obtains H blocks of input method information, and reads the H blocks of input method information in a loop; H is a positive integer.

[0020] When the i-th block of input method information is read in the loop, the i-th block of input method information is submitted to the hash object. The hash value of the (i-1)-th update in the hash object is updated according to the i-th block of input method information to obtain the hash value of the i-th update; i is a positive integer less than or equal to H.

[0021] If i equals H, then the hash value of the i-th update in the hash object is determined as the input method identifier feature corresponding to the input method information.

[0022] Specifically, if an input method plugin matching the input method identifier exists in the plugin set, then the matching input method plugin is registered, including:

[0023] Obtain the input method plugin information corresponding to one or more input method plugins in the plugin set, extract features from the input method plugin information, and obtain the input method plugin features corresponding to each input method plugin.

[0024] The input method identification feature is compared with the input method plugin feature corresponding to each input method plugin. If there is an input method plugin feature that is the same as the input method identification feature, then the input method plugin corresponding to the input method plugin feature that is the same as the input method identification feature is determined as the input method plugin that matches the input method identification feature.

[0025] Register the matching input method plugin to the adaptation layer component.

[0026] The methods also include:

[0027] If no input method plugin matches the input method identifier in the plugin set, a general input method plugin is obtained from the plugin set and registered. The general input method plugin is used to detect the matching relationship between the input method state obtained by the adaptation layer component and the input method lifecycle behavior configured in the general input method plugin.

[0028] The methods also include:

[0029] If the adaptation layer component detects that the input method state matches the second input method lifecycle behavior configured in the adaptation layer component, then the adaptation layer component generates a second invocation instruction and transmits the second invocation instruction to the input method service.

[0030] The input method service sends a second invocation command to the input method application, and the input method application executes the input method task indicated by the second invocation command.

[0031] The methods also include:

[0032] Obtain the characters to be displayed generated by the input method application after it has completed the input method task, and transmit the characters to be displayed to the input method service through the input method application;

[0033] The input method service calls back the characters to be displayed to the adaptation layer component, which then transmits them to the cross-platform application. Finally, the cross-platform application renders and displays the characters.

[0034] The methods also include:

[0035] The input method application transmits lifecycle messages and the updated input method state to the input method service. The input method service then sends the lifecycle messages and the updated input method state back to the adaptation layer component. Finally, the adaptation layer component transmits the lifecycle messages and the updated input method state to the input method plugin.

[0036] If the input method plugin generates an update detection result that indicates the lifecycle message and the updated input method state match the third input method lifecycle behavior, then the update detection result is transmitted back to the adaptation layer component through the input method plugin. In the adaptation layer component, a third invocation instruction is generated based on the update detection result, and the third invocation instruction is transmitted to the input method service.

[0037] The third-party invocation command is sent to the input method application through the input method service.

[0038] One embodiment of this application provides a data processing apparatus, including:

[0039] The transceiver module is used to obtain input method information through the adaptation layer components in cross-platform applications; the input method information is provided by the input method application.

[0040] The feature extraction module is used to extract features from input method information through the adaptation layer component to obtain the input method identification features corresponding to the input method information. If there is an input method plugin in the plugin set that matches the input method identification features, the matching input method plugin is registered. The module also obtains the input method status corresponding to the input method application through the adaptation layer component and transmits the input method status to the registered input method plugin.

[0041] The instruction generation module is used to transmit the detection result back to the adaptation layer component through the input method plugin if the input method plugin generates a detection result indicating that the input method state matches the first input method lifecycle behavior. In the adaptation layer component, the first call instruction is generated based on the detection result and then transmitted to the input method service.

[0042] The task execution module is used to send a first invocation command to the input method application through the input method service. In the input method application, a lifecycle message indicating the execution status of the input method task is generated based on the first invocation command. The lifecycle message is used to be called back to the adaptation layer component and to instruct the adaptation layer component to perform interactive tasks for the input method application.

[0043] In one possible implementation, the transceiver module is also used to perform the following operations:

[0044] Create the input method interaction interface corresponding to the input method application; the input method interaction interface contains the common interaction elements corresponding to the input method application.

[0045] An initial adaptation layer component is created in the development platform where the cross-platform application resides, based on the input method interaction interface; the initial adaptation layer component is used to interact with the input method application through the input method interaction interface;

[0046] The application interaction information of cross-platform applications is encapsulated into the initial adaptation layer component to obtain the adaptation layer component; the adaptation layer component is used to interact with cross-platform applications through the application interaction information.

[0047] In one possible implementation, when the transceiver module obtains input method information through the adaptation layer component in a cross-platform application, it specifically performs the following operations:

[0048] The information retrieval command is transmitted to the input method service through the adaptation layer component in the cross-platform application. The input method service then transmits the information retrieval command to the input method application, which in turn retrieves the input method name, input method version, and operating system information corresponding to the operating system.

[0049] The input method service obtains the input method name, input method version, and operating system information provided by the input method application, and identifies the input method name, input method version, and operating system information as the input method information corresponding to the input method application.

[0050] Input method information is transmitted to the adaptation layer components in cross-platform applications through the input method service.

[0051] In one possible implementation, the feature extraction module is used to extract features from the input method information through the adaptation layer component. When obtaining the input method identifier features corresponding to the input method information, it is specifically used to perform the following operations:

[0052] The adaptation layer component generates a hash object for input method information, divides the input method information into blocks, obtains H blocks of input method information, and reads the H blocks of input method information in a loop; H is a positive integer.

[0053] When the i-th block of input method information is read in the loop, the i-th block of input method information is submitted to the hash object. The hash value of the (i-1)-th update in the hash object is updated according to the i-th block of input method information to obtain the hash value of the i-th update; i is a positive integer less than or equal to H.

[0054] If i equals H, then the hash value of the i-th update in the hash object is determined as the input method identifier feature corresponding to the input method information.

[0055] In one possible implementation, the feature extraction module is used to perform the following operations when registering an input method plugin that matches the input method identifier features if there is an input method plugin in the plugin set:

[0056] Obtain the input method plugin information corresponding to one or more input method plugins in the plugin set, extract features from the input method plugin information, and obtain the input method plugin features corresponding to each input method plugin.

[0057] The input method identification feature is compared with the input method plugin feature corresponding to each input method plugin. If there is an input method plugin feature that is the same as the input method identification feature, then the input method plugin corresponding to the input method plugin feature that is the same as the input method identification feature is determined as the input method plugin that matches the input method identification feature.

[0058] Register the matching input method plugin to the adaptation layer component.

[0059] In one possible implementation, the feature extraction module is also used to perform the following operations:

[0060] If no input method plugin matches the input method identifier in the plugin set, a general input method plugin is obtained from the plugin set and registered. The general input method plugin is used to detect the matching relationship between the input method state obtained by the adaptation layer component and the input method lifecycle behavior configured in the general input method plugin.

[0061] In one possible implementation, the instruction generation module is also used to perform the following operations:

[0062] If the adaptation layer component detects that the input method state matches the second input method lifecycle behavior configured in the adaptation layer component, then the adaptation layer component generates a second invocation instruction and transmits the second invocation instruction to the input method service.

[0063] The input method service sends a second invocation command to the input method application, and the input method application executes the input method task indicated by the second invocation command.

[0064] In one possible implementation, the task execution module is also used to perform the following operations:

[0065] Obtain the characters to be displayed generated by the input method application after it has completed the input method task, and transmit the characters to be displayed to the input method service through the input method application;

[0066] The input method service calls back the characters to be displayed to the adaptation layer component, which then transmits them to the cross-platform application. Finally, the cross-platform application renders and displays the characters.

[0067] In one possible implementation, the task execution module is also used to perform the following operations:

[0068] The input method application transmits lifecycle messages and the updated input method state to the input method service. The input method service then sends the lifecycle messages and the updated input method state back to the adaptation layer component. Finally, the adaptation layer component transmits the lifecycle messages and the updated input method state to the input method plugin.

[0069] If the input method plugin generates an update detection result that indicates the lifecycle message and the updated input method state match the third input method lifecycle behavior, then the update detection result is transmitted back to the adaptation layer component through the input method plugin. In the adaptation layer component, a third invocation instruction is generated based on the update detection result, and the third invocation instruction is transmitted to the input method service.

[0070] The third-party invocation command is sent to the input method application through the input method service.

[0071] One embodiment of this application provides a computer device, including: a processor, a memory, and a network interface;

[0072] The processor is connected to a memory and a network interface. The network interface is used to provide data communication functions, and the memory is used to store computer programs. When the computer program is executed by the processor, the computer device performs the method provided in the embodiments of this application.

[0073] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided in this application.

[0074] One embodiment of this application provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method provided in this application embodiment.

[0075] In this embodiment, input method information can be obtained through an abstracted adaptation layer component in cross-platform applications. The adaptation layer component can extract features from the input method information to obtain input method identification features that uniquely identify the input method application. If an input method plugin is matched through the input method identification features, the input method plugin can be registered. Since the input method plugin can detect the input method status, when the input method status matches the lifecycle behavior, a first invocation instruction can be generated in the adaptation layer component. The first invocation instruction is then sent to the input method application through the adaptation layer component so that the input method service can execute the input method task according to the first invocation instruction. Since the first invocation command can be generated through the cooperation of the input method plugin and the adaptation layer component, and the input method plugin is matched with the input method application (meaning input method applications on different platforms can register different input method plugins), an accurate first invocation command adapted to the input method application can be generated. This allows the input method application to accurately execute the corresponding input method tasks. Furthermore, the input method application can generate lifecycle messages indicating the execution status of the input method tasks based on the first invocation command and send these lifecycle messages back to the adaptation layer component. The adaptation layer component can then accurately execute interactive tasks for the input method application based on the lifecycle messages. Therefore, it can effectively support cross-platform applications and the interaction between input method applications on multiple different platforms, enhancing the uniformity of adaptation between cross-platform applications and input method applications on multiple different platforms. This allows for compatibility between input method applications on different platforms within cross-platform applications based on the functions provided by different input method plugins, thereby improving the usability of input method applications. Attached Figure Description

[0076] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0077] Figure 1 This is a schematic diagram of a data processing scenario provided in an embodiment of this application. Figure 1 ;

[0078] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 1 ;

[0079] Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 2 ;

[0080] Figure 4This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 3 ;

[0081] Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0082] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0083] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0084] It is understood that in the specific embodiments of this application, the data of the objects (such as users) involved need to obtain the permission or consent of the objects when the following embodiments of this application are applied to specific products or technologies, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant regions.

[0085] If object data needs to be collected in this application, a prompt interface or pop-up window will be displayed before and during the collection process. This prompt interface or pop-up window is used to inform the object that certain data is currently being collected. The data acquisition steps will only begin after the object confirms the prompt interface or pop-up window; otherwise, the process will end. Furthermore, the acquired object data will be used in reasonable and legal scenarios or for legitimate purposes. Optionally, in scenarios where object data needs to be used but the object has not authorized its use, authorization can be requested from the object. The object data can be used only after authorization is granted; for example, the object data may include verification signature information and identification verification information.

[0086] Please see Figure 1 , Figure 1 This is a schematic diagram of a data processing scenario provided in an embodiment of this application. Figure 1 .like Figure 1As shown, the business device may include an input method plugin, an adaptation layer component, an input method service, and an input method application. The input method plugin and adaptation layer component can be integrated into a cross-platform application. The input method service can be a system service built into the business device, providing a relay service between the cross-platform application and the input method application. There are inter-process communication connections between the input method plugin and the adaptation layer component, between the adaptation layer component and the input method service, and between the input method service and the input method application. These inter-process communication connections are not limited in method; they can be established directly or indirectly via wired communication, wireless communication, or other methods. This application does not impose any restrictions on these methods.

[0087] It should be understood that, such as Figure 1 The adapter layer component shown can be integrated into a self-drawn cross-platform framework for cross-platform applications. A self-drawn cross-platform framework refers to a cross-platform UI framework that renders the UI (User Interface) structure using its built-in graphics engine and draws using the underlying drawing interfaces of various platforms. Cross-platform applications can transmit input method information and invocation commands to input method applications through the adapter layer component. The input method application can then execute input method tasks based on the invocation commands. For example, if the invocation command indicates that the position of the input method candidate box should be fixed, the input method application can change the position of the input method candidate box from floating to fixed based on the invocation command.

[0088] Cross-platform applications refer to applications that can run on multiple different operating systems or hardware platforms. By using cross-platform frameworks (such as Flutter, React Native, Electron, etc.), developers can build applications using a unified codebase, thus achieving the goal of "Write Once, Run Anywhere" (WORA). Because cross-platform frameworks abstract away the differences in the underlying platforms, developers do not need to delve into the underlying details of each platform. Compared to developing applications separately for each platform, developing cross-platform applications not only reduces development costs and time but also provides a consistent user experience across different platforms, while simultaneously supporting multiple devices and operating systems.

[0089] Cross-platform applications can be application clients with image, video, and other data information functions, such as game applications, video editing applications, social applications, instant messaging applications, live streaming applications, short video applications, video applications, music applications, shopping applications, novel applications, payment applications, and browsers. These application clients can be standalone clients or embedded sub-clients integrated into other clients (such as instant messaging clients, social clients, video clients, etc.), without limitation.

[0090] like Figure 1 As shown, input method information (such as the input method name and version) can be transmitted to the input method service through the input method application. The input method service then forwards this information to the adaptation layer component. The adaptation layer component can extract features from the input method information to obtain the input method identifier features. Based on these features, the component matches input method plugins in the plugin set. If a plugin matches the identifier features, it registers the matching plugin. When the adaptation layer component receives the input method state (such as word selection state) from the input method application, it transmits this state to the registered input method plugin. The registered plugin then matches the input method state with the first input method lifecycle behavior to obtain the detection result. The first input method lifecycle behavior characterizes the behavioral changes experienced by the input method application during its interaction with the cross-platform application and can be pre-configured in the input method plugin.

[0091] If the detection result indicates that the input method state matches the first input method lifecycle behavior, the detection result is transmitted to the adaptation layer component through the registered input method plugin. The adaptation layer component generates a first invocation command based on the detection result and then transmits the first invocation command to the input method service. The input method service then forwards it to the input method application. The input method application can then generate a lifecycle message indicating the execution status of the input method task based on the first invocation command, and execute the input method task indicated by the first invocation command, such as displaying word selection results. The input method service acts as an intermediary between the adaptation layer component and the input method application, relaying input method information and the first invocation command. The first invocation command can be generated through the cooperation of the input method plugin and the adaptation layer component. The input method plugin is matched to the input method application; that is, input method applications on different platforms can register different input method plugins. This allows for the generation of a first invocation command that accurately adapts to the input method application, enabling the input method application to accurately execute the corresponding input method task. After the input method service calls back the lifecycle message to the adaptation layer component, the adaptation layer component can accurately execute the interactive task for the input method application based on the lifecycle message.

[0092] like Figure 1 As shown, taking updating the input method candidate box position as an example, when the cursor position changes during input using an input method application, the input method candidate box position remains at the previous input position, such as... Figure 1As shown in interface 200, there is an adaptation problem between the cross-platform application (the cross-platform application that does not integrate the adaptation layer component of this application) and the input method application, resulting in poor interaction between the cross-platform application and the input method application, as well as poor usability of the input method application. In this embodiment, the adaptation layer component in the cross-platform application can register the input method plugin that matches the input method application. The adaptation layer component can then obtain the input method state corresponding to the input method application transmitted by the input method service, such as the input method word selection state, i.e., the selection state of the candidate words provided by the input method application. This input method word selection state is then transmitted to the registered input method plugin, enabling the registered input method plugin to detect the input method word selection state.

[0093] If a detection result can be generated to indicate that the input method's word selection state matches the first input method lifecycle behavior (such as the behavior of the object having completed the selection of candidate words provided by the input method application), the detection result can be transmitted to the adaptation layer component through the input method plugin. The adaptation layer component then generates a first invocation instruction based on the detection result. This first invocation instruction is then transmitted to the input method service, and subsequently to the input method application. The input method application can then generate a lifecycle message indicating the completion of candidate word spelling input based on the first invocation instruction, and execute the input method task indicated by the first invocation instruction, i.e., inputting the candidate words selected by the object (to obtain the characters to be displayed). The input method application then sends a callback to the input method service with the characters to be displayed and the lifecycle message, which in turn is sent back to the adaptation layer component. The adaptation layer component can then transmit the characters to be displayed to the cross-platform application, which renders and displays the characters. The adaptation layer component captures the current cursor position based on the lifecycle message, and updates the input method candidate box position to the current cursor position. Figure 1 As shown in interface 300, this demonstrates that the functionality provided by different input method plugins can achieve compatibility between input method applications on different platforms in cross-platform applications, thereby improving the interaction between cross-platform applications and input method applications, as well as the usability of input method applications.

[0094] It is understood that the embodiments of this application can obtain input method information through an abstracted adaptation layer component in cross-platform applications. Moreover, the adaptation layer component can extract features from the input method information to obtain input method identification features that uniquely identify the input method application. If an input method plugin is matched through the input method identification features, the input method plugin can be registered. Since the input method plugin can detect the input method status, when the input method status matches the lifecycle behavior, a first invocation instruction can be generated in the adaptation layer component. The first invocation instruction is then sent to the input method application through the adaptation layer component so that the input method service can execute the input method task according to the first invocation instruction. Since the first invocation command can be generated through the cooperation of the input method plugin and the adaptation layer component, and the input method plugin is matched with the input method application (meaning input method applications on different platforms can register different input method plugins), an accurate first invocation command adapted to the input method application can be generated. This allows the input method application to accurately execute the corresponding input method tasks. Furthermore, the input method application can generate lifecycle messages indicating the execution status of the input method tasks based on the first invocation command and send these lifecycle messages back to the adaptation layer component. The adaptation layer component can then accurately execute interactive tasks for the input method application based on the lifecycle messages. Therefore, it can effectively support cross-platform applications and the interaction between input method applications on multiple different platforms, enhancing the uniformity of adaptation between cross-platform applications and input method applications on multiple different platforms. This allows for compatibility between input method applications on different platforms within cross-platform applications based on the functions provided by different input method plugins, thereby improving the usability of input method applications.

[0095] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 1 This data processing method can be executed by a computer device. The following description will use the execution of this data processing method by a computer device as an example. The data processing method may include at least the following steps S101-S105:

[0096] Step S101: Obtain input method information through the adaptation layer component in the cross-platform application;

[0097] Specifically, a computer device can include cross-platform applications, input method applications, and input method services, with the cross-platform application containing an adaptation layer component. The computer device can obtain input method information corresponding to the input method application, such as the input method name, input method version, and operating system information (such as system version number). That is, the input method application transmits the input method name and version to the input method service, which in turn transmits the input method name and version to the adaptation layer component in the cross-platform application, and the adaptation layer component obtains the operating system information. The cross-platform application can include a self-drawn cross-platform framework, which renders the UI structure using its built-in graphics engine and draws through the underlying drawing interfaces of various platforms. The input method service acts as an intermediary for the information transmitted between the adaptation layer component and the input method application.

[0098] Computer devices can interact with cross-platform applications and input method applications through adaptation layer components. For example, a computer device can create an input method interaction interface corresponding to an input method application. This interface includes common interactive elements such as input method candidate boxes and function buttons. Based on this interface, an initial adaptation layer component is created in the development platform of the cross-platform application. This component can then interact with the application through the interface. The device can encapsulate the cross-platform application's interaction information into this initial component, resulting in the adaptation layer component. This interaction information can include button events, gestures, access permissions, and focus changes within the cross-platform application.

[0099] It's understandable that computer devices can unify the interaction between cross-platform applications on desktop and mobile devices through adaptation layer components. Specifically, during the initialization of cross-platform applications (such as initializing the UI framework and network connections), the input method context can be obtained in the adaptation layer component. This allows interaction between the cross-platform application and the input method application. The input method context is an abstract object that manages the input method state, providing a unified interface for cross-platform applications to interact with the input method application while hiding the specific implementation details of the input method application, ensuring consistency across different platforms and scenarios. In the operating system, the input method context is maintained by the Input Method Manager. By default, the operating system creates an input context for each thread and assigns it to all windows within that thread. Cross-platform applications can obtain a handle to the input context associated with a specified window and release the input method context using the `ImmReleaseContext` function. Information in the input context includes the combined window style, composing style, and status window position.

[0100] Computer devices can obtain input method information in the adaptation layer components of cross-platform applications based on the input method context, and realize the interaction between cross-platform applications and input method applications. This includes operations such as showing or hiding the input method application, adjusting the position of the input method candidate box, setting cursor information, setting the selection information of input method candidate words, synchronizing input method information, and receiving various lifecycle messages called back by the input method application.

[0101] Step S102: Extract features from input method information through the adaptation layer component to obtain the input method identifier features corresponding to the input method information. If there is an input method plugin in the plugin set that matches the input method identifier features, then register the matching input method plugin.

[0102] Specifically, the adaptation layer component in cross-platform applications can extract features from input method information to obtain the input method identification features corresponding to the input method information. For example, hash calculation can be performed on the input method information to obtain the hash value (i.e., input method identification feature) corresponding to the input method information. Then, the plugin set can be searched to see if there is an input method plugin that matches the input method identification feature.

[0103] The plugin collection can be stored on a computer device or a server; there are no restrictions. If the plugin collection is stored on a server, the adaptation layer component can send a plugin lookup request to the server. The server will then search the plugin collection for an input method plugin that matches the input method identifier. If a matching plugin is found, the adaptation layer component retrieves it from the server and registers it. Since the registered plugin matches the input method identifier, different platforms can register different plugins. The registration process can involve the adaptation layer component calling the plugin's registration interface, storing the plugin information in its data structure (e.g., a list), initializing the plugin, and updating its registration status (e.g., marking it as "registered" or "available") within the adaptation layer component.

[0104] For example, a computer device can generate a hash object for input method information through an adaptation layer component, and divide the input method information into blocks to obtain H blocks of input method information. Then, in the compiler, a loop script reads the H blocks of input method information in a loop. When the i-th block of input method information is read in each iteration of the loop, the i-th block of input method information can be submitted to the hash object. A new hash value is calculated based on the hash value in the previous hash object and the i-th block of input method information. That is, the (i-1)-th updated hash value in the hash object is updated according to the i-th block of input method information to obtain the i-th updated hash value, where H is a positive integer and i is a positive integer less than or equal to H. When the loop has read the H-th block of input method information, i.e., i equals H, it means that all blocks of input method information have been read, and the loop reading ends. The H-th updated hash value in the hash object at this time is determined as the input method identification feature.

[0105] The computer device can obtain input method plugin information corresponding to one or more input method plugins in the plugin set, and then perform feature extraction on the input method plugin information to obtain input method plugin features corresponding to each input method plugin. The input method identifier features are then compared with the input method plugin features corresponding to each input method plugin. If an input method plugin feature with the same identifier feature exists, the input method plugin corresponding to this feature is identified as the input method plugin that matches the identifier feature, and then the matching input method plugin is registered. The process of feature extraction for input method plugin information is similar to the process of feature extraction for input method information described above, and will not be repeated here.

[0106] Step S103: Obtain the input method status corresponding to the input method application through the adaptation layer component, and transmit the input method status to the registered input method plugin;

[0107] Specifically, input method applications in computer devices can obtain the current input method status, such as the word selection status, and then transmit the input method status to the input method service. The input method service then forwards it to the adaptation layer component in the cross-platform application. In the adaptation layer component, the input method status forwarded by the input method service can be obtained by calling the API interface.

[0108] The adaptation layer component can use message queue technology (such as RabbitMQ, Kafka, etc.) to encapsulate the input method state into a message, which is then transmitted to the registered input method plugin via a message queue. This allows the input method plugin to retrieve the message from the message queue and obtain the input method state. Even if the input method plugin is unavailable, the message queue can temporarily store the message to prevent the input method state from being lost. The adaptation layer component can also use RPC to call the interface provided by the input method plugin, passing the input method state as a parameter to the plugin. This ensures real-time, bidirectional communication between the input method plugin and the adaptation layer component. This embodiment does not impose limitations on these aspects. A message queue is a middleware used to pass messages between different applications or components. It allows senders (producers) to send messages to a queue, and receivers (consumers) to retrieve messages from the queue. Message queues can be used for asynchronous task processing, microservice architecture, log processing, and event-driven architecture. Their main function is to achieve asynchronous communication and decoupling between applications, improving system scalability and reliability.

[0109] Step S104: If the input method plugin generates a detection result to indicate that the input method state matches the first input method lifecycle behavior, the detection result is transmitted back to the adaptation layer component through the input method plugin. In the adaptation layer component, a first call instruction is generated based on the detection result, and the first call instruction is transmitted to the input method service.

[0110] Specifically, input method plugins in computer devices can detect the received input method state. For example, by using hook technology within the plugin, hooks can be set to intercept and process relevant events related to the input method state. This allows matching of the input method state (such as word selection state) with the first input method lifecycle behavior (such as the behavior of an object completing the selection of candidate words provided by the input method application). If the match is successful, a detection result can be generated. The first input method lifecycle behavior characterizes the behavioral changes experienced by the input method application during its interaction with cross-platform applications and can be pre-configured in the input method plugin. Hook technology is a programming mechanism that allows developers to insert custom code logic when specific events occur. A hook is a special callback function that can intercept and process system messages or events. Through hook technology, developers can enhance or change the behavior of an application without modifying the original program code.

[0111] If the detection result indicates that the input method state matches the first input method lifecycle behavior, such as the detection result indicating that the input method word selection state matches the first input method lifecycle behavior (i.e., the object has completed the selection of candidate words provided by the input method application), then the computer device can transmit the detection result to the adaptation layer component through the input method plugin using inter-process communication technologies such as pipes and sockets. The adaptation layer component then generates a first invocation instruction based on the detection result to trigger the input method application to perform a lifecycle message callback. For example, the detection result may include a process step that should be executed after the input method state matches the first input method lifecycle behavior. In this case, the adaptation layer component can generate a first invocation instruction to trigger the input method application to perform a lifecycle message callback and to execute that process step. The computer device can then transmit the first invocation instruction from the adaptation layer component to the input method service using a message queue or event bus.

[0112] Step S105: The first invocation instruction is sent to the input method application through the input method service. In the input method application, a lifecycle message is generated based on the first invocation instruction to indicate the execution status of the input method task. The lifecycle message is used to be called back to the adaptation layer component and to instruct the adaptation layer component to perform interactive tasks for the input method application.

[0113] Specifically, the input method service in the computer device transmits the received first invocation instruction to the input method application. In the input method application, a lifecycle message indicating the execution status of the input method task is generated based on the first invocation instruction. For example, a lifecycle message indicating the completion of candidate word spelling input is generated. The input method application transmits the lifecycle message and the updated input method status of the input method application (such as including the character to be displayed determined by selecting candidate words) to the input method service. The input method service then forwards the message to the adaptation layer component, which processes and invokes the lifecycle message and the updated input method status, and performs interactive tasks for the input method application.

[0114] For example, the input method application's update of the input method state includes the character to be displayed. The input method application then transmits this character to the input method service, which in turn forwards it to the adaptation layer component. This component then transmits the character to the cross-platform application, allowing the computer device to render and display it. For instance, the cross-platform application can use the drawing interface provided by the browser engine layer to generate corresponding UI graphics data and perform a partial refresh in the relevant area of ​​the user interface layer. After receiving the lifecycle messages from the input method service callback through the adaptation layer component, interactive tasks for the input method application can be executed within the component. For example, the position of the input method candidate box can be updated based on the lifecycle message indicating the completion of candidate word spelling input. This means the adaptation layer component captures the current cursor position and updates the input method candidate box to the cursor position when it receives the lifecycle message indicating the completion of candidate word spelling input.

[0115] It is understood that the embodiments of this application can obtain input method information through an abstracted adaptation layer component in cross-platform applications. Moreover, the adaptation layer component can extract features from the input method information to obtain input method identification features that uniquely identify the input method application. If an input method plugin is matched through the input method identification features, the input method plugin can be registered. Since the input method plugin can detect the input method status, when the input method status matches the lifecycle behavior, a first invocation instruction can be generated in the adaptation layer component. The first invocation instruction is then sent to the input method application through the adaptation layer component so that the input method service can execute the input method task according to the first invocation instruction. Since the first invocation command can be generated through the cooperation of the input method plugin and the adaptation layer component, and the input method plugin is matched with the input method application (meaning input method applications on different platforms can register different input method plugins), an accurate first invocation command adapted to the input method application can be generated. This allows the input method application to accurately execute the corresponding input method tasks. Furthermore, the input method application can generate lifecycle messages indicating the execution status of the input method tasks based on the first invocation command and send these lifecycle messages back to the adaptation layer component. The adaptation layer component can then accurately execute interactive tasks for the input method application based on the lifecycle messages. Therefore, it can effectively support cross-platform applications and the interaction between input method applications on multiple different platforms, enhancing the uniformity of adaptation between cross-platform applications and input method applications on multiple different platforms. This allows for compatibility between input method applications on different platforms within cross-platform applications based on the functions provided by different input method plugins, thereby improving the usability of input method applications.

[0116] Please see Figure 3 , Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 2 This data processing method can be executed by a computer device. The following description will use the execution of this data processing method by a computer device as an example. The data processing method may include at least the following steps S201-S207:

[0117] Step S201: Transmit information to the input method service to obtain instructions through the adaptation layer component in the cross-platform application;

[0118] Specifically, computer devices can create adaptation layer components in cross-platform applications. For example, they can create an input method interaction interface corresponding to an input method application, and define input parameters and return values. For instance, they can create an input method interaction interface named Input, and define the input parameters corresponding to the Input interface to include the text input and the current input mode (such as Pinyin input, handwriting input), and define the return value to be information such as the input method candidate word list and the input method status. The Input interface can contain common interactive elements corresponding to the input method application, such as displaying the input method candidate box and hiding the input method function button. It can also declare interactive methods in the input method interaction interface, such as the method showKeyboard() to display the virtual keyboard, the method switchInputMode(mode) to switch the input mode, and the method insertText(text) to insert text into the input method candidate box. It can also define the attributes of the input method interaction interface (such as attributes that transmit input method information), without any restrictions.

[0119] Computer devices can create an initial adaptation layer component in the open platform where the cross-platform application resides, based on the input method interaction interface Input, input parameters, and return values. This initial adaptation layer component can then be used to interact with the input method application through the input method interaction interface Input. For example, the computer device can obtain relevant events such as text insertion and text deletion from the input method application through the input method interaction interface Input in the initial adaptation layer component, as well as receive lifecycle messages from the input method application and callbacks for updating the input method state.

[0120] After a computer device achieves interaction with an input method application through the initial adaptation layer component, it also needs to achieve interaction with cross-platform applications. For example, it can first determine the application interaction information involved in the cross-platform application, such as button clicks, interface switching, and data loading, thereby clarifying the application interaction flow. For example, the application interaction flow of a shopping application could be an object browsing products, an object adding products to the shopping cart, and an object submitting an order. Furthermore, it can submit interaction data, that is, extract key interaction data from the application interaction information and application interaction flow, such as the object's input data, gesture operations, and access permissions granted by the cross-platform application. Thus, the computer device can encapsulate the application interaction information and interaction data of the cross-platform application into the initial adaptation layer component, resulting in the adaptation layer component.

[0121] For example, an interaction model class (such as the AppInteractionModel class) can be defined in the initial adaptation layer component based on the extracted interaction data. This encapsulates application interaction information (such as UI control data) into the interaction model class, and the logic for sending messages is implemented in the sendMessage() method. Then, an adapter class (such as AppInteractionAdapter) can be created. Since this adapter class contains methods to convert the data and logic in the interaction model class into a format that the initial adaptation layer component can recognize and process, the interaction model class can be adapted to the initial adaptation layer component through this adapter class to obtain the adaptation layer component. The adaptation layer component can be used to interact with cross-platform applications through application interaction information. For example, the adaptation layer component can transmit the lifecycle messages called back by the input method application to the cross-platform application for response. Computer devices can also encapsulate requests for obtaining input method information into information retrieval instructions through the adaptation layer component in the cross-platform application, and then transmit these instructions to the input method service.

[0122] Step S202: The information retrieval instruction is transmitted to the input method application through the input method service, and the input method name, input method version and operating system information corresponding to the operating system are retrieved in the input method application;

[0123] Specifically, computer devices can transmit received information retrieval instructions to the input method application via the input method service. The input method application can then retrieve the input method name, version, and operating system information (or the operating system information can be obtained automatically by the adaptation layer component) based on these instructions. The input method name can represent the type of the input method application, while the input method version refers to the current application version number, used to identify updated versions and for upgrades. During the compilation and design of the input method application, programming languages ​​and frameworks may embed metadata containing information such as the input method version and name into library files (e.g., JAR files). The input method application can then retrieve this metadata by reading file attributes (e.g., the Manifest attribute) of the library file, thereby obtaining the input method version and name. Alternatively, the input method version and name can be pre-stored in a configuration file (e.g., XML), which can then be parsed using various programming language libraries (e.g., JDOM) to retrieve this information.

[0124] For operating system information, computer devices (such as input method applications) can obtain it through APIs or function calls provided by the operating system. For example, they can obtain operating system information such as the version and model through the Build class. For instance, for input method application M, the computer device can obtain the input method name M and input method version 1.2.3 from its content configuration file, and obtain the operating system version 11 and model AX by calling the operating system API or based on the call instruction Build.VERSION.SDK_INT. Thus, the operating system version 11 and operating system model AX are identified as operating system information.

[0125] Step S203: Obtain the input method name, input method version, and operating system information provided by the input method application through the input method service, and determine the input method name, input method version, and operating system information as the input method information corresponding to the input method application;

[0126] Specifically, computer devices can transmit the input method name, input method version, and operating system information to the input method service through the input method application. The input method service can then identify the input method name, input method version, and operating system information as the input method information corresponding to the input method application. Alternatively, the input method application can encapsulate the input method name, input method version, and operating system information into an input method information field and transmit this field to the input method service. The input method service can then extract the input method information (including the input method name, input method version, and operating system information) from the input method information field, without any restrictions.

[0127] Step S204: Transmit the input method information to the adaptation layer component in the cross-platform application through the input method service; extract features from the input method information through the adaptation layer component to obtain the input method identifier features corresponding to the input method information;

[0128] Specifically, computer devices can transmit input method information to the adaptation layer component in cross-platform applications through the input method service. For example, the input method service can determine the input method name M, input method version 1.2.3, and operating system information including operating system version 11 and operating system model AX as the input method information corresponding to the input method application M. Then, it generates a request body based on the POST request method: {"Input method name: M","Input method version: 1.2.3","Operating system information: version 11, model AX"}, and then transmits the request body containing the input method information back to the adaptation layer component in the cross-platform application based on the RPC call.

[0129] The adaptation layer component can extract features from input method information to obtain the input method identifier features corresponding to the input method information. For example, in the adaptation layer component, a hash object can be created for processing input method data and generating hash values ​​using the SHA-256 algorithm. The input method information can be divided into blocks. These blocks can be of fixed size (e.g., 2KB, 4KB) H blocks, where H is a positive integer. Alternatively, they can be divided into dynamically sized H blocks, which are adjusted dynamically based on the total data size and the preset number of blocks. For example, when the total data size is D and the number of blocks is H, the size of each block can be determined to be approximately D / H. Alternatively, the first H-1 blocks can be evenly distributed, while the Hth block is adjusted to adapt to the dynamic changes in the total data size. The SHA-256 algorithm typically determines the size of each block to be 512 bits (i.e., 64 bytes).

[0130] For input method information K, the computer device can divide the obtained input method information K into even blocks, resulting in 5 blocks of input method information, namely Block1, ..., Block5. These 5 blocks are then read cyclically. After reading Block1, it is submitted to hash object 1, where the hash value is H1 = 45678abc12345678 (hash value H1 can also be called the first updated hash value in hash object 1). After reading Block2, the hash value H1 in hash object 1 can be further processed... The update process is performed, i.e., H2 = Hash(H1, Block2), to obtain the hash value H2 = 1234567890abcdef for the second update in hash object 1. Similarly, after reading the block input method information Block5, the hash value H4 in hash object 1 can be updated, i.e., H5 = Hash(H4, Block5), to obtain the hash value H5 = 9876543210fedcba9 for the fifth update in hash object 1. At this point, all block input method information has been read, and the computer device can determine the hash value H5 for the fifth update in hash object 1 as the input method identification feature.

[0131] Step S205: Obtain input method plugin information corresponding to one or more input method plugins in the plugin set, extract features from the input method plugin information, and obtain input method plugin features corresponding to each input method plugin.

[0132] Specifically, the computer device can obtain one or more input method configuration files (such as manifest.json or plugin.xml) corresponding to each input method plugin from the plugin collection. Then, it can obtain the input method plugin information corresponding to each input method plugin through the input method configuration file, such as the input method information and operating system information supported by the input method plugin. Then, it can perform feature extraction on the input method plugin information, that is, perform hash calculation on the input method plugin information to obtain the input method plugin features corresponding to each input method plugin.

[0133] The process of feature extraction for input method plugin information is similar to the process of feature extraction for input method information described above, and will not be repeated here. The plugin set can be stored on a computer device or on a server; there are no restrictions. If the plugin set is stored on a server, the adaptation layer component can send a plugin lookup request to the server. The server will then search the plugin set for an input method plugin that matches the input method identifier features. If a plugin that matches the input method identifier features exists, the adaptation layer component can retrieve the matching plugin returned by the server and register it. Since the registered input method plugin matches the input method identifier features, input method applications on different platforms can register different input method plugins.

[0134] Step S206: Compare the input method identification feature with the input method plugin feature corresponding to each input method plugin. If there is an input method plugin feature that is the same as the input method identification feature, then the input method plugin corresponding to the input method plugin feature that is the same as the input method identification feature is determined as the input method plugin that matches the input method identification feature.

[0135] Specifically, the computer device can compare the input method identification features obtained above with the input method plugin features corresponding to each input method plugin. If the input method identification feature is different from any input method plugin feature, it means that there is no input method plugin in the plugin set that matches the input method identification feature. If there is an input method plugin feature that is the same as the input method identification feature, the computer device can identify the input method plugin corresponding to the input method plugin feature that is the same as the input method identification feature as the input method plugin that matches the input method identification feature.

[0136] It is understandable that, since input method identification features can uniquely identify input method applications, input method plugins that match input method identification features are also compatible with input method applications. That is, input method applications on different platforms can register different input method plugins, thereby achieving compatibility between input method applications on different platforms in cross-platform applications based on the functions provided by different input method plugins. This enhances the consistency of cross-platform applications and multiple input method applications on different platforms in terms of adaptation, and improves the user experience of input method applications.

[0137] Step S207: Register the matching input method plugin to the adaptation layer component.

[0138] Specifically, if there is an input method plugin in the plugin set that matches the input method identification characteristics, the computer device can call the registration interface provided by the input method plugin to register the input method plugin that matches the input method identification characteristics to the adaptation layer component. This allows the computer device to use the functional characteristics of the input method plugin through the adaptation layer component. Before the input method plugin is registered, the computer device can call the initialization method through the adaptation layer component to initialize the input method plugin, such as initializing the configuration resources and logging of the input method plugin.

[0139] For example, for an input method plugin Z that matches the input method's identifier characteristics, the computer device can use the `registerPlugin()` method to call the input method plugin Z's registration interface with the plugin's identifier information as a parameter. This registers the input method plugin Z into the adaptation layer component. The adaptation layer component then stores the plugin's identifier information and functional characteristics using data structures (such as dictionaries or lists), including the plugin's name and version, and the input language functions it supports. Within the adaptation layer component, the computer device can call the `initialize()` method to initialize the input method plugin Z, performing tasks such as resource allocation and configuration loading.

[0140] If no input method plugin matching the input method identifier is found in the plugin set, the computer device can obtain a general input method plugin from the plugin set and register the general input method plugin. The general input method plugin is used to detect the matching relationship between the input method state obtained by the adaptation layer component and the input method lifecycle behavior configured in the general input method plugin, and can provide common interactive functions for input method applications on multiple different platforms.

[0141] Please see also Figure 4 , Figure 4 This is a flowchart of a data processing method. Figure 3 This data processing method can be executed by a computer device. The following explanation will use the execution of this data processing method by a computer device as an example.

[0142] The data method may include at least the following steps S208-S211:

[0143] Step S208: Obtain the input method status corresponding to the input method application through the adaptation layer component, and transmit the input method status to the registered input method plugin;

[0144] Specifically, after the computer equipment completes the above... Figure 3 Following step S207 in the corresponding embodiment, the adaptation layer component can obtain the input method state corresponding to the input method application transmitted by the input method service, thereby transmitting the input method state to the registered input method plugin. The input method state can include state information associated with the input method application, such as the input method language mode state and the input method candidate word state. For example, for a multilingual input method application, the adaptation layer component can obtain the state where the object is switching its input method language mode (e.g., Chinese mode) (i.e., the input method language mode state), or it can obtain the state where the object is selecting candidate words provided by the input method application (i.e., the input method candidate word state).

[0145] Step S209: If the input method plugin generates a detection result indicating that the input method state matches the first input method lifecycle behavior, then the detection result is transmitted back to the adaptation layer component through the input method plugin.

[0146] Specifically, computer devices can detect the received input method status through a registered input method plugin. If the input method plugin can generate a detection result indicating that the input method status matches the first input method lifecycle behavior, the detection result can be transmitted back to the adaptation layer component through the input method plugin. The first input method lifecycle behavior can be pre-configured in the input method plugin; that is, the task of detecting whether the input method status matches the first input method lifecycle behavior can be performed solely by the input method plugin. For example, during the process of an object using an input method application to select candidate words, the input method plugin can detect the word selection status of the corresponding input method application. If the detected word selection status matches the first input method lifecycle behavior (i.e., the object has completed the selection of candidate words provided by the input method application), the input method plugin can generate a detection result: {"Status: Candidate word selection completed", "Match: Yes"}, and then transmit the detection result back to the adaptation layer component through the input method plugin.

[0147] Step S210: Generate a first invocation instruction based on the detection result in the adaptation layer component, and transmit the first invocation instruction to the input method service;

[0148] Specifically, the computer device can parse the received detection results through the adaptation layer component, and then generate a first call instruction based on the detection results to trigger the input method application to perform a lifecycle message callback. For example, based on the detection results of the input method candidate word status, the adaptation layer component can determine that the object has completed the selection of candidate words provided by the input method application, and then generate a first call instruction to trigger the input method application to complete the lifecycle message callback of the candidate word input. The first call instruction can be represented as {"Candidate word input completed, request rendering and display"}, and then the first call instruction is transmitted to the input method service.

[0149] Computer devices can also detect the input method status through the adaptation layer component. If the input method status detected by the adaptation layer component matches the second input method lifecycle behavior configured in the adaptation layer component, a second invocation instruction is generated in the adaptation layer component and transmitted to the input method service. The second input method lifecycle behavior can also be used to characterize the behavioral state changes experienced by the input method application during interaction with cross-platform applications, and can be pre-configured in the adaptation layer component. For example, the input method status can be detected first in the adaptation layer component. If the input method status does not match the second input method lifecycle behavior, the input method status can be transmitted to a registered input method plugin for detection. Alternatively, the adaptation layer component and the registered input method plugin can perform parallel detection; no restriction is placed on this.

[0150] Step S211: The first invocation instruction is sent to the input method application through the input method service. In the input method application, a lifecycle message is generated based on the first invocation instruction to indicate the execution status of the input method task. The lifecycle message is used to be called back to the adaptation layer component and to instruct the adaptation layer component to perform interactive tasks for the input method application.

[0151] Specifically, the computer device can send a first invocation command to the input method application through the input method service. In the input method application, a lifecycle message indicating the execution status of the input method task is generated based on the first invocation command. The lifecycle message is then transmitted to the input method service through the input method application. The input method service then calls back the lifecycle message to the adaptation layer component. Finally, the adaptation layer component executes the interactive task for the input method application based on the lifecycle message.

[0152] For example, a computer device can use an input method service to transmit a first invocation instruction, indicating that the input method application has selected a candidate word for input, to the input method application. The input method application then inputs the candidate word selected for the object, resulting in the character to be displayed after the input method application completes the input method task indicated by the first invocation instruction. The input method application also generates a lifecycle message based on the first invocation instruction to indicate the completion of candidate word input. The input method application then transmits the lifecycle message and the character to be displayed to the input method service, which in turn sends the lifecycle message and the character to be displayed back to the adaptation layer component. Finally, the adaptation layer component executes the interactive task for the input method application, such as transmitting the character to be displayed to a cross-platform application, which then renders and displays the character.

[0153] For example, a computer device can obtain the character to be displayed as indicated by the input method task during the execution of the input method task. When an object inputs the character "hello", the input method application can store the character "hello" in a buffer to generate a candidate word list "Hello, hello, hullo". The object can then select the character "hello" as the final character to be displayed. Thus, the input method application can transmit the character "hello" to be displayed to the input method service, and the input method service can call back the character "hello" to be displayed to the adaptation layer component, which in turn transmits the character "hello" to the cross-platform application.

[0154] Cross-platform applications can render and display the text "hello" by using the font style (e.g., KaiTi) and font size (e.g., 16px font size, 100px width, and 20px height) of the text "hello" set in the cross-platform application. The size of the text "hello" is calculated, and its alignment (e.g., left-aligned, center-aligned) is considered. This determines its position within the cross-platform application, and then the text "hello" is drawn onto the application's interface (e.g., the interface at the cursor position). This involves creating a drawing context, such as HTML5 (HyperText Markup Language 5) Canvas, SVG (Scalable Vector Graphics), CSS (Cascading Style Sheets), etc., to draw the text "hello" on the application's interface. For example, using the `fillText` method of HTML5Canvas will produce the text "hello".

[0155] In graphics programming, the drawing context is used to manage and manipulate the environment for drawing graphics. A drawing context is an abstract interface or object that encapsulates all the states and functions required for drawing graphics, including drawing devices (such as screen, canvas, image files, etc.), drawing attributes (such as color, line width, font, etc.), and drawing operations (such as drawing lines, filling areas, drawing text, etc.). During the drawing process, the drawing context provides a unified interface, allowing developers to execute drawing operations through a standardized set of commands. This eliminates the need for direct interaction with the underlying graphics hardware or software, making the drawing code more concise, portable, and adaptable to different drawing targets and platforms.

[0156] Computer devices can update the object interface in the front end of a cross-platform application, thereby displaying the drawn text "hello" in the cross-platform application's object interface. For example, by updating the DOM (Document Object Model) content through web technologies, the text "hello" can be inserted into the cross-platform application's object interface for display. Triggering the cross-platform application's redraw mechanism ensures that the object interface displays the latest text content, and adjusting the cursor position to always be at the end of the input content facilitates continued text input. The DOM is a standard programming interface for Extensible Markup Language (XML). It treats the entire document as an object, and each part of the document (such as elements, text, comments, etc.) is represented as nodes organized in a tree structure, called the DOM tree. The main purpose of the DOM is to allow scripting languages ​​such as JavaScript to dynamically access and modify the document's content, structure, and style.

[0157] Computer devices can use the input method application to send the characters to be displayed and lifecycle messages back to the input method service. After the input method service sends the callback to the adaptation layer component, the current cursor position can be captured based on the lifecycle messages in the adaptation layer component. This allows the position of the input method candidate box to be updated to the current cursor position. For example, the screen coordinates (x1, y1, x2, y2) of the input method candidate box can be obtained by calling relevant functions such as GetClientRect and ClientToScreen through the adaptation layer component, and the current cursor position (x3, y3) can be obtained by calling the function GetCursorPos. Since the position of the input method candidate box is usually represented by a range of coordinates on the screen, including the coordinates of the top left and bottom right corners (x1, y1 can represent the coordinates of the top left corner, and (x2, y2) can represent the coordinates of the bottom right corner), and the cursor position is usually represented by the coordinates of a point (x3, y3), the computer device can compare the position of the input method candidate box (x1, y1, x2, y2) with the cursor position (x3, y3). If the relationship x1 <= x3 <= x2 and y1 <= y3 <= y2 is satisfied, it can be determined that the position of the input method candidate box is the same as the cursor position. If the above relationship is not satisfied, the adaptation layer component can perform the interaction task for the input method application, that is, update the position of the input method candidate box based on the cursor position.

[0158] Computer devices can generate lifecycle messages indicating the execution status of input method tasks through input method applications, such as "input method language mode has been switched, input method candidate words have been entered," etc. The input method application transmits the lifecycle messages and the updated input method status (such as the updated input method word selection status) to the input method service. The input method service then sends the lifecycle messages and the updated input method status back to the adaptation layer component, and the adaptation layer component transmits the lifecycle messages and the updated input method status to the input method plugin. If the input method plugin generates an update detection result indicating that the lifecycle messages and the updated input method status match the lifecycle behavior of a third input method, the input method plugin transmits the update detection result back to the adaptation layer component. The adaptation layer component generates a third invocation instruction based on the update detection result and transmits the third invocation instruction to the input method service. The input method service then sends the third invocation instruction to the input method application, and the input method application executes the input method task indicated by the third invocation instruction. By continuously monitoring the input method status through the adaptation layer components and registered input method plugins, and by continuously calling back lifecycle messages and updating the input method status through the input method application, the compatibility process between cross-platform applications and input method applications can proceed smoothly, and the input method application can always accurately execute input method tasks.

[0159] It is understood that the embodiments of this application can obtain input method information through an abstracted adaptation layer component in cross-platform applications. Moreover, the adaptation layer component can extract features from the input method information to obtain input method identification features that uniquely identify the input method application. If an input method plugin is matched through the input method identification features, the input method plugin can be registered. Since the input method plugin can detect the input method status, when the input method status matches the lifecycle behavior, a first invocation instruction can be generated in the adaptation layer component. The first invocation instruction is then sent to the input method application through the adaptation layer component so that the input method service can execute the input method task according to the first invocation instruction. Since the first invocation command can be generated through the cooperation of the input method plugin and the adaptation layer component, and the input method plugin is matched with the input method application (meaning input method applications on different platforms can register different input method plugins), an accurate first invocation command adapted to the input method application can be generated. This allows the input method application to accurately execute the corresponding input method tasks. Furthermore, the input method application can generate lifecycle messages indicating the execution status of the input method tasks based on the first invocation command and send these lifecycle messages back to the adaptation layer component. The adaptation layer component can then accurately execute interactive tasks for the input method application based on the lifecycle messages. Therefore, it can effectively support cross-platform applications and the interaction between input method applications on multiple different platforms, enhancing the uniformity of adaptation between cross-platform applications and input method applications on multiple different platforms. This allows for compatibility between input method applications on different platforms within cross-platform applications based on the functions provided by different input method plugins, thereby improving the usability of input method applications.

[0160] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 5 As shown, the data processing device includes a transceiver module 1100, a feature extraction module 1200, an instruction generation module 1300, and a task execution module 1400.

[0161] The transceiver module 1100 is used to obtain input method information through the adaptation layer component in a cross-platform application; the input method information is provided by the input method application.

[0162] The feature extraction module 1200 is used to extract features from input method information through the adaptation layer component to obtain the input method identification features corresponding to the input method information. If there is an input method plugin in the plugin set that matches the input method identification features, the matching input method plugin is registered. The module also obtains the input method status corresponding to the input method application through the adaptation layer component and transmits the input method status to the registered input method plugin.

[0163] The instruction generation module 1300 is used to transmit the detection result back to the adaptation layer component through the input method plugin if the input method plugin generates a detection result indicating that the input method state matches the first input method lifecycle behavior. In the adaptation layer component, a first call instruction is generated based on the detection result and the first call instruction is transmitted to the input method service.

[0164] The task execution module 1400 is used to send a first invocation instruction to the input method application through the input method service. In the input method application, a lifecycle message indicating the execution status of the input method task is generated based on the first invocation instruction. The lifecycle message is used to be called back to the adaptation layer component and to instruct the adaptation layer component to perform interactive tasks for the input method application.

[0165] In one possible implementation, the transceiver module 1100 is also used to perform the following operations:

[0166] Create the input method interaction interface corresponding to the input method application; the input method interaction interface contains the common interaction elements corresponding to the input method application.

[0167] An initial adaptation layer component is created in the development platform where the cross-platform application resides, based on the input method interaction interface; the initial adaptation layer component is used to interact with the input method application through the input method interaction interface;

[0168] The application interaction information of cross-platform applications is encapsulated into the initial adaptation layer component to obtain the adaptation layer component; the adaptation layer component is used to interact with cross-platform applications through the application interaction information.

[0169] In one possible implementation, when the transceiver module 1100 obtains input method information through an adaptation layer component in a cross-platform application, it specifically performs the following operations:

[0170] The information retrieval command is transmitted to the input method service through the adaptation layer component in the cross-platform application. The input method service then transmits the information retrieval command to the input method application, which in turn retrieves the input method name, input method version, and operating system information corresponding to the operating system.

[0171] The input method service obtains the input method name, input method version, and operating system information provided by the input method application, and identifies the input method name, input method version, and operating system information as the input method information corresponding to the input method application.

[0172] Input method information is transmitted to the adaptation layer components in cross-platform applications through the input method service.

[0173] In one possible implementation, the feature extraction module 1200 is used to extract features from the input method information through the adaptation layer component. When obtaining the input method identifier features corresponding to the input method information, it is specifically used to perform the following operations:

[0174] The adaptation layer component generates a hash object for input method information, divides the input method information into blocks, obtains H blocks of input method information, and reads the H blocks of input method information in a loop; H is a positive integer.

[0175] When the i-th block of input method information is read in the loop, the i-th block of input method information is submitted to the hash object. The hash value of the (i-1)-th update in the hash object is updated according to the i-th block of input method information to obtain the hash value of the i-th update; i is a positive integer less than or equal to H.

[0176] If i equals H, then the hash value of the i-th update in the hash object is determined as the input method identifier feature corresponding to the input method information.

[0177] In one possible implementation, the feature extraction module 1200 is used to perform the following operations when registering an input method plugin that matches the input method identifier features if there is an input method plugin in the plugin set:

[0178] Obtain the input method plugin information corresponding to one or more input method plugins in the plugin set, extract features from the input method plugin information, and obtain the input method plugin features corresponding to each input method plugin.

[0179] The input method identification feature is compared with the input method plugin feature corresponding to each input method plugin. If there is an input method plugin feature that is the same as the input method identification feature, then the input method plugin corresponding to the input method plugin feature that is the same as the input method identification feature is determined as the input method plugin that matches the input method identification feature.

[0180] Register the matching input method plugin to the adaptation layer component.

[0181] In one possible implementation, the feature extraction module 1200 is also used to perform the following operations:

[0182] If no input method plugin matches the input method identifier in the plugin set, a general input method plugin is obtained from the plugin set and registered. The general input method plugin is used to detect the matching relationship between the input method state obtained by the adaptation layer component and the input method lifecycle behavior configured in the general input method plugin.

[0183] In one possible implementation, the instruction generation module 1300 is also used to perform the following operations:

[0184] If the adaptation layer component detects that the input method state matches the second input method lifecycle behavior configured in the adaptation layer component, then the adaptation layer component generates a second invocation instruction and transmits the second invocation instruction to the input method service.

[0185] The input method service sends a second invocation command to the input method application, and the input method application executes the input method task indicated by the second invocation command.

[0186] In one possible implementation, the task execution module 1400 is also used to perform the following operations:

[0187] Obtain the characters to be displayed generated by the input method application after it has completed the input method task, and transmit the characters to be displayed to the input method service through the input method application;

[0188] The input method service calls back the characters to be displayed to the adaptation layer component, which then transmits them to the cross-platform application. Finally, the cross-platform application renders and displays the characters.

[0189] In one possible implementation, the task execution module 1400 is also used to perform the following operations:

[0190] The input method application transmits lifecycle messages and the updated input method state to the input method service. The input method service then sends the lifecycle messages and the updated input method state back to the adaptation layer component. Finally, the adaptation layer component transmits the lifecycle messages and the updated input method state to the input method plugin.

[0191] If the input method plugin generates an update detection result that indicates the lifecycle message and the updated input method state match the third input method lifecycle behavior, then the update detection result is transmitted back to the adaptation layer component through the input method plugin. In the adaptation layer component, a third invocation instruction is generated based on the update detection result, and the third invocation instruction is transmitted to the input method service.

[0192] The third-party invocation command is sent to the input method application through the input method service.

[0193] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0194] In this embodiment, input method information can be obtained through an abstracted adaptation layer component in cross-platform applications. The adaptation layer component can extract features from the input method information to obtain input method identification features that uniquely identify the input method application. If an input method plugin is matched through the input method identification features, the input method plugin can be registered. Since the input method plugin can detect the input method status, when the input method status matches the lifecycle behavior, a first invocation instruction can be generated in the adaptation layer component. The first invocation instruction is then sent to the input method application through the adaptation layer component so that the input method service can execute the input method task according to the first invocation instruction. Since the first invocation command can be generated through the cooperation of the input method plugin and the adaptation layer component, and the input method plugin is matched with the input method application (meaning input method applications on different platforms can register different input method plugins), an accurate first invocation command adapted to the input method application can be generated. This allows the input method application to accurately execute the corresponding input method tasks. Furthermore, the input method application can generate lifecycle messages indicating the execution status of the input method tasks based on the first invocation command and send these lifecycle messages back to the adaptation layer component. The adaptation layer component can then accurately execute interactive tasks for the input method application based on the lifecycle messages. Therefore, it can effectively support cross-platform applications and the interaction between input method applications on multiple different platforms, enhancing the uniformity of adaptation between cross-platform applications and input method applications on multiple different platforms. This allows for compatibility between input method applications on different platforms within cross-platform applications based on the functions provided by different input method plugins, thereby improving the usability of input method applications.

[0195] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 6 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include an object interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The object interface 1003 may include a display screen and a keyboard; optionally, the object interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the processor 1001. Figure 6As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, an object interface module, and a device control application.

[0196] In such Figure 6 In the computer device 1000 shown, the network interface 1004 can provide network communication elements; the object interface 1003 is mainly used to provide an interface for input to objects; and the processor 1001 can be used to call the device control application stored in the memory 1005.

[0197] When the computer device 1000 is a data processing device, it achieves the following:

[0198] Input method information is obtained through the adaptation layer component in cross-platform applications; the input method information is provided by the input method application.

[0199] The input method information is feature extracted by the adaptation layer component to obtain the input method identification feature corresponding to the input method information. If there is an input method plugin in the plugin set that matches the input method identification feature, the matching input method plugin is registered.

[0200] The system obtains the input method status corresponding to the input method application through the adaptation layer component and transmits the input method status to the registered input method plugin.

[0201] If the input method plugin generates a detection result indicating that the input method state matches the first input method lifecycle behavior, the input method plugin transmits the detection result back to the adaptation layer component. In the adaptation layer component, a first invocation instruction is generated based on the detection result, and the first invocation instruction is transmitted to the input method service.

[0202] The input method service sends a first invocation command to the input method application. In the input method application, a lifecycle message indicating the execution status of the input method task is generated based on the first invocation command. The lifecycle message is used to be called back to the adaptation layer component and to instruct the adaptation layer component to perform interactive tasks for the input method application.

[0203] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 2 , Figure 3 and Figure 4 The description of the data processing method in any corresponding embodiment will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.

[0204] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores a computer program. When the processor executes the computer program, it can execute the foregoing text. Figure 2, Figure 3 and Figure 4 The description of the data processing method in any corresponding embodiment is already provided, and therefore will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application.

[0205] The aforementioned computer-readable storage medium can be an internal storage unit of the data processing apparatus or computer device provided in any of the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been displayed or will be displayed.

[0206] Furthermore, it should be noted that this application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned... Figure 2 , Figure 3 and Figure 4 The method provided in any of the corresponding embodiments.

[0207] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.

[0208] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the foregoing description as a network element. Whether these network elements are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can implement the described network elements using different methods for each specific application, but such implementation should not be considered beyond the scope of this application.

[0209] The methods and related apparatus provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable device, generate instructions for implementing the process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.

[0210] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0211] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0212] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A data processing method, characterized in that, The method includes: Input method information is obtained through an adaptation layer component in a cross-platform application; the input method information is provided by the input method application. The adaptation layer component extracts features from the input method information to obtain the input method identification features corresponding to the input method information. If there is an input method plugin in the plugin set that matches the input method identification features, then the matching input method plugin is registered. The adapter layer component obtains the input method status corresponding to the input method application and transmits the input method status to the registered input method plugin. If the input method plugin generates a detection result indicating that the input method state matches the first input method lifecycle behavior, then the input method plugin transmits the detection result back to the adaptation layer component, and the adaptation layer component generates a first invocation instruction based on the detection result, and transmits the first invocation instruction to the input method service; The input method service sends the first invocation instruction to the input method application. In the input method application, a lifecycle message indicating the execution status of the input method task is generated based on the first invocation instruction. The lifecycle message is used to be called back to the adaptation layer component and to instruct the adaptation layer component to perform an interactive task for the input method application.

2. The method according to claim 1, characterized in that, The method further includes: Create an input method interaction interface corresponding to the input method application; the input method interaction interface includes the general interaction elements corresponding to the input method application. An initial adaptation layer component is created in the development platform where the cross-platform application resides, based on the input method interaction interface; the initial adaptation layer component is used to interact with the input method application through the input method interaction interface; The application interaction information of the cross-platform application is encapsulated into the initial adaptation layer component to obtain the adaptation layer component; the adaptation layer component is used to interact with the cross-platform application through the application interaction information.

3. The method according to claim 1, characterized in that, The process of obtaining input method information through the adaptation layer component in a cross-platform application includes: The information retrieval instruction is transmitted to the input method service through the adaptation layer component in the cross-platform application. The input method service then transmits the information retrieval instruction to the input method application, and the input method name, input method version, and operating system information corresponding to the operating system are retrieved in the input method application. The input method service obtains the input method name, input method version, and operating system information provided by the input method application, and determines the input method name, input method version, and operating system information as the input method information corresponding to the input method application. The input method service transmits the input method information to the adaptation layer component in the cross-platform application.

4. The method according to claim 1, characterized in that, The step of extracting features from the input method information through the adaptation layer component to obtain the input method identifier features corresponding to the input method information includes: The adaptation layer component generates a hash object for the input method information, divides the input method information into blocks to obtain H blocks of input method information, and reads the H blocks of input method information in a loop; H is a positive integer. When the i-th block of input method information is read in the loop, the i-th block of input method information is submitted to the hash object. The hash value of the (i-1)-th update in the hash object is updated according to the i-th block of input method information to obtain the hash value of the i-th update; i is a positive integer less than or equal to H. If i equals H, then the hash value of the i-th update in the hash object is determined as the input method identifier feature corresponding to the input method information.

5. The method according to claim 1, characterized in that, If an input method plugin matching the input method identifier exists in the plugin set, then the matching input method plugin is registered, including: Obtain input method plugin information corresponding to one or more input method plugins in the plugin set, and perform feature extraction on the input method plugin information to obtain input method plugin features corresponding to each input method plugin. The input method identification feature is compared with the input method plugin feature corresponding to each input method plugin. If there is an input method plugin feature that is the same as the input method identification feature, then the input method plugin corresponding to the input method plugin feature that is the same as the input method identification feature is determined as the input method plugin that matches the input method identification feature. Register the matching input method plugin to the adaptation layer component.

6. The method according to claim 1, characterized in that, The method further includes: If there is no input method plugin in the plugin set that matches the input method identifier feature, then a general input method plugin is obtained from the plugin set and registered; the general input method plugin is used to detect the matching relationship between the input method state obtained by the adaptation layer component and the input method lifecycle behavior configured in the general input method plugin.

7. The method according to claim 1, characterized in that, The method further includes: If the adaptation layer component detects that the input method state matches the second input method lifecycle behavior configured in the adaptation layer component, then the adaptation layer component generates a second invocation instruction and transmits the second invocation instruction to the input method service; The input method service sends the second invocation command to the input method application, and the input method application executes the input method task indicated by the second invocation command.

8. The method according to claim 1, characterized in that, The method further includes: The input method application obtains the characters to be displayed generated after completing the input method task, and transmits the characters to be displayed to the input method service through the input method application. The input method service calls back the character to be displayed to the adaptation layer component, the adaptation layer component transmits the character to be displayed to the cross-platform application, and the cross-platform application renders and displays the character.

9. The method according to claim 1, characterized in that, The method further includes: The input method application transmits the lifecycle message and the updated input method state of the input method application to the input method service, the input method service calls back the lifecycle message and the updated input method state to the adaptation layer component, and the adaptation layer component transmits the lifecycle message and the updated input method state to the input method plugin. If the input method plugin generates an update detection result indicating that the lifecycle message and the updated input method state match the third input method lifecycle behavior, then the input method plugin transmits the update detection result back to the adaptation layer component. In the adaptation layer component, a third invocation instruction is generated based on the update detection result, and the third invocation instruction is transmitted to the input method service. The third invocation command is sent to the input method application through the input method service.

10. A data processing apparatus, characterized in that, include: The send / receive module is used to obtain input method information through the adaptation layer components in cross-platform applications; The input method information is provided by the input method application; The feature extraction module is used to extract features from the input method information through the adaptation layer component to obtain the input method identification features corresponding to the input method information. If there is an input method plugin in the plugin set that matches the input method identification features, the matching input method plugin is registered. The module also obtains the input method state corresponding to the input method application through the adaptation layer component and transmits the input method state to the registered input method plugin. The instruction generation module is configured to, if the input method plugin generates a detection result indicating that the input method state matches the first input method lifecycle behavior, transmit the detection result back to the adaptation layer component through the input method plugin, generate a first invocation instruction based on the detection result in the adaptation layer component, and transmit the first invocation instruction to the input method service; The task execution module is used to send the first invocation instruction to the input method application through the input method service. In the input method application, a lifecycle message indicating the execution status of the input method task is generated based on the first invocation instruction. The lifecycle message is used to be called back to the adaptation layer component and to instruct the adaptation layer component to perform an interactive task for the input method application.

11. A computer device, characterized in that, include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication functions, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device executes the method according to any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-9.

13. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium and adapted to be read and executed by a processor so that a computer device having the processor performs the method of any one of claims 1-9.