Data insertion method and device and electronic equipment

By monitoring key messages in the input method and sending them to the target model for retrieval, the results are directly inserted into the cursor position, which solves the problem of single function of the input method, improves user input experience and efficiency, and meets diversified needs.

CN118585074APending Publication Date: 2024-09-03DINGDAO ZHILIAN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410780572.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

The existing input method has a single function and cannot meet the diverse application needs of users. Users need to frequently switch to other tools to search for information when inputting, resulting in low input efficiency.

Method used

By monitoring the key messages in the target window, the preset wake-up characters and end characters are used to identify the information entered by the user, and send it to the target model for retrieval, and the returned results are directly inserted into the cursor position.

Benefits of technology

It improves the user input experience and efficiency. Users can directly ask questions or needs in the input method, obtain relevant information, meet diversified functional requirements, and reduce the steps of manual input and switching tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585074A
    Figure CN118585074A
Patent Text Reader

Abstract

The embodiment of the invention discloses a data insertion method and device and electronic equipment. The method comprises the following steps: monitoring a current key message input under a target input method in a target window; when the content of the current key message is a preset wake-up character, starting to record input information obtained by converting the input key message by the target input method, and stopping until the content of the key message is monitored to be a preset end character; taking input information obtained by converting the key message input by the target input method recorded this time as first input information; sending the first input information to the target model; receiving second input information returned by the target model in response to the content of the first input information; and inserting the second input information into the current cursor position in the target window. Related data can be automatically obtained and inserted at the cursor position of the current window according to the question / demand input by the user in the input method, and the input efficiency of the user can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer input methods, and in particular to a data insertion method, device and electronic equipment. Background Art

[0002] As an important part of the operating system, the input method plays a vital role between the user and the computer. It is a bridge for communication between the computer and the user, and directly affects the user's input efficiency and experience. At present, the input method can only realize the conversion and output of the first information input by the user into the second information (such as pinyin) according to the preset encoding method, or provide some simple emoticons. However, the current input method cannot solve the specific problems or needs raised by the user. For example, when the current user is inputting an introduction article about Beijing through the input method, the current input method cannot provide the user with answers to questions such as "What are the current scenic spots in city A?" When the user needs to input relevant information about the question during the use of the input method, he can only search and obtain the corresponding information in other large models with problem-solving functions (such as browsers or some problem-solving APPs), and enter it in the input method through traditional manual input, which is time-consuming and laborious. Obviously, the functions of the current input method are relatively single and cannot meet the diversified needs of users for application functions. Summary of the invention

[0003] In view of this, the embodiments of the present invention provide a data insertion method, device and electronic device to solve the problem that the existing input method has relatively single functions and cannot meet the user's diversified needs for application functions.

[0004] In a first aspect, an embodiment of the present invention provides a data insertion method for a target input method, the method comprising: Monitor the current key messages entered in the target window under the target input method; When the content of the current key message is monitored to be a preset wake-up character, the input information converted by the target input method from the current key message is recorded until the content of the key message is monitored to be a preset end character; The input information obtained by converting the key message input by the target input method between the wake-up character and the end character recorded this time is used as the first input information; wherein the first input information includes the content to be retrieved / the problem to be solved; Sending the first input information to a target model so that the target model retrieves corresponding content / solves corresponding problems; receiving second input information returned by the target model in response to the content of the first input information; The second input information is inserted into the target window at the current cursor position.

[0005] In combination with the first aspect, in a first implementation of the first aspect, after the current key message input in the target input method in the monitoring target window, the method further includes: If the content of the current key message is not the preset wake-up character, the input information obtained by the target input method from converting the input key message is output in real time at the current cursor position in the target window.

[0006] In combination with the first aspect, in a second implementation of the first aspect, before the current key message to be input in the monitoring target window, the method further includes: The target input method is pre-registered in the target window environment so that the target input method can act as a proxy for keyboard input events in the target window.

[0007] In combination with the first aspect, in a third implementation of the first aspect, the target window is one of GTK, QT and X windows; and / or The target input method is an input method based on the Fcitx framework.

