A voice instruction structured processing method based on a large language model

CN122907050APending Publication Date: 2026-10-13GUIYANG LONGMA COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611057541.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-16
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]本实施例的目的在于提供一种基于大语言模型的语音指令结构化处理方法,用于解决电信运营商的电话语音行业特定术语的识别准确率问题

Benefits of technology

[0014]本发明提供的一种基于大语言模型的语音指令结构化处理方法,解决了电信运营商的电话语音行业特定术语的识别准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122907050A_ABST
    Figure CN122907050A_ABST
Patent Text Reader

Abstract

The application provides a speech instruction structured processing method based on a large language model, receives a speech interaction request initiated by a user, and generates a unique session identifier; pre-processes speech data input by the user, and performs speech recognition by using a hot word enhancement mechanism; constructs a standardized input template according to a user input type; inputs the input template into a large language model to generate structured candidate JSON data; performs structured verification and risk decoupling processing on the candidate JSON data; performs industry consistency judgment on the structured data that passes the verification based on an industry knowledge base; performs persistent storage on the processed structured data, and provides a callback query interface; and solves the problem of recognition accuracy of telephone speech industry-specific terms of a telecom operator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of speech recognition and natural language processing, and in particular relates to a method for structuring speech commands based on a large language model. Background Technology

[0002] In existing technologies, voice interaction systems typically employ simple ASR (Automatic Speech Recognition) technology to convert speech to text, and then directly input the recognition results into downstream applications. However, this approach has the following drawbacks: First, when user input contains industry-specific terminology or professional vocabulary, the recognition accuracy of ordinary ASR models drops significantly; second, the lack of a structured verification mechanism for the recognition results leads to inconsistent output data formats and data risks; third, it fails to incorporate industry knowledge for consistency judgment, making it difficult to meet the precise processing needs of specialized fields. Summary of the Invention

[0003] The purpose of this embodiment is to provide a method for structuring voice commands based on a large language model, which can be used to solve the problem of accuracy in recognizing specific terms in the telephone voice industry of telecommunications operators.

[0004] A method for structuring speech commands based on a large language model includes the following steps: S1: Receives voice interaction requests initiated by users and generates a unique session identifier; S2: Preprocess the user-input voice data and use a hot word enhancement mechanism for speech recognition; S3: Construct standardized input templates based on user input types; S4: Input the input template into the large language model to generate structured candidate JSON data; S5: Perform structured validation and risk decoupling processing on the candidate JSON data; S6: Based on the industry knowledge base, perform industry consistency judgment on the validated structured data; S7: Persistently stores the processed structured data and provides a callback query interface.

[0005] Further session identifiers are generated using the UUID algorithm, in the format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", where each "x" is a hexadecimal number.

[0006] Furthermore, the preprocessing includes noise filtering, endpoint detection, and speech enhancement operations; the hot word enhancement mechanism includes incorporating words from a preset industry hot word library into the language model in a weighted manner, and the words in the industry hot word library include domain-specific terms, product names, and operation instructions.

[0007] Furthermore, the input template includes the following fields: session_id, input_type, raw_input, and timestamp.

[0008] Furthermore, the candidate JSON data includes the user intent recognition result (intent), the entity extraction result (entities), and the parameter parsing result (parameters).

[0009] Furthermore, the structured validation includes field integrity checks, data type validation, numerical range validation, and format conformity checks; the risk decoupling process identifies and filters risks of sensitive information leakage, unauthorized data access, and malicious commands.

[0010] Furthermore, the industry consistency judgment receives three input parameters: the current node identifier c, the state set s*, and the rule set R, and outputs three judgment results: consistent (return value 1), inconsistent (return value 0), and unknown (return value -1).

[0011] Furthermore, step S6 includes the following judgment process: Error 301: Check if the current node identifier c is in the set of valid nodes; 302 Error: Check if the rule set R is empty; 303: Determine whether the rule set R is directly equal to the current node c or the state set s*; Decision 306: Determine whether the current node c and the state set s* have an equivalent mapping relationship with the rule set R by using the preset mapping table M.

[0012] Furthermore, when the result of judgment 301 is "No" or the result of judgment 302 is "Yes", the output judgment result is "Unknown" and the return value is -1; when the result of judgment 303 is "Yes" or the result of judgment 306 is "Yes", the output judgment result is "Consistent" and the return value is 1; when the result of judgment 306 is "No", the output judgment result is "Inconsistent" and the return value is 0.

[0013] Furthermore, the persistent storage content includes complete session records, processing results, and timestamps; the callback query interface supports querying historical processing records by session identifier.

[0014] This invention provides a method for structured processing of voice commands based on a large language model, which solves the problem of improving the recognition accuracy of industry-specific terms in telephone voice communication for telecommunications operators. Attached Figure Description

