Keyboard input method and device, electronic equipment, storage medium and program product

By determining the platform adaptation object in the ArkUI framework and adjusting keyboard input information, the problem of incorrect pinyin input status and cursor position in cross-end frameworks is solved, improving the input experience.

CN118585097AInactive Publication Date: 2024-09-03MIDEA GROUP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310577615.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2024-09-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing ArkUI framework cannot be accurately adapted on different platforms, resulting in incorrect pinyin input status and cursor position, resulting in human input errors and poor experience.

Method used

Determine the platform adaptation object through the component layer, send user interaction information to the platform adaptation layer, pop up the keyboard of the platform adaptation object, obtain and adjust keyboard input information, and send it to the rendering layer to ensure the accuracy of pinyin input status and cursor position. show.

Benefits of technology

It realizes the accurate display of Pinyin input status and input range in the UI interface, avoids human input errors, and improves the Pinyin input experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585097A
    Figure CN118585097A
Patent Text Reader

Abstract

The invention provides a keyboard input method and device, electronic equipment, a readable storage medium and a program product. The method comprises the steps that a component layer determines a platform adaptation object, and user interaction information is sent to a platform adaptation layer corresponding to the platform adaptation object; and the platform adaptation layer bounces a keyboard corresponding to the platform adaptation object, obtains keyboard input information, adjusts the keyboard input information based on the user interaction information, and sends the adjusted keyboard input information to the rendering layer. In the mode, the platform adaptive object can be accurately determined, the pinyin input state and the input range can be displayed on the UI interface, the cursor position is accurate, human errors caused by input are avoided, and the pinyin input experience is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of keyboard technology, and in particular to a keyboard input method, device, electronic device, readable storage medium and program product. Background Art

[0002] With the continuous development of large front-end unified technology, one-time development to meet all scenarios is an inevitable trend. MiniX framework, as an ArkUI (Ark Development) framework based on OpenHarmony (Hongmeng), is suitable for cross-end application development of IoT (Internet of Things). It is a front-end framework that can use JS (JavaScript) language, TS (TypeScript) language and modern popular front-end framework. You can use a set of code to build Android (Android), iOS (iPhoneOS) and OpenHarmony applications.

[0003] However, the existing ArkUI framework cannot accurately adapt to different platforms, which can easily lead to human input errors and a poor pinyin input experience. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a keyboard input method, device, electronic device, readable storage medium and program product, which can accurately determine the platform adaptation object, display the pinyin input status and input range in the UI (User Interface) interface, and accurately position the cursor, without input human errors, and provide a better pinyin input experience.

[0005] In a first aspect, an embodiment of the present invention provides a keyboard input method, the method comprising: the component layer determines a platform adaptation object, and sends user interaction information to a platform adaptation layer corresponding to the platform adaptation object; the platform adaptation layer pops up a keyboard corresponding to the platform adaptation object, obtains keyboard input information, adjusts the keyboard input information based on the user interaction information, and sends the adjusted keyboard input information to the rendering layer.

[0006] In an optional embodiment of the present application, the above-mentioned user interaction information includes: cursor area, pinyin area, keyboard type and keyboard operation type.

[0007] In an optional embodiment of the present application, the step of determining the platform adaptation object by the component layer includes: the component layer obtains the registered platform when the client is started, and uses the registered platform as the platform adaptation object.

[0008] In an optional embodiment of the present application, the step of the platform adaptation layer popping up a keyboard corresponding to the platform adaptation object includes: the platform adaptation layer calling a system interface of the platform adaptation object to pop up a keyboard corresponding to the platform adaptation object.

[0009] In an optional embodiment of the present application, the above-mentioned keyboard input information includes: a replacement area; the step of adjusting the keyboard input information based on user interaction information includes: determining the intersection of the replacement area and the cursor area; adjusting the starting position and text length of the cursor area based on the starting position and text length of the intersection.

