Supply chain data query method, device, equipment, medium and program product

CN122817445APending Publication Date: 2026-09-25SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611300119.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0003]然而,传统的智能问答系统通常直接使用自然语言转数据库查询的方式来进行问询回复,这种方式能够在一定程度上减少人工查询时间,但在复杂供应链场景中容易出现查询结果不准确的问题

Benefits of technology

[0047]上述供应链数据查询方法、供应链数据查询装置、供应链数据查询设备、计算机可读存储介质和计算机程序产品,基于自然语言问询文本依次构建问询目标链、思维链语义断点链、断点执行链及数据查询结果的完整链路。其中,利用业务词表与双向门控循环网络结合的语义识别模型,提升了对口语化的自然语言问询文本的识别准确率,使得能够精准地从调用的数据源接口中获取与输入的自然语言问询文本相关的数据,从而能够提升最终反馈的查询结果的准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122817445A_ABST
    Figure CN122817445A_ABST
Patent Text Reader

Abstract

The application relates to a supply chain data query method, device, equipment, medium and program product. After standardization of a natural language inquiry text to obtain identifiable text, the identifiable text is recognized by using a business vocabulary and a gated recurrent network model to obtain a candidate phrase set. After each candidate phrase in the candidate phrase set is arranged in a category order, an inquiry target chain is formed. Based on the inquiry target chain, a plurality of semantic breakpoints are obtained to form a thinking chain semantic breakpoint chain. Based on the inquiry target chain and the thinking chain semantic breakpoint chain, a plurality of data source interfaces are sequentially called to obtain execution nodes corresponding to each semantic breakpoint. After each execution node is arranged in a preset breakpoint order, a breakpoint execution chain is formed. Based on the breakpoint execution chain, a data query result of the natural language inquiry text in the supply chain is obtained. When there is an abnormal node in the execution node, the data query result contains information of the abnormal node. At least the accuracy of the data query result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system technology, and in particular to a supply chain data query method, supply chain data query device, supply chain data query equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] In the power supply chain business, intelligent queries typically involve not a single field or report, but rather a chain of data spanning multiple business stages, including master data of materials, purchase orders, contract delivery dates, supplier shipments, logistics receipts, temporary warehousing, and formal warehousing. Questions posed by business personnel through intelligent assistants or supply chain intelligent query portals often exhibit clear conversational and reasoning characteristics, such as "Why hasn't this batch of emergency repair cables arrived in a certain region?", "A batch of materials has been shipped, but why can't the system see the warehousing?", and "The contract delivery date has arrived, but the materials haven't been received on-site." These types of queries require first identifying the region, materials, and the purpose of the query, and then verifying each node along the power supply chain business process.

[0003] However, traditional intelligent question-answering systems typically use natural language to convert queries into database queries to respond to inquiries. While this method can reduce manual query time to some extent, it is prone to inaccurate query results in complex supply chain scenarios. Summary of the Invention

[0004] Therefore, it is necessary to provide a power supply chain data query method, power supply chain data query device, power supply chain data query equipment, computer-readable storage medium, and computer program product that can improve the accuracy of power supply chain query results, in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a method for querying supply chain data; the method includes the following steps:

[0006] Obtain natural language query text;

[0007] After standardizing the natural language query text to obtain identifiable text, the identifiable text is then scanned using a prefix tree using a business vocabulary and identified using a gated recurrent network model to obtain a candidate phrase set. The candidate phrases in the candidate phrase set are arranged in order of category to form the query target chain.

[0008] Based on the query target chain, multiple semantic breakpoints are obtained in a preset dependency order to form the semantic breakpoint chain of the thinking chain. The semantic breakpoints are associated with candidate phrases. The query target chain is used to determine the semantic breakpoints in the semantic breakpoint chain of the thinking chain based on the information of the candidate phrases. The candidate phrases contain query information in the natural language query text. The semantic breakpoint chain of the thinking chain is used to determine the data source interface to be called based on each semantic breakpoint.

[0009] Based on the semantic breakpoint chain of the thinking chain, multiple data source interfaces are called sequentially. Based on the query target chain, the information called in the corresponding data source interface is determined to obtain the execution node corresponding to each semantic breakpoint. The execution nodes are arranged in the preset breakpoint order to form the breakpoint execution chain. The breakpoint execution chain is used to represent the information queried after calling each data source interface.

[0010] Based on the breakpoint execution chain, the data query results of natural language query text in the supply chain are obtained. When there is an abnormal node in the execution node, the data query results include information about the abnormal node.

[0011] In one embodiment, determining the query target chain includes:

[0012] Obtain the business vocabulary list, and based on the business vocabulary list and identifiable text, obtain the first candidate phrase in the identifiable text that maps to the business vocabulary list;

[0013] When there are remaining texts in the identifiable text that cannot be mapped to the business vocabulary, a gated recurrent network model is obtained, and the gated recurrent network model is used to supplement the identification of the remaining text to obtain a second candidate phrase; the first candidate phrase and / or the second candidate phrase constitute a candidate phrase set.

[0014] Obtain a multi-class logistic regression model, and use the multi-class logistic regression model to calculate the probability that each candidate phrase in the candidate phrase set corresponds to each semantic role;

[0015] Compare the probability of each candidate phrase corresponding to each semantic role. When the maximum probability of a semantic role is greater than or equal to the minimum threshold, the semantic role with the highest probability is determined as the category of the candidate phrase.

[0016] Based on the category of each candidate phrase, the candidate phrases in the candidate phrase set are arranged in order of category to form a query target chain.

[0017] In one embodiment, determining the semantic breakpoint chain of the thought chain includes:

[0018] Based on candidate phrases in the query target chain that are categorized as query purpose, a basic template is determined. The basic template includes the first breakpoint in the supply chain that is related to the candidate phrases categorized as query purpose.

[0019] Based on the candidate phrases in the query target chain that are classified as query objects, determine the second breakpoint in the supply chain that is related to the candidate phrases in the category of query objects;

[0020] Historical data is obtained, and each first breakpoint and each second breakpoint are used as candidate breakpoints. Based on the historical data, the historical call intensity, data dependency intensity, abnormal contribution degree, and scenario matching degree of each candidate breakpoint are calculated. Based on the historical call intensity, data dependency intensity, abnormal contribution degree, and scenario matching degree, the scenario adaptation score of the candidate breakpoint is obtained.

[0021] When the scene adaptation score of a candidate breakpoint is greater than the breakpoint retention threshold, the candidate breakpoint is retained as a semantic breakpoint.

[0022] Obtain the dependencies between each semantic breakpoint, and determine the preset dependency order based on the dependency relationship and scenario adaptation score; after adjusting the order of each semantic breakpoint based on the preset dependency order, a semantic breakpoint chain of the thought chain is formed.

[0023] In one embodiment, determining the breakpoint execution chain includes:

[0024] Retrieve the interface mapping table, which includes the mapping relationship of the same semantic breakpoint in different data source interfaces;

[0025] Based on the interface mapping table and the semantic breakpoints in the semantic breakpoint chain of the thought chain, the data source interfaces related to the semantic breakpoints are called sequentially to obtain the execution results related to the candidate phrases in the data source interfaces; and

[0026] Based on the execution results, the breakpoint status and consistency score of each execution node are obtained. The breakpoint status and the corresponding consistency score are arranged in the preset breakpoint order to form a breakpoint execution chain. The consistency score is used to characterize the stability of the execution state between the semantic breakpoint and its predecessor breakpoint.

[0027] In one embodiment, determining the consistency score of the execution node includes:

[0028] Obtain information on supply chain rules;

[0029] Based on rule information, the key field matching degree, temporal sequence consistency, state transition consistency, breakpoint delay penalty value, and corresponding weight coefficients are obtained between the currently executing semantic breakpoint and its preceding breakpoints; the sum of the weight coefficients corresponding to the key field matching degree, temporal sequence consistency, state transition consistency, and breakpoint delay penalty value is 1; and

[0030] A consistency score is obtained based on the degree of matching of key fields, consistency of time sequence, consistency of state transition, penalty value for breakpoint delay, and the corresponding weight coefficients.

[0031] In one embodiment, determining the data query result includes:

[0032] Candidate abnormal breakpoints are obtained based on the breakpoint status and consistency score of each execution node;

[0033] Obtain historical data, and based on the historical data, obtain the business correlation strength between candidate anomaly breakpoints and anomaly attribution breakpoints;

[0034] Based on the breakpoint execution chain, the breakpoint distance between the candidate exception breakpoint and the exception attribution breakpoint is obtained;

[0035] Based on consistency score, business correlation strength, and breakpoint distance, the abnormal impact score of the execution node is obtained;

[0036] Based on the anomaly impact scores of each execution node, the local verification master breakpoints are determined; and

[0037] The local verification main breakpoint is partially verified to obtain the local verification conclusion; the local verification is used to determine the cause of the anomaly; the local verification conclusion and the preceding execution node corresponding to the local verification main breakpoint in the breakpoint execution chain constitute the data query result.

[0038] Secondly, this application also provides a supply chain data query device, the device comprising:

[0039] The acquisition module is used to acquire natural language query text;

[0040] The first processing module is used to standardize the natural language query text to obtain identifiable text, and then use a business vocabulary to perform prefix tree scanning and identification on the identifiable text and a gated recurrent network model to identify the identifiable text, thereby obtaining a candidate phrase set. The candidate phrases in the candidate phrase set are arranged in order of category to form a query target chain.

[0041] The second processing module is used to obtain multiple semantic breakpoints arranged in a preset dependency order based on the query target chain to form a semantic breakpoint chain of the thinking chain. Each semantic breakpoint is associated with each candidate phrase. The query target chain is used to determine the semantic breakpoints in the semantic breakpoint chain of the thinking chain based on the information of the candidate phrases. The candidate phrases contain query information in the natural language query text. The semantic breakpoint chain of the thinking chain is used to determine the data source interface to be called based on each semantic breakpoint.

[0042] The third processing module is used to sequentially call multiple data source interfaces based on the semantic breakpoint chain of the thought chain. Based on the query target chain, it determines the information called in the corresponding data source interface to obtain the execution node corresponding to each semantic breakpoint. The execution nodes are arranged in a preset breakpoint order to form a breakpoint execution chain. The breakpoint execution chain is used to represent the information queried after calling each data source interface.

