Document input method and device based on artificial intelligence, equipment and storage medium
Through the text generation model based on artificial intelligence, candidate functions are determined based on document information and operations, and corresponding functions are called during document input, the problems of low matching degree and functional interference in the existing input method are solved, and the document input is significantly improved Efficiency and accuracy.
Patent Information
- Application Number
- CN202310696513.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-06-12
AI Technical Summary
During the document input process, existing input methods are difficult to accurately match user needs, resulting in inefficient input and may interfere with the input process when the model function does not match the requirements.
Through an artificial intelligence-based text generation model, candidate functions matching the document are determined based on text information and text processing operations in the document, and the model is called to perform corresponding functions when selecting the function entry to update the document, improving candidate functions and document input requirements match.
It improves the efficiency of document input, avoids the problem of miscalculation of function portals and the problem of mismatch in demand, and enhances the convenience and accuracy of document input.
Smart Images

Figure CN119128131A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the fields of artificial intelligence and intelligent input, and in particular to a document input method, device, equipment and storage medium based on artificial intelligence. Background Art
[0002] Input method refers to the coding method used to input various symbols into electronic information devices. With the rapid development of information technology and communication technology, input method technology has also developed rapidly. When users use computers, they cannot do without using input methods to input text, etc. Therefore, input method has become an indispensable application in computers or mobile terminals.
[0003] With the development of artificial intelligence technology, new requirements are put forward for input methods. Summary of the invention
[0004] The present invention provides a document input method, device, equipment 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] Determine 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;
[0007] Loading a function entry of the candidate function in the document;
[0008] When a 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 a document input device based on artificial intelligence, comprising:
[0010] A candidate function module, used to determine candidate functions matching the document according to text information and text processing operations in the document; wherein the candidate functions are determined according to 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 updating 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 to update the document according to the execution result.
[0013] According to another aspect of the present disclosure, there is provided an electronic device, 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, and 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 content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0020] Figure 1a is a flow chart of a document input method based on artificial intelligence 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 a candidate function provided according to an embodiment of the present disclosure;
[0024] Figure 3a is a flowchart of another document input method based on artificial intelligence 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 a secondary editing entry 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 schematic diagram of an artificial intelligence-based document input device provided according to an embodiment of the present disclosure;
[0029] Figure 5 It 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 1 is a flowchart of a document input method based on artificial intelligence 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 according to text information and text processing operations in the document; wherein the candidate functions are determined according to a text generation model based on artificial intelligence;
[0032] S102, loading the function entry of the candidate function in 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, and 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 damage 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 been input into the document, text information that is being input into the document, or one of the two. The text processing operation may include a cursor stop operation, a text selection operation, a text input operation, etc. Specifically, during the document input process, the text information and text processing operation in the document are obtained, the text input requirement is determined based on the text information and the text processing operation, and the part that matches the text input requirement is selected from the model functions provided by the text generation model based on artificial intelligence as a candidate function.
[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 entrances of full-text writing function, outline writing function and continuation writing function can be provided in the function entrance menu of the document.
[0037] By selecting candidate functions that match the document from the model functions provided by the artificial intelligence-based text generation model based on the text information and text processing operations in the document, the matching degree between the candidate functions and the document input requirements can be improved, thereby determining the accurate calling time for the candidate functions. The above processing can not only facilitate document input and improve document input efficiency, but also avoid interference of other model functions that do not match the document input requirements with document input input.
[0038] The technical solution provided by the embodiment of the present disclosure can improve the matching degree between the candidate functions and the document input requirements by selecting the candidate functions matching the document from the model functions provided by the text generation model based on artificial intelligence according to the text information and text processing operations in the document. In addition, by loading the function entry of the candidate function in the document, executing the corresponding candidate function to obtain the execution result in response to the selection operation of the function entry of the candidate function, and updating the document according to the execution result, the document input efficiency can be improved.
[0039] Figure 2a is a 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 according to text information in the document;
[0041] S202, determining a candidate function matching the document according to the current document scenario and the text processing operation; wherein the candidate function is determined according to a text generation model based on artificial intelligence;
[0042] S203, loading the function entry of the candidate function in the document;
[0043] S204, 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.
[0044] In the disclosed embodiments, the current document scene of the document can be determined based on the text information that has been input and / or the text information being input 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 stop operation, or a text selection operation, etc. In addition, the part that matches the current document scene and the 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 the candidate function from the model functions provided by the text generation model in combination with the current document scene and the text processing operation, the matching degree between the candidate function and the document input requirements can be further improved, thereby further improving the document input efficiency.
[0045] In an optional implementation, determining candidate functions that match the document based on the current document scene and the text processing operation includes: when the current document scene is a title scene, taking a full-text writing function and an outline writing function as basic functions; determining whether there are auxiliary functions based on the text processing operation; and when there are auxiliary functions, taking both the basic function and the auxiliary function as candidate functions that match the document.
[0046] When the current document scene is a title scene, the full-text writing function and the outline writing function can be used as basic functions, and whether there are auxiliary functions is determined based on the text processing operation; if there are auxiliary functions, both the basic function and the auxiliary function are used as candidate functions; otherwise, only the basic function is used as a candidate function.
[0047] When the document is in the title scenario, the full text writing function and outline writing function are used as basic functions to facilitate the writing of the full text and document outline, and improve the efficiency of document input by providing an overall idea of document writing. When the document is in the title scenario, auxiliary functions that match the text processing operation are also provided, that is, the document input requirements are further refined according to the text processing operation, and the control granularity of the auxiliary functions is refined, which can further improve the matching degree between the candidate functions and the document input requirements, thereby improving the efficiency of document input.
[0048] In an optional implementation, determining whether an auxiliary function exists based on the text processing operation includes: when the text processing operation is a cursor stay 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, may 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 may be used as an auxiliary function. Among them, 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 artificial intelligence-based text generation model to continue creating the document, thereby improving the document input efficiency.
[0050] Specifically, when the document is in the 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 the text generation model based on artificial intelligence to rewrite the selected text, and the rewritten text can be used to replace the selected text. When the document is in the 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 input efficiency of the document.
[0051] In an optional implementation, the function entry of the candidate function is loaded in the document, including: 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 according to the target title; and loading the function entry of the basic function in the document according to the prompt guidance information.
[0052] In the disclosed embodiments, multiple 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 , when the target title is "New Energy Vehicle Industry Report", the prompt guidance information of the full text writing function can be "Help you write the full text of the New Energy Vehicle Industry Report", and the prompt guidance information of the outline writing function can be "Help you write the outline of the New Energy Vehicle Industry Report". When the extracted keywords successfully match the candidate titles, prompt guidance information is generated for the basic function according to the successfully matched target title, and the function entry of the basic function is loaded according to the prompt guidance information, so that the user can judge whether to call the corresponding function entry according to the semantics of the target title in the prompt guidance information, thereby reducing the miscall of 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 only includes the function type but not the title semantics. Figure 2c The prompt guidance information of the full-text writing function can be "Help you write the full text", and the prompt guidance information of the outline writing function can be "Help you write the outline".
[0054] In an optional implementation, the function entry of the basic function is loaded into 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, and the prompt guidance information of the basic function is used as the candidate of the current input sequence to obtain the function entry of the basic function, 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 industry", "line", and "ha" determined by the input method, but also the prompt guidance information of the 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 the 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 embodiment of the present disclosure can further improve the matching degree between the candidate functions and the document input requirements by selecting the candidate functions from the model functions provided by the text generation model in combination with the current document scene and the text processing operation, thereby further improving the document input efficiency. Moreover, when the document is in the title scene, by taking the full text writing function and the outline writing function as the basic functions and determining whether there are auxiliary functions according to the text processing operation, the matching degree between the candidate functions and the document can be further improved, thereby improving the document input efficiency.
[0058] In an optional implementation, determining a candidate function that matches 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 stay operation, taking a continue writing function as a candidate function that matches the document; when the current document scene is a main text scene and the text processing operation is a text selection operation, taking both a continue writing function and a rewrite function as candidate functions that match the document.
[0059] When the document is in the body text scenario and the text processing operation is a cursor retention operation, the continuation function can be used as a candidate function that matches the document. Figure 2d , the function entry of the continuation 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 continuation function and the rewrite function can be used as candidate functions that match the document. Specifically, the function entry of the continuation 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 continuation function and the rewrite function according to the text processing operation in the main text scenario, it is convenient to call the artificial intelligence-based text generation model to continue or rewrite the main text of the document, thereby improving the document input efficiency. Reference Figure 2eWhen the document is in the text scene and the text processing operation is a text selection operation, the function entry of the translation function and the function entry of the document search function can also be loaded in the document. When the function entry of the translation function is selected, the selected text is translated and the translation result is displayed in the translation pop-up window; when the function entry of the document search function is selected, the text information in the document is matched with the candidate document to obtain the successfully matched candidate document, and the candidate document is displayed in the document preview panel.
[0060] In an optional implementation, 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 input in the document and the current input text to obtain the next sentence in the document.
[0061] In the disclosed embodiments, 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 text already entered in the document and the current input text can be tail-truncated to obtain a fixed-length text, and the truncated text is input into the whole sentence prediction model to obtain the next sentence input by the whole sentence prediction model. In the process of writing the main text, the document input efficiency can also be improved by calling the scene prediction model to predict the next sentence.
[0062] In an optional implementation, determining the current document scene of the document based on 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 body scene.
[0063] In an embodiment of the present disclosure, a length threshold of the title that is stopped 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 a case where the text processing operation is a cursor stop operation or a text input operation, the length of the text in the document can be determined based on the text information that has been input in the document; in a 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 that is 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 a title scene; otherwise, the document is in a text scene. There is uncertainty in the text in the selection area. By determining the current document scene based on the text information that is located before the selection area, the stability of the current document scene can be improved.
[0064] Figure 3ais a flowchart 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 according to text information and text processing operations in the document; wherein the candidate functions are determined according to a text generation model based on artificial intelligence;
[0066] S302, loading the function entry of the candidate function in the document;
[0067] S303, when a function entry of any candidate function is selected, determining 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 is used as the input of the text generation model based on artificial intelligence to characterize 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 in combination with the selected candidate function and the text information in the document, so that the text processing requirement content can not only characterize the candidate function, but also retain the original semantics of the user input information in the document. Therefore, in the process of calling the text generation model based on artificial intelligence 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 implementation, 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 disclosed embodiments, corresponding preambles may be provided for candidate functions, and the semantics of the candidate functions may be contained in the preambles. Taking the full-text writing function as an example, the preamble may be "Please write the full text according to the following content:"; taking the outline writing function as an example, the preamble may be "Please write the outline according to the following content:"; taking the continuation writing function as an example, the preamble may be "Please continue writing according to the following content:"; taking the rewrite function as an example, the preamble may 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 function 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 requirement.
[0072] In an optional embodiment, based on the selected candidate function, a preceding statement 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 preceding statement 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 the rewriting function is selected, candidate rewriting intentions and an input box for the rewriting intention may be displayed to guide the user to fill in the rewriting intention. If any candidate rewriting intention is selected, the candidate rewriting intention is used as the target rewriting intention; if a new rewriting intention is entered in the rewriting intention input box, the new rewriting intention is used as the target rewriting intention. Providing candidate rewriting intentions not only facilitates the selection of the target rewriting intention from the candidate rewriting intentions, but also facilitates the provision of ideas for new rewriting intentions.
[0074] After obtaining the target rewriting intention, the preceding statement of the rewriting function is determined in combination with the rewriting function and the target rewriting intention, so that the preceding statement 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 embodiment of the present disclosure, when the function entry of any candidate function is selected, determines the text processing requirement content of the candidate function by combining the selected candidate function and the text information in the document, 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 for the continuation text in the execution result; the secondary editing includes at least one of the following: confirmation, re-authoring, cancellation 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 called to continue writing a document, the following secondary editing entries are added to the continued text: confirmation, re-creation, and cancellation; in response to the selection operation of any secondary editing entry, the continued text is secondary edited, thereby further improving the quality of the document. It should be noted that a modified secondary editing entry can also be added to the continued text, and an underline can be added to the continued text to distinguish it.
[0078] refer to Figure 3d The embodiment of the present disclosure may also provide an artificial intelligence document writing function panel, in which users can be helped to write content through natural language dialogue to improve the writing efficiency of users. In this function panel, portals such as re-creation, use, new conversation, and sending may be provided.
[0079] Specifically, when the document writing function panel is turned on, the user's writing requirement information is obtained, and the writing requirement information is 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 1 is a schematic diagram of a document input device based on artificial intelligence 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 document input device 400 based on artificial intelligence in this embodiment may include:
[0081] A candidate function module 410, for determining candidate functions matching the document according to text information and text processing operations in the document; wherein the candidate functions are determined according to a text generation model based on artificial intelligence;
[0082] A function entry module 420, used for loading the function entry of the candidate function in 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, used to determine the current document scene of the document according to text information in the document;
[0086] The candidate function unit is used to determine the 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, for taking 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, used for determining whether an auxiliary function exists according to the text processing operation;
[0090] The candidate function subunit is used to take both the basic function and the auxiliary function as candidate functions matching the document when an auxiliary function exists.
[0091] In an optional implementation manner, the auxiliary function subunit is specifically used for:
[0092] In the case where the text processing operation is a cursor stay operation, determining that an auxiliary function exists, and using a continue writing function as the auxiliary function;
[0093] In the case where the text processing operation is a text selection operation, determining that an auxiliary function exists, and using a continuation function and an overwrite 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, used for extracting keywords from text in a document when the current document scene is a title scene 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 implementation, the inlet loading unit is specifically used for:
[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 for:
[0103] When the current document scene is a text scene and the text processing operation is a cursor stay operation, taking a continue writing function 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 overwriting 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 according to 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, used for determining a preamble of the selected candidate function according to 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 for:
[0112] When the selected candidate function is a rewrite function, displaying candidate rewrite intentions corresponding to the rewrite 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 continuation text in the execution result when the selected candidate function is the continuation function; the secondary editing includes at least one of the following: confirmation, re-creation, revocation or modification;
[0117] The secondary editing unit is used 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, used to determine the text length according to 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 implementation, the above-mentioned artificial intelligence-based document input device 400 further includes:
[0122] The sentence prediction module is used to predict the whole sentence based on the text input in the document and the current input text to obtain the next sentence in the document when the current document scene is a text scene and the text processing operation is a text input operation.
[0123] The technical solution of the disclosed embodiment provides an intelligent association method based on a computer (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, thereby improving the document input efficiency.
[0124] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance 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 It 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 an embodiment 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 processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required 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. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. 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 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 through a computer network such as the Internet and / or various telecommunication networks.
[0130] The computing unit 501 may be a variety of general and / or special 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), an image processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as a document input method based on artificial intelligence. For example, in some embodiments, the document input method based on artificial intelligence may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the document input method based on artificial intelligence described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform a document input method based on artificial intelligence in any other appropriate manner (e.g., by means of firmware).
[0131] Various implementations of the systems and techniques described above herein 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), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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 may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0133] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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 may 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 with a graphical user interface or a web browser through which a user can interact with implementations 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 may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications 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 the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0137] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, knowledge graph technology, and other major directions.
[0138] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for technical applications such as artificial intelligence and blockchain, as well as model training.
[0139] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0140] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. Artificial intelligence-based document input method, including: Determine 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; Loading a function entry of the candidate function in the document; When a 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.
2. The method according to claim 1, wherein: The step of determining, based on text information and text processing operations in the document, candidate functions matching the document includes: Determining a current document scene of the document according to text information in the document; According to the current document scenario and the text processing operation, a candidate function matching the document is determined.
3. The method according to claim 2, wherein: The step of determining, according to the current document scenario and the text processing operation, a candidate function matching the document comprises: In the case where the current document scene is a title scene, a full text writing function and an outline writing function are used as basic functions; Determining whether an auxiliary function exists according to the text processing operation; In the case where an auxiliary function exists, both the basic function and the auxiliary function are taken as candidate functions matching the document.
4. The method according to claim 3, wherein: The determining, according to the text processing operation, whether an auxiliary function exists comprises: In the case where the text processing operation is a cursor stay operation, determining that an auxiliary function exists, and using a continue writing function as the auxiliary function; In the case where the text processing operation is a text selection operation, determining that an auxiliary function exists, and using a continuation function and an overwrite 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.
5. The method according to claim 3, wherein: The function entry for loading 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 text in the document; 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.
6. The method according to claim 5, 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.
7. The method according to claim 2, wherein: The step of determining, according to the current document scenario and the text processing operation, a candidate function matching the document comprises: When the current document scene is a text scene and the text processing operation is a cursor stay operation, taking a continue writing function 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 overwriting function are used as candidate functions matching the document.
8. The method according to any one of claims 1 to 7, wherein: In the case of selecting a function entry of any candidate function, 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 case of selecting a function entry of any candidate function, determining text processing requirement content of the selected candidate function according to 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.
9. The method according to claim 8, wherein: The step of determining the text processing requirement content of the selected candidate function according to the selected candidate function and the text information in the document includes: According to the selected candidate function, determining a preceding 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.
10. The method according to claim 9, wherein: According to the selected candidate function, the preceding statement of the selected candidate function is determined, including: When the selected candidate function is a rewrite function, displaying candidate rewrite intentions corresponding to the rewrite 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.
11. The method according to claim 4 or 7, wherein: The document is updated according to the execution result, including: In the case where 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, 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.
12. The method according to claim 2, wherein: The determining, based on text information in the document, the current document scene in which the document is located, includes: Determine 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; wherein the current document scene is a title scene or a text scene.
13. The method according to claim 2, 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 that has been input in the document and the current input text to obtain the next sentence in the document.
14. A document input device based on artificial intelligence, comprising: A candidate function module, used to determine candidate functions matching the document according to text information and text processing operations in the document; wherein the candidate functions are determined according to a text generation model based on artificial intelligence; A function entry module, used for loading the function entry of the candidate function in the document; The document updating 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 to update the document according to the execution result.
15. The device according to claim 14, wherein: The candidate functional modules include: A document scene unit, used to determine the current document scene of the document according to text information in the document; The candidate function unit is used to determine the candidate function matching the document according to the current document scenario and the text processing operation.
16. The device according to claim 15, wherein: The candidate functional units include: A basic function subunit, for taking 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, used for determining whether an auxiliary function exists according to the text processing operation; The candidate function subunit is used to take both the basic function and the auxiliary function as candidate functions matching the document when an auxiliary function exists.
17. The device according to claim 16, wherein: The auxiliary function subunit is specifically used for: In the case where the text processing operation is a cursor stay operation, determining that an auxiliary function exists, and using a continue writing function as the auxiliary function; In the case where the text processing operation is a text selection operation, determining that an auxiliary function exists, and using a continuation function and an overwrite 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.
18. The device according to claim 16, wherein: The functional entry module includes: A keyword unit, used for extracting keywords from text in a document when the current document scene is a title scene and the candidate function is the basic 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.
19. The device according to claim 18, 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.
20. The device according to claim 15, wherein: The candidate functional unit is specifically used for: When the current document scene is a text scene and the text processing operation is a cursor stay operation, taking a continue writing function 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 overwriting function are used as candidate functions matching the document.
21. The device according to any one of claims 14 to 20, wherein: The document updating module comprises: A requirement content unit, for determining text processing requirement content of the selected candidate function according to 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.
22. The device according to claim 21, wherein The demand content unit includes: A preamble subunit, used for determining a preamble of the selected candidate function according to 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.
23. The device according to claim 22, wherein: The preamble subunit is specifically used for: When the selected candidate function is a rewrite function, displaying candidate rewrite intentions corresponding to the rewrite 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.
24. The device according to claim 17 or 20, wherein: The document updating module comprises: An editing entry unit, for adding a secondary editing entry to the continuation text in the execution result when the selected candidate function is the continuation function; the secondary editing includes at least one of the following: confirmation, re-creation, revocation or modification; The secondary editing unit is used 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.
25. The device according to claim 15, wherein: The document scene unit includes: A text length subunit, used to determine the text length according to 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; wherein the current document scene is a title scene or a text scene.
26. The apparatus according to claim 15, further comprising: The sentence prediction module is used to predict the whole sentence based on the text input in the document and the current input text to obtain the next sentence in the document when the current document scene is a text scene and the text processing operation is a text input operation.
27. 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 13.
28. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-13.
29. 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 13.
Citation Information
Patent Citations
Auxiliary writing method and apparatus based on artificial intelligence
CN106650943A
Method and device for writing brief descriptions of drawings based on big data
CN106776762A
Conversation system construction method and device, computer equipment and storage medium
CN110196901A
Document query method and device, electronic equipment and storage medium
CN112507068A
Auxiliary writing method, device and system based on language model
CN112966479A
Cited By
Interaction method and apparatus, electronic device, and storage medium
WO2026208732A1