[0010] In an optional embodiment of the present application, the above-mentioned step of sending the adjusted keyboard input information to the rendering layer includes: the platform adaptation layer sends the adjusted keyboard input information to the input box component of the component layer; the component layer marks the input box component as redrawn; the component layer responds to the image synchronization signal, and sends the keyboard input information in the input box component marked as redrawn to the rendering layer.

[0011] In an optional embodiment of the present application, after the step of sending the adjusted keyboard input information to the rendering layer, the method further includes: the rendering layer generates image data based on the adjusted keyboard input information data to display the image data on the screen.

[0012] In an optional embodiment of the present application, the step of the rendering layer generating image data based on the adjusted keyboard input information data includes: the rendering layer generates image data based on the current context, position and text information represented by the adjusted keyboard input information.

[0013] In an optional embodiment of the present application, before the step of determining the platform adaptation object in the component layer, the method further includes: the front-end interface responds to the user's input operation of clicking the text box, and sends the user interaction information to the component layer.

[0014] In the second aspect, an embodiment of the present invention also provides a keyboard input device, which includes: a platform adaptation object determination module, which is used for the component layer to determine the platform adaptation object and send user interaction information to the platform adaptation layer corresponding to the platform adaptation object; a keyboard input information adjustment module, which is used for the platform adaptation layer to pop up the keyboard corresponding to the platform adaptation object, obtain keyboard input information, adjust the keyboard input information based on the user interaction information, and send the adjusted keyboard input information to the rendering layer.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the above-mentioned keyboard input method.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned keyboard input method.

[0017] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, characterized in that the computer program / instruction implements the steps of the above-mentioned keyboard input method when executed by a processor.

[0018] The embodiments of the present invention bring the following beneficial effects:

[0019] The embodiments of the present invention provide a keyboard input method, device, electronic device, readable storage medium and program product. The component layer determines the platform adapter object and sends the user interaction information to the platform adapter layer corresponding to the platform adapter object; the platform adapter layer pops up the keyboard corresponding to the platform adapter object, obtains the keyboard input information, adjusts the keyboard input information based on the user interaction information, and sends the adjusted keyboard input information to the rendering layer. In this way, the platform adapter object can be accurately determined, the pinyin input status and input range are displayed on the UI interface, the cursor position is accurate, no human input errors will occur, and the pinyin input experience is better.

[0020] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0021] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A flowchart of a keyboard input method provided by an embodiment of the present invention;

[0024] Figure 2 A flowchart of another keyboard input method provided by an embodiment of the present invention;

[0025] Figure 3 A schematic diagram of a keyboard input method provided by an embodiment of the present invention;

[0026] Figure 4 A schematic diagram of the structure of a keyboard input device provided by an embodiment of the present invention;

[0027] Figure 5A schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0029] Currently, with the continuous development of the unified big front-end technology, it is an inevitable trend to develop once to meet the full-scenario usage. As an ArkUI framework based on OpenHarmony, the MiniX framework is suitable for cross-terminal application development of IoT. It is a front-end framework that can use JS language, TS language, and modern popular ones, and can use a set of codes to build applications for Android, iOS, and OpenHarmony.

[0030] Each time a user inputs pinyin, they need to first draw letters and then draw characters, and the letters need to be replaced with characters during the input process. For example: when inputting, the interface first displays the pinyin "yiersan", and then displays the characters "一二三". At this time, there may be a situation of character splicing according to the user's needs. For example: it can display "一ersan" or "一二san".

[0031] When the existing ArkUI framework inputs information, it needs to extract the information in the keyboard interface and submit this information to the rendering engine for drawing and display. However, the processing logics of different platforms are different, and the existing ArkUI framework cannot accurately adapt to different platforms, which will cause the UI interface to be unable to display the pinyin input state and input range, and the cursor position is disordered, easily causing input errors by users and a poor pinyin input experience.