[0043] The fourth processing module is used to obtain the data query results of natural language query text in the supply chain based on the breakpoint execution chain. When there is an abnormal node in the execution node, the data query results include the information of the abnormal node.

[0044] Thirdly, this application also provides a supply chain data query device, including: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above methods.

[0045] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods.

[0046] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0047] The aforementioned supply chain data query method, supply chain data query device, supply chain data query equipment, computer-readable storage medium, and computer program product construct a complete chain based on natural language query text, sequentially including the query target chain, the thought chain semantic breakpoint chain, the breakpoint execution chain, and the data query result. Specifically, the semantic recognition model utilizing a business vocabulary combined with a bidirectional gated loop network improves the recognition accuracy of colloquial natural language query text, enabling precise acquisition of data related to the input natural language query text from the invoked data source interface, thereby enhancing the accuracy of the final query results.

[0048] Furthermore, during the execution phase, the interface mapping table and execution consistency scoring mechanism are used to achieve accurate association of cross-system fields and dynamic verification of business status, avoiding misjudgments caused by differences in data standards between systems.

[0049] Furthermore, in the result generation stage, based on the anomaly impact scoring and local verification strategy, it can accurately locate the root causes of anomalies in the execution links such as formal warehousing and logistics signing, and generate interpretable structured and natural language responses, which significantly improves the accuracy, stability and practicality of intelligent question answering in multi-system and multi-caliber chain business scenarios. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 A flowchart illustrating a supply chain data query method provided in one embodiment;

[0052] Figure 2This is a schematic diagram of the supply chain data query device provided in one embodiment;

[0053] Figure 3 This is an internal structure diagram of a supply chain data query device provided in one embodiment. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0055] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0056] Please refer to Figure 1 In one embodiment, a supply chain data query method is provided. The supply chain data query method includes the following steps S10 to S50:

[0057] Step S10: Obtain the natural language query text.

[0058] Step S20: After standardizing the natural language query text to obtain identifiable text, the identifiable text is scanned and identified using a business vocabulary and a gated recurrent network model to obtain a candidate phrase set. The candidate phrases in the candidate phrase set are arranged in order of category to form the query target chain.

[0059] Step S30: Based on the query target chain, obtain multiple semantic breakpoints arranged in a preset dependency order to form a semantic breakpoint chain of the thinking chain. The semantic breakpoints are associated with candidate phrases. The query target chain is used to determine the semantic breakpoints in the semantic breakpoint chain of the thinking chain based on the information of the candidate phrases. The candidate phrases contain query information in the natural language query text. The semantic breakpoint chain of the thinking chain is used to determine the data source interface to be called based on each semantic breakpoint.

[0060] Step S40: Based on the semantic breakpoint chain of the thought chain, multiple data source interfaces are called sequentially. Based on the query target chain, the information called in the corresponding data source interface is determined to obtain the execution node corresponding to each semantic breakpoint. The execution nodes are arranged in the preset breakpoint order to form the breakpoint execution chain. The breakpoint execution chain is used to represent the information queried after calling each data source interface.

[0061] Step S50: Based on the breakpoint execution chain, obtain the data query results of the natural language query text in the supply chain. When there is an abnormal node in the execution node, the data query results include the information of the abnormal node.

[0062] The aforementioned supply chain data query method constructs a complete chain based on natural language query text, sequentially including the query target chain, the thought chain semantic breakpoint chain, the breakpoint execution chain, and the data query result. Specifically, the semantic recognition model, which combines a business vocabulary with a bidirectional gated loop network, improves the recognition accuracy of colloquial natural language query text. This allows for the precise retrieval of data related to the input natural language query text from the called data source interface, thereby enhancing the accuracy of the final query results.

[0063] In one embodiment, step S10 involves receiving natural language query text input by business personnel through a smart assistant or supply chain smart query portal, and converting it into a query target chain. The natural language query text is passed in from the front-end query box via an interface, and its content may include the original question input by the business personnel, such as "Why hasn't this batch of emergency repair cables arrived in location A?". For illustrative purposes only, the natural language query text can be represented as Q. u .

[0064] In one embodiment, step S20, the standardization processing of the natural language query text, may include character unification processing of the natural language query text. For example, it may unify at least one of the following: full-width characters, uppercase and lowercase expressions, consecutive spaces, repeated punctuation, and Chinese numeral writing, so as to form recognizable text. For example, "10kV emergency repair cable!! Not yet delivered" and "10kV emergency repair cable not yet delivered" will be standardized into the same expression. Standardization processing can eliminate differences in the input format of natural language query text, ensuring consistency for the same material level or business action in subsequent recognition processes.

[0065] In one embodiment, step S20, determining the candidate phrase set, may include the following steps S21 to S22:

[0066] Step S21: Obtain the business vocabulary list, and based on the business vocabulary list and the identifiable text, obtain the first candidate phrase in the identifiable text that maps to the business vocabulary list.

[0067] For example, the business terminology can come from at least one of the enterprise's deployed material master data table, purchase order fields, contract delivery date fields, warehouse receipt fields, and historical queries. For instance, the material master data table can provide standard material expressions such as "emergency repair cable," "distribution transformer," and "disconnect switch"; the purchase order field can provide purchase expressions such as "purchase batch," "order number," and "framework agreement"; the contract delivery date field can provide contract expressions such as "delivery date," "performance period," and "delayed delivery"; the warehouse receipt field can provide warehouse expressions such as "arrival registration," "temporary storage," and "not yet in warehouse"; and historical queries can provide colloquial expressions such as "not yet arrived," "why not yet in warehouse," and "has it been shipped." The business terminology may have multiple versions at different update times, and the field expressions in each version may have certain differences. Each time recognition is performed, the latest published version of the business terminology can be used, thus avoiding the use of different versions of the business terminology for multiple fields in the same identifiable text within the same session, which could lead to incorrect query target chains.

[0068] For example, recognizing identifiable text using a business vocabulary may include performing longest phrase matching on the identifiable text using the business vocabulary. The identifiable text is stored in a prefix tree, and scanning begins from the first character of the question in the identifiable text, retaining the longest business phrase that can be matched at the current position each time. For example, when scanning "the emergency repair cable has not yet arrived," the system retains "the emergency repair cable"; when scanning the remaining "has not yet arrived," the system retains its overall action meaning, thereby forming the first candidate phrase in the identifiable text that maps to the business vocabulary.

[0069] Step S22: When there are remaining texts in the identifiable text that cannot be mapped to the business vocabulary, a bidirectional gated recurrent network model is obtained, and the remaining texts are supplemented by the bidirectional gated recurrent network model to obtain a second candidate phrase; the first candidate phrase and / or the second candidate phrase constitute a candidate phrase set.

[0070] For example, sample data such as historical inquiry records, purchase requisition descriptions, warehousing operation notes, and contract performance can be labeled and used as training samples to train a bidirectional gated recurrent network model. During labeling, tags such as region objects, material objects, and business actions can be added to the sample data. For instance, in the historical inquiry record "Why haven't the emergency cables in location A been put into storage?", "location A" is labeled as a region or warehousing object, "emergency cables" is labeled as a material object, and "not put into storage" is labeled as an abnormal storage action.

[0071] For example, the bidirectional gated recurrent network model consists of a word vector input layer, a forward gated recurrent layer, a backward gated recurrent layer, a concatenation layer, and a conditional random field annotation layer. The word vector input layer is used to convert characters or short words in the remaining text into numerical vectors; the forward gated recurrent layer is used to read the context of the numerical vectors from left to right, for example, in the corresponding numerical vector, it reads the preceding business object "Location A - Emergency Cable Repair - Not Yet Arrived"; the backward gated recurrent layer is used to read the context of the numerical vectors from right to left, for example, in the corresponding numerical vector, it reads the action constraint of "Not Yet Arrived" on the preceding "Emergency Cable Repair"; the concatenation layer is used to merge the context read by the forward gated recurrent layer and the backward gated recurrent layer; the conditional random field annotation layer is used to output the role boundary of each character or short word, and determine whether it belongs to a region, material, action, or irrelevant word.

[0072] In one example, using a business vocabulary, all content in the identifiable text can be identified. All the first candidate phrases identified by the business vocabulary constitute a candidate phrase set, and each of the first candidate phrases is used as a candidate phrase in the candidate phrase set.

[0073] In the second example, it can identify the remaining text in the text that cannot be identified by the business vocabulary. The gated recurrent network model is used to supplement the identification of the remaining text to obtain the second candidate phrase. The first candidate phrase and the second candidate phrase constitute the candidate phrase set. Both the first candidate phrase and the second candidate phrase are used as candidate phrases in the candidate phrase set.

[0074] In the third example, the first candidate phrase obtained by matching the business vocabulary can be considered accurate, while the second candidate phrase obtained by matching the gated recurrent network model can be considered questionable. The second candidate phrase will not be directly included in the candidate phrase set. First, the confidence level of the second candidate phrase needs to be judged. When the confidence level of the second candidate phrase reaches the corresponding threshold, the second candidate phrase will be included in the candidate phrase set. When the confidence level of the second candidate phrase is lower than the corresponding threshold, the second candidate phrase will not be included in the candidate phrase set.

[0075] In the fourth example, if the business vocabulary does not match the first candidate phrase and the gated recurrent network model does not match the second candidate phrase, or if the confidence of the matched second candidate phrases is lower than the corresponding threshold, a supplementary query prompt can be output, and the recognition can be re-identified after the business personnel output the supplementary query text.

[0076] In the above embodiments, for identifiable text that cannot be recognized by the business vocabulary, a bidirectional gated recurrent network is used to supplement the recognition, which can improve the recognition success rate of natural language query text. For example only, the candidate phrase set may include "location A", "cable repair", and "not yet delivered".

[0077] In one embodiment, step S20, arranging the candidate phrases in the candidate phrase set according to category order to form a query target chain, may include steps S25 to S27:

[0078] Step S25: Obtain the multi-class logistic regression model and use the multi-class logistic regression model to calculate the probability that each candidate phrase in the candidate phrase set corresponds to each semantic role;

