A Vertical Domain Intent Parsing and Execution Method Based on Atomic Primitive Combination
Patent Information
- Application Number
- CN202610801024.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-09-11
AI Technical Summary
[0002]现有意图解析与任务执行技术,大多依赖通用大模型直接进行语义理解与指令响应,在金融、政务、工业控制、医疗问诊等垂直领域场景中,存在明显适配性不足问题;传统自然语言处理方法多采用模板匹配、规则引擎或浅层语义特征提取等方式,虽然执行效率较高,但对复杂句式、口语化的表达及多意图嵌套语句的泛化能力薄弱,意图识别准确率易受表述差异影响,难以适配动态变化的垂直业务需求;在原子原语架构下的隐含需求推理过程中,异常检测环节成为制约系统性能的关键瓶颈;隐含需求推理需基于用户显性输入,结合原子原语的关联关系、业务场景约束,挖掘用户未明确表述的隐含需求,其全流程具有链路长、场景复杂度差异大、原语交互频繁等特性;当前的异常检测在粒度控制与异常处理机制上存在显著缺陷异常检测粒度多为预设的固定值,且没有考虑到出现的异常情况的频率的高低对异常检测过程的影响,要么采用粗粒度检测,导致局部异常无法被及时发现,进而引发整体推理失效,增加排查难度;要么采用细粒度检测,导致检测开销激增,占用大量系统资源,降低推理效率,尤其在复杂场景下,细粒度检测的冗余计算会严重影响系统响应速度;异常检测粒度无法实时与实际情况相匹配的缺陷,导致实际异常检测中出现误检率升高或检测效率降低的问题
本发明通过构建动态粒度适配机制,结合推理链路阶段、场景复杂度、原语核心等级实现了异常检测粒度的自适应调整,打破了固定粒度的局限,实现了检测精度与推理效率的平衡;在复杂场景下或者出现核心原语以及推理关键阶段采用细粒度检测,达到了确保异常精准识别的效果;在简单场景、普通原语以及推理初始阶段采用粗粒度检测,降低检测耗时和耗能,达到了提高异常检测效率,有效提升隐含需求推理效率的效果;并且设置了异常影响的粒度调整机制用于根据实时检测的异常率判断是否需要对异常检测粒度调整系数进行异常影响调整,提高了在异常情况出现频率偏高时的有异常检测准确率,并降低了异常情况的漏检概率;本发明设置异常检测阈值动态调整机制对不同场景复杂度和不同检测粒度中的异常检测阈值进行适应性调整,使异常阈值能够持续适配场景变化与数据分布变化,有效降低了异常检测的误报率与漏报率,提升了异常检测的可靠性,减少了人工排查成本;通过构建灵活的任务执行编排结构,适配不同业务场景的任务依赖关系,提升了业务执行效率;基于预定义输出模板整合执行结果,确保最终响应贴合用户需求与行业习惯;新增降级处理机制,解决了意图无法匹配原语映射关系时的系统响应问题,提升了用户体验。
Smart Images

