Sentence generation and display method based on three-level on-screen and applied to input method

By integrating large model technology into the input method, sentence generation and display based on 'three-level on-screen' are realized, which solves the shortcomings of traditional input methods in efficient input and high-quality text generation, and improves the intelligence level of the input method. and user experience, especially in the area of ​​professional document writing.

CN118535028APending Publication Date: 2024-08-23HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410774665.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-08-23

Smart Images

  • Figure CN118535028A
    Figure CN118535028A
Patent Text Reader

Abstract

The invention discloses a sentence generation and display method based on'three-level on-screen ', which is applied to an input method. The method comprises the following steps of: displaying English or pinyin input by a user in a group word area; if the Pinyin input by the user in the group word area is detected, displaying a candidate word display interface in response to the operation of inputting the Pinyin; filling the selected candidate words into the word combination area, and replacing pinyin in the original word combination area; the large model triggering shortcut key is pressed down, in response to operation for content in the group word area, the client sends a bilingual generation request to the server based on the content in the group word area, the server calls the large model to execute bilingual generation operation and returns a result to the client, and the client displays a sentence generation display interface; displaying at least one sentence generated by using a large model according to the content in the group word area in the sentence generation display interface, and selecting a certain recommended sentence to enter the terminal equipment. According to the method, text prediction and continuous writing of the sentences can be directly realized in the input method, and the input efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer technology and relates to a sentence generation and display method, and in particular to a Chinese-English bilingual generation method applied to an input method. Background Art

[0002] Currently popular input methods, such as Sogou Input Method and Baidu Input Method, mostly adopt the "secondary screen" mode, that is, after the user enters pinyin in the character group area, the input method can only display the corresponding candidate characters or word lists. Although this mode can recommend associated words or phrases based on the user's instant pinyin input, it cannot predict or generate longer text paragraphs. This limitation leads to a low degree of intelligence in the input method, which cannot meet the user's needs for efficient input and high-quality text generation. Especially when writing professional documents that require a high level of knowledge, such as official documents, academic papers, press releases or advertising copy, the use of traditional input methods is not efficient. Summary of the invention

[0003] In order to solve the above-mentioned problems existing in traditional input methods, the present invention integrates the document generation technology based on a large model into the input method, and proposes a sentence generation and display method based on a "three-level upper screen" applied to the input method. This method proposes for the first time to combine the document generation method based on a large model with the input method tool, which is the first time in academia and industry, and has opened up a new development direction for input method technology, with great theoretical significance and application value. By continuing to explore and optimize this combination, the input method of the future will not only be a simple text input tool, but will become an intelligent, advanced assistant that can assist users to efficiently complete the writing of various documents. The advancement of this technology will help to promote the entire input method industry to a higher level of intelligence, especially in the field of professional document writing, and it can be expected to bring revolutionary changes.

[0004] The objective of the present invention is achieved through the following technical solutions:

[0005] A sentence generation and display method based on "three-level upper screen" applied to an input method comprises the following steps:

[0006] Step 1: The English or Pinyin input by the user is displayed in the character group area;

[0007] Step 2: In response to the operation of inputting English, directly jump to step 4; if the pinyin input by the user in the word group area is detected, in response to the operation of inputting the pinyin, a candidate word display interface is displayed, and the candidate word display page displays at least one candidate word determined based on the input pinyin;

[0008] Step 3: Fill the selected candidate word into the character group area and replace the pinyin in the original character group area, and the secondary screen operation is completed;

[0009] Step 4: Press the big model trigger shortcut key. In response to the operation on the content in the word group area, the client sends a Chinese-English bilingual sentence generation request to the server based on the content in the word group area. The server calls the big model to perform the Chinese-English bilingual sentence generation operation and returns the result to the client. The client displays the sentence generation display interface.

[0010] Step 5: The sentence generation display interface displays at least one sentence generated by the large model based on the content in the word group area. Select a recommended sentence to enter the terminal device to complete the three-level on-screen operation.

[0011] Compared with the prior art, the present invention has the following advantages:

[0012] (1) Improve input efficiency: Traditional input methods are inefficient when processing long texts. Users need to repeatedly input pinyin and select from candidate words, which is time-consuming and error-prone. However, large model-based technology can predict and generate the entire text at the initial stage of user input, greatly reducing input operations and thus improving the overall input speed.