[0079] Step S26: Compare the probabilities of each candidate phrase corresponding to each semantic role. When the maximum probability of a semantic role is greater than or equal to the minimum threshold, the semantic role with the highest probability is determined as the category of the candidate phrase.

[0080] For example, a multi-class logistic regression model can employ a softmax function. Candidate phrases correspond to the semantic roles of the results R. q It can satisfy:

[0081] (Formula 1)

[0082] The candidate phrases can be categorized as region objects, resource objects, inquiry purposes, or irrelevant text. Semantic role results can be used to output the probability that a candidate phrase belongs to a region object, resource object, inquiry purpose, or irrelevant text. q This represents a vector of business objects, which can include region objects and material objects from the candidate phrase set, such as "Location A" and "Emergency Cable Repair". q This represents a business action vector, generated from action phrases in the candidate phrase set, such as "not yet arrived," "delayed," and "not yet in stock." W e This represents the business object mapping matrix, trained from object phrases and semantic role labels in historical query corpora. W a The business action mapping matrix is ​​obtained by training action phrases and query purpose labels from historical query corpora; b q This indicates a bias term used to correct the underlying bias of common inquiry categories.

[0083] The formula within parentheses in formula (1) can be represented as the linear score of the semantic role. The soft-maximum function originates from multinomial logistic regression in statistical learning and is used to convert the linear scores of multiple candidate categories into category probabilities. The above embodiment splits the candidate phrase into two parts: a business object vector and a business action vector, thereby simultaneously considering "what object is being asked" and "what business state the object is experiencing".

[0084] Since business action vectors and business object vectors may be obtained from business vocabulary recognition or gated recurrent network (GRN) model recognition, and the confidence levels of the results from business vocabulary recognition and GRN model recognition are inconsistent, a unified standardization and normalization process can be performed before computation. The bias terms of the business object mapping matrix and business action mapping matrix can be bound to the model version and read according to the current release version, rather than being generated temporarily during the query process. The sum of the probabilities of each semantic role in the results is 1. First, it is determined whether the probability of the largest semantic role of the candidate phrase is greater than or equal to the corresponding minimum threshold; if so, the semantic role with the largest probability is determined as the category of the candidate phrase.

[0085] For example, for the natural language query text "Why hasn't this batch of emergency repair cables arrived in location A yet?", the candidate phrase set includes three candidate phrases: "location A", "emergency repair cables", and "not yet arrived". The candidate phrase "location A" has a linear score of 2.8 for the semantic role of the region object, 0.4 for the semantic role of the material object, and 0.2 for the semantic role of the query purpose. After soft-maximum function conversion, the probability of the region object is the highest; therefore, the region object is determined as the category of the candidate phrase "location A". The candidate phrase "emergency repair cables" has a linear score of 3.1 for the semantic role of the material object. After soft-maximum function conversion, the probability of the material object semantic role is higher than the probabilities of other semantic roles; therefore, the category of the candidate phrase "emergency repair cables" is determined as the material object. Furthermore, for the semantic role of the query purpose, it can be determined as the semantic role of the sub-item, such as query for the reason of abnormal arrival, query for inventory balance, or query for contract change. For example, the candidate phrase "not yet delivered" has a linear score of 3.4 in the semantic role of "delivery anomaly reason query" in the query purpose. After the soft maximum value function conversion, the probability of "delivery anomaly reason query" is higher than that of "inventory balance query" and "contract change query". Therefore, the category of the candidate phrase "not yet delivered" is determined as the query purpose, and it can be further determined as the delivery anomaly reason query under the query purpose.

[0086] For example, if the maximum probability of a candidate phrase in each category is lower than the corresponding minimum threshold, the candidate phrase may not enter the query target chain, and a low-confidence candidate may be recorded in the query target chain for the front end to prompt the user for confirmation when necessary.

[0087] Step S27: Based on the category of each candidate phrase, arrange each candidate phrase in the candidate phrase set according to the category order to form a query target chain.

[0088] For example, after determining the categories of candidate phrases, the query target chain can be assembled according to the category order of "region object - material object - query target". For example, the query target chain can be represented as T. q The order of this category can be consistent with the matching order of the basic templates in the semantic breakpoint chain of the thought chain in subsequent steps, and is used to select the corresponding breakpoint query path according to the query target chain. For example, for the natural language query text "Why hasn't this batch of emergency repair cables arrived in location A yet?", the final output query target chain content is: "Regional object" is "location A", "Material object" is "emergency repair cables", and "Query purpose" is "Query the reason for the abnormal arrival". Since the candidate phrases in the query target chain are assembled according to the category order, and each position has a fixed label (one of region, material, target), the computer can recognize the meaning of the content at the corresponding position.

[0089] For example, if the natural language query text lacks a clearly defined region, such as "Why hasn't this batch of emergency repair cables arrived yet?", the region object in the query target chain can be recorded as an empty field, and in step S40, a breakpoint execution chain without region limitations can be generated according to the material object and query purpose. For example, if the natural language query text contains multiple material objects, such as "Why haven't the emergency repair cables and disconnect switches arrived yet?", two separate query target chains can be generated, each containing only one material object, to ensure that the purchase order, contract delivery date, and warehousing status in the subsequent breakpoint execution chain in step S40 can be associated separately according to the material object. For example, if the natural language query text lacks a material object or query purpose, step S40 may not generate a breakpoint execution chain but instead return a supplementary confirmation prompt.

[0090] In one embodiment, determining the semantic breakpoint chain of the thought chain in step S30 specifically includes the following steps S31 to S35:

[0091] Step S31: Based on the candidate phrases in the query target chain that are categorized as query purpose, determine the basic template. The basic template includes the first breakpoint in the supply chain that is related to the candidate phrases categorized as query purpose.

[0092] For example, the query target chain already includes a region object, a material object, and a query purpose. For instance, "region" represents "location A," "material" represents "cable repair," and "target" represents "delivery anomaly cause query." After reading the query target chain, the system uses "target" to determine the query type, "material" to determine the material category, and "region" to determine the regional business scenario. Then, it selects candidate breakpoints from a pre-built template library of supply chain thinking chains. The template library can be compiled from the enterprise's existing purchase order flow records, contract performance logs, supplier delivery records, logistics receipt records, warehousing and inventory records, and historical intelligent query records. Each query purpose corresponds to a set of basic templates. The basic templates include the first breakpoint in the supply chain related to the candidate phrase with the category of query purpose. For example, the basic template corresponding to "delivery anomaly cause query" includes material standardization breakpoints, purchase order breakpoints, contract delivery date breakpoints, delivery status breakpoints, logistics receipt breakpoints, formal inventory receipt breakpoints, and anomaly attribution breakpoints. Each breakpoint in the template library stores its breakpoint name, applicable query purpose, input fields, output fields, prerequisite dependencies, data source interface, and field mapping relationships, and sets a template version number. Within the same query session, using the same template library version generates a semantic breakpoint chain for the thought process.

[0093] Step S32: Based on the candidate phrases of the category of query object in the query target chain, determine the second breakpoint in the supply chain that is related to the candidate phrases of the category of query object.

[0094] For example, the query object can further include region objects and material objects. A second breakpoint directly related to the current scenario is expanded based on the "material" and "region" fields of the query target chain. For instance, "emergency repair cable" belongs to the emergency repair material category within the material object. In warehousing systems, the situation of "logistics has been signed for but not yet officially put into storage" is common. Therefore, a temporary record breakpoint is introduced near the official storage breakpoint in the basic template. For example, "Location A" is used as a region object to match the distribution of arrival, signing, and storage records for that region in historical queries. When historical records show significant differences between logistics signing and official storage in that region, the logistics signing breakpoint and the official storage breakpoint are assigned a higher degree of scenario fit. After this processing, the region object, material object, and content corresponding to the query purpose in the query target chain are all used as candidate breakpoints when generating the semantic breakpoint chain of the thought chain. Specifically, the candidate phrases corresponding to the query purpose are used to determine the query template, the candidate phrases corresponding to the material object are used to determine material-related breakpoints, and the candidate phrases corresponding to the region object are used to determine region-related breakpoints. Taking the natural language query text "Query the reason for the abnormal arrival of emergency repair cables in location A" as an example, the candidate breakpoints obtained are "material standardization breakpoint, purchase order breakpoint, contract delivery date breakpoint, shipment status breakpoint, logistics receipt breakpoint, temporary storage record breakpoint, formal warehousing breakpoint, and abnormal attribution breakpoint". If the region object in the query target chain is empty, the region-related breakpoints are not considered, but the material object and query purpose can still generate corresponding candidate breakpoints; if the material object cannot be mapped to the standard material category, the material standardization breakpoint can be retained and the subsequent breakpoints that depend on the material code can be marked as insufficient conditions for execution.

[0095] In this embodiment, when generating the corresponding semantic breakpoint chain of the thought chain based on the query target chain, the regional object, material object, and content corresponding to the query purpose in the query target chain need to be considered to obtain the corresponding candidate breakpoints. This ensures that the final semantic breakpoint chain of the thought chain can reflect the current query region, material, and business purpose, rather than just generating ordinary nodes according to a fixed process.

[0096] Step S33: Obtain historical data, and use each first breakpoint and each second breakpoint as candidate breakpoints. Calculate the historical call intensity, data dependency intensity, abnormal contribution degree, and scenario matching degree of each candidate breakpoint based on the historical data. Obtain the scenario adaptation score of the candidate breakpoint based on the historical call intensity, data dependency intensity, abnormal contribution degree, and scenario matching degree.

[0097] Step S34: When the scene adaptation score of the candidate breakpoint is greater than the breakpoint retention threshold, the candidate breakpoint is retained as a semantic breakpoint.

[0098] For example, both the first and second breakpoints are considered as candidate breakpoints, and the scene adaptation score for each candidate breakpoint is calculated sequentially. Historical data related to the candidate breakpoints can be used as input for calculating the scene adaptation score. The scene adaptation score of the i-th candidate breakpoint satisfies:

[0099] (Formula 2)

