CN-122019705-A - Text processing method, device, equipment and storage medium
Abstract
The disclosure provides a text processing method, a text processing device, text processing equipment and a storage medium, and relates to the technical field of artificial intelligence. In some embodiments of the disclosure, a current question text is acquired, whether a first scene tag is consistent with a second scene tag is determined, the second scene tag is a scene tag corresponding to a historical context vector, the historical context vector is a vector extracted based on a historical dialogue text, a historical question detail text corresponding to the historical context vector is acquired under the condition that the first scene tag is consistent with the second scene tag, a context can be combined with the current question text, logic continuity among user questions is enhanced, the historical question detail text and the current question text are input into a compliance scene language model, an association basis corresponding to an answer text and the answer text is obtained, accuracy of compliance questions is improved by means of the model, and the association basis enables the answer text to have knowledge traceability and reliability of compliance questions.
Inventors
- LIU JINQUAN
- ZHANG HANKE
- GU QIANQIAN
Assignees
- 国能大渡河大数据服务有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260106
Claims (10)
- 1. A text processing method, comprising: Acquiring a current question text, wherein the current question text carries a first scene tag; determining whether the first scene tag is consistent with a second scene tag, wherein the second scene tag is a scene tag corresponding to a historical context vector, and the historical context vector is a vector extracted based on a historical dialogue text; Acquiring a history question detail text corresponding to the history context vector under the condition that the first scene label is consistent with the second scene label; And inputting the history question detail text and the current question text into a compliance scene language model to obtain an answer text and a corresponding association basis of the answer text.
- 2. The method according to claim 1, wherein the method further comprises: And under the condition that the first scene label is inconsistent with the second scene label, inputting the current question text into the compliance scene language model to obtain a current scene context vector.
- 3. The method according to claim 1, wherein the method further comprises: In the user question-answer interaction process, monitoring the dialogue state of the current dialogue in real time; recording context information of the current dialogue under the condition that the dialogue state is dialogue interruption, wherein the context information comprises a user identity, a dialogue timestamp, a final questioning content and a compliance question theme; storing the context information as dialogue breakpoint data into a dialogue log associated with a user; under the condition that the user initiates a new dialogue again, acquiring dialogue breakpoint data from the dialogue log; and generating a query prompt text according to the dialogue breakpoint data.
- 4. The method of claim 1, wherein prior to the obtaining the current question text, the method further comprises: receiving a plurality of pieces of compliance knowledge, and distributing a unique answer identifier for each piece of compliance knowledge; retrieving the system clauses corresponding to each compliance knowledge from an internal system library, and distributing a unique basis identifier for each system clause; And establishing a mapping relation between the answer identification and the basis identification, and storing the mapping relation in a structured database to obtain an answer basis association library.
- 5. The method according to claim 4, wherein the method further comprises: Carrying out validity check on the system clause corresponding to the basis mark according to a preset period; And under the condition that the result of the validity check is in a failure state, sending a notification according to the failure to the compliance management terminal so as to enable a management user to check the notification according to the failure.
- 6. The method according to claim 1, wherein the method further comprises: acquiring original compliance content from an internal system release system and an external regulation update platform; And carrying out structural processing on the original compliance content to obtain new compliance knowledge, wherein the new compliance knowledge carries a knowledge scene tag and a matching keyword.
- 7. The method of claim 1, wherein the inputting the historical question detail text and the current question text into a compliance scene language model to obtain an association basis corresponding to an answer text and the answer text comprises: Inputting the history question detail text and the current question text into a compliance scene language model to obtain an answer text; And according to the answer text, searching a target compliance text matched with the answer text from an answer basis association library, and taking the target compliance text as an association basis corresponding to the answer text.
- 8. A text processing apparatus, comprising: the system comprises a first acquisition module, a second acquisition module and a first judgment module, wherein the first acquisition module is used for acquiring a current question text, and the current question text carries a first scene tag; The system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining whether the first scene tag is consistent with a second scene tag, the second scene tag is a scene tag corresponding to a historical context vector, and the historical context vector is a vector extracted based on a historical dialogue text; the second acquisition module is used for acquiring a history question detail text corresponding to the history context vector under the condition that the first scene label is consistent with the second scene label; and the answer module inputs the historical question detail text and the current question text into a compliance scene language model to obtain an answer text and a corresponding association basis of the answer text.
- 9. An electronic device, comprising: A processor; A memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the steps in the method of any of claims 1-7.
- 10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1-7.
Description
Text processing method, device, equipment and storage medium Technical Field The disclosure relates to the technical field of artificial intelligence, and in particular relates to a text processing method, a text processing device, text processing equipment and a storage medium. Background With the increasing complexity of global supervision environment and continuous upgrading of enterprise compliance requirements, enterprises are urgent in demand for efficient, accurate and traceable compliance consultation tools. The intelligent question-answering system is used as an important bridge for connecting the knowledge of the bond gauge with the business personnel, and is widely applied to a plurality of high-supervision industries such as finance, medical treatment, manufacturing and the like. The method has the core aims of rapidly providing accurate answers meeting the latest regulations and internal systems of enterprises when users put forward compliance related problems, and supporting multiple rounds of progressive interaction so as to meet the deep inquiry requirements of compliance details in actual business scenes. The enterprise compliance question-answering system mainly adopts three technical schemes, namely, in the aspect of dialogue management, a short-term context caching mechanism is generally relied on, only the latest 1-2 rounds of user questions are spliced and then input into a model to generate responses, in the aspect of knowledge organization, the content is stored in a form of a 'question-answer' key value pair based on a static FAQ library which is manually maintained, conclusion texts are directly output when the questions are answered, in the aspect of knowledge updating and matching, new rules or regulations are manually input by compliance specialists, answer matching is realized through simple keyword retrieval, and structured management on knowledge sources, timeliness and application ranges is lacked. At present, the compliance question-answering lacks context support, the accuracy of the compliance question-answering is low, and the reliability of the compliance question-answering is low. Disclosure of Invention The disclosure provides a text processing method, a device, equipment and a storage medium, which are used for at least solving the problems that the existing compliance question-answering lacks context support, the accuracy of the compliance question-answering is low, and the reliability of the compliance question-answering is low. The technical scheme of the present disclosure is as follows: the embodiment of the disclosure provides a text processing method, which comprises the following steps: Acquiring a current question text, wherein the current question text carries a first scene tag; determining whether the first scene tag is consistent with a second scene tag, wherein the second scene tag is a scene tag corresponding to a historical context vector, and the historical context vector is a vector extracted based on a historical dialogue text; Acquiring a history question detail text corresponding to the history context vector under the condition that the first scene label is consistent with the second scene label; And inputting the history question detail text and the current question text into a compliance scene language model to obtain an answer text and a corresponding association basis of the answer text. Optionally, the method further comprises: And under the condition that the first scene label is inconsistent with the second scene label, inputting the current question text into the compliance scene language model to obtain a current scene context vector. Optionally, the method further comprises: In the user question-answer interaction process, monitoring the dialogue state of the current dialogue in real time; recording context information of the current dialogue under the condition that the dialogue state is dialogue interruption, wherein the context information comprises a user identity, a dialogue timestamp, a final questioning content and a compliance question theme; storing the context information as dialogue breakpoint data into a dialogue log associated with a user; under the condition that the user initiates a new dialogue again, acquiring dialogue breakpoint data from the dialogue log; and generating a query prompt text according to the dialogue breakpoint data. Optionally, before the acquiring the current question text, the method further includes: receiving a plurality of pieces of compliance knowledge, and distributing a unique answer identifier for each piece of compliance knowledge; retrieving the system clauses corresponding to each compliance knowledge from an internal system library, and distributing a unique basis identifier for each system clause; And establishing a mapping relation between the answer identification and the basis identification, and storing the mapping relation in a structured database to obtain an answer basis associatio