[0008] In combination with the first aspect, in a fourth implementation of the first aspect, when there are multiple target models, inserting the second input information into the current cursor position in the target window includes: Using multiple input information returned by multiple target models as multiple target candidate input information; Displaying multiple target candidate input information and receiving a user's selection of one target candidate input information from the multiple target candidate input information; The currently selected target candidate input information is inserted as the second input information at the current cursor position in the target window.

[0009] In combination with the first aspect, in a fifth implementation of the first aspect, there are multiple target models, and a label is pre-set and stored for each target model; Before sending the first input information to the target model, the method further includes: extracting keywords from the first input information; Match the currently extracted keywords with the labels of each target model according to their semantic similarity; The first input information is sent to the target model corresponding to the tag having the highest semantic similarity matching value with the currently extracted keyword.

[0010] In a second aspect, an embodiment of the present invention provides a data insertion device, including: A key message monitoring module is used to monitor the current key message inputted in the target window under the target input method; A recording module, configured to record input information converted from the input key message by the target input method starting from the current key message when the key message monitoring module monitors that the content of the current key message is a preset wake-up character, and stop when the key message monitoring module monitors that the content of the key message is a preset end character; A determination module, used to convert the input information obtained by the key message input by the target input method between the wake-up character and the end character recorded by the recording module this time into the first input information; wherein the first input information includes the content to be retrieved / the problem to be solved; A sending module, used for sending the first input information to a target model, so that the target model retrieves corresponding content / solves corresponding problems; A receiving module, configured to receive second input information returned by the target model in response to the content of the first input information; The inserting module is used to insert the second input information into the current cursor position in the target window.

[0011] In combination with the second aspect, in the first implementation of the second aspect, the insertion module is also used to output the input information obtained by converting the input key message by the target input method in real time at the current cursor position in the target window when the content of the current key message monitored by the key message monitoring module is not a preset wake-up character.

[0012] In combination with the second aspect, in a second implementation of the second aspect, when there are multiple target models, the insertion module includes: A candidate unit, used to use multiple pieces of input information returned by multiple target models as multiple pieces of target candidate input information; A selection unit, used to display multiple target candidate input information and receive a user's selection of one target candidate input information from the multiple target candidate input information; The inserting unit is used to insert the currently selected target candidate input information as the second input information into the current cursor position in the target window.

[0013] In combination with the second aspect, in a third implementation of the second aspect, there are multiple target models, and a label is pre-set and stored for each target model; The device also includes: An extraction module, used to extract keywords from the first input information; The matching module is used to match the currently extracted keywords with the labels of each target model according to their semantic similarity; The sending module is specifically used to send the first input information to the target model corresponding to the tag with the highest semantic similarity matching value with the currently extracted keyword.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside a space enclosed by the housing, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the data insertion method described in any of the aforementioned embodiments.

[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the data insertion method described in any of the aforementioned embodiments.

[0016] A data insertion scheme provided by an embodiment of the present invention monitors key messages in a target window, and based on a preset wake-up character and an end character, obtains the first input information corresponding to the user input information between the wake-up character and the end character and sends it to a target model, so that the target model responds to the content of the first input information input by the local user, retrieves the corresponding content / solves the corresponding problem and returns the second input information, and finally directly inserts the second input information into the current cursor position in the target window. The present invention can directly call the target model (local or remote) to obtain relevant information based on the user's input, and automatically insert the information returned by the target model into the current cursor position, which can achieve the following beneficial effects: 1. It can improve the user input experience. When users encounter problems, they no longer need to open browsers or other target models to search. Users no longer need to manually enter information related to the problem, which improves user input efficiency. Users can ask questions or requests to the target model at any time at the cursor location, and improve their input based on the target model's answers, which can meet users' diverse needs for application functions.

[0017] 2. Improve user work efficiency. No need to copy and paste certain content from other places to the current target window. You can directly generate the required data and automatically insert it at the cursor position.

[0018] 3. High compatibility. This method is applicable to all input methods based on the Fcitx framework, such as Sogou, iFlytek, Baidu, etc. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 A flow chart of a first embodiment of a data insertion method provided by the present invention; Figure 2 The process of the second embodiment of the data insertion method provided by the present invention; Figure 3 A flow chart of an application method of the data insertion method provided by the present invention; Figure 4 A schematic diagram of the structure of a data insertion device according to a first embodiment of the present invention; Figure 5 A schematic diagram of the structure of a second embodiment of a data insertion device provided by the present invention; Figure 6 A schematic diagram of the structure of a third embodiment of a data insertion device provided by the present invention; Figure 7 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION

[0021] A data insertion solution according to an embodiment of the present invention is described in detail below with reference to the accompanying drawings.

[0022] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] Figure 1 This is a flow chart of Embodiment 1 of the data insertion method provided by the present invention, as shown in FIG. Figure 1 As shown, the method of this embodiment may include: Step S1: monitoring the current key message inputted in the target input method in the target window.