[0100] The initial source for the scenario adaptation scoring formula can be the weighted node evaluation method in graph structure path selection, which involves weighting and summing candidate nodes using multiple normalized indicators to determine the priority of a node in the path. In this embodiment, this method is used to generate query breakpoints in the power supply chain, and a scenario matching item directly related to the query target chain is added to the traditional node evaluation. This allows the breakpoint ranking to simultaneously consider historical usage, field dependencies, abnormal contributions, and the business characteristics of the current region and materials.

[0101] Among them, S b (i) represents the scenario adaptation score of the i-th candidate breakpoint, used to determine whether the breakpoint enters the semantic breakpoint chain of the thought chain and its ranking priority when dependency conditions allow; F b (i) represents the historical call intensity of the i-th candidate breakpoint under the same query purpose, reflecting the frequency of the candidate breakpoint in the same query. It is obtained by statistical analysis of historical intelligent query records, procurement process logs, and warehouse query logs in historical data, and normalized according to the maximum call value among the same candidate breakpoints; D b (i) represents the data dependency strength between the i-th candidate breakpoint and its predecessor breakpoint, reflecting whether the candidate breakpoint has an executable predecessor field source, which is obtained from the field association success status in the historical breakpoint execution logs; C b (i) represents the degree of contribution of the i-th candidate breakpoint to the anomaly in historical anomaly queries, reflecting the value of the candidate breakpoint in anomaly localization. It is obtained by statistical analysis of closed-loop anomaly work orders and historical query attribution results in historical data, and normalized according to the distribution of similar anomaly causes; M b (i) represents the scenario matching degree between the i-th candidate breakpoint and the regional object, material object, and query purpose in the query target chain. It reflects whether the candidate breakpoint matches the regional object, material object, and query purpose in the current query target chain. It is jointly determined by the historical arrival records of the current region, the historical processing records of the current material category, and the template corresponding to the current query purpose in the historical data. α, β, γ, and λ represent weight parameters, corresponding to historical call intensity, data dependency intensity, abnormal contribution degree, and scenario matching degree, respectively. All four are non-negative and remain fixed under the same template type. Historical call intensity, data dependency intensity, abnormal contribution degree, and scenario matching degree can be processed with unified standards and normalized before being weighted for calculation.

[0102] Therefore, breakpoints with high scenario adaptation scores are not only historically used breakpoints, but also breakpoints that can be driven by preceding fields, contribute to anomaly localization, and are suitable for the current business scenario. For example, the "temporary storage record breakpoint" may have a low score in ordinary material arrival inquiries, but in "urgent cable arrival anomaly cause query," because emergency repair materials involve temporary arrival and temporary storage processes, its scenario matching degree and anomaly contribution degree will be improved, thus entering the semantic breakpoint chain of the thinking chain as a semantic breakpoint.

[0103] For example, if the scenario adaptation score of a candidate breakpoint is greater than or equal to the breakpoint retention threshold, the candidate breakpoint is treated as a semantic breakpoint and enters the semantic breakpoint chain of the thinking chain; if the scenario adaptation score of a candidate breakpoint is lower than the breakpoint retention threshold, and the breakpoint is not a necessary field source for subsequent breakpoints, it is not entered into the semantic breakpoint chain of the thinking chain; if the breakpoint is a necessary node for subsequent field dependencies, it can be retained as a basic execution breakpoint even if the scenario adaptation score is not high.

[0104] Taking the input natural language query text "Query for the cause of abnormal cable delivery in location A" as an example, the historical call intensity of the candidate breakpoint "Logistics Receipt Breakpoint" is 0.82, indicating that it is frequently called in similar abnormal delivery queries; the data dependency strength is 0.76, indicating that it is often successfully associated through the shipping tracking number output by the shipping status breakpoint; the anomaly contribution degree is 0.69, indicating that the logistics receipt process has a high contribution in historical anomaly attribution; and the scenario matching degree is 0.88, indicating that this breakpoint matches the scenario of cable delivery for emergency repair in location A very well. If the weight parameters are α=0.25, β=0.30, γ=0.20, and λ=0.25, then the scenario adaptation score of this candidate breakpoint is calculated as 0.25×0.82+0.30×0.76+0.20×0.69+0.25×0.88=0.791. The four values ​​for the candidate "Formal Inbound Breakpoint" are 0.86, 0.81, 0.74, and 0.90, respectively, so the scenario adaptation score is 0.25×0.86+0.30×0.81+0.20×0.74+0.25×0.90=0.831. The four values ​​for the candidate "Regular Inventory Balance Breakpoint" are 0.41, 0.32, 0.18, and 0.22, respectively, so the scenario adaptation score is 0.25×0.41+0.30×0.32+0.20×0.18+0.25×0.22=0.290. In this inquiry scenario, the scenario adaptation scores for the logistics receipt breakpoint and the formal inbound breakpoint are greater than the breakpoint retention threshold, so they enter the breakpoint chain; the scenario adaptation score for the regular inventory balance breakpoint is lower than the breakpoint retention threshold, so it does not enter the breakpoint chain for this delivery anomaly.

[0105] For example, the data dependency strength of the computational parameters in the scene adaptation score can satisfy:

[0106] (Formula 3)

[0107] Among them, D b (i) represents the data dependency strength of the i-th candidate breakpoint relative to its selected candidate predecessor breakpoint; N link (i) represents the number of times the i-th candidate breakpoint in the historical execution record of the historical data successfully correlates with the output field of the selected candidate preceding breakpoint. For example, the number of times the "Formal Inbound Breakpoint" successfully retrieves the inbound transaction record through the logistics tracking number output by the "Logistics Receipt Breakpoint"; N use (i) represents the total number of times the i-th candidate breakpoint in the historical execution record was called; ε represents the smoothing parameter, used to handle the case of newly added candidate breakpoints or when the historical call count is empty, and takes a positive value. N link (i) and N use (i) The data dependency strength of the i-th candidate breakpoint relative to its selected candidate predecessor breakpoint can be calculated from the historical data breakpoint execution log, which records parameters such as breakpoint name, input fields, output fields, and whether the association was successful. If the newly added breakpoint has no historical call records, the data dependency strength of the i-th candidate breakpoint relative to its selected candidate predecessor breakpoint can be given a base value by the smoothing parameter and marked as a low historical sample breakpoint in the breakpoint node, which can improve the verification level when subsequent steps are executed. If the "formal inbound breakpoint" is called 1000 times in the historical arrival anomaly query, and 810 of them are successfully associated with the inbound transaction through the logistics tracking number, and ε=1, then the data dependency strength D of the i-th candidate breakpoint relative to its selected candidate predecessor breakpoint is... b (i)=(810+1) / (1000+1)=0.810.

[0108] The above formulas (2) and (3) are sequential. Specifically, the data dependency strength can be calculated first by executing the historical breakpoint logs, and then the data dependency strength can be substituted into formula (2) to determine the scenario adaptation score of the candidate breakpoint together with the historical call strength, the degree of abnormal contribution and the degree of scenario matching.

[0109] Step S35: Obtain the dependency relationship between each semantic breakpoint, and determine the preset dependency order based on the dependency relationship and the scenario adaptation score; after adjusting the order of each semantic breakpoint based on the preset dependency order, a semantic breakpoint chain of the thought chain is formed.

[0110] For example, the dependencies between semantic breakpoints come from the actual flow relationships of fields in the enterprise system. For instance, the purchase order breakpoint outputs the purchase order number, the contract delivery date breakpoint associates the purchase order number with the contract number, the shipment status breakpoint associates the purchase order number or contract number with the shipment order number, the logistics receipt breakpoint associates the shipment order number with the logistics tracking number, and the formal warehousing breakpoint associates the logistics tracking number or the arrival registration number with the warehousing transaction record.

[0111] For example, since a semantic breakpoint may have multiple candidate preceding breakpoints, when the order of multiple candidate preceding breakpoints and semantic breakpoints cannot be determined based on dependencies, the preceding breakpoints of the semantic breakpoint can be determined based on the scenario adaptation score of each candidate preceding breakpoint, and the semantic breakpoint chain of the thought chain can be generated according to the rule of "dependency priority, score result auxiliary". Specifically, if two semantic breakpoints have a dependency relationship, the preceding field output breakpoint is placed before the subsequent field usage breakpoint; if multiple breakpoints all meet the preceding field conditions, the breakpoint with the higher scenario adaptation score is selected first; if a candidate preceding breakpoint has a high scenario adaptation score but lacks a preceding field source, the breakpoint can also be temporarily not entered into the current position, and enter the semantic breakpoint chain of the thought chain after its dependent field is generated by the preceding breakpoint. For example, if the score for "Formal Inbound Breakpoint" is higher than that for "Logistics Receipt Breakpoint," the "Logistics Receipt Breakpoint" will still be placed before the "Formal Inbound Breakpoint" because the "Formal Inbound Breakpoint" requires a tracking number or arrival registration number. This ensures that the semantic breakpoint chain of the thought chain can be executed sequentially by subsequent steps. If a loop occurs in the dependency relationship or multiple breakpoints depend on each other, the loop can be broken according to the basic business process sequence in the template library, and the link can be marked as a template that needs to be reviewed, thus avoiding the generation of an unexecutable semantic breakpoint chain of the thought chain.

[0112] For example, for the natural language query text "Query the cause of abnormal cable delivery for emergency repair in location A", the abnormal delivery template is first selected as the base template by the query purpose of the target query chain. Then, the material object identifies emergency repair materials and retains temporary record breakpoints. The region object identifies the regional delivery scenario and improves the scenario matching degree between the logistics receipt breakpoint and the formal warehousing breakpoint. After scenario adaptation scoring and dependency constraint sorting, the generated semantic breakpoint chain of the thought chain is: "Material standardization breakpoint → Purchase order breakpoint → Contract delivery date breakpoint → Delivery status breakpoint → Logistics receipt breakpoint → Temporary record breakpoint → Formal warehousing breakpoint → Abnormal attribution breakpoint". For example, the semantic breakpoint chain of the thought chain can be represented as B s .