[0013] (2) Improve text quality: Large models such as the GPT series perform well in text generation. They can not only generate sentences with accurate grammatical structure, but also maintain the logical coherence of the content. This is especially important for professional document writing that requires rigorous text expression, and can significantly improve the overall quality of the document.

[0014] (3) Increase intelligent and personalized functions: The input method based on the big model can adjust the style and content of text generation according to the user's writing style, word usage habits and other personalized information, thereby achieving more advanced personalized services.

[0015] (4) Meeting professional writing needs: For users who need to write professional documents, traditional input methods do not provide sufficient support in terms of professional terminology processing, format structure organization, etc. The big model can generate text that meets specific formats and professional standards based on document types and domain knowledge, greatly facilitating the work of professionals.

[0016] (5) The present invention integrates a large model-based text generation method into the input method, so that the input method can automatically generate richer and more accurate text content, thereby improving the intelligence level of the input method and the user input efficiency, especially in processing scenarios that require complex text input.

[0017] (6) The present invention proposes for the first time to automatically construct prompts based on the content of the user input word group area using the user portrait, and use the constructed prompts as the input of the large model to achieve direct text prediction and continuation of sentences in the input method, significantly improving input efficiency, especially in scenarios such as professional document writing. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a schematic diagram of the implementation environment of the solution provided in Example 1.

[0019] Figure 2 It is a flow chart of a sentence generation and display method based on “three-level upper screen” applied to an input method provided in Example 2.

[0020] Figure 3 This is a flow chart of the Chinese-English bilingual generation method applied to the input method provided in Example 3.

[0021] Figure 4 This is a flowchart displayed in a sentence generation display interface in an input method provided by Example 4.

[0022] Figure 5 It is a schematic diagram of a display interface of a bilingual generation method applied to an input method provided in embodiments 2 to 5.

[0023] Figure 6 It is a schematic diagram of the bilingual generation method applied to the input method provided in Example 5. DETAILED DESCRIPTION

[0024] The technical solution of the present invention is further described below in conjunction with the accompanying drawings, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be included in the protection scope of the present invention.

[0025] The present invention provides a sentence generation and display method based on "three-level upper screen" applied to input method, which not only retains the basic functions of traditional input method, but also introduces an intelligent text generation mode based on "three-level upper screen". In this mode, the user can input content (Chinese or English or Chinese and English mixed) in the word group area, and by triggering shortcut keys, construct the prompt required to interact with the large model, and then send the constructed prompt to the large model on the server side for automatic text generation, and return the generated results to the client in real time for display in the sentence generation display interface. Specifically comprising the following steps:

[0026] Step 1: The English or pinyin input by the user is displayed in the character group area.

[0027] In this step, English is entered by default. After pressing the shift key, the user can enter pinyin in the character group area.

[0028] Step 2: In response to the operation of inputting English, jump directly to step 4; if the pinyin input by the user in the character group area is detected, in response to the operation of inputting pinyin, a candidate word display interface is displayed, and the candidate word display page displays at least one candidate word determined based on the input pinyin.

[0029] Step 3: Fill the selected candidate word into the character group area and replace the pinyin in the original character group area. At this time, the secondary screen operation is completed.

[0030] Step 4: Press the big model to trigger the shortcut key. In response to the operation on the content in the character group area, the client sends a Chinese-English bilingual sentence generation request to the server based on the content in the character group area. The server calls the big model to perform the Chinese-English bilingual sentence generation operation and returns the result to the client. The client displays the sentence generation display interface.

[0031] In this step, the content in the word group area can be in Chinese or English or a mixture of Chinese and English, which is not limited in the present invention.

[0032] In this step, the specific steps of the Chinese-English bilingual sentence generation operation are as follows:

[0033] Step 41: Read the content of the group word area as a user request.

[0034] In this step, the user request refers to the content input by the user in the word group area, which represents the original intention that the user wants to convey to the large model.

[0035] Step 42: Obtain the user's personalized information based on the user portrait model within the local input method.