[0024] Preferably, before step 1 is performed, the target input method may be pre-registered in the target window environment so that the target input method can proxy keyboard input events in the target window.

[0025] Preferably, the target input method is an input method based on the Free Chinese Input Toy for X (Fcitx) framework.

[0026] Preferably, the target window is a graphical window of the operating system, especially one of GTK, QT and X windows. For example, the target window can be a GTK window, QT window or X window in which the user is currently editing text. Here, the target window does not refer to the editing window of the target input method itself.

[0027] In this embodiment, a target input method based on the Fcitx framework is registered in different architecture window environments, and the desktop window program transmits keyboard events to the Fcitx agent, so that the target input method can monitor the key messages in the window in the first place.

[0028] Step S2: When the content of the current key message is monitored to be a preset wake-up character, the input information obtained by the target input method from the current key message is recorded until the content of the key message is monitored to be a preset end character.

[0029] In this embodiment, when the user inputs any character by pressing a key in the target input method in the target window, the target input method monitors the key message and first determines whether the character currently input by the key is a preset wake-up character. If so, it starts to record the input information obtained by the target input method from the current key message in real time until the content of the key message is monitored to be the preset end character.

[0030] Among them, the input information obtained by the target input method from converting the input key message can be text information such as Chinese, English, Japanese, etc., or character information such as ordinary characters, special characters, etc., or information in the form of a string such as a URL. In the embodiment of the present invention, the input information is a general term for any form of information that can be input through the target input method.

[0031] Step S3: converting the key message input by the target input method between the wake-up character and the end character recorded this time into the input information as the first input information; The first input information includes content to be retrieved / problems to be solved.

[0032] For example, the user enters the preset wake-up character "=" through the keyboard, and the target input method captures the wake-up character. The content entered by the user will be saved until the user enters the preset end character "=" and the input ends. Step 3 determines the information entered by the user in the target input method between the wake-up character and the end character as the first input information of this time.

[0033] Step S4: Send the first input information to the target model so that the target model retrieves corresponding content / solves corresponding problems.

[0034] In this embodiment, the target model refers to a model that can perform corresponding search operations or problem-solving operations based on input content, such as search keywords and problems to be solved, and output information that meets the content requirements of the input target model. Among them, for the problems to be solved, the target model can use matching search to perform matching searches in its own database, or the target model can also be a problem-solving model that has been pre-trained by machine learning methods, such as a translation model, a calculation model, etc., which can solve problems according to input conditions and give answers to problems. For example, the first input information can be "What delicacies are there in Beijing", and the target model can return information such as "Beijing delicacies include Beijing roast duck, old Beijing fried noodles, etc." based on the first input information input; or the first input information can also be "The full English name of Peking University", then the target model is a model with translation function, and the target model returns "Peking University".

[0035] Step S5: receiving second input information returned by the target model in response to the content of the first input information.

[0036] Step S6: inserting the second input information into the current cursor position in the target window.

[0037] In this embodiment, the second input information returned by the target model in response to the content of the first input information is directly inserted at the current cursor position in the target window, thereby realizing the function of automatically obtaining relevant data based on the question / requirement input by the user and automatically inserting it into the cursor position in the current window without manual input. The user no longer needs to separately search for the target model, search for answers to questions, and manually enter data, which can improve the input efficiency of the user when using the input method to edit.

[0038] Figure 2 This is a flow chart of Embodiment 2 of the data insertion method provided by the present invention, as shown in FIG. Figure 2 As shown, the method of this embodiment may include: Step 101: monitor the current key message input in the target window under the target input method.

[0039] In this embodiment, the implementation process of step 101 is similar to step 1 of the above method embodiment, and will not be repeated here.

