Artificial intelligence-based document input method, device, equipment, and storage medium
Through an artificial intelligence-based text generation model, matching candidate functions are selected according to document information and processing operations, which solves the problem of low document input efficiency in existing input method technologies and achieves more efficient document input.
Patent Information
- Application Number
- CN202310696513.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-06-12
AI Technical Summary
Existing input method technologies are difficult to effectively match users' document input needs, resulting in low document input efficiency.
Through an AI-based text generation model, combined with the text information and text processing operations in the document, candidate functions that match the document are determined, and the function entry is loaded in the document, and the corresponding candidate function is called to update the document.
It improves the matching degree between candidate functions and document input requirements, improves document input efficiency, and avoids the interference of mismatched functions on input.
Smart Images

Figure CN119128131B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, specifically artificial intelligence and intelligent input, and specifically to an artificial intelligence-based document input method, apparatus, device, and storage medium. Background Art
[0002] Input methods refer to encoding methods used to input various symbols into electronic information devices. With the rapid development of information and communication technologies, input method technology has also developed rapidly. Computer users rely on input methods to input text and other information, making them an essential application for computers and mobile devices.
[0003] With the development of artificial intelligence technology, new requirements are put forward for input methods. Summary of the Invention
[0004] The present disclosure provides a document input method, apparatus, device and storage medium based on artificial intelligence.
[0005] According to one aspect of the present disclosure, there is provided a document input method based on artificial intelligence, comprising:
[0006] Determining candidate functions that match the document based on text information and text processing operations in the document; wherein the candidate functions are determined based on a text generation model based on artificial intelligence;
[0007] Loading a function entry of the candidate function in the document;
[0008] When the function entry of any candidate function is selected, the artificial intelligence-based text generation model is called to execute the selected candidate function, and the document is updated according to the execution result.
[0009] According to one aspect of the present disclosure, there is provided an artificial intelligence-based document input device, comprising:
[0010] A candidate function module, configured to determine candidate functions matching a document based on text information and text processing operations in the document; wherein the candidate functions are determined based on a text generation model based on artificial intelligence;
[0011] A function entry module, used for loading the function entry of the candidate function in the document;
[0012] The document update module is used to call the artificial intelligence-based text generation model to execute the selected candidate function when the function entry of any candidate function is selected, and update the document according to the execution result.
[0013] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method provided by any embodiment of the present disclosure.
[0017] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method provided by any embodiment of the present disclosure.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0020] Figure 1a is a flow chart of an artificial intelligence-based document input method provided according to an embodiment of the present disclosure;
[0021] Figure 1b is a schematic diagram of a candidate function provided according to an embodiment of the present disclosure;
[0022] Figure 2a is a flowchart of another document input method based on artificial intelligence provided according to an embodiment of the present disclosure;
[0023] Figure 2b-Figure 2e They are schematic diagrams of candidate functions provided according to an embodiment of the present disclosure;
[0024] Figure 3a is a flowchart of another artificial intelligence-based document input method provided according to an embodiment of the present disclosure;
[0025] Figure 3b is a schematic diagram of a candidate rewriting intention provided according to an embodiment of the present disclosure;
[0026] Figure 3c is a schematic diagram of an entry for secondary editing provided according to an embodiment of the present disclosure;
[0027] Figure 3dis a schematic diagram of a document writing function panel provided according to an embodiment of the present disclosure;
[0028] Figure 4 is a structural diagram of an artificial intelligence-based document input device provided according to an embodiment of the present disclosure;
[0029] Figure 5 3 is a block diagram of an electronic device used to implement the artificial intelligence-based document input method of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Figure 1a This is a flowchart of a document input method based on artificial intelligence provided according to an embodiment of the present disclosure. The method is applicable to document input. The method can be executed by a document input device based on artificial intelligence, which can be implemented in software and / or hardware and can be integrated into an electronic device. Figure 1a As shown, the document input method based on artificial intelligence in this embodiment may include:
[0031] S101, determining candidate functions matching the document based on text information and text processing operations in the document; wherein the candidate functions are determined based on a text generation model based on artificial intelligence;
[0032] S102, loading the function entry of the candidate function into the document;
[0033] S103, when a function entry of any candidate function is selected, calling the artificial intelligence-based text generation model to execute the selected candidate function, and updating the document according to the execution result.
[0034] Among them, the text generation model based on artificial intelligence is a knowledge-enhanced large language model, which can integrate learning from massive data and large-scale knowledge and has the technical features of knowledge enhancement, retrieval enhancement and dialogue enhancement. It can be built based on deep learning platforms and knowledge enhancement technologies. The text generation model based on artificial intelligence can provide a variety of model functions, such as full-text writing function, outline writing function, continuation function, rewriting function, translation function, etc. The name of the candidate function can be expressed by other words with the same semantics. For example, the rewriting function can also be called the polishing function. However, during the document input process, if the model function provided does not match the document input requirements, it will interfere with the document input and impair the document input efficiency. Therefore, it is very important to provide model functions that match the document input requirements.
[0035] The text information in the document may include text information that has already been entered in the document, text information that is currently being entered in the document, or either of the two. Text processing operations may include cursor rest operations, text selection operations, text input operations, etc. Specifically, during the document input process, the text information and text processing operations in the document are obtained, and the text input requirements are determined based on the text information and text processing operations. The model functions provided by the artificial intelligence-based text generation model are then selected as candidate functions that match the text input requirements.
[0036] Furthermore, the function entry of the candidate function is loaded into the document; in response to the selection operation of the function entry of any candidate function, the text generation model based on artificial intelligence is called to execute the selected candidate function, and the document is updated according to the execution result. Figure 1b , the function entry of full text writing function, outline writing function and continuation writing function can be provided in the function entry menu of the document.
[0037] By selecting candidate functions that match the document from the model functions provided by the AI-based text generation model based on the document's text information and text processing operations, the matching between the candidate functions and the document input requirements can be improved, thereby accurately determining the timing for calling the candidate functions. This processing not only facilitates document input and improves document input efficiency, but also prevents interference from other model functions that do not match the document input requirements.
[0038] The technical solutions provided by the embodiments of the present disclosure improve the matching degree between candidate functions and document input requirements by selecting candidate functions that match the document from model functions provided by an artificial intelligence-based text generation model based on the text information and text processing operations in the document. Furthermore, by loading function entries for candidate functions into the document, executing the corresponding candidate function in response to a selection operation on the function entry of the candidate function to obtain an execution result, and updating the document based on the execution result, the efficiency of document input can be improved.
[0039] Figure 2a Flowchart of another document input method based on artificial intelligence provided according to an embodiment of the present disclosure. Figure 2a , the document input method based on artificial intelligence of this embodiment may include:
[0040] S201, determining a current document scene of the document based on text information in the document;
[0041] S202, determining candidate functions matching the document based on the current document scenario and the text processing operation; wherein the candidate functions are determined based on an artificial intelligence-based text generation model;
[0042] S203, loading the function entry of the candidate function into the document;
[0043] S204, when the function entry of any candidate function is selected, calling the artificial intelligence-based text generation model to execute the selected candidate function, and updating the document according to the execution result.
[0044] In an embodiment of the present disclosure, the current document scene of a document can be determined based on the text information that has been entered and / or the text information being entered in the document. The current document scene can be a title scene or a text scene, etc.; the text processing operation can be a text input operation, a cursor pause operation, or a text selection operation, etc. Furthermore, the part that matches the current document scene and text processing operation can be selected from the model functions provided by the artificial intelligence-based text generation model as a candidate function. By selecting candidate functions from the model functions provided by the text generation model in combination with the current document scene and text processing operation, the matching degree between the candidate functions and the document input requirements can be further improved, thereby further improving the document input efficiency.
[0045] In an optional embodiment, determining candidate functions that match the document based on the current document scenario and the text processing operation includes: when the current document scenario is a title scenario, using a full-text writing function and an outline writing function as basic functions; determining whether an auxiliary function exists based on the text processing operation; and if an auxiliary function exists, using both the basic function and the auxiliary function as candidate functions that match the document.
[0046] When the current document scenario is a title scenario, the full-text writing function and the outline writing function can be used as basic functions, and whether there are auxiliary functions can be determined based on the text processing operation; if there are auxiliary functions, both the basic function and the auxiliary function can be used as candidate functions; otherwise, only the basic function can be used as a candidate function.
[0047] When a document is in the title scenario, the full-text writing and outline writing functions are used as basic functions to facilitate the writing of the full text and document outline, and improve document input efficiency by providing a holistic approach to document writing. In the title scenario, auxiliary functions that match text processing operations are also provided. This further refines document input requirements based on text processing operations and refines the granularity of control over auxiliary functions. This can further improve the match between candidate functions and document input requirements, thereby improving document input efficiency.
[0048] In an optional embodiment, determining whether an auxiliary function exists based on the text processing operation includes: when the text processing operation is a cursor pause operation, determining that an auxiliary function exists, and using a continue writing function as an auxiliary function; when the text processing operation is a text selection operation, determining that an auxiliary function exists, and using a continue writing function and an overwrite function as auxiliary functions; when the text processing operation is a text input operation, determining that an auxiliary function does not exist.
[0049] In an embodiment of the present disclosure, a dwell time threshold value, such as 3s, can be preset. When the cursor dwell time of the input method is greater than the dwell time threshold value, it is determined that a cursor dwell operation is detected, that is, the cursor is in a dwell state. Specifically, when the document is in a title scene and a cursor dwell operation is detected, the continue writing function can be used as an auxiliary function. The continue writing function is used to continue creating based on the text information already entered in the document. When the document is in a title scene and a cursor dwell operation is detected, by using the continue writing function as a candidate function that matches the document, it is convenient to call the text generation model based on artificial intelligence to continue creating the document, thereby improving the input efficiency of the document.
[0050] Specifically, when a document is in a title scene and a text selection operation is detected, the continue writing function and the rewrite function can be used as auxiliary functions. Among them, the rewrite function is used to call an artificial intelligence-based text generation model to rewrite the selected text, and the rewritten text can be used to replace the selected text. When a document is in a title scene and a text selection operation is detected, by using the continue writing function and the rewrite function as candidate functions that match the document, it is convenient to flexibly continue to create or rewrite the document, thereby improving the efficiency of document input.
[0051] In an optional embodiment, loading the function entry of the candidate function in the document includes: when the current document scene is a title scene and the candidate function is the basic function, extracting keywords from the text in the document; matching the extracted keywords with a preset candidate title to obtain a target title; generating prompt guidance information for the basic function based on the target title; and loading the function entry of the basic function in the document based on the prompt guidance information.
[0052] In the embodiment of the present disclosure, a plurality of candidate titles can be pre-determined for selection, and the candidate titles can be obtained by processing the titles of existing documents. Specifically, when the document is in a title scenario, keywords can be extracted from the text in the document, and the extracted keywords are matched with each candidate title. If the match is successful, the successfully matched candidate title is used as the target title. According to the target title, prompt guidance information is generated for the basic function, and the function entry of the basic function is loaded in the document according to the prompt guidance information. Among them, the basic function can be a full-text writing function and an outline writing function. Reference Figure 2b For example, if the target title is "New Energy Vehicle Industry Report," the prompt for the full-text writing function might read "Help you write the full text of the New Energy Vehicle Industry Report," and the prompt for the outline writing function might read "Help you write the outline of the New Energy Vehicle Industry Report." If the extracted keywords successfully match each candidate title, prompts are generated for the basic functions based on the matching target title. The function entry for the basic function is loaded based on the prompts, allowing users to determine whether to call the corresponding function entry based on the semantics of the target title in the prompts, thereby reducing the risk of accidentally calling the function entry.
[0053] It should be noted that if the extracted keywords fail to match any candidate title, the prompt guidance information of the basic function will only include the function type, but not the title semantics. Figure 2c The prompt guidance information for the full-text writing function can be "Help you write the full text", and the prompt guidance information for the outline writing function can be "Help you write the outline".
[0054] In an optional embodiment, the function entry of the basic function is loaded in the document according to the prompt guidance information, including: when the text processing operation is a text input operation, the prompt guidance information of the basic function is used as a candidate for the current input sequence to obtain the function entry of the basic function.
[0055] When the document is in the title scene and the text is in the text input operation, that is, when the input method is in the input state, the current input sequence of the input method is obtained, the prompt guidance information of the basic function is used as the candidate of the current input sequence, and the function entry of the basic function is obtained, that is, the function entry of the basic function is loaded in the candidate of the current input sequence. Figure 2b The candidates for the current input sequence "hangye" include not only the candidates "industry", "hangye", "shipping", "line", and "ha" determined by the input method, but also the prompt guidance information of basic functions: "Help you write the full text of the new energy vehicle industry report", "Help you write the outline of the new energy vehicle industry report".
[0056] When any candidate corresponding to the prompt guidance information of a basic function is selected, the text generation model based on artificial intelligence is called to execute the corresponding candidate function, and the document is updated according to the execution result. During the document input process, by loading the function entry of the basic function in the candidate of the current input sequence, the convenience of calling the basic function can be improved, and the function entry of the basic function can be prevented from interfering with the document input. In addition, when any candidate determined by the input method is selected, the candidate is displayed on the screen.
[0057] The technical solution provided by the embodiments of the present disclosure further improves the matching degree between candidate functions and document input requirements by selecting candidate functions from the model functions provided by the text generation model in combination with the current document scenario and text processing operations, thereby further improving document input efficiency. Furthermore, in the case of a document in a title scenario, by using the full-text writing function and outline writing function as the basic functions and determining whether auxiliary functions exist based on the text processing operations, the matching degree between candidate functions and the document can be further improved, thereby improving document input efficiency.
[0058] In an optional embodiment, the determining of candidate functions matching the document based on the current document scene and the text processing operation includes: when the current document scene is a main text scene and the text processing operation is a cursor pause operation, taking the continue writing function as a candidate function matching the document; when the current document scene is a main text scene and the text processing operation is a text selection operation, taking both the continue writing function and the rewrite function as candidate functions matching the document.
[0059] In the document body scenario, and the text processing operation is a cursor hover operation, the continuation function can be used as a candidate function to match the document. Figure 2d , the function entry of the continue function can be loaded in the document. When the document is in the main text scenario and the text processing operation is a text selection operation, both the continue function and the rewrite function can be used as candidate functions to match the document. Specifically, the function entry of the continue function and the rewrite function can be loaded synchronously in the document, and the rewrite function is used to rewrite the selected text. By loading the function entry of the continue function and the rewrite function according to the text processing operation in the main text scenario, it is convenient to call the text generation model based on artificial intelligence to continue or rewrite the main text of the document, thereby improving the document input efficiency. Reference Figure 2eWhen the document is in the main text mode and the text processing operation is a text selection operation, the translation function and the document search function can also be loaded into the document. When the translation function is selected, the selected text is translated and the translation result is displayed in the translation pop-up window. When the document search function is selected, the text information in the document is matched with candidate documents to obtain successful candidate documents, and the candidate documents are displayed in the document preview panel.
[0060] In an optional embodiment, the method further includes: when the current document scene is a text scene and the text processing operation is a text input operation, performing whole sentence prediction based on the text already entered in the document and the current input text to obtain the next sentence in the document.
[0061] In the disclosed embodiment, a whole sentence prediction model is also provided for predicting new sentences based on existing sentences in the document. The whole sentence prediction model can be constructed based on a transformer network. Specifically, when the document is in a main text scene and there is a text input operation, the tail of the text already entered in the document and the current input text can be truncated to obtain a text of a fixed length, and the truncated text is input into the whole sentence prediction model to obtain the next sentence input by the whole sentence prediction model. During the main text writing process, the document input efficiency can also be improved by calling the scene prediction model to predict the next sentence.
[0062] In an optional embodiment, determining the current document scene of the document based on the text information in the document includes: determining the text length based on the text information in the document; determining the current document scene of the document based on the text length; wherein the current document scene is a title scene or a text scene.
[0063] In an embodiment of the present disclosure, a length threshold for the pause title can be preset, such as 20 words or 25 words. Specifically, the length of the text in the document can be determined based on the text information in the document. For example, in the case where the text processing operation is a cursor pause operation or a text input operation, the length of the text in the document can be determined based on the text information already entered in the document; in the case where the text processing operation is a text selection operation, the length of the text in the document can be determined based on the text information located before the selection area in the document. In addition, the length of the text in the document is compared with the length threshold; if the length of the text in the document is less than or equal to the length threshold, the document is in the title scene; otherwise, the document is in the text scene. There is uncertainty in the text located in the selection area. By determining the current document scene based on the text information located before the selection area, the stability of the current document scene can be improved.
[0064] Figure 3aFlowchart of another document input method based on artificial intelligence provided according to an embodiment of the present disclosure. Figure 3a , the document input method based on artificial intelligence of this embodiment may include:
[0065] S301, determining candidate functions matching the document based on text information and text processing operations in the document; wherein the candidate functions are determined based on a text generation model based on artificial intelligence;
[0066] S302, loading the function entry of the candidate function into the document;
[0067] S303, when a function entry of any candidate function is selected, determining a text processing requirement content of the selected candidate function according to the selected candidate function and text information in the document;
[0068] S304: Input the text processing requirement content into the artificial intelligence-based text generation model, and update the document according to the output text of the text generation model.
[0069] Among them, the text processing requirement content serves as the input of the artificial intelligence-based text generation model to represent the call requirements for candidate functions. When the function entry of any candidate function is selected, the text processing requirement content of the candidate function is determined by combining the selected candidate function and the text information in the document, so that the text processing requirement content can not only represent the candidate function, but also retain the original semantics of the user input information in the document. Therefore, in the process of calling the artificial intelligence-based text generation model to execute the candidate function, the original semantics of the user can be fully retained, thereby improving the matching degree between the output text of the text generation model and the document input requirements.
[0070] In an optional embodiment, determining the text processing requirement content of the selected candidate function based on the selected candidate function and the text information in the document includes: determining the preamble of the selected candidate function based on the selected candidate function; and combining the preamble and the text information in the document to obtain the text processing requirement content of the candidate function.
[0071] In the embodiment of the present disclosure, a corresponding preamble can be provided for the candidate function, and the preamble contains the semantics of the candidate function. Taking the full-text writing function as an example, the preamble can be "Please write the full text according to the following content:"; taking the outline writing function as an example, the preamble can be "Please write the outline according to the following content:"; taking the continuation writing function as an example, the preamble can be "Please continue writing according to the following content:"; taking the rewriting function as an example, the preamble can be "Please rewrite the following content:". By combining the preamble and the text information in the document, the text processing requirement content of the candidate function is obtained, so that the text processing requirement content has both the functional type of the candidate function and the original semantics of the user input information in the document, which can improve the matching degree between the output text of the text generation model and the document input requirements.
[0072] In an optional embodiment, based on the selected candidate function, the preamble of the selected candidate function is determined, including: when the selected candidate function is a rewrite function, displaying the candidate rewrite intention corresponding to the rewrite function; obtaining the target rewrite intention input by the user; or, obtaining the target rewrite intention selected from the candidate rewrite intentions; based on the selected candidate function and the target rewrite intention, determining the preamble of the selected candidate function.
[0073] In the embodiment of the present disclosure, at least one candidate rewriting intention may be provided in advance for the rewriting function. Figure 3b When you select the rewrite function, candidate rewrite intents and an input box for the rewrite intent are displayed to guide you in filling in the rewrite intent. If you select any candidate rewrite intent, that candidate rewrite intent becomes the target rewrite intent; if you enter a new rewrite intent in the rewrite intent input box, the new rewrite intent becomes the target rewrite intent. Providing candidate rewrite intents not only makes it easier to select a target rewrite intent from the candidate rewrite intents, but also helps you generate ideas for new rewrite intents.
[0074] After obtaining the target rewriting intention, the preamble of the rewriting function is determined by combining the rewriting function and the target rewriting intention, so that the preamble can further refine the rewriting requirements, thereby improving the matching degree between the rewriting result and the user requirements.
[0075] The technical solution provided by the embodiments of the present disclosure determines the text processing requirement content of any candidate function by combining the selected candidate function and the text information in the document when the function entry of any candidate function is selected, so that in the process of calling the artificial intelligence-based text generation model to execute the candidate function, the user's original semantics can be fully retained, thereby improving the matching degree between the output text of the text generation model and the document input requirements.
[0076] In an optional embodiment, the document is updated according to the execution result, including: when the selected candidate function is the continuation function, adding a secondary editing entry to the continuation text in the execution result; the secondary editing includes at least one of the following: confirmation, re-creation, revocation or modification; in response to the selection operation of the secondary editing entry, the continuation text is secondary edited, and the document is updated according to the secondary editing result.
[0077] refer to Figure 3c When the text generation model is used to continue a document, the following secondary editing entries are added to the continued text: Confirm, Re-author, and Undo. Selecting any of these secondary editing entries allows the continued text to be edited again, further improving the document's continued quality. It should be noted that a secondary editing entry for modification can also be added to the continued text, and the continued text can be underlined for distinction.
[0078] refer to Figure 3d The disclosed embodiments may also provide an AI-powered document writing panel, which can assist users in writing content through natural language conversations, improving their writing efficiency. This panel provides access to re-authoring, using, creating a new conversation, and sending.
[0079] Specifically, when the document writing function panel is turned on, the user's writing requirement information is obtained and transmitted to the artificial intelligence-based text generation model, so that the artificial intelligence-based text generation model determines the writing content according to the writing requirement information; in response to a request to change the writing content, a follow-up request or a tuning request, the artificial intelligence-based text generation model can also be called to respond and determine the response content; the response content can be used to update the document.
[0080] Figure 4 This is a schematic diagram of the structure of an artificial intelligence-based document input device according to an embodiment of the present disclosure. This embodiment is applicable to document input. The device can be implemented in software and / or hardware. Figure 4 As shown, the artificial intelligence-based document input device 400 of this embodiment may include:
[0081] A candidate function module 410 is configured to determine candidate functions that match a document based on text information and text processing operations in the document; wherein the candidate functions are determined based on an artificial intelligence-based text generation model;
[0082] A function entry module 420 is configured to load a function entry of the candidate function into the document;
[0083] The document updating module 430 is used to call the artificial intelligence-based text generation model to execute the selected candidate function when the function entry of any candidate function is selected, and update the document according to the execution result.
[0084] In an optional implementation, the candidate function module 410 includes:
[0085] A document scene unit, configured to determine a current document scene of the document based on text information in the document;
[0086] The candidate function unit is used to determine a candidate function matching the document according to the current document scenario and the text processing operation.
[0087] In an optional implementation, the candidate functional units include:
[0088] A basic function subunit, configured to use a full-text writing function and an outline writing function as basic functions when the current document scene is a title scene;
[0089] an auxiliary function subunit, configured to determine whether an auxiliary function exists according to the text processing operation;
[0090] The candidate function subunit is configured to, when an auxiliary function exists, take both the basic function and the auxiliary function as candidate functions matching the document.
[0091] In an optional embodiment, the auxiliary function subunit is specifically used to:
[0092] In a case where the text processing operation is a cursor dwell operation, determining that an auxiliary function exists, and using a continue writing function as the auxiliary function;
[0093] In a case where the text processing operation is a text selection operation, determining that an auxiliary function exists, and selecting a continue writing function and an overwriting function as the auxiliary functions;
[0094] In a case where the text processing operation is a text input operation, it is determined that no auxiliary function exists.
[0095] In an optional implementation, the function entry module 420 includes:
[0096] A keyword unit, configured to extract keywords from text in a document when the current document scenario is a title scenario and the candidate function is the basic function;
[0097] A target title unit is used to match the extracted keywords with preset candidate titles to obtain a target title;
[0098] a guidance generating unit, configured to generate prompt guidance information for the basic function according to the target title;
[0099] An entry loading unit is used to load the function entry of the basic function in the document according to the prompt guidance information.
[0100] In an optional embodiment, the entry loading unit is specifically used to:
[0101] In the case where the text processing operation is a text input operation, the prompt guidance information of the basic function is used as a candidate item of the current input sequence to obtain a function entry of the basic function.
[0102] In an optional implementation manner, the candidate functional unit is specifically used to:
[0103] When the current document scene is a text scene and the text processing operation is a cursor dwell operation, the continue writing function is selected as a candidate function matching the document;
[0104] When the current document scene is a text scene and the text processing operation is a text selection operation, both the continue writing function and the overwrite function are used as candidate functions matching the document.
[0105] In an optional implementation, the document updating module 430 includes:
[0106] A requirement content unit, for determining text processing requirement content of the selected candidate function based on the selected candidate function and text information in the document when a function entry of any candidate function is selected;
[0107] A document updating unit is used to input the text processing requirement content into the artificial intelligence-based text generation model and update the document according to the output text of the text generation model.
[0108] In an optional implementation manner, the demand content unit includes:
[0109] A preamble subunit, configured to determine a preamble of the selected candidate function based on the selected candidate function;
[0110] The requirement content subunit is used to combine the preceding statement and the text information in the document to obtain the text processing requirement content of the candidate function.
[0111] In an optional implementation manner, the preamble subunit is specifically used to:
[0112] When the selected candidate function is a rewriting function, displaying candidate rewriting intentions corresponding to the rewriting function;
[0113] Obtaining a target rewriting intent input by a user; or obtaining a target rewriting intent selected from the candidate rewriting intents;
[0114] According to the selected candidate function and the target rewriting intention, a preceding statement of the selected candidate function is determined.
[0115] In an optional implementation, the document updating module 430 includes:
[0116] An editing entry unit, for adding a secondary editing entry to the continued text in the execution result when the selected candidate function is the continued function; the secondary editing includes at least one of the following: confirmation, re-authoring, cancellation or modification;
[0117] The secondary editing unit is configured to perform secondary editing on the continued text in response to a selection operation on the secondary editing entry, and update the document according to the secondary editing result.
[0118] In an optional implementation, the document scene unit includes:
[0119] A text length subunit, configured to determine the text length based on the text information in the document;
[0120] The document scene subunit is used to determine the current document scene of the document according to the text length; wherein the current document scene is a title scene or a text scene.
[0121] In an optional embodiment, the artificial intelligence-based document input device 400 further includes:
[0122] The sentence prediction module is used to predict the entire sentence based on the text already input in the document and the current input text when the current document scene is a text scene and the text processing operation is a text input operation, so as to obtain the next sentence in the document.
[0123] The technical solution of the disclosed embodiment provides an intelligent association method based on a personal computer (PC) input method by introducing functions such as full-text writing, outline writing, continuation writing, rewriting, and whole-sentence prediction into the input method, which can improve the efficiency of document input.
[0124] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0125] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0126] Figure 5 3 is a block diagram of an electronic device used to implement the artificial intelligence-based document input method of an embodiment of the present disclosure.
[0127] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0128] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 can also be stored in the RAM 503. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0129] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0130] The computing unit 501 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the artificial intelligence-based document input method. For example, in some embodiments, the artificial intelligence-based document input method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the artificial intelligence-based document input method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the artificial intelligence-based document input method by any other appropriate means (e.g., by means of firmware).
[0131] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0132] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0133] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0134] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0135] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0136] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0137] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.
[0138] Cloud computing refers to a technology system that provides network access to elastically scalable shared pools of physical or virtual resources. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on-demand in a self-service manner. Cloud computing technology provides efficient and powerful data processing capabilities for the application of technologies such as artificial intelligence and blockchain, as well as for model training.
[0139] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0140] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. Artificial intelligence-based document input methods, including: Determining a current document scene of the document based on text information in the document; wherein the current document scene is a title scene or a body scene; Determining candidate functions that match the document based on the current document scenario and text processing operations; wherein the candidate functions are determined based on an artificial intelligence-based text generation model, and the candidate functions include a full-text writing function, an outline writing function, a continuation writing function, a rewrite function, and a translation function; and the text processing operations are text input operations, cursor hover operations, or text selection operations; Loading a function entry of the candidate function in the document; When a function entry of any candidate function is selected, calling the artificial intelligence-based text generation model to execute the selected candidate function, and updating the document according to the execution result; The function entry for loading the candidate function in the document includes: Extracting keywords from the text in the document when the current document scene is a title scene and the candidate function is a basic function; wherein the basic function is a full-text writing function and an outline writing function; Match the extracted keywords with the preset candidate titles to obtain the target title; Generating prompt guidance information for the basic function according to the target title; According to the prompt guidance information, the function entry of the basic function is loaded in the document.
2. The method according to claim 1, wherein The determining, based on the current document scenario and the text processing operation, candidate functions matching the document includes: In the case where the current document scene is a title scene, the full text writing function and the outline writing function are used as basic functions; Determining whether an auxiliary function exists according to the text processing operation; In the case that an auxiliary function exists, both the basic function and the auxiliary function are taken as candidate functions matching the document.
3. The method according to claim 2, wherein: The determining whether an auxiliary function exists according to the text processing operation includes: In a case where the text processing operation is a cursor dwell operation, determining that an auxiliary function exists, and using a continue writing function as the auxiliary function; In a case where the text processing operation is a text selection operation, determining that an auxiliary function exists, and selecting a continue writing function and an overwriting function as the auxiliary functions; In a case where the text processing operation is a text input operation, it is determined that no auxiliary function exists.
4. The method according to claim 1, wherein The step of loading the function entry of the basic function in the document according to the prompt guidance information includes: In the case where the text processing operation is a text input operation, the prompt guidance information of the basic function is used as a candidate item of the current input sequence to obtain a function entry of the basic function.
5. The method according to claim 1, wherein The determining, based on the current document scenario and the text processing operation, candidate functions matching the document includes: When the current document scene is a text scene and the text processing operation is a cursor dwell operation, the continue writing function is selected as a candidate function matching the document; When the current document scene is a text scene and the text processing operation is a text selection operation, both the continue writing function and the overwrite function are used as candidate functions matching the document.
6. The method according to any one of claims 1 to 5, wherein When the function entry of any candidate function is selected, calling the artificial intelligence-based text generation model to execute the selected candidate function, and updating the document according to the execution result, including: In the case of selecting a function entry of any candidate function, determining text processing requirement content of the selected candidate function based on the selected candidate function and text information in the document; The text processing requirement content is input into the artificial intelligence-based text generation model, and the document is updated according to the output text of the text generation model.
7. The method according to claim 6, wherein: The step of determining the text processing requirement content of the selected candidate function based on the selected candidate function and the text information in the document includes: Determine, according to the selected candidate function, a preamble statement of the selected candidate function; The preceding statement and the text information in the document are combined to obtain the text processing requirement content of the candidate function.
8. The method according to claim 7, wherein: According to the selected candidate function, determine the preceding statement of the selected candidate function, including: When the selected candidate function is a rewriting function, displaying candidate rewriting intentions corresponding to the rewriting function; Obtaining a target rewriting intent input by a user; or obtaining a target rewriting intent selected from the candidate rewriting intents; According to the selected candidate function and the target rewriting intention, a preceding statement of the selected candidate function is determined.
9. The method according to claim 3 or 5, wherein: The document is updated according to the execution result, including: In the case where the selected candidate function is the continuation function, a secondary editing entry is added to the continuation text in the execution result; the secondary editing includes at least one of the following: confirmation, re-creation, cancellation or modification; In response to a selection operation on the secondary editing entry, the continued text is secondary edited, and the document is updated according to the secondary editing result.
10. The method according to claim 1, wherein The determining, based on text information in the document, the current document scene in which the document is located, includes: Determining the length of the text according to the text information in the document; The current document scene of the document is determined according to the text length.
11. The method according to claim 1 , further comprising: When the current document scene is a text scene and the text processing operation is a text input operation, a whole sentence prediction is performed based on the text already input in the document and the current input text to obtain the next sentence in the document.
12. An artificial intelligence-based document input device, comprising: Candidate functional modules include: A document scene unit, configured to determine a current document scene of the document based on text information in the document; wherein the current document scene is a title scene or a body scene; a candidate function unit, configured to determine candidate functions matching the document based on the current document scenario and text processing operations; wherein the candidate functions are determined based on an artificial intelligence-based text generation model, and include a full-text writing function, an outline writing function, a continuation writing function, a rewrite function, and a translation function; and the text processing operations are text input operations, cursor hover operations, or text selection operations; A function entry module, used for loading the function entry of the candidate function in the document; A document updating module, configured to, when a function entry of any candidate function is selected, call the artificial intelligence-based text generation model to execute the selected candidate function, and update the document according to the execution result; The function entry module includes: A keyword unit, configured to extract keywords from the text in the document when the current document scenario is a title scenario and the candidate function is a basic function; wherein the basic function is a full-text writing function and an outline writing function; A target title unit is used to match the extracted keywords with preset candidate titles to obtain a target title; a guidance generating unit, configured to generate prompt guidance information for the basic function according to the target title; An entry loading unit is used to load the function entry of the basic function in the document according to the prompt guidance information.
13. The device according to claim 12, wherein The candidate functional units include: A basic function subunit, configured to use a full-text writing function and an outline writing function as basic functions when the current document scene is a title scene; an auxiliary function subunit, configured to determine whether an auxiliary function exists according to the text processing operation; The candidate function subunit is configured to, when an auxiliary function exists, take both the basic function and the auxiliary function as candidate functions matching the document.
14. The device according to claim 13, wherein The auxiliary function subunit is specifically used for: In a case where the text processing operation is a cursor dwell operation, determining that an auxiliary function exists, and using a continue writing function as the auxiliary function; In a case where the text processing operation is a text selection operation, determining that an auxiliary function exists, and selecting a continue writing function and an overwriting function as the auxiliary functions; In a case where the text processing operation is a text input operation, it is determined that no auxiliary function exists.
15. The device according to claim 12, wherein The entry loading unit is specifically used for: In the case where the text processing operation is a text input operation, the prompt guidance information of the basic function is used as a candidate item of the current input sequence to obtain a function entry of the basic function.
16. The device according to claim 12, wherein The candidate functional units are specifically used for: When the current document scene is a text scene and the text processing operation is a cursor dwell operation, the continue writing function is selected as a candidate function matching the document; When the current document scene is a text scene and the text processing operation is a text selection operation, both the continue writing function and the overwrite function are used as candidate functions matching the document.
17. The device according to any one of claims 13 to 16, wherein: The document update module includes: A requirement content unit, for determining text processing requirement content of the selected candidate function based on the selected candidate function and text information in the document when a function entry of any candidate function is selected; A document updating unit is used to input the text processing requirement content into the artificial intelligence-based text generation model and update the document according to the output text of the text generation model.
18. The device according to claim 17, wherein The demand content unit includes: A preamble subunit, configured to determine a preamble of the selected candidate function based on the selected candidate function; The requirement content subunit is used to combine the preceding statement and the text information in the document to obtain the text processing requirement content of the candidate function.
19. The device according to claim 18, wherein The preamble subunit is specifically used for: When the selected candidate function is a rewriting function, displaying candidate rewriting intentions corresponding to the rewriting function; Obtaining a target rewriting intent input by a user; or obtaining a target rewriting intent selected from the candidate rewriting intents; According to the selected candidate function and the target rewriting intention, a preceding statement of the selected candidate function is determined.
20. The device according to claim 14 or 16, wherein The document update module includes: An editing entry unit, configured to add a secondary editing entry to the continued text in the execution result when the selected candidate function is the continued function; the secondary editing includes at least one of the following: confirmation, re-authoring, cancellation, or modification; The secondary editing unit is configured to perform secondary editing on the continued text in response to a selection operation on the secondary editing entry, and update the document according to the secondary editing result.
21. The device according to claim 12, wherein The document scene unit includes: A text length subunit, configured to determine the text length based on the text information in the document; The document scene subunit is used to determine the current document scene of the document according to the text length.
22. The apparatus according to claim 12, further comprising: The sentence prediction module is used to predict the entire sentence based on the text already input in the document and the current input text when the current document scene is a text scene and the text processing operation is a text input operation, so as to obtain the next sentence in the document.
23. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the method according to any one of claims 1-11.
25. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Auxiliary writing method and apparatus based on artificial intelligence
CN106650943A
Conversation system construction method and device, computer equipment and storage medium
CN110196901A
Auxiliary writing method, device and system based on language model
CN112966479A
Input text processing method and device, electronic equipment and storage medium
CN113360001A