[0036] In this step, the user portrait model is a deep learning model that predicts the personalized information of the user based on the user's historical input. The model first cleans the historical input content of the user in the input method group area to eliminate information that is irrelevant to the professional document field. Next, the entity extraction technology is used to identify and extract keywords from the cleaned data. The keywords are then sent to the trained multi-layer perceptron-based deep learning model to generate the user's professional tags, such as "program analysis", "code representation", etc. The structure of the multi-layer perceptron deep learning model includes an input layer, several hidden layers and an output layer. Each layer uses a nonlinear activation function to enhance the expressiveness of the model, and optimizes the model weights through the back-propagation algorithm to ensure accurate mapping of input keywords to corresponding tags.

[0037] Step 43: Combine the user request with the personalized information, automatically construct a model based on the prompt to generate the prompt, and send the prompt to the large model in the server through the network.

[0038] In this step, the Prompt automatic construction model architecture integrates user requests and personalized information, and uses automatic prompt word construction technology to guide the large model to generate personalized professional corpus. First, the model receives the content entered by the user in the group word area and the user personalized data generated in step 42, such as professional tags related to the user's writing field, as input. Then, the structured prompt word module constructs a structured prompt word composed of roles, tasks, requirements and prompts according to the group word area content and personalized data. Finally, the structured prompt word is input into the prompt word generator module based on the open source large model such as Llama3 to optimize and generate the prompt word with variants. The final prompt word generated by the automatic construction model will be sent to the professional corpus text generation large model to generate sentences that meet the user's professional needs and personal preferences. This architecture not only automates the professional corpus automatic generation process, but also ensures that the generated content is personalized for the user's professional field and requirements, and understands and responds to complex user needs through advanced AI technology.

[0039] In this step, there are multiple large models for generating professional corpus in the server, and users can freely choose according to their own usage, and the present invention does not limit this.

[0040] Step 44: The paragraph or sentence generated by the large model is transmitted back to the client through the network and displayed in the sentence generation display interface of the subsequent step 5.

[0041] Step 5: The sentence generation display interface displays at least one sentence generated by the large model based on the content in the word group area. Select a recommended sentence to enter the terminal device to complete the three-level on-screen operation.

[0042] In this step, the specific steps for displaying in the sentence generation display interface are as follows:

[0043] Step 51: When the large model in the server executes paragraph or sentence generation, the generation result is transmitted back to the input method of the client in real time using streaming transmission.

[0044] Step 52: After receiving the text generated by the large model, the input method will immediately display it on the sentence generation display interface.

[0045] In this step, the candidate list of the display interface will display a prompt message, indicating that the large model is generating text, and the prompt message defaults to "Generating". The present invention does not limit the specific content of the prompt message. Once the text generation is completed, the prompt message will automatically disappear.

[0046] Embodiment 1:

[0047] Figure 1The schematic diagram of the implementation environment of the solution provided by this embodiment is shown. The implementation environment of the solution may include: a terminal device 10 and a server 20, wherein:

[0048] The terminal device 10 includes but is not limited to electronic devices such as mobile phones, tablet computers, and PCs (Personal Computers). The client of the target application can be installed in the terminal device 10. Optionally, the target application can be an application that needs to be downloaded and installed, or it can be in the form of a web page or a small program, which is not limited in this embodiment.

[0049] The server 20 is used to provide background services for the client of the target application in the terminal device 10. For example, the server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited to these.

[0050] The terminal device 10 and the server 20 can communicate with each other via a network. The network can be a wired network or a wireless network.

[0051] In an embodiment, the target application may be an input method application. Of course, the input method application may be an independent application or a functional module with an input method function in a certain target application. Optionally, the target application may be a chat application, a search application, a document writing application, etc., which is not limited in this embodiment. For example, if the target application is an input method application, it can provide the user with at least one candidate word according to the pinyin input by the user. When the user enters Chinese or enters English in English mode by selecting the candidate word corresponding to the pinyin in the group word area, the shortcut key is triggered to automatically generate sentences or paragraphs, and in response to the operation of generating sentences for the content of the group word area, the candidate sentence display interface is displayed, that is, multiple generated sentences related to the content of the group word area are displayed to the user, so that the user can select sentences to enter sentences into the editor. Optionally, the client of the above-mentioned target application is running in the terminal device 10. In this embodiment, the target application may also be a web page. On the terminal device 10 running the web page, in response to the user's input pinyin, the web page can give at least one candidate word for the input pinyin, and further, give the relevant generated sentences of the content of the group word area.