[0040] Step 102 , determine whether the content of the current key message is a preset wake-up character, if so, execute step 103 , otherwise, execute step 109 .

[0041] In this embodiment, when the user inputs any character by pressing a key in the target input method in the target window, the target input method monitors the key message and first determines whether the character currently input by the key is a preset wake-up character. If so, step 103 is executed to enter the data insertion process of the input method.

[0042] For example, the wake-up character may be preset as "=", and when it is monitored that the content of the key message input by the user in the target window is the character "=", step 103 is executed.

[0043] Step 103, recording in real time the input information obtained by the target input method from converting the input key message; In this embodiment, the process of converting the input key message to obtain input information by the target input method may include the following steps A1-A2: Step A1: Process the current key message according to the conversion mode of the target input method to obtain a plurality of first candidate input information corresponding to the current key message; When the user types on the keyboard, the keystroke messages are passed to the manager of the target input method, and the input method manager passes these messages to the input method editor IME, which processes these messages and converts them into text. For example, when a user enters the pinyin input information "yumi" through the keyboard in a Chinese input method, the Chinese input method converts it and obtains multiple first candidate input information corresponding to "yumi": 1. corn; 2. surplus rice; 3. fish rice; 4. fish paste...

[0044] Step A2: displaying a plurality of first candidate input information, receiving a user's selection of one of the plurality of first candidate input information, and outputting the currently selected first candidate input information; For example, the above Chinese input method displays multiple first candidate input information in the floating window of the input method: 1. corn; 2. surplus rice; 3. fish and rice; 4. fish paste...; when the user selects one of the first candidate input information through the input device, for example, when "corn" is selected, "corn" is output as the result.

[0045] Step 104 , determining whether the content of the current key message is a preset end character, if so, executing step 105 , otherwise, returning to executing step 103 .

[0046] Step 105: The input information obtained by converting the key message input by the target input method between the wake-up character and the end character recorded this time is used as the first input information, wherein the first input information includes the content to be retrieved / the problem to be solved.

[0047] In this embodiment, when the user inputs the wake-up character, the result of the content input by the user through the keyboard after being processed by the target input method will be recorded and saved by Fcitx. Then, when the end character is monitored, the input ends, and Fcitx gives the content obtained by the target input method between the wake-up character and the end character as the first input information to the target model, waiting for the return data of the target model. Among them, the first input information includes the content to be retrieved / the problem to be solved, that is, the content that the local user currently wants to retrieve through the target model or the problem that he wants to solve through the target model. For example, the user can enter keywords such as "Beijing" and "food" as the first input information. If the target model is a browser, the browser will search for the two keywords "Beijing" and "food"; or, the first input information input by the user can be "19993×586÷7", and the target model is a calculator application, then the target model can return the result of the calculation formula "19993×586÷7"; or, the first input information input by the user can be "What is the growth cycle of cicadas?", and the target model can be a knowledge encyclopedia or browser, etc., then the target model will retrieve and match the answer to the question in its own database.

[0048] Step 106: Send the first input information to the target model so that the target model can retrieve corresponding content / solve corresponding problems.

[0049] In this embodiment, the implementation process of step 106 is similar to step 4 of the above method embodiment, and will not be repeated here.

[0050] In some optional embodiments, when there are multiple pre-specified target models, the method provided by the present invention further pre-sets a label for each target model and stores the corresponding relationship between the label and the target model. In these embodiments, before step 106, the method provided by the present invention may further include the following steps B1-B3: Step B1, extracting keywords from the first input information; Step B2: matching the currently extracted keywords with the labels of each target model by semantic similarity; For example, if three target models are pre-specified, the label of target model one is "picture", the label of target model two is "computation", and the label of target model three is "translation", the first input information is "the full English name of Peking University", and the keywords currently extracted in step B1 are "Peking University" and "English", then in this step B2, it can be calculated that the semantic similarities between the labels of the three target models and the keyword "Peking University" are all 0, and the semantic similarity matching value between the label "translation" and the keyword "English" is the highest.

[0051] Step B3: Send the first input information to the target model corresponding to the tag with the highest semantic similarity matching value of the currently extracted keyword.