[0032] Based on this, an embodiment of the present invention provides a keyboard input method, device, electronic device, readable storage medium, and program product. Aiming at the defects of pinyin input in the cross-terminal framework in the prior art, an embodiment of the present invention specifically provides a pinyin input drawing method for the OpenHarmony ArkUI cross-terminal framework. This method can be applied to the cross-terminal framework to realize the drawing of letter-associated characters, and solves the problems of the inability to display the pinyin input state and input range, and the cursor position disorder in pinyin input in the cross-terminal framework.

[0033] To facilitate the understanding of this embodiment, a keyboard input method disclosed in an embodiment of the present invention will be introduced in detail first.

[0034] Embodiment 1:

[0035] The embodiment of the present invention provides a keyboard input method, see Figure 1 A flowchart of a keyboard input method is shown, the keyboard input method comprises the following steps:

[0036] Step S102: the component layer determines a platform adaptation object and sends the user interaction information to the platform adaptation layer corresponding to the platform adaptation object.

[0037] In this embodiment, it can be divided into a front end and a client end. Among them, the front end and the client end belong to different functional groups, the front end is responsible for development, and the client end is responsible for parsing and rendering.

[0038] Among them, the user interaction information can represent the cursor area, pinyin area and other contents. The component layer can include multiple platform adapter objects, such as Android, iOS, OpenHarmony and Linux. In this embodiment, each platform adapter object has different processing logic for keyboard input. Therefore, the component layer in this embodiment can determine the appropriate platform adapter object and send the user interaction information to the platform adapter layer corresponding to the platform adapter object.

[0039] Step S104: the platform adaptation layer pops up a keyboard corresponding to the platform adaptation object, obtains keyboard input information, adjusts the keyboard input information based on the user interaction information, and sends the adjusted keyboard input information to the rendering layer.

[0040] After determining the platform adaptation object, the platform adaptation layer can pop up the keyboard corresponding to the platform adaptation object, obtain keyboard input information entered by the user through the keyboard, adjust the above keyboard input information based on the user interaction information transmitted by the component layer, and send the adjusted keyboard input information to the rendering layer.

[0041] The rendering layer in this embodiment can generate image data according to the adjusted keyboard input information, that is, redraw the image data, and then send the image data to the screen for rendering and display.

[0042] The embodiment of the present invention provides a keyboard input method, in which the component layer determines the platform adapter object, and sends the user interaction information to the platform adapter layer corresponding to the platform adapter object; the platform adapter layer pops up the keyboard corresponding to the platform adapter object, obtains the keyboard input information, adjusts the keyboard input information based on the user interaction information, and sends the adjusted keyboard input information to the rendering layer. In this way, the platform adapter object can be accurately determined, the pinyin input status and input range are displayed on the UI interface, and the cursor position is accurate, there will be no input human errors, and the pinyin input experience is better.

[0043] Embodiment 2:

[0044] This embodiment provides another keyboard input method, which is implemented on the basis of the above embodiment. Figure 2 The flowchart of another keyboard input method is shown in FIG. 1 . The keyboard input method in this embodiment includes the following steps:

[0045] Step S202: the front-end interface responds to the user's input operation of clicking the text box and sends the user interaction information to the component layer.

[0046] The front-end interface may display a text box, and the user may perform an input operation by clicking the text box. The front-end interface responds to the user's input operation by clicking the text box, and may transmit the user interaction information to the component layer through the interpretation engine.

[0047] This embodiment provides a method for drawing pinyin letter-associated text in a pinyin input method application on an OpenHarmony ArkUI cross-terminal framework, which can display the input status and pinyin letter range during the input process, and automatically correct the input cursor position when replacing or deleting text.

[0048] See also Figure 3 As shown is a schematic diagram of a keyboard input method, a user can click a text box on the front-end interface to initiate an input operation, and the front-end interpretation engine can trigger an event call to send user interaction information to the text box binding component of the component layer.

[0049] Specifically, the interaction information in this embodiment may include: cursor area, pinyin area, keyboard type and keyboard operation type.