[0113] For example, the semantic breakpoint chain of the MindChain can adopt a chained object storage. Each breakpoint node can record the corresponding breakpoint name, preceding dependent breakpoints, input fields, output fields, associated data sources, and associated fields. For example, the "Contract Delivery Date Breakpoint" records its preceding dependency as the purchase order breakpoint, the input field as the purchase order number, the associated data source as the contract management system, and the output field as the contract delivery date status; the "Formal Warehousing Breakpoint" records its preceding dependency as the logistics receipt breakpoint or the temporary storage record breakpoint, the input field as the logistics tracking number or the arrival registration number, the associated data source as the warehousing system, and the output field as the formal warehousing status. Each breakpoint can also save information such as whether it is mandatory, whether it has low historical samples, the data source interface version, and the execution timeout threshold, so that subsequent steps can be executed according to the determined interface and exceptions can be handled.

[0114] In one embodiment, determining the breakpoint execution chain in step S40 may include the following steps S41 to S43:

[0115] Step S41: Obtain the interface mapping table, which includes the mapping relationship of the same semantic breakpoint in different data source interfaces.

[0116] For example, data sources may include Enterprise Resource Planning (ERP) systems, contract management systems, supplier collaboration systems, logistics platforms, and warehousing systems. When associating fields across systems, an interface mapping table can be used to identify corresponding fields in different data sources. The interface mapping table can be compiled from the interface fields of the ERP system, contract management system, supplier collaboration system, logistics platform, and warehousing system, recording fields that can be associated between different systems. For example, the "Purchase Order Number" in ERP corresponds to the "Order Reference Number" in the contract management system, the "Shipping Order Number" in the supplier collaboration system corresponds to the "Shipping Tracking Number" in the logistics platform, and the "Logistics Tracking Number" in the logistics platform corresponds to the "Arrival Logistics Number" in the warehousing system.

[0117] Step S42: Based on the interface mapping table and each semantic breakpoint in the semantic breakpoint chain of the thinking chain, call the data source interface related to the semantic breakpoint in sequence to obtain the execution result related to the candidate phrase in the data source interface.

[0118] For example, a breakpoint execution chain is generated according to the breakpoint order, pre-dependent breakpoints, input fields, output fields, associated data sources, and associated fields recorded in the semantic breakpoint chain of the thought chain. The breakpoint execution chain can be represented as B. e The MindChain semantic breakpoint chain has transformed the query target chain into executable supply chain business breakpoints (semantic breakpoints). For example, in the natural language query text "Query the cause of abnormal cable delivery for emergency repair in location A", the MindChain semantic breakpoint chain includes "material standardization breakpoint → purchase order breakpoint → contract delivery date breakpoint → shipment status breakpoint → logistics receipt breakpoint → temporary record breakpoint → formal warehousing breakpoint → anomaly attribution breakpoint". Based on each breakpoint in the MindChain semantic breakpoint chain and the corresponding candidate phrase information in the query target chain, the corresponding data source interface is called to query relevant information in the data source to obtain query results and corresponding field sources. Furthermore, in subsequent step S43, the corresponding breakpoint status can be generated based on the query results and corresponding field sources.

[0119] For example, the first breakpoint in the semantic breakpoint chain of the thought chain is read first, and a query is initiated based on the associated data source and input fields recorded at that breakpoint. For instance, the "Materials Standardization Breakpoint" reads the material object "Emergency Repair Cable" and the region object "Area A" in the query target chain, and calls the materials master data interface to query the standard material name, material code, and material category. If the standard material code "RJDL-10KV" is obtained, this code is used as the output field of the "Materials Standardization Breakpoint" and as the input field of the subsequent "Purchase Order Breakpoint". Subsequently, the "Purchase Order Breakpoint" reads the standard material code and queries the regional object information in the target chain, calling the purchase order interface in the ERP system to query the purchase order number, purchase batch, and order status; the "Contract Delivery Date Breakpoint" reads the purchase order number and calls the contract management system interface to query the contract number and contract delivery date status; the "Shipping Status Breakpoint" reads the purchase order number or contract number and calls the supplier shipping record interface to query the shipping order number and shipping status; the "Logistics Receipt Breakpoint" reads the shipping order number and calls the logistics platform interface to query the logistics tracking number and receipt status; the "Temporary Storage Record Breakpoint" and "Formal Warehousing Breakpoint" read the logistics tracking number or arrival registration number and call the warehousing system interface to query the temporary storage status and formal warehousing status. This process transforms the preceding dependencies in the semantic breakpoint chain of the thought chain into field-transfer relationships during execution, with the input of each breakpoint coming from the output of its preceding breakpoint. Each API call can record the requested fields, returned fields, API status code, response time, and query time. If the API times out, has insufficient permissions, or returns an empty result, the system records the breakpoint status as "API error," "permission error," or "query empty" respectively, and retains the results of the preceding nodes to prevent subsequent responses from mistakenly judging API failure as business non-existence. If the same field has different values ​​in multiple preceding breakpoints, the primary input field can be selected according to the preset field priority in the template library, and other values ​​can be written into the field conflict record. The field conflict record is used as a candidate exception basis for local verification in subsequent steps.

[0120] For example, in the semantic breakpoint chain of the thinking chain, after all breakpoints before the "abnormal attribution breakpoint" have been executed, an attribution entry can be formed based on the states of the preceding breakpoints in the semantic breakpoint chain of the thinking chain.

[0121] Step S43: Based on the execution results, obtain the breakpoint status and consistency score of each execution node. The breakpoint status and the corresponding consistency score are arranged in the preset breakpoint order to form a breakpoint execution chain. The consistency score is used to characterize the stability of the execution state between the semantic breakpoint and its predecessor breakpoint.

[0122] For example, the breakpoint status can be determined based on the execution result as "material standardization is normal", "purchase order is normal", "contract delivery date has been overdue", "supplier has shipped", "logistics has been signed for", "temporary record is pending verification", etc.

[0123] For example, determining the consistency score of the execution node includes steps S431 to S433:

[0124] Step S431: Obtain supply chain rule information.

[0125] Step S432: Based on the rule information, obtain the key field matching degree, temporal sequence consistency, state transition consistency, breakpoint delay penalty value, and corresponding weight coefficients between the currently executed semantic breakpoint and its predecessor breakpoint; the sum of the weight coefficients corresponding to the key field matching degree, temporal sequence consistency, state transition consistency, and breakpoint delay penalty value is 1.

[0126] Step S433: Based on the degree of matching of key fields, consistency of time sequence, consistency of state transition, penalty value for breakpoint delay, and corresponding weight coefficients, a consistency score is obtained.

[0127] For example, the initial source for calculating the consistency score is field consistency verification in database join queries and business process state transition verification. Database join queries determine whether records from different systems point to the same business object using primary or foreign key fields, while business process state transition verification determines whether the business chain is functioning correctly by checking if the preceding and following states conform to the process sequence. This example modifies the above, merging key field matching, time sequence, state transition, and breakpoint delay into a single execution consistency score. This score is used to identify issues in the power supply chain where "fields match but the business state is stalled," such as "logistics has been signed for but warehousing has not yet officially started storage." The consistency score can satisfy:

[0128] (Formula 4)

[0129] Among them, C e (i) represents the execution consistency score between the i-th semantic breakpoint and its preceding breakpoint in the breakpoint execution chain, used to mark the execution status of the semantic breakpoint in the breakpoint execution chain; K e (i) Indicates the degree of matching of key fields, derived from the interface mapping table and the fields returned by the breakpoint query. It is obtained by matching the input fields of the current breakpoint with the output fields of the previous breakpoint, such as the matching results of purchase order number, contract number, delivery note number, logistics tracking number, or arrival registration number; T e (i) Indicates consistency of time sequence, derived from fields such as purchase order time, contract delivery date, shipment time, logistics receipt time, and warehousing time. This consistency is obtained from the sequential relationship between the preceding breakpoint time field and the current breakpoint time field in the supply chain rules information, such as the order relationship between contract delivery date, shipment time, logistics receipt time, and warehousing time; S e(i) Indicates state transition consistency, derived from the supply chain state rule table, obtained from the supply chain rule information. For example, "shipped - signed for" is a normal state transition, "signed for - not yet in storage" is a state transition pending verification, and "not shipped - signed for" is a conflicting state transition; L e (i) represents the breakpoint delay penalty value, derived from the breakpoint execution logs of similar historical materials. It is obtained by comparing the state dwell time between the current breakpoint and its predecessor in historical data with the historical normal dwell time range for similar materials. For example, if the dwell time of emergency repair materials from logistics receipt to formal warehousing exceeds the historical normal range, the breakpoint delay penalty value increases. ω1, ω2, ω3, and ω4 represent the weight coefficients configured during system deployment, corresponding to field matching, time sequence, state transition, and delay penalty, respectively. The degree of key field matching, time sequence consistency, state transition consistency, breakpoint delay penalty value, and their corresponding weight coefficients can be uniformly processed and normalized before calculation, and the sum of the corresponding weight coefficients is 1. If the current breakpoint fails to obtain a business return value due to interface or permission abnormalities, the consistency score is not calculated based on an empty business state. Instead, the execution consistency score is marked as uncalcifiable and output as an interface abnormality in subsequent steps.

[0130] Formula (4) is derived from the basic field consistency check. The basic field consistency check usually only judges whether the key fields returned by the two systems match, such as whether the logistics order number is consistent or the purchase order number is consistent. In the power supply chain inquiry, field matching can only indicate that the records can be associated, but it cannot indicate that the business link has been closed. Therefore, in this embodiment, time sequence consistency and state transition consistency are added on the basis of the key field matching degree to judge whether the business state after field association is in line with the supply chain process; further, a breakpoint delay penalty value is added to deal with the common state stagnation problem in emergency repair materials and emergency materials. The above four items are combined into a consistency score by weighting, of which the first three items improve the execution consistency score and the delay penalty item reduces the execution consistency score. All items are normalized comparison values, and the weight coefficients are also configured according to the same proportion range. Therefore, the calculation results can be used for state comparison within the same breakpoint execution chain.