[0052] Embodiment 2:

[0053] Figure 2 The figure shows a flowchart of a sentence generation and display method based on "three - level screen input" applied to an input method in this embodiment. In this sentence generation and display method, the execution entity of each step can be a computer device, which refers to an electronic device with data calculation, processing, and storage capabilities. The computer device can be Figure 1 the terminal device 10 in

[0054] Step 210: Display the English or pinyin input by the user in the character composition area. By default, English is input. After pressing the shift key, the user can input pinyin in the character composition area.

[0055] The character composition area refers to the area 510 used to temporarily store the input text to be confirmed. Before the user selects a record from the word recommendation list or from the sentence generation and display interface, the input content, whether Chinese or English, will be temporarily saved in the character composition area. In this embodiment, underlined text can be used to identify the content stored in the current character composition area, and highlighted text can be used to identify the content of the character composition area. The present invention does not limit this.

[0056] The input method is based on Chinese - English bilingual. English can be directly input into the character composition area. When the system detects a change in the content in the character composition area, it automatically performs bilingual search and displays the search results in the sentence recommendation display interface 520. Chinese can be input by pinyin or other forms. Exemplarily, as Figure 5 (b), input the Chinese character "方法" by inputting the pinyin "fangfa". Of course, the input method can also support other types of languages. The present invention does not limit this. In this embodiment, in addition to using the keyboard, the user can also input text in the form of voice, photos, etc.

[0057] Step 220: In response to the operation of inputting English, directly jump to step 240; in response to the operation of inputting pinyin, display a candidate word display interface, and the candidate word display page displays at least 1 candidate word determined based on the input pinyin.

[0058] In this embodiment, by default, the input content is treated as English. After pressing the shift key, the input mode is switched, and the user can input pinyin in the character composition area. In this embodiment, the input mode can also be switched by shortcut keys, voice, etc. The present invention does not limit the method of switching the input mode.

[0059] When in the pinyin input mode, the content input by the user will be temporarily stored in the character composition area. Exemplarily, as Figure 5(b), the user uses the shortcut key shift to switch to the pinyin input mode, and inputs "fangfa" 530 through the input method, "fangfa" will be displayed in the character group area, and then the system matches it with the built-in pinyin character library according to the intelligent matching algorithm, and displays the matching results in the candidate list 540. In this embodiment, multiple candidate words such as "method", "visit method", and "put" are returned. In this embodiment, the user's way of inputting Chinese is not limited to pinyin, but can also be radicals, strokes, voice input, etc., which are not limited by the present invention.

[0060] In this embodiment, the candidate words found are displayed vertically in the candidate list in order of high to low matching degree. This embodiment has no limit on the number of content items displayed in the candidate area, but at least one content item that meets the requirements should be included; the form of displaying the candidate words can also be horizontal or page turning. The operation types for the operation of the candidate word search results include but are not limited to pressing the Enter key, pressing the number keys, etc., and the present invention does not limit the specific operation type.

[0061] Step 230: Fill the selected candidate word into the character group area and replace the pinyin in the original character group area, and the secondary screen operation is completed.

[0062] For example, Figure 5 (b), the current content of the word grouping area is "machine learning is very popularfangfa", where "fangfa" is the content entered by the user in pinyin mode, and the other contents are all in English. At this time, the candidate words displayed in the candidate list in order are "method", "visit method", and "put on". When the user presses the number key "1", that is, the candidate word ranked first in the candidate list is selected, the content of the word grouping area will become "machine learning is very popular method" 550. Of course, the user can also select candidate words by "arrow key + enter" or mouse click. The system detects that the content in the word grouping area has changed, automatically performs a bilingual search, and displays the search results in the sentence recommendation display interface 560.

[0063] Step 240: Press the large model trigger shortcut key, in response to the operation on the content in the word group area, the client sends a bilingual generation request to the server based on the content in the word group area, the server calls the large model to perform the bilingual generation operation, and returns the result to the client, and the client displays the sentence generation display interface. The content in the word group area can be Chinese or English or a mixture of Chinese and English.