[0015] Figure 1 : A flowchart illustrating the steps of the telecom voice-based risk control method provided in this embodiment of the invention; Figure 2: Flowchart of industry consistency judgment for the telecom voice risk control method based on operators provided in the embodiments of the present invention. Detailed Implementation

[0016] This invention provides a method for structured processing of voice commands based on a large language model, aiming to solve the aforementioned technical problems in existing technologies. This method achieves accurate recognition and structured output of voice commands by introducing key steps such as hot word-enhanced ASR, input template construction, structured verification and risk decoupling, and industry consistency judgment.

[0017] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings (see attached figures). Figure 1 ).

[0018] Step S1: Receive the request and generate a session identifier: When a user initiates a voice interaction request, the system receives the request and generates a unique session identifier `session_id`. This session identifier is used throughout the entire processing flow to ensure data correlation and tracking between each step. Specifically, the system uses a UUID (Universally Unique Identifier) ​​algorithm to generate the `session_id`, with the format `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`, where each `x` is a hexadecimal digit.

[0019] Step S2: Preprocessing and hot word enhancement for speech recognition: The system preprocesses the user-input voice data, including noise filtering, endpoint detection, and voice enhancement. The preprocessed voice data is then input into the ASR engine for speech-to-text recognition. In this embodiment, the ASR engine is an end-to-end speech recognition model based on deep learning.

[0020] To improve the recognition accuracy of industry-specific terms, this invention introduces a hot word enhancement mechanism. Specifically, the system pre-constructs an industry hot word library, which includes domain-specific terms, product names, and operation instructions. During ASR recognition, words from the hot word library are weighted and incorporated into the language model, thereby increasing the recognition probability of hot words. For example, in the financial field, the hot word library may include terms such as "account opening," "transfer," and "wealth management products."

[0021] Step S2b: Speech recognition output: When the user does not provide direct text input, the system outputs the ASR recognition result and proceeds to the next processing step.

[0022] Step S3: Input template construction: Based on the user input type (text input or ASR recognition result), the system constructs a standardized input template. The input template includes the following fields: session_id: string; session identifier; raw_input: string; the raw input content; timestamp: timestamp; the requested time; Step S4: Generate candidate JSON from the large language model: The constructed input template is fed into a Large Language Model (LLM), which generates structured candidate JSON data based on the input content. The candidate JSON includes user intent recognition results, entity extraction results, and parameter parsing results.