[0052] In these embodiments, multiple target models may be models that focus on solving different problems. Therefore, a label for characterizing the type of problem it solves is pre-set for each target model. When the target model needs to be called to solve the problem corresponding to the first input information, keywords in the first input information are extracted, such as tourism, food, health, place names, personal names, etc. Keywords are used to perform semantic similarity matching with the keywords and the labels of the target model. The target model corresponding to the label with the highest semantic similarity matching value is selected as the target model to be called this time, thereby accurately locating the best target model that can solve the problem corresponding to the first input information and improving the accuracy of the second input information content returned by the target model.

[0053] Step 107: Receive second input information returned by the target model in response to the content of the first input information.

[0054] Step 108: insert the second input information into the current cursor position in the target window.

[0055] In this embodiment, the implementation process of steps 107-108 is similar to steps 5-6 of the above method embodiment, and will not be repeated here.

[0056] In some preferred embodiments, when there are multiple target models, step 108 may specifically include the following steps C1-C3: Step C1, using the multiple pieces of input information returned by the multiple target models as multiple pieces of target candidate input information; Step C2: displaying multiple target candidate input information, and receiving a user's selection of one target candidate input information from the multiple target candidate input information; Step C3: inserting the currently selected target candidate input information as the second input information into the current cursor position in the target window.

[0057] Step 109: Outputting input information converted by the target input method from the input key message in real time at the current cursor position in the target window.

[0058] In this embodiment, if it is monitored that the current key message content is not the preset wake-up character, the normal function of the target input method is executed, that is, the aforementioned steps A1-A2, to obtain the content actually output by the user through the target input method, and output the content in real time at the current cursor position in the target window.

[0059] A specific embodiment is used below. Figure 1-2 The technical solution of any one of the method embodiments shown in the figure is described in detail.

[0060] Figure 3 The following is a workflow diagram of the data insertion method provided by the present invention in the target input method. The applicable scenario of this embodiment can be to use the target input method based on Fcitx (such as iFlytek input method, Sogou input method, Baidu input method, etc.) in GTK, QT, and X graphic windows. Figure 3 As shown, the workflow in this embodiment may include: Step 201: Register the Fcitx-based target input method in different architecture window environments, so that the desktop window program transmits keyboard events to the Fcitx agent.

[0061] In this embodiment, when the target window type is GTK, the keyboard event is passed to the Fcitx-gclient agent; when the target window type is QT, the keyboard event is passed to the Fcitx-qt agent; when the target window type is X, the keyboard event is passed to the XIM agent.

[0062] Step 202: The front-end module (Frontend) of the target input method processes the key message transmitted from the data bus and converts it into a Frontend structure.

[0063] In this embodiment, when the target window type is GTK, the key message is transmitted to the frontend / gtk framework; when the target window type is QT, the key message is transmitted to the frontend / qt framework; when the target window type is X, the key message is transmitted to the frontend / XIM framework.

[0064] Step 203: The front-end management module of the target input method determines whether the user inputs a wake-up character / end character by monitoring the key message. If so, execute step 204; otherwise, execute step 205.

[0065] In this embodiment, if the front-end management module determines that the current key message is a wake-up character, the next input content will be saved by Fcitx until the input end character is monitored.

[0066] Step 204: Send the first input information corresponding to the key message between the wake-up character and the end character to the local target model, and then insert the second input information returned by the target model in response to the first input information into the cursor position of the current target window.

[0067] Step 205: Fcitx input method editor (Fcitx-ime) further processes the key message, determines the hot key and transmits it to the target input method currently being used.

[0068] Step 206: The editor of the target input method (IME) processes the received key information and returns candidate information in its own operation window.

[0069] A data insertion method provided by an embodiment of the present invention monitors key messages in a target window, and based on a preset wake-up character and an end character, obtains first input information corresponding to the user input information between the wake-up character and the end character and sends it to a target model, so that the target model returns second input information in response to the content of the first input information, and finally directly inserts the second input information into the current cursor position in the target window. The present invention can directly call the target model (locally or remotely) to obtain relevant information based on the user's input, and automatically insert the information returned by the target model into the current cursor position. There is no need to manually input all the information, which can improve the user input efficiency and greatly enhance the user input experience. The user can ask questions or demands to the target model at any time at the cursor position, and improve his input according to the answer of the target model, which can meet the user's diversified needs for application functions.