[0064] In this embodiment, the user enters some content in the word group area and presses the large model trigger shortcut key such as "~". The client sends a large model call request to the server. The server calls the large model, performs text prediction and continuation based on the content in the word group area, and returns the result to the client. When the prediction is in progress, a prompt message such as "Generating" 570 will be displayed in the candidate list. The content of the prompt message is not limited in this application. For example, Figure 5 (b), the user enters "Machinelearning is a very popular method" and presses the shortcut key. The first line in the candidate list shows the content being generated by the large model and displays a prompt message. The search results in step 230 are moved back in sequence. In this embodiment, after the prediction is completed, the prompt message disappears, and the first line in the candidate list shows the prediction content 580 completed by the large model. For example, Figure 5 (e), the user inputs "Machine learning is a very popular method", presses the large model trigger shortcut key, and the first row of the candidate list shows the prediction content completed by the large model. In this embodiment, the method of calling the large model generation may also be in other forms, which are not limited by the present invention.

[0065] Step 250: at least one sentence generated by the large model based on the content in the word group area is displayed in the sentence generation display interface, and a recommended sentence is selected to enter the terminal device to complete the third-level on-screen operation 590.

[0066] This embodiment has no limit on the number of content items displayed in the sentence generation display interface, but it should contain at least one content that meets the requirements; in this embodiment, the generated sentences can be displayed in the first few lines of the original candidate list window or directly after the input content in the word group area. The present invention does not limit the form of sentence display.

[0067] Embodiment 3:

[0068] Figure 3 The flowchart of the Chinese-English bilingual generation method provided by the embodiment is shown. The execution subject of the method can be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. The computer device can be Figure 1 The terminal device 10 in the embodiment may also be a server 20. In this embodiment, for the convenience of description, only the execution subject of each step is introduced as a "client" or a "server".

[0069] Step 310: Read the content of the word grouping area as a user request. The user request refers to the text input in the word grouping area, and the large model generates subsequent content based on the text in the word grouping area.

[0070] In this embodiment, the user has entered some content in the word group area, which can be Chinese or English or a mixture of Chinese and English. By pressing a large model shortcut key such as "~", the system will read all the content in the word group area as the user request. For example, Figure 5 (c)(d), after pressing the big model shortcut key, the big model reads the user's request, and the content in the candidate list changes. Of course, in this embodiment, the way to call the big model can also be other forms, such as voice, command, etc., and the present invention is not limited to this.

[0071] Step 320: Obtain the user's personalized information based on the user portrait model in the local input method. The user portrait model is a deep learning model that predicts the user's personalized information based on the user's historical input. By analyzing the user's historical input content on the client and the selection of bilingual search results, a more accurate prediction of the user's request is achieved.

[0072] In this embodiment, during operation, the input method first collects the historical input content of the user in the input method character group area, and performs data cleaning to eliminate information that is not related to the professional document field. Next, entity extraction technology is used to identify and extract keywords from the cleaned data. The keywords are then sent to the trained multi-layer perceptron-based user portrait model to generate the user's professional tags, such as "clinical", "prevention", "treatment", etc. Based on the predicted user tag information, it is inferred that the user is more interested in the medical field, thereby improving the accuracy of subsequent sentence generation.

[0073] Step 330: Combine the user request with the personalized information, automatically construct a model based on the prompt to generate a prompt, and send the prompt to the large model in the server through the network. The prompt is the prompt word when calling the large model. The constructed prompt generation model is used to input the user request in step 310 and the personalized information obtained in step 320 to generate a personalized prompt. This prompt can contain the specific content of the user request, and at the same time combine the personalized information to make the generated text more in line with the user's needs and interests.

[0074] In this step, the large model is a text generation model, such as GPT-4, or other types of general artificial intelligence models. Large models dedicated to professional text generation can also be developed. Such models use high-quality bilingual corpora to incrementally train the 20 billion parameter GPT-NeoX model or other models pre-trained based on Wikipedia and other open source materials. Then, by building a dedicated instruction fine-tuning dataset, the large model is fine-tuned to ensure that it can accurately generate professional corpora. The present invention does not limit the type of large model and the training and calling techniques of the model.