[0050] The front-end interface can transmit the cursor area section (base, extend), pinyin area compose (base, extend), keyboard type (inputType), and keyboard operation type (actionType) data that interact with the user to the engine component layer.

[0051] Among them, base is the starting position, such as 0 for the first input. Extend is the end position, such as 7 for inputting yiersan. The keyboard type is used to indicate what type of keyboard the user needs to call, such as: 26-key keyboard, 9-key keyboard, Roman alphabet keyboard, English keyboard, Pinyin keyboard, etc. The keyboard operation type is used to indicate the operation the user wants to perform, such as: search, complete input, etc.

[0052] Step S204: the component layer determines the platform adaptation object and sends the user interaction information to the platform adaptation layer corresponding to the platform adaptation object.

[0053] Specifically, the component layer in this embodiment obtains the registration platform when the client is started, and uses the registration platform as the platform adaptation object.

[0054] like Figure 3 As shown, the component layer can obtain the platform adapter object and send user interaction information to the platform adapter object. The component layer can query and obtain the registered platform when the client is started, and transmit the user interaction information received from the front end to the platform adapter layer corresponding to the platform adapter object.

[0055] Step S206: the platform adaptation layer pops up the keyboard corresponding to the platform adaptation object, obtains keyboard input information, adjusts the keyboard input information based on the user interaction information, and sends the adjusted keyboard input information to the rendering layer.

[0056] Specifically, the platform adaptation layer in this embodiment can call the system interface of the platform adaptation object to pop up the keyboard corresponding to the platform adaptation object.

[0057] like Figure 3 As shown, the platform adaptation layer can pop up a keyboard, obtain keyboard input information, and adjust the keyboard input information according to user interaction information.

[0058] In this embodiment, data can be set to the keyboard processing object in the keyboard pop-up (Show) method of the platform adapter object, and the keyboard processing object calls the system API (Application Programming Interface) to pop up the keyboard. Among them, the function of the Show method is to display the keyboard, that is, when the user enters text in the input box, a keyboard will pop up from the bottom.

[0059] Specifically, the keyboard input information in this embodiment includes: a replacement area; this embodiment can determine the intersection of the replacement area and the cursor area; and adjust the starting position and text length of the cursor area based on the starting position and text length of the intersection.

[0060] When inputting pinyin text with the keyboard, you can first get the text or letters in the replacement area (replaceRange) in the API, and then determine whether the replacement area (replaceRange) and the cursor area (selectRange) have an intersection.

[0061] If the replacement area (replaceRange) and the cursor area (selectRange) have an intersection, the starting position (location) of the cursor area (selectRange) can be replaced with the sum of the starting position (location) of the cursor area (selectRange) and the starting position (location) of the intersection, and the text length (length) of the cursor area (selectRange) can also be replaced with the sum of the text length (length) of the cursor area (selectRange) and the text length (length) of the intersection. Finally, the cursor area (selectRange) and the replacement area (replaceRange) are converted into the form of cursor area section (base, extend) and replacement area compose (base, extend) respectively.

[0062] After adjusting the keyboard input information, the platform adaptation layer in this embodiment can send the adjusted keyboard input information to the rendering layer. Specifically, the platform adaptation layer in this embodiment sends the adjusted keyboard input information to the input box component of the component layer; the component layer marks the input box component as redrawing; the component layer responds to the image synchronization signal and sends the keyboard input information in the input box component marked as redrawing to the rendering layer.

[0063] like Figure 3 As shown, the platform adaptation layer sends the adjusted keyboard input information to the component layer. The component layer saves the keyboard input information and marks the input box component as being redrawn.

[0064] The platform adaptation layer can transmit the adjusted cursor area section (base, extend) and replacement area compose (base, extend) as keyboard input information to the input box (textfield) component of the component layer, save the keyboard input information in the selection object and compose object of the component layer, and mark the textfield component as redrawn.

[0065] like Figure 3 As shown, the component layer can respond to the Vsync synchronization signal and send the keyboard input information in the input box component marked as redrawn to the rendering layer.