[0070] Corresponding to the method provided by the present invention, an embodiment of the present invention further provides a data inserting device. Figure 4 The structure diagram of the data insertion device according to the present invention is as follows: Figure 4 As shown, the device of this embodiment may include: A key message monitoring module 1 is used to monitor the current key message inputted in the target input method in the target window; The recording module 2 is used for recording the input information obtained by the target input method from the current key message when the key message monitoring module 1 monitors that the content of the current key message is a preset wake-up character, and stops when the key message monitoring module 1 monitors that the content of the key message is a preset end character; Determining module 3, used for converting the input key message input by the target input method between the wake-up character and the end character recorded by recording module 2 as the first input information; wherein the first input information includes the content to be retrieved / the problem to be solved; A sending module 4, configured to send the first input information to a target model, so that the target model retrieves corresponding content / solves corresponding problems; A receiving module 5, configured to receive second input information returned by the target model in response to the content of the first input information; Inserting module 6 is used to insert the second input information into the current cursor position in the target window.

[0071] In this embodiment, when the target input method is an input method based on the Fcitx framework, the target input method based on the Fcitx framework is pre-registered in different architecture window environments, and the desktop window program transmits the keyboard event to the Fcitx agent. The function of the data insertion device provided in this embodiment can be implemented by the front-end management module (Frontend) of Fcitx. Frontend processes the key information transmitted from the data bus and converts it into a frontend structure. Any type of window key message will pass through this module, and then Frontend determines whether there is a wake-up character and an end character by monitoring the key message. If monitored, the first input information of the user input key message between the wake-up character and the end character after being converted by the target input method is sent to the local or remote target model, and then the return value of the target model is inserted into the current cursor position in the target window through Frontend.

[0072] The device of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.

[0073] Preferably, the insertion module 6 is also used to output the input information obtained by the target input method converting the input key message in real time at the current cursor position in the target window when the content of the current key message monitored by the key message monitoring module 1 is not the preset wake-up character.

[0074] Figure 5 This is a structural diagram of a second embodiment of a data insertion device provided by the present invention, as shown in FIG. Figure 5 As shown, the device of this embodiment is Figure 4 On the basis of the device structure shown, further, when there are multiple target models, the insertion module 6 may include: A candidate unit 61 is used to use the multiple pieces of input information returned by the multiple target models as multiple pieces of target candidate input information; A selection unit 62, used to display multiple candidate input information and receive a user's selection of one target candidate input information from the multiple target candidate input information; The inserting unit 63 is used to insert the currently selected target candidate input information as the second input information into the current cursor position in the target window.

[0075] Figure 6 The structure diagram of the third embodiment of the data insertion device provided by the present invention is as follows: Figure 6 As shown, the device of this embodiment is Figure 4 On the basis of the device structure shown, further, there are multiple target models, and a label is pre-set and stored for each target model; The data inserting device further comprises: Extraction module 7, used to extract keywords from the first input information; A matching module 8 is used to match the keywords extracted by the current extraction module 7 with the labels of each target model according to semantic similarity; The sending module 4 is specifically used to send the first input information to the target model corresponding to the tag with the highest semantic similarity matching value with the currently extracted keyword.

[0076] An embodiment of the present invention further provides an electronic device. Figure 7 A schematic diagram of the structure of an electronic device provided by the present invention can realize the present invention Figure 1 The process of the embodiment shown is as follows: Figure 7 As shown, the above-mentioned electronic device may include: a shell 21, a processor 22, a memory 23, a circuit board 24 and a power supply circuit 25, wherein the circuit board 24 is arranged inside the space enclosed by the shell 21, and the processor 22 and the memory 23 are arranged on the circuit board 24; the power supply circuit 25 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 23 is used to store executable program codes; the processor 22 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 23, so as to execute a data insertion method described in any of the above-mentioned embodiments.

[0077] This electronic device exists in many forms, including but not limited to: (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, feature phones, and low-end phones.

[0078] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers and have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.

[0079] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video playback modules (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.

[0080] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general-purpose computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0081] (5) Other electronic devices with data interaction functions.

[0082] In the fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement any one of the data insertion methods provided in the aforementioned embodiments, thereby also being able to achieve the corresponding technical effects, which have been described in detail above and will not be repeated here.

[0083] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0084] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0085] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.