[0075] Step 340: Transmit the paragraph or sentence generated by the large model back to the client through the network.

[0076] In this embodiment, the content generated by the large model and other sentences recommended by normal knowledge search are displayed in the candidate area. After the paragraph is generated, the newly generated content will replace the sentence originally in the first place, and the sentences obtained by other knowledge search will be moved back in sequence. Figure 5 (c)(d)(e), the first line of content in the candidate list is displayed as the text generated by the large model, and the other sentences are moved back in sequence. The present invention has no limitation on the display method of the content generated by the large model. For example, the newly generated content can be displayed in a new tab page for user selection. The present invention does not limit the process and technology of knowledge search.

[0077] Embodiment 4:

[0078] Figure 4 The flowchart shown in the sentence generation interface provided by this embodiment is displayed. The execution subject of the method can be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. The computer device can be Figure 1 The terminal device 10 in the embodiment may also be a server 20. In this embodiment, for the convenience of description, only the execution subject of each step is introduced as a "client" or a "server".

[0079] Step 410: When the large model in the server executes paragraph or sentence generation, the generation result is transmitted back to the input method of the client in real time using a streaming transmission method.

[0080] When the large model generates content, the server and the client will establish a persistent connection and transmit data in real time, which involves network communication technology and real-time data transmission protocols, such as WebSocket, Server-Sent Events, etc. The present invention does not limit the specific transmission protocol.

[0081] When the large model starts to be generated, the text is transmitted to the client during the generation process, rather than waiting for the large model to be fully generated and then transmitting it all at once. Streaming significantly reduces latency and improves user experience.

[0082] Step 420: After receiving the text generated by the large model, the input method will immediately display it on the sentence generation display interface. The candidate list of the display interface will display a prompt message indicating that the large model is generating text.

[0083] After the client receives the content generated by the large model, it will render the content in real time to the sentence generation display interface. The prompt message on the display interface defaults to "Generating". For example, Figure 5(d) The candidate list displays the content being generated by the large model in real time, and displays a prompt message "Generating". The present invention does not limit the specific content of the prompt message, and once the text generation is completed, the prompt message will automatically disappear.

[0084] During the sentence display process, the user can terminate the large model execution process in advance and fill the generated text into the editor, or press the large model shortcut key "~" again to re-execute the large model generation.

[0085] Embodiment 5:

[0086] Figure 6 FIG. 1 is a schematic diagram of a bilingual generation method applied to an input method provided by this embodiment.

[0087] The first is the bilingual search process. The user inputs English or Chinese into the character group area through the input method client. When the input method detects that the text content in the character group area has changed, it automatically performs a bilingual search process. The input method client sends a request to the input method server (the server of the input method application). The server uses the bilingual search method to query the distributed index warehouse, obtain relevant professional corpus, and return the matching results to the input method server. Finally, it returns them to the input method client and displays them in the candidate list. Figure 5 (a)(c), the present invention does not limit the bilingual search process and technology.

[0088] When the user presses the shortcut key to generate a large model, the bilingual generation process begins. The input method client sends the prompt words generated by the automatic construction model to the professional corpus text in the server to generate a large model to generate sentences that meet the user's professional needs and personal preferences. The server returns the generated results to the input method client and displays them on the sentence generation display interface, such as Figure 5 (d)(e). Of course, the bilingual search results and bilingual generated results can also be sent separately and displayed in the same display interface, such as Figure 5 (d)(e), where the bilingual generated results are displayed in the first line of the interface, and the bilingual search results are displayed in the following order. When the user selects a candidate in the candidate list, the candidate is input into the editor, such as Figure 5 (f).

[0089] Through the method of this embodiment, on the one hand, the bilingual generation results are returned in real time. When the user is inputting content, press the large model shortcut key, the input method can read the user's request in real time and send the request to the server, the server calls the large model to generate text and returns the generated results through streaming, ensuring the real-time nature of the bilingual generation results. On the other hand, the intelligence level of the input method is enhanced. Since the results returned by the bilingual generation system are highly related to the content input by the user, it can fully predict the content that the user wants to input. These bilingual generation results may be highly consistent with the content that the user wants to input, making the user's input experience intelligent. Finally, the user's experience is enhanced. The system can use the large model to accurately understand the specific content of professional corpora, and effectively generate bilingual knowledge that is highly matched with the actual needs of users. The system can dynamically display relevant bilingual corpora according to the different content input by the user, thereby realizing more accurate and personalized input method applications, and significantly improving the efficiency and quality of document writing.