[0131] For example, when executing the natural language query text "Query the reason for the abnormal arrival of emergency repair cables in location A", the system obtains the standard material code "RJDL-10KV" after executing the "Material Standardization Breakpoint" in the semantic breakpoint chain of the thought chain; obtains the purchase order number "PO20240518001" after executing the "Purchase Order Breakpoint"; obtains the contract delivery status as "overdue" after executing the "Delivery Status Breakpoint"; obtains the delivery order number "FH20240526003" and the delivery status "delivered" after executing the "Logistics Receipt Breakpoint"; obtains the logistics tracking number "WL20240527009" and the receipt status "received" after executing the "Formal Warehousing Breakpoint"; when executing the "Formal Warehousing Breakpoint", the system uses the logistics tracking number "WL20240527009" to query the warehousing system, and returns an empty formal warehousing status. Consistency scores are calculated for each breakpoint. For example, when calculating consistency for the "formal warehousing breakpoint," if the tracking number can be transmitted from the previous "logistics receipt breakpoint" to the warehousing system, the key field matching degree is set to 0.95; if the logistics receipt time is earlier than the current query time, but the warehousing receipt time is empty, the time sequence consistency is set to 0.45; if the status combination is "received - not yet in storage," which belongs to the pending verification status transition, the status transition consistency is set to 0.40; if the historical normal receipt to warehousing stay interval for this type of emergency repair material is relatively short, but the current stay time exceeds this interval, the breakpoint delay penalty value is set to 0.30. If the weight coefficients are ω1=0.35, ω2=0.25, ω3=0.25, and ω4=0.15, then the consistency score is calculated as 0.35×0.95+0.25×0.45+0.25×0.40-0.15×0.30=0.500. The system writes the consistency score into the execution node of the "Formal Warehousing Breakpoint" and marks the status of the breakpoint as "Pending Verification Anomaly", with the anomaly type recorded as "Not Formal Warehousing After Receipt".

[0132] During the generation of the breakpoint execution chain, the system can write the breakpoint status (execution status) and the corresponding consistency score for each execution node. The breakpoint status can include the corresponding breakpoint name, preceding dependent breakpoints, input field values, output field values, associated data sources, associated fields, and exception types. Taking the "Contract Delivery Date Breakpoint" as an example, this node record's preceding dependency is the "Purchase Order Breakpoint," the input field is the purchase order number "PO20240518001," the associated data source is the contract management system, and the output fields are the contract number and contract delivery date status. Taking the "Logistics Receipt Breakpoint" as another example, this node record's preceding dependency is the "Shipping Status Breakpoint," the input field is the shipping order number "FH20240526003," the associated data source is the logistics platform, and the output fields are the logistics tracking number "WL20240527009" and the receipt status. Taking the "Formal Warehousing Breakpoint" as yet another example, this node record's preceding dependencies are the "Logistics Receipt Breakpoint" and the "Temporary Record Breakpoint," the input field is the logistics tracking number or arrival registration number, the associated data source is the warehousing system, the output field is the formal warehousing status, and the execution status is "Pending Verification Anomaly." These nodes are connected according to the breakpoint order in the semantic breakpoint chain of the thought chain to form the breakpoint execution chain. If an execution node returns multiple business records, the main record can be selected according to the sorting rules in the material code, region object, order time, and breakpoint template, while retaining the multiple record markers so that subsequent steps can indicate the existence of multiple related records in the natural language results.

[0133] The breakpoint execution chain formed in this embodiment includes at least the breakpoint status of each execution node. When the consistency score is low, it can also include the corresponding consistency score judgment result. For example, the breakpoint execution chain is: "Material standardization is normal → Purchase order is normal → Contract delivery date has exceeded the deadline → Supplier has shipped → Logistics has been signed for → Temporary record is pending verification → Formal warehousing is empty and the execution consistency score has decreased → Anomaly attribution entry is formed." After receiving the breakpoint execution chain in step S50, partial verification can be performed around the "formal warehousing breakpoint" and its preceding "logistics signing breakpoint" and "temporary record breakpoint", and intelligent interactive query results can be generated for business personnel.

[0134] In one embodiment, step S50, based on the breakpoint execution chain, obtains the data query results of the natural language query text in the supply chain. When there is an abnormal node in the execution node, the data query results contain information about the abnormal node, which may specifically include the following steps S51 to S56:

[0135] Step S51: Based on the breakpoint status and consistency score of each execution node, candidate abnormal breakpoints are obtained.

[0136] For example, the execution consistency score and breakpoint status of each breakpoint node are read sequentially according to the order of the breakpoint execution chain. Since the execution consistency score is calculated based on the degree of matching of key fields, consistency of time sequence, consistency of state transition, and breakpoint delay penalty value, it can represent the stability of the execution state between the i-th semantic breakpoint and its predecessor breakpoint. Breakpoints with execution consistency scores below a preset threshold or breakpoint statuses containing anomaly types are identified as candidate abnormal breakpoints. For example, if the execution status of the "formal entry breakpoint" is "pending verification anomaly" and the anomaly type is "not formally entered into the warehouse after receipt," then this breakpoint is included in the candidate abnormal breakpoint set. When the candidate abnormal breakpoint set is empty, data query results of "no abnormal breakpoints found" or "link status normal" can be generated.

[0137] For example, if the preceding input field of a breakpoint in the breakpoint execution chain is empty, the system may not skip the breakpoint directly, but instead supplement it according to the alternative input fields or backup preceding breakpoints recorded in the semantic breakpoint chain of the thought chain; if the input field still cannot be obtained, the execution status of the breakpoint is recorded as "preceding field missing", and the status is passed to subsequent dependent breakpoints.

[0138] Step S52: Obtain historical data and, based on the historical data, obtain the business correlation strength between candidate anomaly breakpoints and anomaly attribution breakpoints.

[0139] Step S53: Based on the breakpoint execution chain, obtain the breakpoint distance between the candidate exception breakpoint and the exception attribution breakpoint.

[0140] Step S54: Based on the consistency score, business correlation strength, and breakpoint distance, obtain the abnormal impact score of the execution node.

[0141] Step S55 determines the local verification master breakpoint based on the abnormal impact score of each execution node.