[0086] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0087] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A data insertion method, characterized in that: For a target input method, the method comprises: Monitor the current key messages entered in the target window under the target input method; When the content of the current key message is monitored to be a preset wake-up character, the input information converted by the target input method from the current key message is recorded until the content of the key message is monitored to be a preset end character; The input information obtained by converting the key message input by the target input method between the wake-up character and the end character recorded this time is used as the first input information; wherein the first input information includes the content to be retrieved / the problem to be solved; Sending the first input information to a target model so that the target model retrieves corresponding content / solves corresponding problems; receiving second input information returned by the target model in response to the content of the first input information; The second input information is inserted into the target window at the current cursor position.

2. The data insertion method according to claim 1, characterized in that: After the current key message inputted in the target input method in the monitoring target window, the method further includes: If the content of the current key message is not the preset wake-up character, the input information obtained by the target input method from converting the input key message is output in real time at the current cursor position in the target window.

3. The data insertion method according to claim 1, characterized in that: Before the current key message to be input in the monitoring target window, the method further includes: The target input method is pre-registered in the target window environment so that the target input method can act as a proxy for keyboard input events in the target window.

4. The data insertion method according to claim 1, characterized in that: The target window is one of GTK, QT and X window; and / or The target input method is an input method based on the Fcitx framework.

5. The data insertion method according to claim 1, characterized in that: When there are multiple target models, inserting the second input information into the current cursor position in the target window includes: Using multiple pieces of input information returned by multiple target models as multiple pieces of target candidate input information; Displaying multiple target candidate input information and receiving a user's selection of one target candidate input information from the multiple target candidate input information; The currently selected target candidate input information is inserted as the second input information at the current cursor position in the target window.

6. The data insertion method according to claim 1, characterized in that: There are multiple target models, and a label is set and stored in advance for each target model; Before sending the first input information to the target model, the method further includes: extracting keywords from the first input information; Match the currently extracted keywords with the labels of each target model according to their semantic similarity; The first input information is sent to the target model corresponding to the tag having the highest semantic similarity matching value with the currently extracted keyword.

7. A data insertion device, characterized in that: include: A key message monitoring module is used to monitor the current key message inputted in the target window under the target input method; A recording module, configured to record input information converted from the input key message by the target input method starting from the current key message when the key message monitoring module monitors that the content of the current key message is a preset wake-up character, and stop when the key message monitoring module monitors that the content of the key message is a preset end character; A determination module, used to convert the input information obtained by the key message input by the target input method between the wake-up character and the end character recorded by the recording module this time into the first input information; wherein the first input information includes the content to be retrieved / the problem to be solved; A sending module, used for sending the first input information to a target model, so that the target model retrieves corresponding content / solves corresponding problems; A receiving module, configured to receive second input information returned by the target model in response to the content of the first input information; The inserting module is used to insert the second input information into the current cursor position in the target window.

8. The data insertion device according to claim 7, characterized in that: The inserting module is also used to output input information obtained by converting the input key message by the target input method in real time at the current cursor position in the target window when the content of the current key message monitored by the key message monitoring module is not a preset wake-up character.

9. The data insertion device according to claim 7, characterized in that: When there are multiple target models, the insertion module includes: A candidate unit, used to use multiple pieces of input information returned by multiple target models as multiple pieces of target candidate input information; A selection unit, used to display multiple candidate input information and receive a user's selection of one target candidate input information from the multiple target candidate input information; The inserting unit is used to insert the currently selected target candidate input information as the second input information into the current cursor position in the target window.

10. The data inserting device according to claim 7, characterized in that: There are multiple target models, and a label is set and stored in advance for each target model; The device also includes: An extraction module, used to extract keywords from the first input information; The matching module is used to match the currently extracted keywords with the labels of each target model according to their semantic similarity; The sending module is specifically used to send the first input information to the target model corresponding to the tag with the highest semantic similarity matching value with the currently extracted keyword.

11. An electronic device, characterized in that: The electronic device comprises: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the data insertion method described in any one of claims 1 to 6.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the data insertion method according to any one of claims 1 to 6.