Claims

1. A sentence generation and display method based on "three-level upper screen" applied to input method, characterized in that The method comprises the following steps: Step 1: The English or Pinyin input by the user is displayed in the character group area; Step 2: In response to the operation of inputting English, jump directly to step 4; If the pinyin input by the user in the word group area is detected, in response to the operation of inputting the pinyin, a candidate word display interface is displayed, wherein the candidate word display page displays at least one candidate word determined based on the input pinyin; Step 3: Fill the selected candidate word into the character group area and replace the pinyin in the original character group area, and the secondary screen operation is completed; Step 4: Press the big model trigger shortcut key. In response to the operation on the content in the word group area, the client sends a Chinese-English bilingual sentence generation request to the server based on the content in the word group area. The server calls the big model to perform the Chinese-English bilingual sentence generation operation and returns the result to the client. The client displays the sentence generation display interface. Step 5: The sentence generation display interface displays at least one sentence generated by the large model based on the content in the word group area. Select a recommended sentence to enter the terminal device to complete the three-level on-screen operation.

2. The sentence generation and display method based on "three-level upper screen" applied to the input method according to claim 1, characterized in that In step 1, English is input by default, and after pressing the shift key, the user inputs pinyin in the word group area.

3. The sentence generation and display method based on "three-level upper screen" applied to the input method according to claim 1, characterized in that In step 4, the content in the character group area is Chinese or English or a mixture of Chinese and English.

4. The sentence generation and display method based on "three-level on-screen" applied to the input method according to claim 1, characterized in that In step 4, the specific steps of the Chinese-English bilingual sentence generation operation are as follows: Step 41: Read the content of the word group area as a user request; Step 42: Obtaining personalized information of the user based on the user portrait model within the local input method; Step 43: Combine the user request with the personalized information, automatically construct a model based on the prompt to generate a prompt, and send the prompt to the large model in the server through the network; Step 44: The paragraph or sentence generated by the large model is transmitted back to the client through the network and displayed in the sentence generation display interface of step 5.

5. The sentence generation and display method based on "three-level upper screen" applied to the input method according to claim 4 is characterized in that The user portrait model is a deep learning model that predicts the user's personalized information based on the user's historical input. The model first cleans the user's historical input content in the input method group area to eliminate information that is irrelevant to the professional document field. Next, it uses entity extraction technology to identify and extract keywords from the cleaned data, and then sends the keywords to a trained deep learning model based on a multi-layer perceptron to generate the user's professional label.

6. The sentence generation and display method based on "three-level on-screen" applied to the input method according to claim 4, characterized in that The Prompt automatic construction model architecture integrates user requests and personalized information, and uses automatic prompt word construction technology to guide the large model to generate personalized professional corpus. First, the model receives the content entered by the user in the word group area and the user personalized data generated in step 42 as input. Then, the structured prompt word module constructs structured prompt words consisting of roles, tasks, requirements and prompts according to the content of the word group area and the personalized data. Finally, the structured prompt words are input into the prompt word generator module based on the open source large model to optimize and mutate the generated prompt words. The final prompt words generated by the Prompt automatic construction model will be sent to the professional corpus text generation large model to generate sentences that meet the user's professional needs and personal preferences.

7. The sentence generation and display method based on "three-level on-screen" applied to the input method according to claim 1, characterized in that In step 5, the specific steps for displaying in the sentence generation display interface are as follows: Step 51: When the large model in the server executes paragraph or sentence generation, the generated results are transmitted back to the input method of the client in real time by streaming; Step 52: After receiving the text generated by the large model, the input method will immediately display it on the sentence generation display interface.

8. The sentence generation and display method based on "three-level on-screen" applied to the input method according to claim 7, characterized in that In step 52, the candidate list of the display interface will display a prompt message indicating that the large model is generating text. The prompt message defaults to "Generating". Once the text generation is completed, the prompt message will automatically disappear.