[0142] For example, the calculation of the anomaly impact score is derived from the decay propagation model in the graph structure. The basic idea of ​​the decay propagation model is that the impact of a node on a target node weakens as the path distance increases, and is also affected by the connection strength between nodes. This example applies this idea to the breakpoint execution chain of the power supply chain, treating the breakpoint as a node in the graph structure, the field dependency relationship and the historical anomaly linkage relationship as the connection relationship between nodes, and the consistency score as the basic value for the anomaly strength. To adapt to the power supply chain inquiry scenario, the formula incorporates the business association strength and the breakpoint distance, so that the anomaly propagation is concentrated in the truly relevant supply chain links. Specifically, the node strength is replaced with the anomaly strength (1-C). e (i)), because of the consistency score (C e (i) A lower value indicates more inconsistent breakpoints and a higher degree of anomaly; replace connection strength with the business correlation strength between breakpoints in the power supply chain (R).e (i) enables different links such as logistics, warehousing, and contracts to participate in the result generation according to the degree of historical business correlation; the distance attenuation term is written as (1+μD) e (i) This approach minimizes the impact of distant breakpoints on the final attribution. This process avoids excessive influence of distant breakpoints on the current query result while preserving the contribution of preceding key anomalies to the final result. For example, the "Purchase Order Breakpoint" anomaly can affect multiple subsequent breakpoints via a longer path, while the "Formal Inbound Breakpoint" anomaly directly impacts the attribution of arrival anomalies. The two will influence the attribution based on C... e (i), R e (i) and D e Combinations of (i) yield different impact scores. Abnormal impact scores satisfy:

[0143] (Formula 5)

[0144] Among them, P e (i) represents the score of the abnormal impact of the i-th candidate anomaly breakpoint on the final query result, used to determine the local verification master breakpoint; C e (i) represents the consistency score of the i-th candidate anomalous breakpoint. The lower the value, the more anomalous the breakpoint is. Therefore, this step uses 1-C. e (i) represents the anomaly intensity; R e (i) represents the business correlation strength between the i-th candidate anomaly breakpoint and the anomaly attribution breakpoint, which is obtained by statistical analysis of historical breakpoint execution logs and historical anomaly attribution records in historical data. For example, if the "formal inbound breakpoint" and the "anomaly attribution breakpoint" frequently co-occur in the arrival anomaly scenario, then the correlation strength is relatively high; D e (i) represents the breakpoint distance between the i-th candidate anomaly breakpoint and the anomaly attribution breakpoint, calculated by the breakpoint order in the breakpoint execution chain; for example, the distance between adjacent breakpoints is 1. μ represents the breakpoint reliability decay parameter, used to control the rate at which the anomaly impact decreases with increasing breakpoint distance, and takes a non-negative value. All items can be processed for uniformity and normalization before calculation. If the consistency score is incalculable, the breakpoint is not included in this formula, but is output as an interface anomaly or permission anomaly. If historical statistics on business association strength are lacking, the basic association strength in the template library is used and marked as a low-sample association.

[0145] For example, breakpoints whose anomaly impact score is higher than the corresponding threshold can be identified as candidate anomaly breakpoints.

[0146] For example, for the natural language query text "Location A - Emergency Cable Repair - Delivery Anomaly Inquiry", the consistency score of the "Formal Warehousing Breakpoint" is 0.500, its business association strength with the anomaly attribution breakpoint is 0.92, the breakpoint distance is 1, and the breakpoint confidence decay parameter is 0.4. Therefore, the anomaly impact score of this breakpoint is (1-0.500)×0.92 / (1+0.4×1)=0.329. In the same execution chain, the consistency score of the "Logistics Receipt Breakpoint" is 0.82, its business association strength with the anomaly attribution breakpoint is 0.78, and the breakpoint distance is 2. Therefore, its anomaly impact score is (1-0.82)×0.78 / (1+0.4×2)=0.078. It can be seen that although the logistics receipt breakpoint is related to the warehousing process, its execution consistency is high and the anomaly intensity is low; the formal warehousing breakpoint has a higher consistency score and is closer to the attribution node, so the system identifies the "formal warehousing breakpoint" as the main breakpoint for local verification.

[0147] Step S56: Perform local verification on the main breakpoint of local verification to obtain the local verification conclusion; local verification is used to determine the cause of the anomaly; the local verification conclusion and the preceding execution node corresponding to the main breakpoint of local verification in the breakpoint execution chain constitute the data query result.

[0148] For example, after determining the main breakpoint for local verification, the source of the preceding fields of the breakpoint is read from the breakpoint execution chain, and the data source directly related to the main breakpoint for local verification is called to obtain data from the corresponding data source interface. For example, for the "formal inbound breakpoint", the breakpoint execution chain has recorded that its input fields come from the logistics tracking number output by the "logistics receipt breakpoint" and the arrival registration number output by the "temporary storage record breakpoint". Therefore, the system uses the logistics tracking number and the arrival registration number to access the arrival registration table, temporary storage log table and formal inbound log table in the warehousing system. If the arrival registration form has a record but the formal warehousing record is empty, the partial verification conclusion is "The reason for the anomaly is determined to be that the goods have arrived and are awaiting formal warehousing." If the temporary storage record has a record but the formal warehousing record is empty, the partial verification conclusion is "The reason for the anomaly is determined to be that the goods have been temporarily stored and are awaiting formal warehousing." If there are no corresponding records in the arrival registration form, temporary storage record, and formal warehousing record, but the logistics platform shows that the goods have been signed for, the partial verification conclusion is "The reason for the anomaly is determined to be that the logistics receipt status is inconsistent with the warehousing record." The above partial verifications only focus on the breakpoint with the highest anomaly impact score and its direct field source, so that the final result can follow the breakpoint execution chain, rather than regenerating a new query path. If the partial verification of the breakpoint with the highest anomaly impact score cannot reach a definite conclusion, the system can retain the "awaiting manual verification" status and output the verified data source and the key fields that were not obtained, avoiding the generation of overly definitive responses.

[0149] For example, the system generates data query results in the processing direction (e.g., represented as R). aWhen a query is performed, the local verification conclusion and the status of the preceding breakpoint in the breakpoint execution chain are combined to form the query result. The data query result can include two parts: structured result and natural language result. The structured result records the region object, material object, main anomaly breakpoint, anomaly type, anomaly impact score, and associated preceding nodes; the natural language result is generated through a pre-set result template, and the template fields are directly derived from the breakpoint execution chain and the local verification result. For example, in the above scenario, the structured content of the data query result can be expressed as: "region" is "location A", "material" is "repair cable", "main_abnormal_node" is "formal warehousing breakpoint", "abnormal_type" is "not formally warehousing after signing", the anomaly impact score "abnormal_score" is 0.329, and the associated preceding nodes "related_nodes" are "logistics signing breakpoint, temporary storage record breakpoint". The generated natural language result is: "The emergency repair cable has been received by logistics, but the warehousing system has not yet formed a formal warehousing record. The current anomaly is concentrated in the formal warehousing stage. Based on the purchase order, contract delivery date, supplier shipment, and logistics receipt status, it is determined that the material is in the state of being received but awaiting formal warehousing. It is recommended to prioritize checking the warehousing arrival registration and the processing status of temporary storage to formal warehousing." Natural language results must not use business states that do not appear in the breakpoint execution chain or partial verification as a basis; if a data source query is empty, the empty system and field should be clearly stated, rather than directly inferring that the business did not occur.

[0150] When generating natural language results, the system organizes the text in the order of "confirmed preceding status - abnormal breakpoint - partial verification conclusion - processing direction," enabling business personnel to see the key evidence in the query chain. For example, the system first states "purchase order is normal, supplier has shipped, logistics has been signed for," then states "formal warehousing is empty," then provides the partial verification conclusion "awaiting formal warehousing after signing," and finally provides the processing direction "verify warehouse arrival registration and transfer temporary storage to formal warehousing." For emergency repair materials, the result template prioritizes outputting the logistics and warehousing chain status; for long-cycle equipment materials, the result template prioritizes outputting the contract delivery date and shipping status. The final output data query result serves as the response content of the intelligent interactive query interface, which can be displayed as a natural language answer on the interface, along with the abnormal breakpoint name, related nodes, status summary, data source name, and query time. Thus, the query result contains both a readable answer and traceable breakpoint execution evidence.

[0151] For example, if there are no abnormal breakpoints in the breakpoint execution chain and all required breakpoints are executed successfully, the system generates a normal chain response; if there are interface or permission abnormalities in the breakpoint execution chain but not business abnormalities, the system will explicitly mark the abnormality type as a data source access abnormality and will not generate unfounded business attributions.

[0152] In one or more embodiments, such as Figure 2 As shown, a supply chain data query device 10 is disclosed. The device includes: an acquisition module 110, a first processing module 120, a second processing module 130, a third processing module 140, and a fourth processing module 150. The acquisition module 110 is used to acquire natural language query text. The first processing module 120 standardizes the natural language query text to obtain identifiable text, then uses a business vocabulary to perform prefix tree scanning and identification on the identifiable text, and uses a gated recurrent network model to identify the identifiable text, obtaining a candidate phrase set. The candidate phrases in the candidate phrase set are arranged in category order to form a query target chain. The second processing module 130, based on the query target chain, obtains multiple semantic breakpoints arranged in a preset dependency order to form a thought chain semantic breakpoint chain. Each semantic breakpoint is associated with a candidate phrase. The query target chain is used to determine the semantic breakpoints in the thought chain semantic breakpoint chain based on the information of the candidate phrases. The candidate phrases contain query information from the natural language query text. The thought chain semantic breakpoint chain is used to determine the data source interface to be called based on each semantic breakpoint. The third processing module 140 is used to sequentially call multiple data source interfaces based on the semantic breakpoint chain of the thought chain. Based on the query target chain, it determines the information called in the corresponding data source interface to obtain the execution node corresponding to each semantic breakpoint. The execution nodes are arranged in a preset breakpoint order to form a breakpoint execution chain. The breakpoint execution chain is used to represent the information queried after calling each data source interface. The fourth processing module 150 is used to obtain the data query results of natural language query text in the supply chain based on the breakpoint execution chain. When there is an abnormal node in the execution node, the data query results include the information of the abnormal node.

[0153] In one embodiment, the first processing module 120 is used to acquire a business terminology list and, based on the business terminology list and identifiable text, obtain a first candidate phrase in the identifiable text that maps to the business terminology list; when there are remaining texts in the identifiable text that cannot be mapped to the business terminology list, a bidirectional gated recurrent network model is acquired and used to supplement the identification of the remaining text to obtain a second candidate phrase; the first candidate phrase and / or the second candidate phrase constitute a candidate phrase set; a multi-class logistic regression model is acquired and used to calculate the probability of each candidate phrase in the candidate phrase set corresponding to each semantic role; the probability of each candidate phrase corresponding to each semantic role is compared respectively, and when the maximum probability of the semantic role is greater than or equal to the minimum threshold, the semantic role with the highest probability is determined as the category of the candidate phrase; and based on the category of each candidate phrase, the candidate phrases in the candidate phrase set are arranged in category order to form a query target chain.

[0154] In one embodiment, the categories of candidate phrases include inquiry purpose and inquiry object; the second processing module 130 is used to determine a basic template based on candidate phrases of the category of inquiry purpose in the inquiry target chain, the basic template including a first breakpoint in the supply chain related to the candidate phrases of the category of inquiry purpose; based on candidate phrases of the category of inquiry object in the inquiry target chain, determine a second breakpoint in the supply chain related to the candidate phrases of the category of inquiry object; acquire historical data, and use each first breakpoint and each second breakpoint as candidate breakpoints, calculate the historical call intensity, data dependency intensity, abnormal contribution degree, and scenario matching degree of each candidate breakpoint based on the historical data, and obtain the scenario adaptation score of the candidate breakpoint based on the historical call intensity, data dependency intensity, abnormal contribution degree, and scenario matching degree; when the scenario adaptation score of the candidate breakpoint is greater than the breakpoint retention threshold, the candidate breakpoint is retained as a semantic breakpoint; and acquire the dependency relationship between each semantic breakpoint, determine the preset dependency order based on the dependency relationship and the scenario adaptation score; after adjusting the order of each semantic breakpoint based on the preset dependency order, a semantic breakpoint chain of the thought chain is formed.

[0155] In one embodiment, the third processing module 140 is used to obtain an interface mapping table, which includes the mapping relationship of the same semantic breakpoint in different data source interfaces; based on the interface mapping table and each semantic breakpoint in the semantic breakpoint chain of the thought chain, the data source interface related to the semantic breakpoint is called in sequence to obtain the execution result related to the candidate phrase in the data source interface; and based on the execution result, the breakpoint status and consistency score of each execution node are obtained. The breakpoint status and the corresponding consistency score are arranged in a preset breakpoint order to form a breakpoint execution chain; the consistency score is used to characterize the stability of the execution state between the semantic breakpoint and its predecessor breakpoint.

[0156] In one embodiment, when determining the consistency score of an execution node, the third processing module 140 includes: acquiring rule information of the supply chain; based on the rule information, obtaining the degree of matching of key fields, temporal sequence consistency, state transition consistency, breakpoint delay penalty value, and corresponding weight coefficients between the currently executed semantic breakpoint and its predecessor breakpoint; the sum of the weight coefficients corresponding to the degree of matching of key fields, temporal sequence consistency, state transition consistency, and breakpoint delay penalty value is 1; and obtaining a consistency score based on the degree of matching of key fields, temporal sequence consistency, state transition consistency, breakpoint delay penalty value, and corresponding weight coefficients.

[0157] In one embodiment, the fourth processing module 150 is used to obtain candidate abnormal breakpoints based on the breakpoint status and consistency score of each execution node; acquire historical data, and based on the historical data, obtain the business association strength between the candidate abnormal breakpoints and the abnormal attribution breakpoints; obtain the breakpoint distance between the candidate abnormal breakpoints and the abnormal attribution breakpoints based on the breakpoint execution chain; obtain the abnormal impact score of the execution node based on the consistency score, business association strength, and breakpoint distance; determine the local verification master breakpoint based on the abnormal impact score of each execution node; and perform local verification on the local verification master breakpoint to obtain a local verification conclusion; the local verification is used to determine the cause of the abnormality; the local verification conclusion and the preceding execution node corresponding to the local verification master breakpoint in the breakpoint execution chain constitute the data query result.

[0158] Each module in the aforementioned supply chain data query device 10 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0159] In one exemplary embodiment, a supply chain data query device is provided. The supply chain data query device may include a server, and the internal structure diagram of the server may be as follows: Figure 3 As shown, the server includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor of this supply chain data query device provides computing and control capabilities. The memory of the supply chain data query device includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database of the supply chain data query device stores data such as natural language query text, query target chains, semantic breakpoint chains, and breakpoint execution chains. The I / O interfaces of the supply chain data query device are used for exchanging information between the processor and external devices. The communication interface of the supply chain data query device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a supply chain data query method.