Figure CN122735902A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vertical domain intent parsing technology, specifically a vertical domain intent parsing and execution method based on the combination of atomic primitives. Background Technology
[0002] Existing intent parsing and task execution technologies mostly rely on general-purpose large models for direct semantic understanding and command response, which suffers from significant limitations in adaptability to vertical scenarios such as finance, government affairs, industrial control, and medical consultation. Traditional natural language processing methods often employ template matching, rule engines, or shallow semantic feature extraction, which, while efficient, have weak generalization capabilities for complex sentences, colloquial expressions, and nested intent statements. Intent recognition accuracy is easily affected by variations in expression, making it difficult to adapt to dynamically changing vertical business needs. In the implicit requirement reasoning process under the atomic primitive architecture, anomaly detection becomes a key bottleneck restricting system performance. Implicit requirement reasoning needs to be based on explicit user input, combined with the relationships between atomic primitives and business scenario constraints, to uncover unexpressed user statements. The implicit requirements of anomaly detection are characterized by long links, large differences in scenario complexity, and frequent primitive interactions throughout the entire process. Current anomaly detection has significant defects in granularity control and anomaly handling mechanisms. The anomaly detection granularity is mostly a preset fixed value, and it does not take into account the impact of the frequency of anomalies on the anomaly detection process. Either coarse-grained detection is used, which makes it impossible to detect local anomalies in time, thus causing the overall inference to fail and increasing the difficulty of investigation; or fine-grained detection is used, which leads to a surge in detection overhead, consuming a lot of system resources and reducing inference efficiency. Especially in complex scenarios, the redundant calculation of fine-grained detection can seriously affect the system response speed. The defect that the anomaly detection granularity cannot match the actual situation in real time leads to problems such as increased false detection rate or reduced detection efficiency in actual anomaly detection. Summary of the Invention
[0003] The purpose of this invention is to provide a vertical domain intent parsing and execution method based on atomic primitive combination, so as to solve the problems raised in the prior art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a vertical domain intent parsing and execution method based on atomic primitive combination, the method comprising the following: S1. Receive the user's natural language request, perform semantic parsing on the natural language request, and obtain the initial intent representation; S2. Predefine the set of atomic primitives, atomic primitive attributes, and atomic primitive mapping rules. Based on the pre-built atomic primitive mapping rules, decompose the initial intent representation into a sequence of atomic primitive invocation tasks. S3. Reason for the user's implicit needs and set up an anomaly detection threshold dynamic adjustment mechanism to identify and detect anomalies in the implicit needs reasoning process; S4. Set a dynamic adjustment mechanism for anomaly detection granularity to adaptively adjust the anomaly detection granularity based on the inference link stage, scenario complexity, and atomic primitive core level, and set a granularity adjustment mechanism for anomaly impact to adjust the anomaly detection granularity adjustment coefficient for anomaly impact. S5. Construct a task execution orchestration structure based on the extended task set; call the corresponding atomic primitives to execute the task execution orchestration structure and obtain structured execution results; S6. Integrate the structured execution results based on the predefined output template to generate the final response; S7. When the initial intent representation cannot match the preset primitive mapping relationship, perform degradation processing and transfer the natural language request to the unstructured text processing flow.
[0005] Furthermore, in step S2: based on the business scenarios, business rules, and task types of the vertical domain, a set of atomic primitives, atomic primitive attributes, and atomic primitive mapping rules are predefined to form an atomic primitive mapping system; and based on the constructed atomic primitive mapping relationship, the initial intent representation is decomposed into one or m atomic primitive invocation tasks; constructing the vertical domain atomic primitive mapping system and decomposing the original intent includes the following steps: S21. Analyze the business processes and task types in the vertical domain, and break down the business processes and task types into n atomic primitives. Each atomic primitive is assigned a unique input / output parameter and execution logic. The atomic primitive represents the smallest indivisible task execution unit in the vertical domain. S22. Define the attributes of each atomic primitive, including primitive complexity, primitive interaction frequency, and primitive association weight. The primitive complexity is obtained through business decomposition and quantitative evaluation. First, by identifying the smallest business unit corresponding to the atomic primitive, its core execution logic, dependent conditions, and processing flow are decomposed. Second, the complexity evaluation coefficient is obtained by combining the number of execution steps, the number of dependent primitives, and the number of business constraints. The primitive interaction frequency is obtained by collecting historical call data of atomic primitives in vertical domain business systems and collecting primitive call data in real time, such as the past 4-8 months in a chemical trading system. The primitives are analyzed for their call counts, call periods, and associated call scenarios. The interaction frequency is dynamically updated in conjunction with changes in business scenarios such as peak seasons for chemical transactions and new product launches, thereby obtaining the actual primitive interaction frequency. The primitive association weight represents the degree of association between a certain atomic primitive and other atomic primitives. The primitive association weight is based on the association rules of the atomic primitive library and collects historical data of primitive combination sequences. For example, in chemical transactions, the number of joint calls between the chemical procurement primitive, the chemical product inspection primitive, and the chemical logistics transportation primitive is used. The association rule mining algorithm is used to calculate the association support and confidence between primitives as the basic quantitative value method for association weight. S23. Based on the vertical domain business rules, establish a mapping relationship between user intent and atomic primitive calling tasks to form atomic primitive mapping rules. The atomic primitive mapping rules are used to establish the correspondence between user intent and atomic primitive calling tasks. S24. The initial intent identified from the natural language is denoted as A. Based on the pre-constructed atomic primitive mapping relationship, the intent representation is matched with the atomic primitive mapping rules, and the initial intent representation is decomposed into one or m atomic primitive calling tasks. The sequence of atomic primitive calling tasks obtained from the decomposition is denoted as {a1, a2, ..., am}. For example, in chemical transactions, the supplier queries this original intent and obtains the primitive sequence {quote query, procurement, logistics, inspection, settlement}. Furthermore, in step S3: based on the atomic primitive call task set, with the atomic primitive library as the core support, and combined with the preset atomic primitive association rules and vertical domain business scenario constraints in the atomic primitive library, such as the requirement that the procurement primitive must be called after the supplier queries the primitive, and the requirement that the settlement primitive must be based on the qualified result of the verification primitive, these are primitive association rules set in the chemical transaction atomic primitive library; through semantic association and logical deduction analysis, the implicit needs of users are obtained. For example, if a user only says that they want to purchase 10 tons of 98% concentrated sulfuric acid, we can find out that the supplier needs to have a hazardous chemical operation qualification, the logistics needs to have a hazardous materials transportation qualification, and so on. The system implicitly identifies the need for third-party inspection after delivery. It constructs an implicit requirement inference chain to address these needs, with each chain containing x ordered inference nodes. Each node corresponds to a combination of atomic primitives and inference logic. The combined atomic primitives of all inference nodes form the acquired extended task set {q1, q2, ..., qk}. Furthermore, it clarifies what each node should do, how the primitives should cooperate, and which user needs they correspond to. This provides a clear basis for subsequent anomaly detection and business execution, ensures the accuracy of the identified implicit requirements, and makes the entire inference process traceable and verifiable.
[0006] Furthermore, in step S3: during the implicit requirement reasoning process, anomaly detection is performed on the operating parameters of the atomic primitives in real time. The core operating parameters include the test response time, data accuracy, and parameter deviation. A dynamic adjustment mechanism for the anomaly detection threshold is set to adaptively adjust the anomaly detection threshold for different scenario complexities and detection granularities. The core level of the primitive and the scenario complexity are jointly analyzed to obtain the anomaly detection threshold adjustment coefficient g. An initial test response time threshold t0, data accuracy threshold p0, and parameter deviation threshold h0 are set. After obtaining the anomaly detection threshold adjustment coefficient, the actual anomaly detection threshold is obtained by dynamically adjusting the threshold based on the initial anomaly detection threshold. The adjusted test response time threshold t0 is then used to determine the actual anomaly detection threshold. 01 =g×t0; Adjusted data accuracy threshold p 01 =g×p0; Adjusted parameter deviation threshold h 01 =g×h0.
[0007] Further, in step S4: a dynamic granularity adaptation mechanism is set for the anomaly detection granularity in the anomaly handling extension rule, and the anomaly detection granularity is divided into coarse-grained anomaly detection, medium-grained anomaly detection and fine-grained anomaly detection, wherein different anomaly detection granularities target different detection unit levels; the coarse-grained anomaly detection takes a complete implicit demand reasoning link as a detection unit, does not distinguish a single reasoning node and an atomic primitive, and only monitors the overall operation state of the link; the medium-grained anomaly detection takes a single reasoning node as a detection unit, and each detection unit corresponds to a specific combined fragment of atomic primitives, which is used for detecting the interaction state of primitive combination and the execution condition of reasoning logic in the node; the fine-grained anomaly detection takes a single atomic primitive as a detection unit, which is used for detecting the operating parameter and execution state of a single primitive.
[0008] Further, in step S4: an initial detection granularity is first determined according to the scene complexity of the core primitive of the initial intention, a complexity evaluation coefficient a of the core primitive is obtained by weighted analysis of the execution step s1 of the core primitive corresponding to the initial intention, the number of dependent primitives s2 and the number of service constraints s3, and the complexity evaluation coefficient is calculated according to the following formula: a=(s1+s2+s3) / 3; scenario complexity evaluation coefficient thresholds a1 and a2 are set; the analysis results of the scene complexity of the core primitive include the following three cases: If a≤a1, the scene complexity of the core primitive of the initial intention is low, indicating that the scene corresponding to the core primitive of the initial intention is a simple scene, then coarse granularity is set as the initial detection granularity; If a1<a≤a2, the scene complexity of the core primitive of the initial intention is moderate, indicating that the scene corresponding to the core primitive of the initial intention is a medium scene, then medium granularity is set as the initial detection granularity; If a>a2, the scene complexity of the core primitive of the initial intention is high, indicating that the scene corresponding to the core primitive of the initial intention is a complex scene, then fine granularity is set as the initial detection granularity.
[0009] Furthermore, in step S4: the dynamic adjustment mechanism for anomaly detection granularity adaptively adjusts the anomaly detection granularity based on the inference link stage, scene complexity, and atomic primitive core level; during the implicit requirement inference process, the anomaly detection granularity adjustment coefficient is obtained by jointly analyzing the inference link stage w, scene complexity b, and atomic primitive core level c; the core level of the atomic primitive can be obtained by weighted fusion analysis of three influencing factors: the number of execution steps y within a single primitive, the association weight u, and the number of anomaly chain reactions v, and a critical threshold y0 for the number of execution steps of the core primitive and a critical threshold v0 for the number of anomaly chain reactions are set. Primitives with three or fewer execution steps are generally considered ordinary primitives, while those with more than three execution steps are defined as core primitives. Therefore, the critical threshold for the number of execution steps for core primitives can be set to 3. If the number of abnormal chain reactions for an ordinary primitive is 0, it indicates the presence of an abnormal chain reaction, thus classifying it as a core primitive. Therefore, the critical threshold for the number of abnormal chain reactions for core primitives can be set to 1. The following formula is used to calculate: c = (y / y0 + u + v / v0) / 3. For example, in the supplier information query primitive, execution steps y = 2; association weight u = 0.35; number of abnormal chain reactions v = 0; y0 = 3, v0 = 1; then c = 0.45. The anomaly detection granularity adjustment coefficient *r* is obtained by jointly analyzing the real-time changes in primitive core level and scene complexity. The coefficient is calculated using the following formula: *r* = *w* × (*f1* *b* / *a* + *f2* *c*). Here, *w* represents the inference link stage assignment (*w* = 1, 2, 3); *w* = 1 represents the first-level inference stage; *w* = 2 represents the second-level inference stage; and *w* = 3 represents the third-level inference stage. *f1* represents the influence weight of scene complexity in the anomaly detection granularity adjustment coefficient; and *f2* represents the influence weight of primitive core level. By combining the inference link stage, scene complexity, and primitive core level, adaptive adjustment of anomaly detection granularity is achieved, breaking the limitations of fixed granularity and achieving a balance between detection accuracy and inference efficiency. Fine-grained detection is used in complex scenarios or when core primitives or key inference stages appear to ensure accurate anomaly identification. Setting an anomaly detection granularity adjustment threshold r0; if r≤r0, it indicates that the anomaly detection granularity adjustment coefficient is too low, then the anomaly detection granularity is coarsened by one level. If the anomaly detection granularity is already at coarse granularity, the original anomaly detection granularity is maintained; coarse-grained detection is adopted in simple scenarios, common primitives and the initial stage of inference, which reduces detection time consumption and energy consumption, achieves the effects of improving anomaly detection efficiency and effectively improving the efficiency of implicit demand inference; if r>r0, it indicates that the anomaly detection granularity adjustment coefficient is too high, then the anomaly detection granularity is refined by one level. If the anomaly detection granularity is already at fine detection granularity, the original anomaly detection granularity is maintained; fine-grained detection is adopted in complex scenarios, when core primitives occur or at the key stage of inference, which achieves the effect of ensuring accurate identification of anomalies.
[0010] Further, in step S4: a granularity adjustment mechanism affected by anomalies is set, which is used to judge whether it is necessary to perform anomaly influence adjustment on the anomaly detection granularity adjustment coefficient according to the real-time detected anomaly rate; recording the occurrence frequency z of detected anomalies in real time; setting an anomaly frequency threshold as z0, judging whether additional anomaly influence adjustment is required for the anomaly detection granularity adjustment coefficient according to the comparative analysis between the real-time anomaly rate and the threshold. If z<z0, it indicates that the occurrence frequency of anomalies is relatively low, then no anomaly influence adjustment is performed on the anomaly detection granularity; if z≥z0, it indicates that the occurrence frequency of anomalies is relatively high, then additional anomaly influence adjustment is added to the anomaly detection granularity; the anomaly detection granularity adjustment coefficient after adding the additional anomaly influence adjustment is: r'=r×z / z0; and the adjusted anomaly detection granularity adjustment coefficient is used for actual anomaly detection; a dynamic adjustment mechanism for anomaly detection thresholds is set to adaptively adjust the anomaly detection thresholds under different scene complexities and different detection granularities, so that the anomaly thresholds can continuously adapt to scene changes and data distribution changes, which effectively reduces the false positive rate and false negative rate of anomaly detection, improves the reliability of anomaly detection, and reduces the cost of manual troubleshooting.
[0011] Furthermore, in step S5: for the implicit requirement inference link after anomaly detection and correction, extract the business tasks corresponding to each inference node in the link to form an extended task set. The extended task set covers all sub-tasks required for implicit requirement inference and business execution. Based on the business logic and dependencies of each sub-task in the extended task set, select a matching task execution orchestration structure. The orchestration structure includes serial execution relationships, parallel execution relationships, and conditional execution relationships. Serial execution relationships are used to execute tasks with sequential dependencies. For example, in chemical trading, product inspection tasks need to be executed after logistics scheduling tasks are completed; the two use a serial execution relationship. Parallel execution relationships are used to execute tasks without dependencies. Simultaneous tasks, such as supplier screening and product quotation query, can be executed in parallel, improving execution efficiency. Conditional execution relationships are used to execute tasks with conditional branching relationships; for example, payment settlement requires product inspection to pass as a condition. If the inspection passes, settlement is executed; otherwise, execution is halted and exception handling is triggered. A flexible task execution orchestration structure is built to adapt to task dependencies in different business scenarios, improving business execution efficiency. After the orchestration structure is built, the corresponding atomic primitives in the atomic primitive library are called, and each subtask is executed sequentially or synchronously according to the execution relationship of the orchestration structure. The execution data of each primitive and the task completion results are recorded in real time and integrated to form a structured execution result.
[0012] Furthermore, in step S7: if the initial intent representation obtained from semantic parsing still cannot match the preset atomic primitive mapping relationship after intent expansion, that is, the user intent is a niche demand or non-standardized request in a vertical domain without a preset corresponding atomic primitive, such as in a chemical trading scenario where the user inputs an inquiry about the import and export tariff policy of chemical products, but there is no preset atomic primitive related to tariff query in the atomic primitive library, then the degradation mechanism is automatically triggered. The atomic primitive call and structured execution process will no longer be executed. Instead, the received natural language request will be transferred to the unstructured text processing process, such as human agent interaction and general semantic response, to avoid process interruption. At the same time, the intent identified after unstructured text processing is recorded to provide data support for subsequent atomic primitive expansion and primitive mapping relationship optimization, thereby improving the system's long-term adaptability.
[0013] Compared with the prior art, the beneficial effects of the present invention are: This invention constructs a dynamic granularity adaptation mechanism, combining inference link stages, scene complexity, and primitive core level to achieve adaptive adjustment of anomaly detection granularity, breaking the limitations of fixed granularity and achieving a balance between detection accuracy and inference efficiency. Fine-grained detection is used in complex scenarios or when core primitives appear and during critical inference stages, ensuring accurate anomaly identification. Coarse-grained detection is used in simple scenarios, with ordinary primitives, and at the initial inference stage, reducing detection time and energy consumption, thus improving anomaly detection efficiency and effectively enhancing implicit requirement inference efficiency. Furthermore, an anomaly impact granularity adjustment mechanism is set up to determine whether the anomaly detection granularity adjustment coefficient needs to be adjusted based on the real-time anomaly rate, improving the handling of anomaly occurrences. The invention improves anomaly detection accuracy when the threshold is high and reduces the probability of missed detections in abnormal situations. It employs a dynamic anomaly detection threshold adjustment mechanism to adaptively adjust the threshold for different scenario complexities and detection granularities, ensuring the threshold continuously adapts to changes in scenario and data distribution. This effectively reduces false positive and false negative rates, improves the reliability of anomaly detection, and reduces manual investigation costs. A flexible task execution orchestration structure is built to adapt to task dependencies in different business scenarios, improving business execution efficiency. Execution results are integrated based on predefined output templates to ensure the final response aligns with user needs and industry practices. A new degradation processing mechanism addresses system response issues when intents cannot match primitive mapping relationships, enhancing user experience. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the method flow for a vertical domain intent parsing and execution method based on atomic primitive combination according to the present invention. Detailed Implementation
[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] like Figure 1 As shown, this invention provides a technical solution: a vertical domain intent parsing and execution method based on atomic primitive combination, the method comprising the following: S1. Receive the user's natural language request, perform semantic parsing on the natural language request, and obtain the initial intent representation; S2. Predefine the set of atomic primitives, atomic primitive attributes, and atomic primitive mapping rules. Based on the pre-built atomic primitive mapping rules, decompose the initial intent representation into a sequence of atomic primitive invocation tasks. S3. Reason for the user's implicit needs and set up an anomaly detection threshold dynamic adjustment mechanism to identify and detect anomalies in the implicit needs reasoning process; S4. Set a dynamic adjustment mechanism for anomaly detection granularity to adaptively adjust the anomaly detection granularity based on the inference link stage, scenario complexity, and atomic primitive core level, and set a granularity adjustment mechanism for anomaly impact to adjust the anomaly detection granularity adjustment coefficient for anomaly impact. S5. Construct a task execution orchestration structure based on the extended task set; call the corresponding atomic primitives to execute the task execution orchestration structure and obtain structured execution results; S6. Integrate the structured execution results based on the predefined output template to generate the final response; S7. When the initial intent representation cannot match the preset primitive mapping relationship, perform degradation processing and transfer the natural language request to the unstructured text processing flow.
[0017] In step S2: Based on the business scenarios, business rules, and task types of the vertical domain, a set of atomic primitives, atomic primitive attributes, and atomic primitive mapping rules are predefined to form an atomic primitive mapping system; and based on the constructed atomic primitive mapping relationship, the initial intent representation is decomposed into one or m atomic primitive invocation tasks; constructing the vertical domain atomic primitive mapping system and decomposing the original intent includes the following steps: S21. Analyze the business processes and task types in the vertical domain, and break them down into n atomic primitives. Each atomic primitive is assigned a unique input / output parameter and execution logic. The atomic primitive represents the smallest indivisible task execution unit in the vertical domain. S22. Define the properties of each atomic primitive. The atomic primitive properties include primitive complexity, primitive interaction frequency, and primitive association weight. S23. Based on the business rules of the vertical domain, establish a mapping relationship between user intent and atomic primitive calling tasks to form atomic primitive mapping rules. The atomic primitive mapping rules are used to establish the correspondence between user intent and atomic primitive calling tasks. The mapping rules include exact matching rules and fuzzy matching rules. S24. The initial intent identified from the natural language is denoted as A. Based on the pre-constructed atomic primitive mapping relationship, the intent representation is matched with the atomic primitive mapping rule, and the initial intent representation is decomposed into one or m atomic primitive calling tasks. The set of atomic primitive calling tasks obtained from the decomposition is denoted as {a1, a2, ..., am}.
[0018] In step S3: Based on the task collection invoked using atomic primitives, and with the atomic primitive library as the core support, combined with the preset atomic primitive association rules in the atomic primitive library and the business scenario constraints specific to the vertical domain, the implicit needs of users are analyzed through semantic association and logical deduction. Implicit need inference links are then constructed for the implicit needs of users. Each implicit need inference link contains x ordered inference nodes. Each inference node corresponds to an atomic primitive combination and inference logic. The atomic primitive combinations corresponding to all inference nodes are the obtained extended task set {q1, q2, ..., qk}.
[0019] In step S3: During the implicit requirement reasoning process, anomaly detection is performed on the running parameters of atomic primitives in real time. Core running parameters include test response time, data accuracy, and parameter deviation. A dynamic adjustment mechanism for the anomaly detection threshold is set to adaptively adjust the anomaly detection threshold for different scenario complexities and detection granularities. The core level of the primitive and the scenario complexity are jointly analyzed to obtain the anomaly detection threshold adjustment coefficient g. Initial test response time threshold t0, data accuracy threshold p0, and parameter deviation threshold h0 are set. After obtaining the anomaly detection threshold adjustment coefficient, the actual anomaly detection threshold is obtained by dynamically adjusting the initial anomaly detection threshold. The adjusted test response time threshold t0 is then used to determine the actual anomaly detection threshold. 01 =g×t0; Adjusted data accuracy threshold p 01 =g×p0; Adjusted parameter deviation threshold h 01 =g×h0.
[0020] In step S4: A dynamic granularity adaptation mechanism is set for the anomaly detection granularity in the anomaly handling extension rules, dividing the anomaly detection granularity into coarse-grained anomaly detection, medium-grained anomaly detection, and fine-grained anomaly detection. Different anomaly detection granularities target different detection unit levels. Coarse-grained anomaly detection uses the complete implicit requirement inference chain as the detection unit, without distinguishing between individual inference nodes and atomic primitives, and only monitors the overall running status of the chain. Medium-grained anomaly detection uses a single inference node as the detection unit, and each detection unit corresponds to a specific atomic primitive combination fragment, used to detect the interaction status of the primitive combination within the node and the execution status of the inference logic. Fine-grained anomaly detection uses a single atomic primitive as the detection unit, used to detect the running parameters and execution status of a single primitive.
[0021] In step S4: First, the initial detection granularity is determined based on the scenario complexity of the core primitives of the initial intent. The execution steps s1, the number of dependent primitives s2, and the number of business constraints s3 corresponding to the core primitives of the initial intent are weighted and analyzed to obtain the complexity evaluation coefficient 'a' of the core primitives. This coefficient is calculated using the following formula: a = (s1 + s2 + s3) / 3. Scenario complexity evaluation coefficient thresholds a1 and a2 are set. The analysis results of the scenario complexity of the core primitives include the following three cases: If a≤a1, the scenario complexity of the core primitive of the initial intention is low, indicating that the scenario corresponding to the core primitive of the initial intention is a simple scenario, and the coarse granularity is set as the initial detection granularity; If a1<a≤a2, the scenario complexity of the core primitive of the initial intention is moderate, indicating that the scenario corresponding to the core primitive of the initial intention is a medium scenario, and the medium granularity is set as the initial detection granularity; If a>a2, the scenario complexity of the core primitive of the initial intention is high, indicating that the scenario corresponding to the core primitive of the initial intention is a complex scenario, and the fine granularity is set as the initial detection granularity.
[0022] In step S4: the dynamic adjustment mechanism of anomaly detection granularity adaptively adjusts the anomaly detection granularity based on the inference link stage, scenario complexity and core level of atomic primitives; in the implicit requirement inference process, the anomaly detection granularity adjustment coefficient is obtained through joint analysis of the inference link stage w, scenario complexity b and atomic primitive core level c; The anomaly detection granularity adjustment coefficient r is obtained through joint analysis of real-time change values of the primitive core level and scenario complexity, and the anomaly detection granularity adjustment coefficient is calculated by the following formula: r=w×(f1×b / a+f2×c); wherein, w represents the assignment of the inference link stage, w=1, 2, 3; w=1 represents the first-level inference stage; w=2 represents the second-level inference stage; w=3 represents the third-level inference stage; f1 represents the influence weight of scenario complexity in the anomaly detection granularity adjustment coefficient; f2 represents the influence weight of primitive core level in the anomaly detection granularity adjustment coefficient; An anomaly detection granularity adjustment threshold r0 is set; if r≤r0, it indicates that the anomaly detection granularity adjustment coefficient is low, and the anomaly detection granularity is coarsened by one level. If the anomaly detection granularity is already coarse granularity, the original anomaly detection granularity remains unchanged; if r>r0, it indicates that the anomaly detection granularity adjustment coefficient is high, and the anomaly detection granularity is refined by one level. If the anomaly detection granularity is already fine detection granularity, the original anomaly detection granularity remains unchanged.
[0023] In step S4: an abnormality influence-based granularity adjustment mechanism is provided to determine whether abnormality influence adjustment needs to be performed on the abnormality detection granularity adjustment coefficient according to the real-time detected abnormality rate; the occurrence frequency z of the detected abnormal conditions is recorded in real time; an abnormality frequency threshold is set as z0, whether additional abnormality influence adjustment is required for the abnormality detection granularity adjustment coefficient is determined based on comparative analysis between the real-time abnormality rate and the threshold. If z<z0, it indicates that the abnormality occurrence frequency is relatively low, and no abnormality influence adjustment is performed on the abnormality detection granularity; if z≥z0, it indicates that the abnormality occurrence frequency is relatively high, and additional abnormality influence adjustment is performed on the abnormality detection granularity; the abnormality detection granularity adjustment coefficient after adding the additional abnormality influence adjustment is: r'=r×z / z0; and the adjusted abnormality detection granularity adjustment coefficient is used for actual abnormality detection.
[0024] In step S5: for the implicit demand reasoning link after abnormality detection and correction, the business task corresponding to each reasoning node in the link is extracted to form an extended task set, and the extended task set covers all subtasks required for implicit demand reasoning and business execution; a matched task execution orchestration structure is selected according to the business logic and dependency of each subtask in the extended task set, and the orchestration structure includes serial execution relationship, parallel execution relationship and conditional execution relationship; tasks with sequential dependency are executed by adopting the serial execution relationship; tasks that have no dependency and can be advanced synchronously are executed by adopting the parallel execution relationship; tasks with conditional branch relationship are executed by adopting the conditional execution relationship; after the orchestration structure is constructed, the corresponding atomic primitives in the atomic primitive library are called, each subtask is executed sequentially or synchronously according to the execution relationship of the orchestration structure, the execution data of each primitive and the task completion result are recorded in real time, and the structured execution result is formed through integration.
[0025] In step S7: if the initial intent representation obtained by semantic parsing still cannot match the preset atomic primitive mapping relationship after intent expansion, the degradation mechanism is automatically triggered, and the atomic primitive calling and structured execution process is no longer executed, instead, the received natural language request is transferred to the unstructured text processing flow to avoid process interruption, and meanwhile, the intent recognized after unstructured text processing is recorded to provide data support for subsequent atomic primitive expansion and primitive mapping relationship optimization, and improve the long-term adaptation capability of the system; and a reverse learning mechanism is set up to perform full-dimensional log buried point collection for all user requests that trigger degradation, without missing any abnormal scenarios; the collected degradation samples are automatically cleaned and hierarchically classified to eliminate invalid noise data and accurately lock the optimizable samples; root cause analysis is performed on the degraded samples after layering to accurately locate the problem nodes; the atomic primitive mapping relationship is supplemented and improved based on the attribution result, so as to achieve reverse optimization and targeted problem fixing; business layer optimization is completed for data-type and rule-type degradation problems to make up for the shortcomings of scenes; after iterative optimization is completed, the system performs full-volume effect reinspection to verify the effectiveness of the optimization.
[0026] Example 1: receiving the natural language request "I need to purchase 10 tons of concentrated sulfuric acid with a concentration of 98%, to be delivered within 3 days, and payment shall be made after delivery and acceptance"; performing word segmentation and semantic recognition through a natural language processing model, and拆解 the original intention: concentrated sulfuric acid, 98% concentration, 10 tons of purchase quantity, 3-day delivery cycle, settlement method; recording the initial intention recognized from natural language as A, based on the pre-constructed atomic primitive mapping relationship, matching said intention representation with the atomic primitive mapping rules, and拆解 the initial intention representation into m=6 atomic primitive calling tasks, recording the sequence of atomic primitive calling tasks obtained by disassembly as {supplier information query primitive, chemical product quotation query primitive, chemical product inspection primitive, chemical purchase primitive, chemical logistics transportation primitive, electronic contract primitive}; Example 2: first determining the initial detection granularity according to the scenario complexity of the core primitive corresponding to the initial intention, performing weighted analysis on the execution step number s1=5 of the core primitive corresponding to the initial intention, the number of dependent primitives s2=6 and the number of business constraints s3=0 to obtain the complexity evaluation coefficient a=3.67 of the core primitive, and setting the scenario complexity evaluation coefficient thresholds a1=3 and a2=5; then a1<a≤a2, which means the scenario complexity of the core primitive corresponding to the initial intention is moderate, indicating the scenario of the core primitive corresponding to the initial intention is a medium scenario, thus setting medium granularity as the initial detection granularity; In the implicit demand reasoning process, the reasoning link stage w=2, the scenario complexity b=3.67 and the atomic primitive core level c=0.45 are jointly analyzed to obtain the abnormal detection granularity adjustment coefficient; the current scenario belongs to the secondary reasoning link stage, the real-time change values of the primitive core level and the scenario complexity are jointly analyzed to obtain the abnormal detection granularity adjustment coefficient r, and the abnormal detection granularity adjustment coefficient is calculated by the following formula: r=w×(f1×b / a+f2×c); f1=0.5 represents the influence weight of scenario complexity in the abnormal detection granularity adjustment coefficient; f2=0.5 represents the influence weight of primitive core level in the abnormal detection granularity adjustment coefficient; thus r=1.45 is obtained through calculation; setting the abnormal detection granularity adjustment threshold r0=1.5; then r<r0, which indicates the abnormal detection granularity adjustment coefficient is on the high side, so the abnormal detection granularity is adjusted to be one level finer, and the abnormal detection granularity is adjusted from medium granularity to fine granularity; Example 3: Receiving a natural language request, "Please check today's styrene price," the system uses a natural language processing model for word segmentation and semantic recognition to break down the original intent: "Check today's styrene market price." In the bulk chemical industry, checking prices is one of the decision-making bases for business personnel to determine whether it is appropriate to make a purchase or sale. Therefore, considering the transaction decision-making characteristics of the bulk chemical industry, the core purpose of business personnel checking the price of a single product is to determine whether there is a favorable opportunity for purchase or sale. This requires comprehensive analysis of multiple dimensions, including market supply and demand, industry operating rates, platform transaction activity, and their own risk control exposure. Therefore, after recognizing the basic intent, the system automatically completes multi-dimensional intent expansion, fully covering the core information required for decision-making. The expanded output dimensions are as follows: real-time bulk styrene price for the day, recent social styrene inventory, operating rates of the upstream and downstream styrene industry chain, real-time styrene offers on the platform, bid price range, and current user business exposure data. Through intent expansion, the user's simple price query requirement is upgraded to an integrated decision support service encompassing price, supply and demand, industry trends, platform transactions, and personal risk control, significantly improving the business practicality of intelligent question answering and avoiding the problem of single data failing to translate into effective decision-making.
[0027] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A vertical domain intent parsing and execution method based on atomic primitive combination, characterized in that: The method includes the following: S1. Receive the user's natural language request, perform semantic parsing on the natural language request, and obtain the initial intent representation; S2. Predefine the set of atomic primitives, atomic primitive attributes, and atomic primitive mapping rules. Based on the pre-built atomic primitive mapping rules, decompose the initial intent representation into a sequence of atomic primitive invocation tasks. S3. Reason for the user's implicit needs and set up an anomaly detection threshold dynamic adjustment mechanism to identify and detect anomalies in the implicit needs reasoning process; S4. Set a dynamic adjustment mechanism for anomaly detection granularity to adaptively adjust the anomaly detection granularity based on the inference link stage, scenario complexity, and atomic primitive core level, and set a granularity adjustment mechanism for anomaly impact to adjust the anomaly detection granularity adjustment coefficient for anomaly impact. S5. Construct a task execution orchestration structure based on the extended task set; call the corresponding atomic primitives to execute the task execution orchestration structure and obtain structured execution results; S6. Integrate the structured execution results based on the predefined output template to generate the final response; S7. When the initial intent representation cannot match the preset primitive mapping relationship, perform degradation processing and transfer the natural language request to the unstructured text processing flow.
2. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 1, characterized in that: In step S2: Based on the business scenarios, business rules, and task types of the vertical domain, a set of atomic primitives, atomic primitive attributes, and atomic primitive mapping rules are predefined to form an atomic primitive mapping system; and based on the constructed atomic primitive mapping relationship, the initial intent representation is decomposed into one or m atomic primitive invocation tasks; Constructing a vertical domain atomic primitive mapping system and decomposing the original intent includes the following steps: S21. Analyze the business processes and task types in the vertical domain, and break down the business processes and task types into n atomic primitives. Each atomic primitive is assigned a unique input and output parameter and execution logic. The atomic primitives represent the smallest indivisible task execution unit in a vertical domain; S22. Define the attributes of each atomic primitive, including primitive complexity, primitive interaction frequency, and primitive association weight. S23. Based on the business rules of the vertical domain, establish a mapping relationship between user intent and atomic primitive calling tasks to form atomic primitive mapping rules. The atomic primitive mapping rules are used to establish the correspondence between user intent and atomic primitive calling tasks. The mapping rules include exact matching rules and fuzzy matching rules. S24. The initial intent identified from the natural language is denoted as A. Based on the pre-constructed atomic primitive mapping relationship, the intent representation is matched with the atomic primitive mapping rule, and the initial intent representation is decomposed into one or m atomic primitive calling tasks. The sequence of atomic primitive calling tasks obtained from the decomposition is denoted as {a1, a2, ..., am}.
3. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 1, characterized in that: In step S3: based on the set of tasks invoked by atomic primitives, with the atomic primitive library as the core support, combined with the preset atomic primitive association rules in the atomic primitive library and the business scenario constraints specific to the vertical field, the implicit requirements of the user are analyzed through semantic association and logical reasoning, and an implicit requirement reasoning link is constructed for the user's implicit requirements. Each implicit requirement reasoning link comprises x ordered reasoning nodes, each reasoning node corresponds to an atomic primitive combination and a reasoning logic, and the atomic primitive combinations corresponding to all reasoning nodes are the obtained extended task set {q1, q2, …, qk}.
4. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 3, characterized in that: In step S3: during the implicit requirement reasoning process, anomaly detection shall be performed on the operating parameters of atomic primitives in real time. The core operating parameters include inspection response time, data accuracy and parameter deviation; an anomaly detection threshold dynamic adjustment mechanism is set to adaptively adjust anomaly detection thresholds in different scenario complexities and different detection granularities, and the anomaly detection threshold adjustment coefficient g is obtained through joint analysis of the primitive core level and scenario complexity; initial inspection response time threshold t0, data accuracy threshold p0 and parameter deviation threshold h0 are set, and after obtaining the anomaly detection threshold adjustment coefficient, the actual anomaly detection threshold is obtained through dynamic adjustment based on the set initial anomaly detection threshold.
5. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 1, characterized in that: In step S4: a dynamic granularity adaptation mechanism is set for the anomaly detection granularity in the anomaly handling extension rules. The anomaly detection granularity is divided into coarse-grained anomaly detection, medium-grained anomaly detection and fine-grained anomaly detection, and different anomaly detection granularities correspond to different levels of detection units; the coarse-grained anomaly detection takes the complete implicit requirement reasoning link as the detection unit, does not distinguish between individual reasoning nodes and atomic primitives, and only monitors the overall operating status of the link; the medium-grained anomaly detection takes a single reasoning node as the detection unit, each detection unit corresponds to a specific segment of atomic primitive combination, which is used to detect the interaction status of the primitive combination and the execution of reasoning logic within the node; The fine-grained anomaly detection takes a single atomic primitive as the detection unit, which is used to detect the operating parameters and execution status of a single primitive.
6. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 5, characterized in that: In step S4: the initial detection granularity is first determined according to the scenario complexity of the core primitive of the initial intention, and the scenario complexity assessment coefficient a of the core primitive is obtained through weighted analysis of the execution steps of the core primitive corresponding to the initial intention, the number of dependent primitives and the number of business constraints. Scenario complexity assessment coefficient thresholds a1 and a2 are set; the analysis result of the scenario complexity of the core primitive includes the following three cases: If a≤a1, the scenario complexity of the core primitive of the initial intention is low, indicating that the scenario of the core primitive corresponding to the initial intention is a simple scenario, and coarse granularity is set as the initial detection granularity; If a1<a≤a2, the scenario complexity of the core primitive of the initial intention is medium, indicating that the scenario of the core primitive corresponding to the initial intention is a medium scenario, and medium granularity is set as the initial detection granularity; If a>a2, the scenario complexity of the core primitive of the initial intention is high, indicating that the scenario of the core primitive corresponding to the initial intention is a complex scenario, and fine granularity is set as the initial detection granularity.
7. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 6, characterized in that: In step S4: the dynamic adjustment mechanism of anomaly detection granularity adaptively adjusts the anomaly detection granularity based on the inference link stage, the scene complexity and the atomic primitive core level; In the implicit demand inference process, the joint analysis of the inference link stage w, the scene complexity b and the atomic primitive core level c is used to obtain the anomaly detection granularity adjustment coefficient; The anomaly detection granularity adjustment coefficient r is obtained through joint analysis of real-time change values of the primitive core level and the scene complexity, and the anomaly detection granularity adjustment coefficient is calculated by the following formula: r=w×(f1×b / a+f2×c); wherein, w represents the value assigned to the inference link stage, w=1, 2, 3; w=1 represents the first-level inference stage; w=2 represents the second-level inference stage; w=3 represents the third-level inference stage; f1 represents the influence weight of scene complexity in the anomaly detection granularity adjustment coefficient; f2 represents the influence weight of the primitive core level in the anomaly detection granularity adjustment coefficient; An anomaly detection granularity adjustment threshold r0 is set; if r≤r0, it indicates that the anomaly detection granularity adjustment coefficient is relatively low, and the anomaly detection granularity is coarsened by one level. If the anomaly detection granularity is already coarse-grained, the original anomaly detection granularity remains unchanged; if r>r0, it indicates that the anomaly detection granularity adjustment coefficient is relatively high, and the anomaly detection granularity is refined by one level. If the anomaly detection granularity is already fine-grained, the original anomaly detection granularity remains unchanged.
8. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 7, characterized in that: In step S4: the granularity adjustment mechanism for anomaly impact is set to judge whether it is necessary to adjust the anomaly detection granularity adjustment coefficient for anomaly impact according to the real-time detected anomaly rate; the occurrence frequency z of detected anomaly conditions is recorded in real time; an anomaly frequency threshold z0 is set, and it is judged whether additional anomaly impact adjustment is required for the anomaly detection granularity adjustment coefficient according to the comparative analysis of the real-time anomaly rate and the threshold. If z<z0, it indicates that the anomaly occurrence frequency is relatively low, and no anomaly impact adjustment is performed on the anomaly detection granularity; If z≥z0, it indicates that the anomaly occurrence frequency is relatively high, and additional anomaly impact adjustment is added to the anomaly detection granularity; the anomaly detection granularity adjustment coefficient after adding the additional anomaly impact adjustment is: r'=r×z / z0; and the adjusted anomaly detection granularity adjustment coefficient is used for actual anomaly detection.
9. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 1, characterized in that: In step S5: for the implicit demand inference link after anomaly detection and correction, the service task corresponding to each inference node in the link is extracted to form an extended task set, and the extended task set covers all subtasks required for implicit demand inference and service execution; A matched task execution orchestration structure is selected according to the service logic and dependency of each subtask in the extended task set, and the orchestration structure includes serial execution relationship, parallel execution relationship and conditional execution relationship; Tasks with sequential dependencies are executed by adopting the serial execution relationship; Tasks without dependencies that can be promoted synchronously are executed by adopting the parallel execution relationship; Tasks with conditional branch relationships are executed by adopting the conditional execution relationship; Once the orchestration structure is constructed, the corresponding atomic primitives in the atomic primitive library are called, and each subtask is executed sequentially or synchronously according to the execution relationship of the orchestration structure. The execution data of each primitive and the task completion results are recorded in real time and integrated to form a structured execution result.
10. The vertical domain intent parsing and execution method based on atomic primitive combination according to claim 1, characterized in that: In step S7: If the initial intent representation obtained by semantic parsing still cannot match the preset atomic primitive mapping relationship after intent expansion, the degradation mechanism is automatically triggered. The atomic primitive call and structured execution process will no longer be executed. Instead, the received natural language request will be transferred to the unstructured text processing process to avoid process interruption. At the same time, the intent identified after unstructured text processing is recorded to provide data support for subsequent atomic primitive expansion and primitive mapping relationship optimization, thereby improving the long-term adaptability of the system.