Text processing method and device, equipment and storage medium
By using scenario tag matching and compliance scenario language models, the problem of lack of context in compliance Q&A systems has been solved, improving the accuracy and credibility of answers and meeting the needs of enterprises for efficient, accurate and traceable compliance consulting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUODIAN DADU RIVER POWER ENG
- Filing Date
- 2026-01-06
- Publication Date
- 2026-05-12
AI Technical Summary
Existing compliance Q&A systems lack contextual support, have low accuracy and credibility, and cannot meet the needs of enterprises for efficient, accurate and traceable compliance consulting.
By obtaining the scene tags of the current question text and matching them with the context vectors of historical dialogue texts, and combining them with a compliant scene language model, the system generates answer text with relevant evidence, thereby enhancing logical continuity and knowledge traceability.
It improved the accuracy and credibility of compliance Q&A, achieved logical coherence in multi-round progressive consultation and traceability of compliance knowledge, and enhanced the efficiency and reliability of compliance consultation.
Smart Images

Figure CN122019705A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a text processing method, apparatus, device, and storage medium. Background Technology
[0002] With the global regulatory environment becoming increasingly complex and corporate compliance requirements continuously escalating, enterprises have an urgent need for efficient, accurate, and traceable compliance consulting tools. Intelligent question-and-answer systems, serving as a crucial bridge connecting compliance knowledge with business personnel, have been widely adopted in several highly regulated industries such as finance, healthcare, and manufacturing. Their core objective is to quickly provide accurate answers that comply with the latest regulations and internal corporate policies when users raise compliance-related questions, and to support multi-round, progressive interactions to meet the need for in-depth questioning on compliance details in real-world business scenarios.
[0003] Enterprise compliance Q&A systems mainly adopt three types of technical solutions: In terms of dialogue management, they generally rely on short-term context caching mechanisms, only concatenating the most recent 1-2 rounds of user questions and inputting them into the model to generate responses; in terms of knowledge organization, they are mostly based on manually maintained static FAQ libraries, storing content in the form of "question-answer" key-value pairs, and directly outputting the conclusion text when answering; in terms of knowledge updating and matching, they rely on compliance specialists to manually enter new regulations or systems, and achieve answer matching through simple keyword searches, lacking structured management of knowledge sources, timeliness, and scope of application.
[0004] Currently, compliance Q&As lack contextual support, have low accuracy, and low credibility. Summary of the Invention
[0005] This disclosure provides a text processing method, apparatus, device, and storage medium to at least address the problems of existing compliance Q&A systems lacking contextual support, having low accuracy, and low credibility.
[0006] The technical solution disclosed herein is as follows: This disclosure provides a text processing method, including: Obtain the current question text; wherein, the current question text carries a first scenario tag; Determine whether the first scene label and the second scene label are consistent; wherein, the second scene label is the scene label corresponding to the historical context vector, and the historical context vector is a vector extracted based on the historical dialogue text; If the first scene label and the second scene label are the same, obtain the historical question detail text corresponding to the historical context vector; Input the historical question details and the current question text into the compliance scenario language model to obtain the answer text and the corresponding association basis.
[0007] Optionally, the method further includes: If the first scene label and the second scene label are inconsistent, the current question text is input into the compliant scene language model to obtain the current scene context vector.
[0008] Optionally, the method further includes: During user question-and-answer interactions, the current dialogue status is monitored in real time; When the dialogue status is interrupted, the context information of the current dialogue is recorded; wherein, the context information includes user identity identifier, dialogue timestamp, last question content and compliance question topic; The context information is stored as dialogue breakpoint data in the user's associated session log; If the user initiates a new conversation again, the conversation breakpoint data is retrieved from the conversation log; Based on the dialogue breakpoint data, generate follow-up question prompt text.
[0009] Optionally, before obtaining the current question text, the method further includes: It receives multiple compliance questions and assigns a unique answer identifier to each one. Retrieve the relevant policy clauses from the internal policy database corresponding to each of the aforementioned compliance knowledge items, and assign a unique basis identifier to each policy clause; Establish a mapping relationship between the answer identifier and the basis identifier, and store the mapping relationship in a structured database to obtain the answer basis association library.
[0010] Optionally, the method further includes: The validity of the institutional provisions corresponding to the basis identifier is verified according to a preset cycle. If the validity check result is invalid, a validity invalidation notification is sent to the compliance management terminal for management users to view.
[0011] Optionally, the method further includes: Obtain original compliance information from internal policy release systems and external regulatory update platforms; The original compliance content is structured to obtain new compliance knowledge, which carries knowledge scenario tags and matching keywords.
[0012] Optionally, the step of inputting the historical question details text and the current question text into a compliance scenario language model to obtain the answer text and the corresponding association basis includes: Input the historical question details and the current question text into the compliance scenario language model to obtain the answer text; Based on the answer text, retrieve the target compliant text that matches the answer text from the answer reference association database, and use it as the association reference corresponding to the answer text.
[0013] This disclosure also provides a text processing apparatus, including: The first acquisition module is used to acquire the current question text; wherein, the current question text carries a first scene tag; The determining module is used to determine whether the first scene label and the second scene label are consistent; wherein, the second scene label is the scene label corresponding to the historical context vector, and the historical context vector is a vector extracted based on historical dialogue text; The second acquisition module is used to acquire the historical question detail text corresponding to the historical context vector when the first scene label and the second scene label are consistent. The answer module inputs the historical question details text and the current question text into the compliance scenario language model to obtain the answer text and the corresponding association basis.
[0014] This disclosure also provides an electronic device, including: processor; Memory used to store processor-executable instructions; The processor is configured to execute instructions to implement the steps in the above method.
[0015] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0016] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects: In some embodiments of this disclosure, the current question text is obtained; wherein the current question text carries a first scenario tag; it is determined whether the first scenario tag and a second scenario tag are consistent; wherein the second scenario tag is the scenario tag corresponding to the historical context vector, and the historical context vector is a vector extracted based on historical dialogue text; if the first scenario tag and the second scenario tag are consistent, the historical question detail text corresponding to the historical context vector is obtained, and the current question text can be combined with the context to enhance the logical continuity between user questions; the historical question detail text and the current question text are input into a compliance scenario language model to obtain the answer text and the corresponding association basis, thereby improving the accuracy of compliance Q&A with the help of the model; the association basis enables the answer text to have knowledge traceability capability, thereby improving the credibility of compliance Q&A.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0019] Figure 1 A flowchart illustrating a text processing method provided for an exemplary embodiment of this disclosure; Figure 2 An architecture diagram of a text processing system provided for exemplary embodiments of this disclosure; Figure 3 A flowchart illustrating compliance question-and-answer knowledge tracing and association provided as an exemplary embodiment of this disclosure; Figure 4 A schematic diagram of the structure of a text processing apparatus provided for an exemplary embodiment of this disclosure; Figure 5 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this disclosure. Detailed Implementation
[0020] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0021] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.
[0022] It should be noted that the user information involved in this disclosure includes, but is not limited to, user device information and user personal information; the collection, storage, use, processing, transmission, provision and disclosure of user information in this disclosure all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0023] There are currently several compliance Q&A schemes, which are explained below.
[0024] 1. Multi-turn conversation implementation scheme: simple context caching + single question and answer response.
[0025] This solution uses a "dialogue window caching" mechanism to temporarily store the user's most recent 1-2 rounds of question text in the system to support basic multi-turn interactions. When a user asks a new question, the system concatenates the cached historical dialogue content with the current question and inputs it into a keyword matching model or a basic pre-trained language model to generate a single response.
[0026] However, this solution lacks a dedicated module for understanding contextual semantics and logical connections, making it unable to identify the progressive relationships between user questions (such as "scenario continuation," "follow-up questions," and "condition supplementation"). It only achieves a superficial multi-round concatenation, essentially treating each round of questions as an independent request. Therefore, it is difficult to support the progressively in-depth and logically coherent consulting needs commonly found in enterprise compliance scenarios.
[0027] 2. Knowledge tracing implementation scheme: static FAQ library + output of answers without basis.
[0028] This solution centers on a manually maintained static FAQ database. Compliance specialists pre-compile common compliance questions and their standard answers, storing them in "question-answer" key-value pairs. When a user asks a question, the system retrieves the most similar question from the FAQ database using keyword matching and directly returns the corresponding answer text.
[0029] This approach fails to establish an explicit link between the answer and the compliance basis (such as legal provisions or internal company documents), and the answer does not include the source of the basis, clause number, or traceable link. Users cannot verify the compliance, timeliness, or authority of the answer, which violates the basic requirement of "verifiable and traceable" compliance management for enterprises and poses a compliance risk.
[0030] 3. Compliance knowledge update and matching solution: manual input + keyword search.
[0031] In this solution, compliance knowledge updates rely entirely on manual operation: whenever external regulations are revised or internal company policies are issued / changed, compliance specialists must manually extract the relevant content, organize it into text format, and enter it into the knowledge base. When a user asks a question, the system only performs a simple match between the keywords in the question and the knowledge base entries, returning the answer with the highest keyword overlap.
[0032] This method has two major drawbacks: First, the knowledge updates are lagging behind, and it cannot keep up with changes in regulations in real time, which can easily lead to the system outputting outdated or invalid answers. Second, the matching mechanism is crude and does not distinguish between "general compliance knowledge" (such as national laws) and "enterprise-customized knowledge" (such as internal approval processes), so it cannot provide accurate and appropriate answers based on the user's business scenario or job attributes, which seriously affects the pertinence and practicality of compliance guidance.
[0033] To address the aforementioned technical issues, in some embodiments of this disclosure, the current question text is obtained; wherein the current question text carries a first scenario tag; it is determined whether the first scenario tag and a second scenario tag are consistent; wherein the second scenario tag is the scenario tag corresponding to the historical context vector, and the historical context vector is a vector extracted based on historical dialogue text; if the first scenario tag and the second scenario tag are consistent, the historical question detail text corresponding to the historical context vector is obtained, and the current question text can be combined with the context to enhance the logical continuity between user questions; the historical question detail text and the current question text are input into a compliance scenario language model to obtain the answer text and the corresponding association basis, thereby improving the accuracy of compliance Q&A with the help of the model; the association basis enables the answer text to have knowledge traceability capabilities, thereby improving the credibility of compliance Q&A.
[0034] The technical solutions provided by the embodiments of this disclosure are described in detail below with reference to the accompanying drawings.
[0035] Figure 1 This is a flowchart illustrating a text processing method provided as an exemplary embodiment of the present disclosure. Figure 1 As shown, the method includes: S101: Obtain the current question text; wherein, the current question text carries the first scenario tag; S102: Determine whether the first scene label and the second scene label are consistent; wherein, the second scene label is the scene label corresponding to the historical context vector, and the historical context vector is a vector extracted based on the historical dialogue text; S103: If the first scene label and the second scene label are the same, obtain the historical question details text corresponding to the historical context vector; S104: Input the historical question details and the current question text into the compliance scenario language model to obtain the answer text and the corresponding association basis.
[0036] In this embodiment, the entity executing the above method can be a server or a terminal device.
[0037] The terminal device includes, but is not limited to, mobile stations (MS), mobile terminals, mobile phones, handsets, and portable equipment. This terminal device can communicate with one or more core networks via a radio access network (RAN). For example, the terminal device can be a mobile phone (or "cellular" phone), a computer with wireless communication capabilities, a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an AR terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical care, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc. The operating systems installed on the terminal device include, but are not limited to, iOS, Android, Windows, Linux, and Mac OS. In different networks, terminals may be called by different names, such as: user equipment, mobile station, user unit, station, cellular phone, personal digital assistant, wireless modem, wireless communication device, handheld device, laptop, cordless phone, wireless local loop station, television, etc. For ease of description, this embodiment will simply refer to it as terminal device.
[0038] In this embodiment, the implementation form of the server is not limited. For example, the server can be a conventional server, a cloud server, a cloud host, a virtual center, or other server devices. The server mainly consists of a processor, hard disk, memory, system bus, and other common computer architecture types.
[0039] In this embodiment, the current question text is obtained; wherein the current question text carries a first scene tag; it is determined whether the first scene tag and the second scene tag are consistent; wherein the second scene tag is the scene tag corresponding to the historical context vector, and the historical context vector is a vector extracted based on the historical dialogue text; if the first scene tag and the second scene tag are consistent, the historical question detail text corresponding to the historical context vector is obtained, and the current question text can be combined with the context to enhance the logical continuity between user questions; the historical question detail text and the current question text are input into the compliance scene language model to obtain the answer text and the corresponding association basis, thereby improving the accuracy of compliance Q&A with the help of the model; the association basis enables the answer text to have knowledge traceability capability, thereby improving the credibility of compliance Q&A.
[0040] Figure 2 An architecture diagram of a text processing system provided for an exemplary embodiment of this disclosure. Figure 2 As shown, the data layer serves as the foundational support, synchronizing internal and external compliance data (external regulations, internal systems) via API / OA, storing historical dialogue context, and ultimately providing complete data resources to the platform layer in two structured forms: a "knowledge-basis association library" and a "context vector library," solving the problems of fragmented and unconnected data. Inter-layer flow: The structured storage library of the data layer outputs data to the three engines of the platform layer. The engines generate core capabilities based on the data, then empower the application layer functions, achieving a smooth transfer of "data → capability → application," avoiding inter-layer isolation. The application layer directly inherits the capabilities of the platform layer, providing users with full-scenario functions of "question and answer - source tracing - reminders," meeting the core needs of compliance consultation, with a complete and non-redundant logical chain.
[0041] It's important to note that the compliance scenario language model is a fine-tuned version of a large language model within the compliance domain. This refers to building upon general-purpose large language models (such as LLaMA, ChatGLM, and Qwen) through supervised fine-tuning (SFT) or instruction tuning on enterprise compliance-related corpora. This refines the model's understanding and generation capabilities to better align with the professional needs of compliance business scenarios. Specifically, the model's training data typically includes, but is not limited to: internal company policy documents (such as the "Employee Code of Conduct" and "Data Security Management Regulations"); historical compliance consultation records, Q&A pairs, and audit rectification opinions; compliance training materials, case libraries, and risk warning documents. Through this type of domain data fine-tuning, the model can accurately identify compliance terminology, understand compliance logical structures (such as "exceptions," "approval prerequisites," and "prohibited clauses"), and distinguish between general regulatory requirements and company-specific rules.
[0042] In some embodiments of this disclosure, the training process of the compliance scenario language model is as follows: Based on a general-purpose large language model (such as Qwen, ChatGLM, etc.), domain adaptation and task optimization are used to enable it to understand and generate professional compliance content for enterprises. First, a high-quality compliance corpus is constructed, including national laws and regulations, industry regulatory guidelines, internal enterprise documents, historical compliance Q&A records, and multi-round compliance dialogue samples. The corpus is then anonymized, deduplicated, and structurally labeled (e.g., source type, applicable position, effective status, etc.). Subsequently, an instruction tuning method is used to convert the corpus into an "instruction-answer-basis" format, guiding the model to learn to cite specific clauses as required, distinguish between mandatory and advisory provisions, and refuse to answer questions outside the knowledge boundary. Some solutions also perform domain-adaptive pre-training before tuning to enhance the model's internalized understanding of compliance terminology and logical structures.
[0043] To further support multi-round, progressive compliance consultations, contextual modeling capabilities are specifically incorporated into the training process: by constructing dialogue samples with "scenario tags" (such as data compliance) and "logical relationship tags" (such as follow-up questions, exceptions, and supplementary conditions), the model can automatically extract scenario keywords from user interactions and identify logical connections between questions, thereby generating a structured contextual representation. After training, the model is evaluated using business metrics such as compliance accuracy, traceability of evidence, and scenario matching, and is manually verified by compliance experts. After the system goes live, it can also achieve continuous learning through an automated knowledge update mechanism.
[0044] It should be noted that scene tags can be automatically extracted from the current question text and historical question text using a compliant scene language model, or users can pre-label the current question text and historical question text with scene tags.
[0045] Contextual tags are structured semantic labels used to identify the business or regulatory context of compliance questions and answers. They are typically defined by domain experts or automatically extracted from dialogue by models. Examples include "cross-border data," "anti-bribery," "procurement approval," and "employee conduct guidelines." The purpose of contextual tags is to map user questions to specific subsets of compliance knowledge, thereby distinguishing between general regulatory requirements and company-customized rules, and providing contextual anchors for subsequent answer matching, access control, and knowledge delivery.
[0046] Historical context vectors are dense vector representations generated by semantically encoding the content of a user's current and past multi-turn conversations using natural language processing techniques (such as large language models fine-tuned for compliance domains). These vectors integrate key information from the conversation, including scenario tags, logical relationships (such as follow-up questions, exceptions, and conditional constraints), and entities (such as job titles and policy names), used to dynamically reconstruct the user's intent and conversational flow in subsequent question-and-answer sessions. Historical context vectors are typically stored in conjunction with conversation IDs and used as prompts or retrieval criteria when new questions arise, ensuring the logical coherence and accuracy of answers across multiple rounds of dialogue.
[0047] In some embodiments of this disclosure, historical dialogue text is input into a compliance scenario language model to extract scenario keywords and logical relationships, generating a historical context vector. One possible approach is to receive multi-turn dialogue text from a user in a compliance question-and-answer system; based on the compliance scenario language model, scenario keywords and logical relationships are automatically extracted from the historical dialogue text. The extracted scenario keywords and logical relationships are then fused to generate a structured context vector. Furthermore, the structured context vector is bound and stored with the current user's session ID; in subsequent rounds of question-and-answer, the answer generation strategy is dynamically adjusted based on the context vector to maintain the logical coherence of the conversation and improve the scenario adaptability of the compliance answer.
[0048] In one optional embodiment, the historical context vector is set with an expiration period. It should be noted that this disclosure does not limit the expiration period, which can be adjusted according to actual circumstances. The expiration period could be, for example, 2 hours, 24 hours, etc. By setting an expiration period, when a user asks a new question, the system automatically associates historical question details with the context vector by matching the scenario consistency, eliminating the need for repeated background input, solving the problem of multi-turn conversation breakage, and improving dialogue efficiency.
[0049] It should be noted that scenario keywords refer to the core semantic units in a dialogue or text that can identify the business, industry, or life context in which the current interaction takes place. Scenario keywords include, but are not limited to: procurement compliance, business type, compliance theme, system type, or job role.
[0050] Logical relationships refer to the inferences, dependencies, or structural connections between different statements or semantic units in a dialogue, and are central to understanding intent and judging compliance. Logical relationships include, but are not limited to: probing, limiting, contrasting, exceptions, or supplementary conditions.
[0051] In some embodiments of this disclosure, the current question text is obtained; wherein the current question text carries a first scene tag; it is determined whether the first scene tag and a second scene tag are consistent; wherein the second scene tag is the scene tag corresponding to the historical context vector, and the historical context vector is a vector extracted based on the historical dialogue text. Specifically, the current question text is received, parsed to obtain the first scene tag corresponding to the current question text, and the similarity between the first scene tag and the second scene tag is calculated. If the similarity is greater than or equal to a set similarity threshold, the first scene tag and the second scene tag are determined to be consistent; if the similarity is less than the set similarity threshold, the first scene tag and the second scene tag are determined to be inconsistent. It should be noted that this disclosure does not limit the setting of the similarity threshold; the set similarity threshold may be, for example, 0.8 or 0.9.
[0052] In one specific embodiment of this disclosure, the user's current input query text is "Please check the status of yesterday's order." After semantic parsing, the system identifies its first scenario label as "order query." Simultaneously, the system extracts the historical context vector from historical dialogues, and the corresponding historical scenario label (i.e., the second scenario label) is "logistics tracking." Subsequently, the system calculates the semantic similarity between the two scenario labels, "order query" and "logistics tracking," obtaining a similarity value of 0.85. Since this value is greater than the preset similarity threshold of 0.8, the system determines that the first scenario label and the second scenario label are consistent, thus incorporating the current query into the same dialogue scenario for contextual fusion processing to provide a more coherent and accurate response.
[0053] In one embodiment, when the first scenario label and the second scenario label are consistent, the historical question detail text corresponding to the historical context vector is obtained. It should be noted that the historical question detail text refers to the specific questions that the user has raised in multiple rounds of dialogue or historical interactions, which are related to the current scenario and are typically organized according to a semantic hierarchy. For example, "procurement contract" is a high-level general scenario label, indicating that the user is concerned with issues related to the procurement contract as a whole; while "procurement contract supplier" is a lower-level refined label, indicating that the user further focuses on specific matters related to the supplier in the procurement contract (such as qualifications, performance, breach of contract, etc.). When the first scenario label (the scenario to which the current question belongs) is consistent with the second scenario label (the scenario to which the historical context belongs), the system can backtrack from the historical context vector and extract the corresponding historical question detail text based on this consistency, thereby accurately restoring the specific question level that the user previously focused on, providing precise contextual support for the current answer.
[0054] In another embodiment, if the first scene label and the second scene label are inconsistent, the current question text is input into the compliant scene language model to obtain the current scene context vector. It should be noted that the method for obtaining the current scene context vector can be found in the description of the corresponding section of the foregoing embodiments, and will not be repeated here.
[0055] In some embodiments of this disclosure, the detailed text of historical questions and the current question text are input into a compliance scenario language model to obtain the answer text and the corresponding association basis. One possible approach is to input the detailed text of historical questions and the current question text into the compliance scenario language model to obtain the answer text; based on the answer text, a target compliance text matching the answer text is retrieved from an answer basis association library and used as the association basis corresponding to the answer text.
[0056] In the above embodiments, an answer basis association library is pre-built. One possible approach is to receive multiple compliance knowledge entries and assign a unique answer identifier to each entry; retrieve the corresponding policy clause from an internal policy database and assign a unique basis identifier to each clause; establish a mapping relationship between the answer identifier and the basis identifier, and store the mapping relationship in a structured database to obtain the answer basis association library. This disclosure binds compliance knowledge with corresponding basis, storing it as a mapping relationship between answer identifiers and basis identifiers, which allows for quick retrieval of target compliance text from the answer basis association library, improving retrieval efficiency. This disclosure's embodiments solve the knowledge traceability problem, improve the coverage of traceability information, eliminate the need for users to manually verify the basis, improve the verification efficiency of compliance consultation basis, and determine the compliance of answers.
[0057] Figure 3 This is a flowchart illustrating a compliance question-and-answer knowledge tracing process, provided as an exemplary embodiment of this disclosure. (For example...) Figure 3 As shown, after generating the answer text, the relevant supporting documents are extracted from the answer supporting document association library through the answer identifier; and the validity of the corresponding institutional clauses is verified; if the validity test result is valid, the answer text and supporting documents are merged and output; if the validity test result is invalid, the invalid supporting documents are marked and the compliant user is prompted to update, and the temporarily associated supporting documents are output after replacing the valid supporting documents.
[0058] In one feasible approach, traceability information is automatically labeled. When generating an answer, the system simultaneously retrieves the relevant supporting evidence, attaching it to the answer as evidence. Users can then click on the evidence ID to jump to the original text and view the corresponding compliance documentation.
[0059] It should be noted that the internal policy database includes the company's internal rules and regulations, operating procedures, compliance guidelines, and approved policy documents.
[0060] In some embodiments of this disclosure, the validity of the policy provisions corresponding to the basis identifier is checked according to a preset period; if the result of the validity check is invalid, a basis invalidation notification is sent to the compliance management terminal so that the management user can view the basis invalidation notification.
[0061] In one exemplary embodiment, the system automatically performs validity checks on policy provisions every 30 days according to a preset cycle, checking whether the policy provisions are still the currently valid version. In a particular check, if the policy provision is detected as "repealed," its validity check result is determined to be invalid. The system automatically generates a notification of invalidity, including the original legal basis identifier, the reason for invalidity, and information on alternative standards, and pushes it to the compliance management terminal through the enterprise compliance management platform. Compliance specialists can view the notification after logging into the terminal and update internal policy references accordingly, ensuring that the company's operations continue to comply with the latest regulatory requirements.
[0062] In some embodiments of this disclosure, during user question-and-answer interaction, the current dialogue status is monitored in real time; when the dialogue status is interrupted, the context information of the current dialogue is recorded; wherein, the context information includes user identity identifier, dialogue timestamp, last question content, and compliance issue topic; the context information is stored as dialogue breakpoint data in the user's associated session log; when the user initiates a new dialogue, the dialogue breakpoint data is retrieved from the session log; and based on the dialogue breakpoint data, follow-up prompt text is generated. This disclosure records user dialogue breakpoints, improving dialogue efficiency. For example, the next dialogue may automatically prompt "Do you want to continue the follow-up question about XX compliance issue?".
[0063] In some embodiments of this disclosure, compliance knowledge is updated automatically. One possible approach is to obtain original compliance content from an internal policy publishing system and an external regulatory update platform; then, the original compliance content is structured to obtain new compliance knowledge, wherein the new compliance knowledge carries knowledge scenario tags and matching keywords.
[0064] In the above embodiments, a two-dimensional matching method using scenario tags and keywords is employed. First, enterprise-specific knowledge is filtered through scenario tags, and then answers are refined through keyword matching, distinguishing between general compliance knowledge and enterprise-customized knowledge. After new knowledge is entered, compliance knowledge update reminders are automatically pushed to relevant users. This disclosure solves the problems of delayed knowledge updates and matching discrepancies, improving the efficiency of knowledge base maintenance.
[0065] Figure 4 This is a schematic diagram of the structure of a text processing apparatus 40 provided for an exemplary embodiment of this disclosure. (See diagram below.) Figure 4 As shown, the text processing device 40 includes: a first acquisition module 41, a determination module 42, a second acquisition module 43, and a response module 44.
[0066] The first acquisition module 41 is used to acquire the current question text; wherein the current question text carries a first scene tag; The determination module 42 is used to determine whether the first scene label and the second scene label are consistent; wherein, the second scene label is the scene label corresponding to the historical context vector, and the historical context vector is a vector extracted based on the historical dialogue text; The second acquisition module 43 is used to acquire the historical question detail text corresponding to the historical context vector when the first scene label and the second scene label are consistent. The answer module 44 inputs the historical question details and the current question text into the compliance scenario language model to obtain the answer text and the corresponding association basis.
[0067] Optionally, module 42 can also be used for: If the first scenario label and the second scenario label are inconsistent, the current question text is input into the compliant scenario language model to obtain the current scenario context vector.
[0068] Optionally, the answer module 44 can also be used for: During user question-and-answer interactions, the current dialogue status is monitored in real time; When the dialogue status is interrupted, record the context information of the current dialogue; the context information includes user identity, dialogue timestamp, last question asked and compliance question topic; Contextual information is stored as dialogue breakpoint data in the user's associated session log; If the user initiates a new conversation again, retrieve the conversation breakpoint data from the conversation log; Generate follow-up question prompts based on dialogue breakpoint data.
[0069] Optionally, before acquiring the current question text, the first acquisition module 41 can also be used for: It receives multiple compliance questions and assigns a unique answer identifier to each one. Retrieve the relevant policy clauses from the internal policy database for each compliance knowledge item and assign a unique basis identifier to each policy clause; Establish a mapping relationship between answer identifiers and basis identifiers, and store the mapping relationship in a structured database to obtain the answer basis association library.
[0070] Optionally, the answer module 44 can also be used for: The validity of the relevant institutional provisions based on the identification shall be verified according to a preset cycle. If the validity verification result is invalid, a basis invalidation notification is sent to the compliance management terminal so that management users can view the basis invalidation notification.
[0071] Optionally, the answer module 44 can also be used for: Obtain original compliance information from internal policy release systems and external regulatory update platforms; The original compliance content is structured to obtain new compliance knowledge, which carries knowledge scenario tags and matching keywords.
[0072] Optionally, when the answer module 44 inputs the historical question details and the current question text into the compliance scenario language model to obtain the answer text and the corresponding association evidence, it is used for: Input the detailed text of historical questions and the text of the current question into the compliance scenario language model to obtain the answer text; Based on the answer text, retrieve the target compliant text that matches the answer text from the answer reference association database, and use it as the reference for the answer text.
[0073] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0074] Figure 5 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present disclosure. For example... Figure 5 As shown, the electronic device includes a memory 51 and a processor 52. Additionally, the electronic device also includes a power supply component 53 and a communication component 54.
[0075] Memory 51 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device.
[0076] The memory 51 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0077] Communication component 54 is used for data transmission with other devices.
[0078] The processor 52 can execute computer instructions stored in the memory 51 to: obtain the current question text; wherein the current question text carries a first scene label; determine whether the first scene label and the second scene label are consistent; wherein the second scene label is the scene label corresponding to the historical context vector, and the historical context vector is a vector extracted based on the historical dialogue text; if the first scene label and the second scene label are consistent, obtain the historical question detail text corresponding to the historical context vector; input the historical question detail text and the current question text into the compliant scene language model to obtain the answer text and the association basis corresponding to the answer text.
[0079] Accordingly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program. When the computer-readable storage medium stores a computer program, and the computer program is executed by one or more processors, it causes one or more processors to perform... Figure 1 Each step in the method embodiment.
[0080] Accordingly, embodiments of this disclosure also provide a computer program product, which includes a computer program / instructions that are executed by a processor. Figure 2 Each step in the method embodiment.
[0081] The above Figure 5 The communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0082] The above Figure 5 The power supply component provides power to the various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.
[0083] The aforementioned electronic devices also include a display screen and audio components.
[0084] The display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions, but also the duration and pressure associated with the touch or swipe operation.
[0085] An audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals may be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0086] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0087] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0089] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0090] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0091] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0092] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0093] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0094] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A text processing method, characterized in that, include: Obtain the current question text; wherein, the current question text carries a first scenario tag; Determine whether the first scene label and the second scene label are consistent; wherein, the second scene label is the scene label corresponding to the historical context vector, and the historical context vector is a vector extracted based on the historical dialogue text; If the first scene label and the second scene label are the same, obtain the historical question detail text corresponding to the historical context vector; Input the historical question details and the current question text into the compliance scenario language model to obtain the answer text and the corresponding association basis.
2. The method according to claim 1, characterized in that, The method further includes: If the first scene label and the second scene label are inconsistent, the current question text is input into the compliant scene language model to obtain the current scene context vector.
3. The method according to claim 1, characterized in that, The method further includes: During user question-and-answer interactions, the current dialogue status is monitored in real time; When the dialogue status is interrupted, the context information of the current dialogue is recorded; wherein, the context information includes user identity identifier, dialogue timestamp, last question content and compliance question topic; The context information is stored as dialogue breakpoint data in the user's associated session log; If the user initiates a new conversation again, the conversation breakpoint data is retrieved from the conversation log; Based on the dialogue breakpoint data, generate follow-up question prompt text.
4. The method according to claim 1, characterized in that, Before obtaining the current question text, the method further includes: It receives multiple compliance questions and assigns a unique answer identifier to each one. Retrieve the relevant policy clauses from the internal policy database corresponding to each of the aforementioned compliance knowledge items, and assign a unique basis identifier to each policy clause; Establish a mapping relationship between the answer identifier and the basis identifier, and store the mapping relationship in a structured database to obtain the answer basis association library.
5. The method according to claim 4, characterized in that, The method further includes: The validity of the institutional provisions corresponding to the basis identifier is verified according to a preset cycle. If the validity check result is invalid, a validity invalidation notification is sent to the compliance management terminal for management users to view.
6. The method according to claim 1, characterized in that, The method further includes: Obtain original compliance information from internal policy release systems and external regulatory update platforms; The original compliance content is structured to obtain new compliance knowledge, which carries knowledge scenario tags and matching keywords.
7. The method according to claim 1, characterized in that, The step of inputting the historical question details text and the current question text into the compliant scenario language model to obtain the answer text and the corresponding association basis includes: Input the historical question details and the current question text into the compliance scenario language model to obtain the answer text; Based on the answer text, retrieve the target compliant text that matches the answer text from the answer reference association database, and use it as the association reference corresponding to the answer text.
8. A text processing device, characterized in that, include: The first acquisition module is used to acquire the current question text; wherein, the current question text carries a first scene tag; The determining module is used to determine whether the first scene label and the second scene label are consistent; wherein, the second scene label is the scene label corresponding to the historical context vector, and the historical context vector is a vector extracted based on historical dialogue text; The second acquisition module is used to acquire the historical question detail text corresponding to the historical context vector when the first scene label and the second scene label are consistent. The answer module inputs the historical question details text and the current question text into the compliance scenario language model to obtain the answer text and the corresponding association basis.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute instructions to implement the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.