[0066] The component layer in this embodiment can receive a synchronization signal, convert the cursor area section (base, extend) into cursorRect (right, top, left, bottom), and generate a color boxes set according to the replacement area compose (base, extend). The object attribute in the boxes set can be composeRect (right, top, left, bottom).

[0067] Step S208: the rendering layer generates image data based on the adjusted keyboard input information data to display the image data on the screen.

[0068] like Figure 3 As shown, the rendering layer in this embodiment can redraw the component. Specifically, the rendering layer in this embodiment can generate image data based on the current context, position and text information represented by the adjusted keyboard input information.

[0069] The rendering layer in this embodiment can call the drawing graphics (drawRect) method to generate image data according to the current context, position and text information, and then send the image data to the screen for rendering and display. Among them, the drawRect method function is to draw graphics, and can draw image data according to the current context, position (Rect) and text information. The image data can be composed of pixel data in the image format of Bitmap.

[0070] The above method provided by the embodiment of the present invention specifically provides a method for drawing pinyin letter associated text when a pinyin input method is applied to the OpenHarmonyArkUI cross-end framework, which can increase the friendliness of cross-end framework interaction, meet the needs of most users, and solve the problems of the inability to display the pinyin input status and input range, and the disordered cursor position in the cross-end framework pinyin input.

[0071] Embodiment three:

[0072] Corresponding to the above method embodiment, the present invention provides a keyboard input device, see Figure 4 A schematic diagram of the structure of a keyboard input device is shown, the keyboard input device comprising:

[0073] The platform adaptation object determination module 41 is used for determining the platform adaptation object at the component layer and sending the user interaction information to the platform adaptation layer corresponding to the platform adaptation object;

[0074] The keyboard input information adjustment module 42 is used for the platform adaptation layer to pop up the keyboard corresponding to the platform adaptation object, obtain keyboard input information, adjust the keyboard input information based on the user interaction information, and send the adjusted keyboard input information to the rendering layer.

[0075] The embodiment of the present invention provides a keyboard input device, wherein the component layer determines a platform adapter object, and sends user interaction information to the platform adapter layer corresponding to the platform adapter object; the platform adapter layer pops up the keyboard corresponding to the platform adapter object, obtains keyboard input information, adjusts the keyboard input information based on the user interaction information, and sends the adjusted keyboard input information to the rendering layer. In this way, the platform adapter object can be accurately determined, the pinyin input status and input range are accurately displayed on the UI interface, and the cursor position is accurate, and input human errors will not occur, and the pinyin input experience is better.

[0076] The above user interaction information includes: cursor area, pinyin area, keyboard type and keyboard operation type.

[0077] The platform adapter object determination module is used in the component layer to obtain the registered platform when the client is started, and use the registered platform as the platform adapter object.

[0078] The keyboard input information adjustment module is used by the platform adaptation layer to call the system interface of the platform adaptation object and pop up the keyboard corresponding to the platform adaptation object.

[0079] The keyboard input information includes: a replacement area; the keyboard input information adjustment module is used to determine the intersection of the replacement area and the cursor area; and adjust the starting position and the text length of the cursor area based on the starting position and the text length of the intersection.

[0080] The above-mentioned keyboard input information adjustment module is used for the platform adaptation layer to send the adjusted keyboard input information to the input box component of the component layer; the component layer will mark the input box component as redrawn; the component layer responds to the image synchronization signal and sends the keyboard input information in the input box component marked as redrawn to the rendering layer.

[0081] The above-mentioned device comprises: an image data generating module, which is used for the rendering layer to generate image data based on the adjusted keyboard input information data, so as to display the image data on the screen.

[0082] The image data generation module is used for the rendering layer to generate image data based on the current context, position and text information represented by the adjusted keyboard input information.

[0083] The above-mentioned device also includes a user interaction information sending module, which is used for the front-end interface to respond to the input operation of the user clicking the text box and send the user interaction information to the component layer.