[0023] For example, when a user's voice input is "Help me check today's stock quotes," the LLM generates the following candidate JSON: json { "intent": "stock_query", "entities": [ { "type": "date", "value": "today" }, { "type": "stock_type", "value": "market_quotation } ], "parameters": { "query_date": "2026-06-24", "query_type": "real_time" } } ``` Step S5: Structured verification and risk decoupling: The system performs structured validation on the candidate JSON output by the LLM to ensure that the data format conforms to preset specifications. Validation includes: field integrity checks, data type validation, numerical range validation, and format conformity checks.

[0024] Simultaneously, this step performs risk decoupling operations, identifying and filtering potentially risky data. Risky data includes, but is not limited to: risks of sensitive information leakage, risks of unauthorized data access, and risks of malicious commands. For identified risky data, the system performs blocking or downgrading processing.

[0025] Step S6: Industry Consistency Judgment Processing: Based on an industry knowledge base, the system performs industry consistency checks on the validated structured data. Specifically, the system compares the entities and parameters in the structured data with standard data in the industry knowledge base to determine whether they conform to industry standards and business logic.

[0026] For example, in the medical field, when a drug name is identified, the system checks whether the drug is on the list of permitted drugs and whether the dosage is within the safe range.

[0027] The industry consistency judgment process in this embodiment includes the following steps (see...). Figure 2 ): Check for 301 errors: Is the current node in the set of valid nodes? The system first checks whether the current node identifier 'c' exists in a preset set of valid nodes. This set of valid nodes is a predefined list of valid entities in an industry knowledge base; for example, in the medical field, it is a list of permitted drug names, and in the financial field, it is a list of compliant financial product names.

[0028] - If the current node c is not in the set of valid nodes, the output result is "unknown" and the return value is -1; - If the current node c is in the set of valid nodes, proceed to the next judgment step.

[0029] Check if the rule set is empty (302 error). The system checks whether the rule set R is empty. The rule set R is a set of business rules related to the current node c, such as drug use contraindications rules, product operation specifications, etc.

[0030] - If the rule set R is empty, it means that there are no applicable judgment rules for the current node c. The output result is "unknown" and the return value is -1. - If the rule set R is not empty, proceed to the next judgment step.

[0031] Determine if a 303 error occurs: Does the rule set directly match? The system determines whether the rule set R is directly equal to the current node c or the state set s*. A direct match means that the current node c or the state set s* already fully conforms to the preset rules, and no further judgment is needed.

[0032] - If R = c or R = s*, that is, the rule set is completely consistent with the current node or state set, the output result is "consistent" and the return value is 1; - If the rule set R is not directly equal to the current node c and the state set s*, then proceed to the next judgment step.

[0033] 306 Error: Mapping Table Equivalence Check When the rule set R is not directly equal to the current node c and the state set s*, the system performs an equivalence check using a preset mapping table M. The mapping table M is an equivalence relation table defined in the industry knowledge base, used to handle scenarios such as synonyms, alias mappings, and correspondences between different versions of terminology.

[0034] For example, in the medical field, mapping table M can contain the correspondence between drug brand names and generic names; in the financial field, mapping table M can contain the correspondence between the abbreviations and full names of financial products.

[0035] The system uses mapping table M to determine whether the current node c and state set s* have an equivalent mapping relationship with rule set R: - If an equivalence relationship can be established between the current node c or the state set s* and the rule set R through the mapping table M, the output result is "consistent" and the return value is 1; - If an equivalence relation cannot be established through the mapping table M, the output result is "Inconsistent" and the return value is 0.

[0036] 308 Error: Industry Consistency Check Output: After the above judgment process, the system outputs the industry consistency judgment result, which includes the following three states: 1. Consistency: The current node and status conform to industry rules and business logic; 0: Inconsistent; the current node and status do not conform to industry rules and business logic. -1: Unknown, unable to determine the consistency of the current node and its state.

[0037] Step S7: Persistent storage and callback query: The structured data processed as described above is persistently stored in the database, including complete session records, processing results, timestamps, and other information. The system also supports a callback notification mechanism, allowing processing results to be pushed to downstream business systems. Furthermore, the system provides a query interface, allowing users to retrieve historical processing records using `session_id`.

[0038] This invention provides a method for structured processing of voice commands based on a large language model, which solves the problem of improving the recognition accuracy of industry-specific terms in telephone voice communication for telecommunications operators.

[0039] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for structuring speech commands based on a large language model, characterized in that, Includes the following steps: S1: Receives voice interaction requests initiated by users and generates a unique session identifier; S2: Preprocess the user-input voice data and use a hot word enhancement mechanism for speech recognition; S3: Construct standardized input templates based on user input types; S4: Input the input template into the large language model to generate structured candidate JSON data; S5: Perform structured validation and risk decoupling processing on the candidate JSON data; S6: Based on the industry knowledge base, perform industry consistency judgment on the validated structured data; S7: Persistently stores the processed structured data and provides a callback query interface.

2. The method according to claim 1, characterized in that, In step S1, the session identifier is generated using the UUID algorithm and is in the format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", where each "x" is a hexadecimal number.

3. The method according to claim 1, characterized in that, In step S2, the preprocessing includes noise filtering, endpoint detection, and speech enhancement operations; the hot word enhancement mechanism includes incorporating words from a preset industry hot word library into the language model in a weighted manner, and the words in the industry hot word library include domain-specific terms, product names, and operation instructions.

4. The method according to claim 1, characterized in that, In step S3, the input template includes the following fields: session identifier (session_id), input type (input_type), raw input content (raw_input), and request timestamp (timestamp).

5. The method according to claim 1, characterized in that, In step S4, the candidate JSON data includes the user intent recognition result intent, the entity extraction result entities, and the parameter parsing result parameters.

6. The method according to claim 1, characterized in that, In step S5, the structured verification includes field integrity check, data type verification, numerical range verification, and format standardization check; the risk decoupling process identifies and filters risks of sensitive information leakage, unauthorized data access, and malicious commands.

7. The method according to claim 1, characterized in that, In step S6, the industry consistency judgment receives three input parameters: current node identifier c, state set s*, and rule set R, and outputs three judgment results: consistent (return value 1), inconsistent (return value 0), and unknown (return value -1).

8. The method according to claim 7, characterized in that, Step S6 includes the following judgment process: Error 301: Check if the current node identifier c is in the set of valid nodes; 302 Error: Check if the rule set R is empty; 303: Determine whether the rule set R is directly equal to the current node c or the state set s*; Judgment 306: Determine whether the current node c and the state set s* have an equivalent mapping relationship with the rule set R by using the preset mapping table M.

9. The method according to claim 8, characterized in that, When the result of judgment 301 is "No" or the result of judgment 302 is "Yes", the output judgment result is "Unknown" and the return value is -1; when the result of judgment 303 is "Yes" or the result of judgment 306 is "Yes", the output judgment result is "Consistent" and the return value is 1; when the result of judgment 306 is "No", the output judgment result is "Inconsistent" and the return value is 0.

10. The method according to claim 1, characterized in that, In step S7, the persistent storage content includes complete session records, processing results, and timestamps; the callback query interface supports querying historical processing records by session identifier.