CN-117112764-B - Text processing method, device, storage medium and equipment
Abstract
The application discloses a text processing method, a device, a storage medium and equipment, wherein the method comprises the steps of firstly obtaining a target task text to be processed, which is input by a target user; and then, automatically analyzing the combined text, and carrying out structuring and self-adaptive mixed rewriting on the preset prompt word by utilizing an analysis result to obtain the optimized prompt word text. Therefore, the method and the device effectively optimize the written prompting words by adopting a structured and self-adaptive mixed prompting word writing mode, and improve the writing efficiency and accuracy of the prompting words, so that the related AI model can more accurately understand and execute the target tasks indicated by the target users, and further improve the interaction experience of the target users.
Inventors
- SUN QINGHUA
- ZHU YUHAO
- WANG SHIJIN
- HU GUOPING
- LIU CONG
- WEI SI
Assignees
- 科大讯飞股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230904
Claims (8)
- 1. A text processing method, comprising: acquiring a target task text to be processed, which is input by a target user; Combining the target task text by utilizing a fixed prefix of a preset prompting word to obtain a combined text, wherein the fixed prefix of the preset prompting word comprises a using rule of the prompting word, the using rule of the prompting word comprises a fixed flow part in the prompting word marked by a first preset marking symbol, and the using rule of the prompting word comprises a random strain flow part in the prompting word marked by a second preset marking symbol; Automatically analyzing the combined text, identifying a fixed flow part text and a random strain flow part text in the prompt word text by utilizing an analysis result, and marking the fixed flow part text in the optimized prompt word text by utilizing a first preset marking symbol; and marking the random strain flow part text in the optimized prompt word text by using a second preset mark symbol to obtain the optimized prompt word text.
- 2. The method according to claim 1, wherein after the target task text is combined by using a fixed prefix of a preset prompt word to obtain a combined text, the method further comprises: The large language model LLM is obtained by utilizing a large-scale language data set to carry out language rule and mode training in an autoregressive generation mode, and when new text data are generated, the large language model LLM predicts the possibility of a next language unit based on the content which is generated before until complete text data are generated; the automatic analysis is carried out on the combined text, and the analysis result is utilized to carry out the structuralization and self-adaptive mixed type rewriting on the preset prompting word, so as to obtain the optimized prompting word text, which comprises the following steps: And automatically analyzing the combined text by using the large language model LLM, and carrying out structural and self-adaptive hybrid rewriting on the preset prompt word by using an analysis result to obtain an optimized prompt word text.
- 3. The method according to claim 1, wherein the method further comprises: And feeding back the optimized prompt word text to the target user.
- 4. The method of claim 2, wherein the method further comprises: and calling intelligent recognition and processing capacity of the large language model LLM, and updating the random strain flow part text of the prompt word text to obtain the updated prompt word text.
- 5. The method according to any one of claims 1-4, further comprising: Generating a reply text conforming to natural language habits according to the optimized prompt word text, and feeding back the reply text to the target user.
- 6. A text processing apparatus, comprising: the acquisition unit is used for acquiring a target task text to be processed, which is input by a target user; the system comprises a combination unit, a combination unit and a processing unit, wherein the combination unit is used for carrying out combination processing on the target task text by utilizing a fixed prefix of a preset prompt word to obtain a combined text, the fixed prefix of the preset prompt word comprises a use rule of the prompt word, the use rule of the prompt word comprises a fixed flow part in the prompt word marked by utilizing a first preset mark symbol, and the use rule of the prompt word comprises a random strain flow part in the prompt word marked by utilizing a second preset mark symbol; the system comprises a combination text, a rewriting unit and a random strain flow part text, wherein the combination text is automatically analyzed, a fixed flow part text and a random strain flow part text in the prompt word text are identified by utilizing an analysis result, the fixed flow part text in the optimized prompt word text is marked by utilizing a first preset mark symbol, and the random strain flow part text in the optimized prompt word text is marked by utilizing a second preset mark symbol, so that the optimized prompt word text is obtained.
- 7. A text processing device is characterized by comprising a processor, a memory and a system bus; The processor and the memory are connected through the system bus; The memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the method of any of claims 1-5.
- 8. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein instructions, which when run on a terminal device, cause the terminal device to perform the method of any of claims 1-5.
Description
Text processing method, device, storage medium and equipment Technical Field The present application relates to the field of natural language processing technologies, and in particular, to a text processing method, a device, a storage medium, and a device. Background Along with the rapid development of new generation information technologies such as artificial intelligence (ARTIFICIAL INTELLIGENCE, AI for short), the internet of things and the like, the application scenes of man-machine interaction are wider and wider. Various intelligent interaction software and devices appear in life and work of people, such as chat generation pretraining converters (CHAT GENERATIVE PRE-trained Transformer, chatGPT for short), intelligent sound boxes, intelligent televisions and other AI models, and can provide intelligent interaction functions of information inquiry and other application scenes for people so as to assist users to complete various behavior intentions. Currently, for users to input voice or text information of intelligent interaction software or devices (such as intelligent speakers, intelligent televisions, etc.), the manner in which human language is understood and generated is mainly by means of AI models based on statistics and pattern recognition. However, problems may occur when processing too complex instructions or hints, because these models lack deep semantic understanding. The model may not be capable of comprehensively understanding complex prompt words, may ignore certain parts, or misunderstand the intention of the prompt words, and further, the information really wanted by the user cannot be timely and accurately fed back to the user, so that the processing effect on the text input by the user is poor, and the interactive experience of the user is reduced. Disclosure of Invention The main purpose of the embodiment of the application is to provide a text processing method, a device, a storage medium and equipment, which can enable an AI model to more accurately understand and execute tasks indicated by users by effectively writing prompt words, thereby improving the interactive experience of the users. The embodiment of the application provides a text processing method, which comprises the following steps: acquiring a target task text to be processed, which is input by a target user; Combining the target task text by utilizing a fixed prefix of a preset prompt word to obtain a combined text; and automatically analyzing the combined text, and utilizing an analysis result to carry out structural and self-adaptive mixed type rewriting on the preset prompting word to obtain an optimized prompting word text. In a possible implementation manner, the fixed prefix of the preset prompting word comprises a using rule of the prompting word, the using rule of the prompting word comprises the step of marking a fixed flow part in the prompting word by using a first preset marking symbol, and the using rule of the prompting word comprises the step of marking a random strain flow part in the prompting word by using a second preset marking symbol. In a possible implementation manner, the method further includes, after performing a combination process on the target task text by using a fixed prefix of a preset prompt word to obtain a combined text: The large language model LLM is obtained by utilizing a large-scale language data set to carry out language rule and mode training in an autoregressive generation mode, and when new text data are generated, the large language model LLM predicts the possibility of a next language unit based on the content which is generated before until complete text data are generated; the automatic analysis is carried out on the combined text, and the analysis result is utilized to carry out the structuralization and self-adaptive mixed type rewriting on the preset prompting word, so as to obtain the optimized prompting word text, which comprises the following steps: And automatically analyzing the combined text by using the large language model LLM, and carrying out structural and self-adaptive hybrid rewriting on the preset prompt word by using an analysis result to obtain an optimized prompt word text. In a possible implementation manner, the method further includes: And feeding back the optimized prompt word text to the target user. In a possible implementation manner, the automatically parsing the combined text, and using the parsing result to perform structural and adaptive hybrid rewrite on the preset prompting word, to obtain an optimized prompting word text, includes: Automatically analyzing the combined text, and marking a fixed flow part text in the optimized prompt word text by using a first preset mark symbol according to an analysis result; and marking the random strain flow part text in the optimized prompt word text by using a second preset mark symbol. In a possible implementation manner, the method further includes: and calling intelligent recognition and processi