[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the keyboard input device described above can refer to the corresponding process in the aforementioned embodiment of the keyboard input method, and will not be repeated here.

[0085] Embodiment 4:

[0086] The embodiment of the present invention also provides an electronic device for executing the above keyboard input method; see Figure 5 A structural schematic diagram of an electronic device is shown, which includes a memory 100 and a processor 101, wherein the memory 100 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 101 to implement the above-mentioned keyboard input method.

[0087] Further, Figure 5 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .

[0088] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0089] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.

[0090] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned keyboard input method. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0091] The keyboard input method, device, electronic device, readable storage medium and computer program product of the program product provided in the embodiments of the present invention include computer programs / instructions. When the computer programs / instructions are executed by the processor, the methods in the previous method embodiments can be implemented. The specific implementation can be found in the method embodiments and will not be repeated here.

[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and / or device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0093] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0094] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0095] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0096] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A keyboard input method, characterized in that: The method comprises: The component layer determines the platform adaptation object and sends the user interaction information to the platform adaptation layer corresponding to the platform adaptation object; The platform adaptation layer pops up a keyboard corresponding to the platform adaptation object, obtains keyboard input information, adjusts the keyboard input information based on the user interaction information, and sends the adjusted keyboard input information to the rendering layer.

2. The method according to claim 1, characterized in that The user interaction information includes at least any one of the following: cursor area, pinyin area, keyboard type or keyboard operation type.

3. The method according to claim 1 or 2, characterized in that: The steps for the component layer to determine the platform adapter object include: The component layer obtains the registered platform when the client is started, and uses the registered platform as a platform adaptation object.

4. The method according to any one of claims 1 to 3, characterized in that: The step of the platform adaptation layer popping up a keyboard corresponding to the platform adaptation object includes: The platform adaptation layer calls the system interface of the platform adaptation object and pops up a keyboard corresponding to the platform adaptation object.

5. The method according to claim 2, characterized in that: The keyboard input information includes: a replacement area; and a step of adjusting the keyboard input information based on the user interaction information includes: Determine the intersection of the replacement area and the cursor area; The starting position and the length of the text in the cursor area are adjusted based on the starting position and the length of the text in the intersection.

6. The method according to any one of claims 1 to 5, characterized in that: The step of sending the adjusted keyboard input information to the rendering layer includes: The platform adaptation layer sends the adjusted keyboard input information to the input box component of the component layer; The component layer marks the input box component as being to be redrawn; The component layer responds to the image synchronization signal and sends the keyboard input information in the input box component marked as being redrawn to the rendering layer.

7. The method according to any one of claims 1 to 6, characterized in that: After the step of sending the adjusted keyboard input information to the rendering layer, the method further includes: The rendering layer generates image data based on the adjusted keyboard input information data to display the image data on a screen.

8. The method according to claim 7, characterized in that The step of generating image data based on the adjusted keyboard input information data by the rendering layer comprises: The rendering layer generates image data based on the adjusted current context, position and text information represented by the keyboard input information.

9. The method according to any one of claims 1 to 8, characterized in that: Before the step of determining the platform adaptation object at the component layer, the method further includes: The front-end interface responds to the user's input operation of clicking the text box and sends the user interaction information to the component layer.

10. A keyboard input device, characterized in that: The device comprises: A platform adaptation object determination module is used for determining the platform adaptation object at the component layer and sending the user interaction information to the platform adaptation layer corresponding to the platform adaptation object; The keyboard input information adjustment module is used for the platform adaptation layer to pop up the keyboard corresponding to the platform adaptation object, obtain keyboard input information, adjust the keyboard input information based on the user interaction information, and send the adjusted keyboard input information to the rendering layer.

11. An electronic device, characterized in that: The keyboard input method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the keyboard input method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the keyboard input method according to any one of claims 1 to 9.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the keyboard input method according to any one of claims 1 to 9 are implemented.