[0160] Those skilled in the art will understand that Figure 3The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the supply chain data query device to which the present application is applied. A specific supply chain data query device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0161] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the supply chain data query method in any of the above embodiments.

[0162] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the supply chain data query method in any of the above embodiments.

[0163] For example, the supply chain data query device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. Supply chain data querying may include, but is not limited to, processors and memory. Those skilled in the art will understand that the intelligent interactive query device for power supply chain data based on the thought chain can also include input / output devices, network access devices, buses, etc.

[0164] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor serves as the control center for the intelligent interactive query device for power supply chain data based on the thought chain, connecting various parts of the supply chain data query process through various interfaces and lines.

[0165] Memory can be used to store computer programs and / or modules. The processor performs various functions of supply chain data query by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can primarily include a program storage area and a data storage area. The program storage area can store operating devices, applications required for at least one function, etc.; the data storage area can store data created based on the operation of the controller, etc. Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital cards (SD cards), flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0166] If the supply chain data query integration module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0167] The aforementioned supply chain data query method, supply chain data query device, supply chain data query equipment, computer-readable storage medium, and computer program product construct a complete chain based on natural language query text, sequentially including the query target chain, the thought chain semantic breakpoint chain, the breakpoint execution chain, and the data query result. Specifically, the semantic recognition model utilizing a business vocabulary combined with a bidirectional gated loop network improves the recognition accuracy of colloquial natural language query text, enabling precise acquisition of data related to the input natural language query text from the invoked data source interface, thereby enhancing the accuracy of the final query results.

[0168] Furthermore, during the execution phase, the interface mapping table and execution consistency scoring mechanism are used to achieve accurate association of cross-system fields and dynamic verification of business status, avoiding misjudgments caused by differences in data standards between systems.

[0169] Furthermore, in the result generation stage, based on the anomaly impact scoring and local verification strategy, it can accurately locate the root causes of anomalies in the execution links such as formal warehousing and logistics signing, and generate interpretable structured and natural language responses, which significantly improves the accuracy, stability and practicality of intelligent question answering in multi-system and multi-caliber chain business scenarios.

[0170] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0171] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A supply chain data query method, characterized in that, The method includes the following steps: Obtain natural language query text; After standardizing the natural language query text to obtain identifiable text, the identifiable text is then scanned using a business vocabulary and identified using a gated recurrent network model to obtain a candidate phrase set. The candidate phrases in the candidate phrase set are arranged in order of category to form a query target chain. Based on the query target chain, multiple semantic breakpoints are obtained in a preset dependency order to form a thought chain semantic breakpoint chain. The semantic breakpoints are associated with the candidate phrases. The query target chain is used to determine the semantic breakpoints in the thought chain semantic breakpoint chain based on the information of the candidate phrases. The candidate phrases contain query information in the natural language query text. The thought chain semantic breakpoint chain is used to determine the data source interface to be called based on each of the semantic breakpoints. Based on the semantic breakpoint chain of the thought chain, multiple data source interfaces are sequentially called. Based on the query target chain, the information called in the corresponding data source interface is determined to obtain the execution node corresponding to each semantic breakpoint. The execution nodes are arranged in a preset breakpoint order to form a breakpoint execution chain. The breakpoint execution chain is used to represent the information queried after calling each data source interface. Based on the breakpoint execution chain, the data query results of the natural language query text in the supply chain are obtained. When there is an abnormal node in the execution node, the data query results contain the information of the abnormal node.

2. The supply chain data query method according to claim 1, characterized in that, Determining the query target chain includes: Obtain the business terminology list, and based on the business terminology list and the identifiable text, obtain the first candidate phrase in the identifiable text that maps to the business terminology list; When there are remaining texts in the identifiable text that cannot be mapped to the business vocabulary, the gated recurrent network model is obtained, and the gated recurrent network model is used to supplement the identification of the remaining text to obtain a second candidate phrase; the first candidate phrase and / or the second candidate phrase constitute the candidate phrase set; Obtain a multi-class logistic regression model, and use the multi-class logistic regression model to calculate the probability that each candidate phrase in the candidate phrase set corresponds to each semantic role; The probability of each candidate phrase corresponding to each semantic role is compared. When the maximum probability of a semantic role is greater than or equal to a minimum threshold, the semantic role with the highest probability is determined as the category of the candidate phrase. Based on the category of each candidate phrase, the candidate phrases in the candidate phrase set are arranged in the order of the categories to form the query target chain.

3. The supply chain data query method according to claim 2, characterized in that, Determining the semantic breakpoint chain of the thought chain includes: Based on the candidate phrases in the query target chain that are categorized as the query purpose, a basic template is determined, the basic template including a first breakpoint in the supply chain related to the candidate phrases that are categorized as the query purpose; Based on the candidate phrases in the query target chain that belong to the query object, determine a second breakpoint in the supply chain that is related to the candidate phrases that belong to the query object; Historical data is acquired, and each of the first breakpoints and each of the second breakpoints is used as candidate breakpoints. Based on the historical data, the historical call intensity, data dependency intensity, abnormal contribution degree, and scene matching degree of each candidate breakpoint are calculated. Based on the historical call intensity, the data dependency intensity, the abnormal contribution degree, and the scene matching degree, the scene adaptation score of the candidate breakpoint is obtained. When the scene adaptation score of the candidate breakpoint is greater than the breakpoint retention threshold, the candidate breakpoint is retained as the semantic breakpoint; and Obtain the dependency relationships between each semantic breakpoint, and determine the preset dependency order based on the dependency relationships and the scene adaptation score; after adjusting the order of each semantic breakpoint based on the preset dependency order, the thought chain semantic breakpoint chain is formed.

4. The supply chain data query method according to claim 1, characterized in that, Determining the breakpoint execution chain includes: Obtain the interface mapping table, which includes the mapping relationship of the same semantic breakpoint in different data source interfaces; Based on the interface mapping table and each semantic breakpoint in the semantic breakpoint chain of the thought chain, the data source interface related to the semantic breakpoint is called sequentially to obtain the execution result related to the candidate phrase in the data source interface; and Based on the execution results, the breakpoint status and consistency score of each execution node are obtained. The breakpoint status and the corresponding consistency score are arranged in the preset breakpoint order to form the breakpoint execution chain. The consistency score is used to characterize the stability of the execution state between the semantic breakpoint and its preceding breakpoint.

5. The supply chain data query method according to claim 4, characterized in that, Determining the consistency score of the execution node includes: Obtain the rule information of the supply chain; Based on the rule information, the key field matching degree, temporal sequence consistency, state transition consistency, breakpoint delay penalty value, and corresponding weight coefficients are obtained between the currently executed semantic breakpoint and its preceding breakpoint; the sum of the weight coefficients corresponding to the key field matching degree, temporal sequence consistency, state transition consistency, and breakpoint delay penalty value is 1; and The consistency score is obtained based on the matching degree of the key fields, the consistency of the time sequence, the consistency of the state transition, the penalty value for breakpoint delay, and the corresponding weight coefficient.

6. The supply chain data query method according to claim 4, characterized in that, Determining the data query results includes: Based on the breakpoint status and consistency score of each execution node, candidate abnormal breakpoints are obtained; Obtain historical data, and based on the historical data, obtain the business correlation strength between the candidate abnormal breakpoints and the abnormal attribution breakpoints; Based on the breakpoint execution chain, the breakpoint distance between the candidate abnormal breakpoint and the abnormal attribution breakpoint is obtained; Based on the consistency score, the business association strength, and the breakpoint distance, the abnormal impact score of the execution node is obtained; Based on the anomaly impact scores of each execution node, determine the local verification master breakpoint; and The local verification main breakpoint is partially verified to obtain a local verification conclusion; the local verification is used to determine the cause of the anomaly; the local verification conclusion and the preceding execution node corresponding to the local verification main breakpoint in the breakpoint execution chain constitute the data query result.

7. A supply chain data query device, characterized in that, The device includes: The acquisition module is used to acquire natural language query text; The first processing module is used to standardize the natural language query text to obtain identifiable text, and then use a business vocabulary to perform prefix tree scanning recognition on the identifiable text and a gated recurrent network model to recognize the identifiable text to obtain a candidate phrase set. The candidate phrases in the candidate phrase set are arranged in order of category to form a query target chain. The second processing module is used to obtain multiple semantic breakpoints arranged in a preset dependency order based on the query target chain to form a thought chain semantic breakpoint chain, wherein each semantic breakpoint is associated with each candidate phrase; the query target chain is used to determine the semantic breakpoints in the thought chain semantic breakpoint chain based on the information of the candidate phrases, wherein the candidate phrases contain query information in the natural language query text, and the thought chain semantic breakpoint chain is used to determine the data source interface to be called based on each semantic breakpoint; The third processing module is used to sequentially call multiple data source interfaces based on the semantic breakpoint chain of the thought chain, and determine the information called in the corresponding data source interface based on the query target chain, so as to obtain the execution node corresponding to each semantic breakpoint. The execution nodes are arranged in a preset breakpoint order to form a breakpoint execution chain; the breakpoint execution chain is used to represent the information queried after calling each data source interface; and The fourth processing module is used to obtain the data query results of the natural language query text in the supply chain based on the breakpoint execution chain. When there is an abnormal node in the execution node, the data query results include the information of the abnormal node.

8. A supply chain data query device, characterized in that, include: A memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method according to any one of claims 1 to 6.

9. 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 to 6.

10. A computer program product, comprising a computer program, 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 to 6.