Logic graph generation method and related apparatus

By utilizing AI models to generate logic graphs, the problem of low efficiency in logic graph construction is solved, enabling automated generation and real-time updates of logic graphs. This adapts to the complexity of enterprise business scenarios and long-chain dependencies, improving construction efficiency and applicability.

WO2026138140A1PCT designated stage Publication Date: 2026-07-02HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-10-29
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

In existing technologies, the construction of logic graphs mainly relies on manual construction by experts, which is inefficient and difficult to promote and apply on a large scale in various business scenarios of enterprises.

Method used

By acquiring the tree-connected text, inference elements, and rule set describing the business reasoning logic, and leveraging the semantic understanding capabilities of the AI ​​model, the judgment logic nodes and conclusion nodes of the tree-connected structure are generated one by one to construct a logic graph. A model self-verification mechanism is introduced to ensure the accuracy and reliability of the logic graph.

Benefits of technology

It improves the efficiency of logic graph construction, ensures that the logic graph can reproduce the complexity of enterprise business and the long chain of dependent reasoning logic, and realizes the automated generation and real-time updating of logic graphs to adapt to business needs at different times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025130823_02072026_PF_FP_ABST
    Figure CN2025130823_02072026_PF_FP_ABST
Patent Text Reader

Abstract

A logic graph generation method, applied to the technical field of artificial intelligence (AI). By giving a plurality of texts in a tree‑structured connection describing service inference logic, derivation elements indicating an inference direction, and a rule set on which service inference depends, a corresponding target rule can be accurately matched, in the rule set, for each text on the basis of the plurality of texts and the derivation elements. Then, decision logic nodes and conclusion nodes in the tree‑structured connection are generated one by one by using the semantic understanding capability of an AI model on the basis of the guidance of the texts and the derivation elements and the constraints of the target rules, so as to obtain a logic graph applied to service inference. In addition, nodes in a tree‑structured connection in the logic graph can effectively reproduce the complexity of enterprise services and the dependency‑based long‑chain inference logic, thereby improving the construction efficiency of the logic graph while ensuring the availability of the logic graph.
Need to check novelty before this filing date? Find Prior Art

Description

A method and related apparatus for generating logic graphs

[0001] This application claims priority to two Chinese patent applications filed with the State Intellectual Property Office on December 27, 2024, application number 202411977848.X, entitled "A Method and Related Device for Constructing an Enterprise Logic Graph" and on March 28, 2025, application number 202510387932.4, entitled "A Method and Related Apparatus for Generating a Logic Graph", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of artificial intelligence (AI) technology, and in particular to a method and apparatus for generating a logic graph. Background Technology

[0003] Graph technology is a technique that describes concepts, entities, and their relationships in a structured form. By expressing information in the form of graphs, graph technology enables entities and the relationships between them to be effectively organized and represented in a network structure, allowing users to easily retrieve and reason about knowledge.

[0004] Taking a logic graph as an example, a logic graph records the dependencies between different logic rules and the reasoning results obtained based on these rules. In enterprise business reasoning scenarios (such as tax rate calculation or code review scenarios), enterprises use specific business data as input, perform reasoning in the logic graph, determine the logic rules satisfied by the business data one by one, and then obtain the reasoning results corresponding to the business data.

[0005] Logical graphs can play an important role in most business scenarios of an enterprise. However, the construction of logical graphs currently mainly relies on manual construction by experts, which is inefficient and makes it difficult to promote and apply them on a large scale in various business scenarios of an enterprise. Summary of the Invention

[0006] This application provides a method and related apparatus for generating logic graphs, which can improve the efficiency of logic graph construction for enterprises.

[0007] Firstly, a method for generating a logic graph is provided, applicable to generating logic graphs in business reasoning scenarios. This method includes: an execution device acquiring business reasoning data, a first set of derivation elements, and a first set of rules. The business reasoning data includes multiple texts connected in a tree structure, which describe business reasoning logic. The first set of derivation elements includes multiple ordered derivation elements used to indicate the direction of reasoning. The first set of rules includes rules upon which the business reasoning process depends. Then, the execution device determines the target rules corresponding to the multiple texts in the first set of rules based on the multiple texts and their corresponding derivation elements. The multiple texts include a first text, and the target rule corresponding to the first text is determined based on the first text and its corresponding derivation elements. The derivation elements corresponding to the first text are determined from the ordered derivation elements based on the position of the first text within the multiple texts. For example, if the first text is at level N in the tree-connected multiple texts, then the derivation element corresponding to the first text can be the Nth derivation element among the ordered derivation elements. Secondly, the execution device generates a logic graph using a first model based on the multiple texts, their corresponding derivation elements, and the target rules. The logic graph is a tree-like connection diagram including multiple judgment logic nodes and multiple conclusion nodes. Each judgment logic node corresponds to a different text, for example, a one-to-one correspondence between multiple judgment logic nodes and multiple texts. Furthermore, the first judgment logic node among the multiple judgment logic nodes is generated based on the first text, the corresponding derivation elements of the first text, and the target rule. The first judgment logic node indicates the conditions that the business logic must satisfy. That is, the first judgment logic node is generated based on the business reasoning logic indicated by the first text and the reasoning direction indicated by the derivation elements corresponding to the first text, under the rule constraints indicated by the target rule. The first conclusion node among the multiple conclusion nodes indicates the business reasoning result, and the business logic corresponding to the business reasoning result satisfies the conditions indicated by the judgment logic nodes related to the first conclusion node.

[0008] In this solution, given multiple texts describing the business reasoning logic in a tree-like structure, derivation elements indicating the direction of reasoning, and a set of rules upon which the business reasoning depends, the solution can accurately match the corresponding target rule to each text within the rule set based on the multiple texts and derivation elements. Then, leveraging the semantic understanding capabilities of the AI ​​model, based on the guidance of the texts and derivation elements and the constraints of the target rules, the solution generates tree-like judgment logic nodes and conclusion nodes one by one, thereby obtaining a logic graph applicable to business reasoning. The tree-like nodes in the logic graph can effectively reproduce the complexity of enterprise business and the long-chain, dependent reasoning logic, improving the construction efficiency of the logic graph while ensuring its usability.

[0009] In one possible implementation, multiple judgment logic nodes in the logic graph are divided into multi-layer judgment logic nodes connected in a tree structure. One derivation element in the first derivation element set corresponds to one or more judgment logic nodes in the same layer of judgment logic nodes, and different judgment logic nodes in the same layer of judgment logic nodes are used to indicate different conditions belonging to the same reasoning direction.

[0010] In other words, each layer of judgment logic node in the logic graph is generated based on the same derivation element to indicate different conditions under the same reasoning direction, ensuring that different judgment logic nodes can be selected for different businesses during the business reasoning process, thereby improving the business coverage of the logic graph.

[0011] In one possible implementation, the first model is a large language model. The execution device generates a logic graph using the first model, specifically including: the execution device first generates prompt words based on the first text, the corresponding derivation elements of the first text, and the target rules. The prompt words are used to instruct the first model to generate the business reasoning logic described in the first text and the reasoning direction indicated by the derivation elements corresponding to the first text, and to generate the conditions that the business needs to satisfy based on the constraints described by the target rules corresponding to the first text. Then, the execution device inputs the prompt words into the first model to instruct the first model to generate the conditions that the business needs to satisfy based on the prompt words, and obtains the output result of the first model. Next, the execution device uses the output result of the first model as the condition indicated by the first judgment logic node, and generates the first judgment logic node in the logic graph.

[0012] In this solution, by leveraging the powerful semantic understanding capabilities of a large language model to integrate text, inference elements, and target rules, conditions that conform to the constraints of the target rules are generated. This enables the accurate generation of judgment logic nodes in the logic graph, ensuring the rationality of the constructed logic graph.

[0013] In one possible implementation, the conclusion node is a leaf node in the logic graph, and the judgment logic nodes associated with the conclusion node include the judgment logic nodes traversed from the root node to the leaf node in the logic graph.

[0014] In other words, since the logic graph itself is a tree-like connection graph, a unique path is formed from the root node to the conclusion node, and all the decision logic nodes on this path are the decision logic nodes related to the conclusion node. Furthermore, the business logic corresponding to the business reasoning result indicated by the conclusion node must satisfy the conditions indicated by all the related decision logic nodes.

[0015] In one possible implementation, after generating the logic graph, the execution device verifies, using a second model, whether the reasoning logic of the first judgment logic node in the logic graph is consistent with the target reasoning logic, which is the reasoning logic embodied by the first text and its corresponding derivation elements. Furthermore, if the first judgment logic node fails the verification, the execution device corrects the first judgment logic node using the first model based on the correction suggestions output by the second model. These correction suggestions indicate that the first judgment logic node should be corrected by prioritizing the target content in the target rule corresponding to the first text.

[0016] That is, when generating the first judgment logic node in the logic graph, if the target rule corresponding to the first judgment logic node contains a lot of content, then when generating the conditions for the first judgment logic node through the first model, it may generate incorrect conditions based on some content in the target rule that is irrelevant to the first text. In this case, by using the second model to verify the reasoning logic of the first judgment logic node and provide correction suggestions, the first model can be instructed to correct the first judgment logic node based on the correct content in the target rule, ensuring the correctness of the first judgment logic node generated by the first model.

[0017] In this scheme, a model self-verification mechanism is introduced during the construction of the logic graph. This mechanism guides the model to perform verification on the generated logic graph and provide corresponding correction suggestions, which ensures the reliability of the final constructed logic graph. This enables automated generation of logic graphs and improves the construction efficiency of logic graphs.

[0018] In one possible implementation, when an update to the logic graph is required, the execution device acquires a second set of derivation elements and a second set of rules, both of which guide the update of the logic graph. Then, based on the second set of derivation elements and the second set of rules, the execution device updates the logic graph using a first model to obtain the updated logic graph.

[0019] In this scheme, when the rules for constructing the logic graph change, the logic graph is updated based on the new derivation elements and new rules, which enables real-time updates of the logic graph and ensures its applicability at different times.

[0020] In one possible implementation, during the process of updating a judgment logic node at a certain layer of the logic graph, the execution device determines the judgment logic node corresponding to the second derivation element in the logic graph. Both the first derivation element set and the second derivation element set include the second derivation element. That is, the derivation element corresponding to this layer of judgment logic node remains unchanged.

[0021] Then, based on the rule corresponding to the second derivation element in the second rule set, the execution device updates the condition indicated by the judgment logic node corresponding to the second derivation element in the logic graph. The rule corresponding to the second derivation element in the second rule set is different from the rule corresponding to the second derivation element in the first rule set.

[0022] In this scheme, when the rules change but the derivation elements remain unchanged, the execution device updates the nodes in the logic graph based on the guidance of the derivation elements and the constraints of the new rules, thereby achieving adaptive updates of the logic graph to follow the rules and ensuring the applicability of the logic graph.

[0023] In one possible implementation, during the update of a decision logic node at a certain layer of the logic graph, the execution device determines the decision logic node corresponding to the third derivation element in the logic graph. This third derivation element corresponds to the fourth derivation element in the first set of derivation elements. That is, the derivation element corresponding to this layer of decision logic node has changed.

[0024] Then, based on the rule corresponding to the third derivation element in the second rule set, a new judgment logic node is generated in the logic graph. The new judgment logic node is used to replace the judgment logic node corresponding to the third derivation element.

[0025] In this scheme, when the derivation elements change, the execution device regenerates new nodes to replace the original nodes in the logic graph based on the guidance of the new derivation elements and the constraints of the new rules. This enables the logic graph to be updated adaptively according to the rules, ensuring the applicability of the logic graph.

[0026] In one possible implementation, the first set of rules includes regulations or pre-defined business rules.

[0027] In one possible implementation, the first model is a large language model.

[0028] In a second aspect, a logic graph generation apparatus is provided, comprising modules for executing the logic graph generation method in the first aspect or any possible implementation thereof.

[0029] Thirdly, a logic diagram generation apparatus is provided, comprising: a processor and a memory; the memory is used to store computer instructions, which, when executed by the processor, cause the logic diagram generation apparatus to perform the method described above.

[0030] Fourthly, a computer-readable storage medium is provided that stores instructions which, when executed on a computer, cause the computer to perform the methods of any of the above aspects.

[0031] Fifthly, a computer program product containing instructions is provided, which, when executed on a computer, enable the computer to perform the methods described above.

[0032] In a sixth aspect, a chip system is provided, the chip system including a processor and a communication interface for communicating with a module other than the chip shown, the processor for running computer programs or instructions such that an apparatus on which the chip system is mounted can perform the methods of any of the above aspects.

[0033] In a seventh aspect, a computing device is provided, comprising a logic diagram generation apparatus of the third aspect or a chip of the sixth aspect, wherein the logic diagram generation apparatus or the chip system in the computing device is used to implement the operational steps of the method of any of the above aspects.

[0034] Eighthly, a computing device cluster is provided, comprising at least one computing device, wherein any one computing device is used to run a computer program or instructions, such that the computing device cluster can perform the methods of any of the above aspects. Alternatively, some or all of the computing devices are used together to run a computer program or instructions, such that the computing device cluster can perform the methods of any of the above aspects.

[0035] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0036] Figure 1 is a schematic diagram of a system architecture 100 provided in this application;

[0037] Figure 2 is a flowchart illustrating a method for generating a logic graph provided in this application;

[0038] Figure 3 is a schematic diagram of a generation logic graph provided in this application;

[0039] Figure 4 is a schematic diagram of the logic graph in a tax rate reasoning scenario provided in this application;

[0040] Figure 5 is a schematic diagram of a logic graph generation process provided in this application;

[0041] Figure 6 is a schematic diagram of a judgment logic node in an update logic graph provided in this application;

[0042] Figure 7 is a schematic diagram of the judgment logic node in another update logic graph provided in this application;

[0043] Figure 8 is a schematic diagram of a system architecture for processing logic graphs provided in this application;

[0044] Figure 9 is a flowchart illustrating an update logic graph provided in this application;

[0045] Figure 10 is a schematic diagram of a logic map generation device provided in this application;

[0046] Figure 11 is a schematic diagram of the structure of a computing device provided in this application;

[0047] Figure 12 is a schematic diagram of the structure of a computing device cluster provided in this application;

[0048] Figure 13 is a schematic diagram of another computing device cluster provided in this application;

[0049] Figure 14 is a schematic diagram of the structure of a chip provided in this application;

[0050] Figure 15 is a schematic diagram of the structure of a computer-readable storage medium provided in this application. Detailed Implementation

[0051] To facilitate understanding, some technical terms used in this application will be introduced below.

[0052] (1) Large Language Model

[0053] Large language models are deep learning models trained on massive amounts of text data that can generate natural language text or understand the meaning of language text. Large language models can handle various natural language tasks, such as text classification, question answering, and dialogue, and are an important pathway to artificial intelligence.

[0054] Specifically, large language models are a technology that has emerged in recent years. Because large language models undergo meticulous data engineering and training processes, their parameters have learned a wealth of existing natural language processing knowledge. This knowledge can now replace humans in many language-related tasks, such as having large language models write code or perform text summarization.

[0055] Currently, large language models are mainly composed of Transformer networks.

[0056] (2) Transformer network

[0057] Transformer networks are powerful sequence models, but the computation time and memory required increase quadratically with sequence length, significantly increasing the hardware's storage and computing power demands. Essentially, Transformer networks employ a self-attention mechanism. Self-attention is a mechanism that associates different positions within a single sequence to compute a representation of the same sequence, playing a crucial role in machine reading, abstract summarization, and image description generation.

[0058] Taking the Transformer network applied to natural language processing as an example, the Transformer network processes input data of arbitrary length and generates new feature representations of the input data, which are then converted into target words. The self-attention network layer in the Transformer network uses an attention mechanism to capture the relationships between all other words, thereby generating new feature representations for each word. The advantage of the Transformer network's self-attention network is that the attention mechanism can directly capture the relationships between all words in a sentence without considering word positions.

[0059] (3) Prompt

[0060] Prompts originated as an input format designed by researchers for downstream tasks. Their purpose is to help pre-trained models "recall" what they "learned" during pre-training, hence the name "cue word." For large language models, a prompt is the user's input, instructing the model on the task to be performed. A prompt can be a simple question, a longer text, or a set of instructions, depending on the user's specific needs. Generally, a prompt is a short text string that provides context and task-related information to help the model better understand the requirements and generate the correct output. For example, in question-answering tasks, a prompt might contain a description of the question or topic to help the large language model generate the correct answer. Furthermore, prompts are often designed by humans to help large language models better understand specific tasks or domains.

[0061] In this way, when a large language model generates content, it first processes the prompt and then outputs content based on its understanding of the prompt. The working principle of the large language model is to predict the probability of the next word appearing based on the preceding context of the user input, thereby generating the following text word by word. Therefore, differences in the user's input prompt directly affect the quality of the large language model's output. In some cases, even a difference of just a few words in the user's input prompt can result in significantly different content generated by the large language model.

[0062] (4) Agent

[0063] An intelligent agent is an agent capable of perceiving its environment and taking actions to achieve specific goals. An intelligent agent can be software, hardware, or a system, possessing autonomy, adaptability, and interactivity. By perceiving changes in the environment (e.g., through sensors or data input), an intelligent agent makes judgments and decisions based on its learned knowledge and algorithms, and then executes actions to influence the environment or achieve predetermined goals.

[0064] Currently, the construction of logic graphs mainly relies on manual construction by experts, which is inefficient and difficult to promote and apply on a large scale in various business scenarios within enterprises. Taking the construction process of logic graphs in legal and regulatory scenarios as an example, experts need to retrieve and interpret regulatory information and summarize the interpretation results; then, experts need to abstract the regulatory information in the interpretation results according to the business rules of the actual business scenario, thereby realizing the construction of the logic graph. Obviously, the construction of logic graphs heavily depends on expert experience and requires experts to manually construct a large amount of information, which is time-consuming and results in low efficiency in the construction of logic graphs.

[0065] In view of this, this application provides a method for generating a logic graph. Given multiple texts in a tree-like connection describing business reasoning logic, derivation elements indicating the direction of reasoning, and a set of rules upon which the business reasoning depends, the method can accurately match the corresponding target rule to each text within the rule set based on the multiple texts and derivation elements. Then, leveraging the semantic understanding capabilities of an AI model, and guided by the texts and derivation elements and constrained by the target rules, the method generates tree-like connected judgment logic nodes and conclusion nodes one by one, thereby obtaining a logic graph applicable to business reasoning. Furthermore, the tree-like connected nodes in the logic graph effectively reproduce the complexity of enterprise business and the long-chain, dependent reasoning logic, improving the construction efficiency of the logic graph while ensuring its usability.

[0066] Please refer to Figure 1, which is a schematic diagram of a system architecture 100 provided in this application. As shown in Figure 1, in the system architecture 100, the execution device 110 can be implemented by at least one computing instance among physical hosts (computing devices), virtual machines, and containers. When the execution device 110 is implemented by a virtual machine or a container, the execution device 110 actually exists in the form of a cloud computing product and can provide cloud services.

[0067] Optionally, the execution device 110 can be used in conjunction with other computing devices, such as data storage devices, load balancers, etc.; the execution device 110 can be deployed on a single physical site or distributed across multiple physical sites.

[0068] In addition, the system architecture 100 also includes a data storage system 120, which is used to store the data and logical graph required for constructing the logical graph.

[0069] Optionally, for persistent data storage, the data storage system 120 may be located external to the execution device 110, exchanging data with the execution device 110 via a network. Alternatively, if the execution device 110 is a physical host, the data storage system 120 may also be located internally to the execution device 110, such as implementing the data storage system 120 as a database system that exchanges data with the processor via a bus. With the data storage system 120 present, the execution device 110 can use the data in the data storage system 120 to construct the logical graph.

[0070] Optionally, the user can interact with the execution device 110 by operating the local device 101. The local device 101 can represent any computing device, such as a personal computer, computer workstation, smartphone, tablet, and laptop.

[0071] Local device 101 can interact with execution device 110 through a communication network of any communication mechanism / standard. The communication network can be a wide area network, a local area network, a point-to-point connection, or any combination thereof.

[0072] In one implementation, the execution device 110 is used to implement the logic graph generation method provided in this application, thereby constructing the corresponding logic graph.

[0073] Optionally, during the process of executing the logic graph generation method by the execution device 110, the local device 101 can provide the execution device 110 with data required for constructing the logic graph, such as business reasoning data, a set of inference elements, and a set of rules, so that the execution device 110 can construct the logic graph. Furthermore, after the execution device 110 executes the logic graph generation method and obtains the logic graph, it can feed the logic graph back to the local device 101.

[0074] In another implementation, one or more aspects of the execution device 110 may be implemented by the local device 101. For example, the local device 101 may obtain the data (such as a set of rules) required to construct the logical graph from the execution device 110, thereby executing the logical graph generation method provided in this application to construct the logical graph.

[0075] Of course, in some examples, execution device 110 and local device 101 can also be the same device.

[0076] Please refer to Figure 2, which is a flowchart illustrating a method for generating a logic diagram according to this application. As shown in Figure 2, the method for generating a logic diagram includes the following steps 201-203.

[0077] Step 201: Obtain business reasoning data, a first set of derivation elements, and a first set of rules. The business reasoning data includes multiple texts connected in a tree structure, which are used to describe the business reasoning logic. The first set of derivation elements includes multiple ordered derivation elements used to indicate the direction of reasoning. The first set of rules includes the rules on which the business reasoning process depends.

[0078] In this application, before constructing the execution logic graph, the execution device can pre-acquire the business reasoning data, the first set of derivation elements, and the first set of rules provided by the user. The business reasoning data includes multiple texts connected in a tree structure, each describing the business reasoning logic. Specifically, since business reasoning logic in enterprises is often complex and manifests as a long chain of dependent reasoning logic, the business reasoning data can be summarized by multiple texts connected in a tree structure. Each text describes a segment of business reasoning logic, and the tree-like connections between the texts represent the reasoning order or dependency relationship between the business reasoning logics represented by the texts. That is, in the actual business reasoning process, the user often executes the business reasoning logic described by the preceding text in the tree-like connection, and then executes the business reasoning logic described by the preceding text in the tree-like connection. For example, in the business reasoning scenario of corporate income tax rate reasoning, the multiple texts can describe the situations of various countries, the various sources of corporate income, and the various amounts of corporate income that need to be considered during the tax rate reasoning scenario, all of which will affect the final tax rate.

[0079] In general, business reasoning data can include key information provided by users for business reasoning scenarios, which can be used to assist in the construction of logic graphs.

[0080] Specifically, for multiple texts connected in a tree structure, these texts can be presented in the form of a mind map, where each text originates from a node in the mind map. Of course, multiple texts in business reasoning data can also be presented in other forms, as long as they can demonstrate the tree-like connection between the texts; no specific limitations are imposed here.

[0081] The first set of derivation elements includes one or more derivation elements. Derivation elements are abstracted from the reasoning logic of the business and essentially summarize the reasoning direction of the reasoning content to be generated in the logic graph to be constructed. For example, in the scenario of corporate income tax rate reasoning, assuming that reasoning about the corporate income tax rate requires considering factors such as the country of origin of the company's income, the source of the company's income, and the amount of the company's income, the first set of derivation elements could include the following multiple derivation elements: country of origin of income, source of income, and amount of income.

[0082] The first rule set may include multiple rules, and these rules include those upon which the business reasoning process depends. In other words, the business reasoning process relies on the rules in the first rule set for its execution; therefore, the generation of reasoning logic within the business reasoning process actually depends on the rules in the first rule set.

[0083] The rules included in the first rule set are related to the business reasoning scenario, and are often derived from this scenario. For example, the first rule set may include regulations or pre-defined business rules. For instance, in a business reasoning scenario involving corporate income tax rate reasoning, the first rule set could include regulations from legal texts such as the "Corporate Income Tax Law of XX Country." Furthermore, pre-defined business rules could be, for example, rule standards developed by experts for the business scenario (such as the review rules specified in a code review manual for a code review scenario), or rules extracted and integrated from a large amount of text (such as profit reasoning rules in the financial field obtained by integrating a large amount of financial statement information).

[0084] Generally, users can pre-build multiple rule sets for different business reasoning scenarios, with different rule sets corresponding to different business reasoning scenarios. In this way, when building an enterprise logic graph, the appropriate rule set can be selected based on the scenario to which the logic graph to be built belongs.

[0085] Step 202: Based on multiple texts and their corresponding derivation elements, determine the target rules for each of the multiple texts in the first rule set. The multiple texts include the first text. The target rule for the first text is determined based on the first text and its corresponding derivation elements. The derivation elements for the first text are determined from multiple ordered derivation elements based on the position of the first text in the multiple texts.

[0086] Generally, the first rule set contains a large number of rules, some of which may be irrelevant to the logic graph to be constructed. Furthermore, when the first derivation element set includes multiple derivation elements, different derivation elements may correspond to different rules. Therefore, to improve the accuracy of constructing the logic graph, the execution device can determine the target rule corresponding to each text in the first rule set based on the text and its corresponding derivation elements. For example, when the first derivation element set includes multiple derivation elements, the execution device can combine each text in the multiple texts with its corresponding derivation element to determine the target rule corresponding to each text in the first rule set.

[0087] Taking the first text in a set of multiple texts as an example, the execution device can first determine the derivation element corresponding to the first text from among multiple ordered derivation elements based on the position of the first text in the multiple texts. For example, if the first text is at the Nth level in the tree-connected multiple texts, then the derivation element corresponding to the first text can be the Nth derivation element among multiple ordered derivation elements.

[0088] Then, the execution device combines the first text and its corresponding derived elements to determine the target rule corresponding to the first text from the first rule set. For example, the execution device generates a prompt word based on the first text, its corresponding derived elements, and the first rule set, and inputs the prompt word into the first model to instruct the first model to retrieve relevant rules from the first rule set based on the first text and its corresponding derived elements, and then determines the target rule based on the output of the first model. Of course, the execution device can also retrieve the rule with the highest semantic similarity to the first text and its corresponding first derived elements from the first rule set through semantic similarity retrieval, thereby obtaining the target rule corresponding to the first text.

[0089] Specifically, the multiple decision logic nodes in the logic graph are divided into multi-layered decision logic nodes connected in a tree structure. One derivation element in the first derivation element set corresponds to one or more decision logic nodes in the same layer, and different decision logic nodes in the same layer are used to indicate different conditions belonging to the same reasoning direction. For example, in the scenario of corporate income tax rate reasoning, assuming that a certain derivation element is the country where the company is located, then the text in a certain layer corresponding to this derivation element can be reasoning content describing different countries involved in the reasoning process, such as country A, country B, and country C; assuming that a certain derivation element is the source of the company's income, then the text in a certain layer corresponding to this derivation element can be reasoning content describing different types of income involved in the reasoning process, such as income from the sale of goods, income from the provision of services, income from the transfer of property, and income from the receipt of donations.

[0090] Step 203: Based on multiple texts, the derivation elements corresponding to the multiple texts, and the target rules, a logic graph is generated through the first model. The logic graph is a tree-like connection diagram including multiple judgment logic nodes and multiple conclusion nodes. The multiple judgment logic nodes correspond to multiple texts respectively, and the first judgment logic node among the multiple judgment logic nodes is generated based on the first text, the derivation elements corresponding to the first text, and the target rules. The first judgment logic node is used to indicate the conditions that the business needs to meet. The first conclusion node among the multiple conclusion nodes is used to indicate the business reasoning result, and the business corresponding to the business reasoning result satisfies the conditions indicated by the judgment logic node related to the first conclusion node.

[0091] After determining the derivation elements and target rules corresponding to each text in the business reasoning data, the execution device can generate a logical graph indicating the business reasoning process based on the business reasoning logic described in each text, the reasoning direction guided by the reasoning elements, and the constraints of the target rules, using a first model. Specifically, the execution device can generate a corresponding judgment logic node for each text in the business reasoning data, and the generated judgment logic nodes can maintain a tree-like connection relationship between the multiple texts.

[0092] For example, the first model can be a large language model. The execution device generates a logic graph using the first model, specifically including: the execution device first generates prompt words based on the first text, the derivation elements corresponding to the first text, and the target rule. The prompt words are used to instruct the first model to refer to the business reasoning logic described in the first text and the reasoning direction indicated by the derivation elements corresponding to the first text, and to generate the conditions that the business needs to meet based on the constraints described by the target rule corresponding to the first text. For example, the prompt words could specifically be: "Please refer to the reasoning content described in the following text, the reasoning direction indicated by the derivation elements, and the constraints of the target rule corresponding to the text to generate a judgment logic node in a tree-structured logic graph; where the text is XXX, the derivation element corresponding to the text is XXX, and the target rule corresponding to the text is XXX."

[0093] Then, the execution device inputs a prompt word into the first model to instruct the first model to generate the conditions that the business needs to meet based on the prompt word, and obtains the output result of the first model. Next, the execution device uses the output result of the first model as the condition indicated by the first judgment logic node, and generates the first judgment logic node in the logic graph.

[0094] In this solution, by leveraging the powerful semantic understanding capabilities of a large language model to integrate text, inference elements, and target rules, conditions that conform to the constraints of the target rules are generated. This enables the accurate generation of judgment logic nodes in the logic graph, ensuring the rationality of the constructed logic graph.

[0095] It should be noted that the tree-connected texts in business reasoning data often provide a brief description of the business reasoning logic. For example, multiple texts may be provided by users based on their business experience, and there may be incomplete or non-standard expressions of the reasoning logic. Therefore, by using the text and its corresponding derivation elements as guidance, and under the constraints of the target rules corresponding to the text, the execution device can generate accurate judgment logic nodes according to the target rules. Furthermore, these judgment logic nodes can indicate complete and standardized conditions, thereby achieving the generation of an accurate logic graph.

[0096] Furthermore, after generating the final layer of decision logic nodes, the execution device can generate a connected conclusion node for each decision logic node based on the target rule corresponding to each decision logic node in the final layer. This conclusion node indicates the business reasoning result under the conditions indicated by all decision logic nodes related to the conclusion node. Of course, the business reasoning data can also include multiple conclusion texts, each indicating the business reasoning conclusion. In this case, the execution device can refer to the generation method of the decision logic nodes and generate a conclusion node based on each conclusion text and the target rule corresponding to the preceding text connected to the conclusion text in the business reasoning data.

[0097] Specifically, in enterprise business reasoning scenarios, business reasoning logic is often complex, long-chained, and dependent, making it difficult to generate all relevant business reasoning logic in one go using an AI model. Therefore, this solution provides the AI ​​model with corresponding reasoning logic and deductive elements indicating the direction of reasoning through multiple interconnected texts in a tree structure. Then, based on the given reasoning logic, the corresponding rules are retrieved. Finally, under the constraints of the rules, the AI ​​model generates corresponding judgment logic nodes for each text, thereby generating complete and standardized business reasoning logic that conforms to the actual reasoning scenario.

[0098] The logic graph generated by the first model is a tree-like connection graph, including multiple nodes connected by a tree structure. Simply put, the logic graph organizes objects in a parent-child hierarchical structure. Nodes in the logic graph can have parent nodes or child nodes. Furthermore, a parent node can have one or more child nodes, while each child node can only have one parent node. Among the multiple nodes in the logic graph, there are two types: decision logic nodes and conclusion nodes. Any decision logic node can have either a parent node or a child node. Conclusion nodes are leaf nodes in the logic graph and do not have child nodes.

[0099] In the logic graph, each decision logic node corresponds to a piece of text in the business reasoning data, and multiple decision logic nodes maintain a tree-like connection relationship with multiple texts to indicate the long chain and dependent business reasoning logic in the enterprise's business reasoning process. Each decision logic node is used to indicate the conditions that the business must meet during the business reasoning process, and different decision logic nodes indicate different conditions. That is, the decision logic node is actually used to indicate the decision logic in the business reasoning process to determine which conditions the business actually meets. The conclusion node is used to indicate the business reasoning result, and the business corresponding to the business reasoning result satisfies the conditions indicated by the decision logic nodes related to the conclusion node.

[0100] Optionally, the logic graph includes a tree-connected multi-level decision logic node, and each level of decision logic node may include one or more decision logic nodes. One derivation element in the first derivation element set corresponds to one or more decision logic nodes in the same level, and different decision logic nodes in the same level are used to indicate different conditions belonging to the same reasoning direction.

[0101] Of course, in some business reasoning scenarios, the logic graph can also include a layer of decision logic nodes. That is, the child nodes of the decision logic nodes in the logic graph are the conclusion nodes, and the decision logic nodes do not have parent nodes.

[0102] Furthermore, the conclusion node is a leaf node in the logic graph, and the decision logic nodes associated with the conclusion node include all decision logic nodes traversed from the root node to the leaf node. In other words, since the logic graph itself is a tree-like connection graph, a unique path is formed from the root node to the conclusion node, and all decision logic nodes on this path are the decision logic nodes associated with the conclusion node. Moreover, the business logic corresponding to the business reasoning result indicated by the conclusion node must satisfy the conditions indicated by all related decision logic nodes.

[0103] In summary, the execution device can generate a logic graph by traversing each node sequentially based on the first model. When generating each judgment logic node in the logic graph, it can be based on the input content corresponding to each judgment logic node (i.e., a text in the business reasoning data, the derivation element corresponding to the text, and the target rule corresponding to the text). This ensures the accuracy of the generation of each node in the logic graph and makes the logic graph gradually generated according to the reasoning logic. This ensures that the logic graph can reproduce the complex and long-chain dependent reasoning logic in the actual business reasoning scenario of the enterprise, and ensures the rationality of the reasoning logic of the logic graph.

[0104] For example, please refer to Figure 3, which is a schematic diagram of a generation logic graph provided in this application. As shown in Figure 3, taking the tax rate reasoning scenario as an example, the business reasoning data obtained by the execution device is used to describe the reasoning logic under the corporate income tax rate reasoning scenario. Furthermore, the business reasoning data may include multiple texts, and the multiple texts are organized and presented in the form of a mind map to represent the tree-like connection relationship between the multiple texts.

[0105] The first set of derivation elements obtained by the execution device includes four ordered derivation elements: taxable entity, country of income, source of income, and amount of income. The first set of rules obtained by the execution device consists of the corporate income tax laws and regulations of various countries.

[0106] Based on the acquired business reasoning data, the first set of derivation elements, and the first set of rules, the execution device can generate a logical graph for the tax rate reasoning scenario using the first model.

[0107] Please refer to Figure 4, which is a schematic diagram of a logic graph for a tax rate reasoning scenario provided in this application. As shown in Figure 4, the logic graph constructs the connection relationships between nodes in a tree-like manner, thereby creating multiple layers of judgment logic nodes and a single layer of conclusion nodes. Each judgment logic node at the same layer corresponds to the same derivation element, and the conditions indicated by each judgment logic node at the same layer are determined based on the reasoning direction indicated by the same derivation element.

[0108] For example, in the first-level judgment logic node of the logic graph, based on the tax rate reasoning scenario of corporate income tax described in the descriptive text and the derivation element of the tax base, the judgment logic node "tax base is enterprise" can be generated as the root node, representing that the tax base of this logic graph is an enterprise.

[0109] In the second-level judgment logic node of the logic graph, based on the first-level judgment logic node, two judgment logic nodes can be generated according to the descriptive text, the inference element of the country of income, and the established laws and regulations, namely "income comes from country A" and "income comes from country B", indicating that the reasoning direction is the country of income.

[0110] Similarly, the third-level judgment logic nodes in the logic graph include judgment logic nodes such as "revenue from sales of goods", "revenue from donations received", and "revenue from providing services", which are used to indicate that the reasoning direction is the company's revenue source. The fourth-level judgment logic nodes in the logic graph include judgment logic nodes such as "amount in range 1", "amount in range 2", "amount in range 3", and "amount in range 4", which are used to indicate that the reasoning direction is the size of the company's revenue amount.

[0111] The final node in the logic graph is the conclusion node. The conclusion node represents the specific tax rate of a company's revenue when it meets the conditions indicated by the relevant judgment logic nodes. Taking the first conclusion node as an example, this node indicates that the company's tax rate is 1. Furthermore, from the root node of the logic graph to this conclusion node, the path sequentially passes through the judgment logic nodes for "taxable entity is a company," "company revenue originates from country A," "revenue from sales of goods," and "amount falls within the range of 1." Therefore, the business matching this conclusion node must satisfy the conditions indicated by all the judgment logic nodes along the above path. In other words, assuming a business is revenue A, we need to deduce the tax rate corresponding to revenue A. If revenue A satisfies the following conditions: the taxable entity is a company (i.e., revenue A is company revenue), revenue A originates from country A, revenue A is revenue from sales of goods, and the amount of revenue A falls within the range of 1, then we can deduce that the tax rate for revenue A is 1.

[0112] The above describes the process of automatically generating a logic graph using a first model. In some examples, to ensure the correctness of the reasoning logic in the final generated logic graph, the execution device can further verify the logic graph based on the model to correct some problems in the initially generated logic graph.

[0113] For example, after generating a logic graph based on the first model, the execution device can verify, using the second model, whether the reasoning logic of the first judgment logic node in the logic graph is consistent with the target reasoning logic, based on the first text and its corresponding derivation elements. The target reasoning logic is the reasoning logic embodied by the first text and its corresponding derivation elements. The second model can be a large language model. Furthermore, the first model and the second model can be the same model or different models.

[0114] For example, the execution device can generate a prompt word based on the first text used to generate the first judgment logic node, the derivation element corresponding to the first text, and the conditions in the first judgment logic node. This prompt word is used to indicate whether the reasoning logic indicated by the first text and the derivation element corresponding to the first text is consistent with the reasoning logic corresponding to the conditions in the first judgment logic node. Then, the execution device inputs the prompt word into the second model, which processes the prompt word to obtain the verification result.

[0115] It should be understood that due to the illusion problem inherent in AI models, even though the first model is provided with the first text, its corresponding derivation elements, and the target rule when generating the first judgment logic node, it may still generate incorrect content. For example, if the target rule includes a lot of content, and only some of that content is related to the first text and its corresponding derivation elements, the first model might generate the first judgment logic node based on other content in the target rule that is unrelated to the first text, leading to incorrect reasoning logic in the first judgment logic node. In such cases, instructing the second model to judge from a review perspective whether the reasoning logic indicated by the first text and its corresponding derivation elements is consistent with the reasoning logic of the first judgment logic node can often reveal problems with the first judgment logic node, thereby verifying the generated content.

[0116] If the logic graph passes the verification, the execution device can consider the reasoning logic of the generated logic graph to be reasonable, and then feed the logic graph back to the user to complete the construction of the logic graph.

[0117] If the logic diagram verification fails, the execution device can obtain the correction suggestions provided by the second model for the logic diagram. For example, when the execution device verifies the logic diagram using the second model, it can use prompts to instruct the second model to provide corresponding correction suggestions when it determines that the logic diagram verification has failed.

[0118] Then, based on the correction suggestions output by the second model, the execution device corrects the logic graph using the first model. For example, the execution device constructs prompt words based on the correction suggestions output by the second model, and then instructs the first model to correct the logic graph based on the correction suggestions to obtain the corrected logic graph.

[0119] For example, if the first judgment logic node fails verification, the execution device corrects the first judgment logic node based on the correction opinion output by the second model, using the first model. The correction opinion indicates that the first judgment logic node should be corrected by prioritizing the target content in the target rule corresponding to the first text. The target content in the target rule is the content identified by the second model that is related to the first text and its corresponding derived elements.

[0120] When revising the first judgment logic node using the first model, the execution device can generate prompts based on the revision suggestions to instruct the first model to revise the first judgment logic node accordingly. That is, when generating the initial first judgment logic node, the first model might have generated it based on content in the target rule that is unrelated to the first text and its corresponding derived elements. Therefore, when revising the first judgment logic node, the first model needs to focus on regenerating the conditions in the first judgment logic node based on the target content in the target rule that is related to the first text and its corresponding derived elements, thereby ensuring the accuracy of the revised first judgment logic node.

[0121] That is, when generating the first judgment logic node in the logic graph, if the target rule corresponding to the first judgment logic node contains a lot of content, then when generating the conditions for the first judgment logic node through the first model, it may generate incorrect conditions based on some content in the target rule that is irrelevant to the first text. In this case, by using the second model to verify the reasoning logic of the first judgment logic node and provide correction suggestions, the first model can be instructed to correct the first judgment logic node based on the correct content in the target rule, ensuring the correctness of the first judgment logic node generated by the first model.

[0122] Of course, after the first model corrects the logic graph, the execution device can continue to verify the corrected logic graph using the second model, and repeat the verification-correction process until the corrected logic graph passes verification. Specifically, when the verification result of the second model shows that the reasoning logic indicated by each judgment logic node in the logic graph is consistent with the text and derivation elements corresponding to the judgment logic node, the execution device can consider the corrected logic graph to have passed verification.

[0123] In this scheme, a model self-verification mechanism is introduced during the construction of the logic graph. This mechanism guides the model to perform verification on the generated logic graph and provide corresponding correction suggestions, which ensures the reliability of the final constructed logic graph. This enables automated generation of logic graphs and improves the construction efficiency of logic graphs.

[0124] For example, please refer to Figure 5, which is a schematic diagram of a logic graph generation process provided by this application. As shown in Figure 5, the execution device can obtain the mind map (i.e., the aforementioned business reasoning data), the derivation element set, and the regulatory set (i.e., the aforementioned first rule set) provided by the user. The mind map can be a tree diagram, and each node in the tree diagram corresponds to a derivation element in the derivation element set. Therefore, based on the text content of each node in the tree diagram and the corresponding derivation element, the execution device can determine the regulatory rule corresponding to the text of each node in the tree diagram from the regulatory set.

[0125] Then, following the order of the derivation elements in the derivation element set, the execution device can combine the text content, derivation elements, and corresponding regulations of each node in the mind map to generate judgment logic nodes layer by layer through a large language model. Furthermore, based on the generated judgment logic nodes and regulations, the execution device can generate corresponding conclusion nodes through the large language model, thereby obtaining a logic graph composed of judgment logic nodes and conclusion nodes.

[0126] Secondly, after the initial generation of the logic graph, the execution device uses the same large language model or another large language model to verify whether the reasoning logic of the logic graph is consistent with the reasoning logic indicated by the mind map and the set of derivation elements. If the logic graph passes the logic consistency check, it can be output. If the logic graph fails the logic consistency check, the execution device corrects the judgment logic nodes based on the correction suggestions output by the large language model, so as to regenerate the judgment logic nodes. For example, the execution device can instruct the large language model to re-execute the logic graph generation process based on the correction suggestions to complete the correction of the logic graph. Of course, the corrected logic graph needs to continue to undergo logic consistency checks until it passes the logic consistency check before the final generated logic graph can be output.

[0127] In some cases, the rules used to construct logic graphs may change over time. In such cases, the logic graphs constructed based on the original rules are often no longer applicable and need to be adjusted to incorporate the new rules. Therefore, this application also provides a scheme for updating logic graphs.

[0128] For example, the execution device can acquire a second set of derivation elements and a second set of rules, both of which are used to update the logic graph. Both the second set of derivation elements and the second set of rules can be newly provided input information from the user to facilitate the updating of the logic graph. As another example, the second set of derivation elements and the second set of rules can also be updated data acquired by the execution device through other systems, or they can be updated data obtained by training a large model based on updated policies or rules of the enterprise.

[0129] Compared to the first rule set, the rules included in the second rule set have changed; for example, new rules have been added, some rules have been deleted, or some rules have been updated. Similarly, compared to the first derivation element set, the derivation elements included in the second derivation element set may have changed; for example, new derivation elements have been added, some derivation elements have been deleted, or some derivation elements have been updated. Of course, compared to the first derivation element set, the second derivation element set may also remain unchanged; for example, if only some rules in the second rule set are updated, the derivation elements on which the logic graph depends remain unchanged, so the second derivation element set may not have changed compared to the first derivation element set. Then, based on the second derivation element set and the second rule set, the execution device can update the logic graph using the first model to obtain the updated logic graph.

[0130] Specifically, since the business reasoning scenario of the logic graph has not actually changed, but the derivation elements may have changed due to rule changes, updating the logic graph only requires adapting to the original reasoning logic based on the new set of derivation elements and the new set of rules. This achieves adaptive updating of the logic graph under the new rules.

[0131] Generally speaking, for any layer of decision logic node in the logic graph, there may be two situations where an update needs to be performed.

[0132] Case 1: The derivation elements corresponding to the judgment logic node have not changed, but the rules corresponding to the judgment logic node have changed, which means that the conditions indicated by the judgment logic node need to be updated.

[0133] Specifically, if the derivation elements corresponding to a first-level judgment logic node remain unchanged but the rules change, it means that the reasoning direction of this first-level judgment logic node has not changed, but the specific reasoning content has changed. Therefore, it is necessary to adaptively update the conditions indicated by this first-level judgment logic node.

[0134] For example, during the update of the logic graph, the execution device selects a second derivation element from the second derivation element set and determines the judgment logic node corresponding to the second derivation element in the logic graph, wherein both the first and second derivation element sets include the second derivation element. That is, the second derivation element is a derivation element that has not changed.

[0135] Then, the execution device can determine the rule corresponding to the second derivation element in the second rule set, and based on the rule corresponding to the second derivation element in the second rule set, update the condition indicated by the judgment logic node corresponding to the second derivation element in the logic graph. The rule corresponding to the second derivation element in the second rule set is different from the rule corresponding to the second derivation element in the first rule set.

[0136] Updating the judgment logic node corresponding to the second derivation element in the logic graph can specifically involve adding a new judgment logic node, deleting some of the original judgment logic nodes, or updating the content of some or all of the judgment logic nodes.

[0137] Please refer to Figure 6, which is a schematic diagram of a judgment logic node in an updated logic graph provided in this application. As shown in Figure 6, in the logic graph, the derivation element corresponding to the second-level judgment logic node has not changed and remains "personal identity". Before the logic graph is updated, the two judgment logic nodes in the second-level judgment logic node indicate "citizen of country A" and "not a citizen of country A", respectively. Even though the derivation element corresponding to the second-level judgment logic node has not changed, the regulations corresponding to the second-level judgment logic node have changed. Therefore, the execution device needs to update the conditions indicated in the second-level judgment logic node based on the new regulations. For example, the execution device modifies the content of the first judgment logic node in the second-level judgment logic node to "citizen of country A and has actual connection with XX".

[0138] In this scheme, when the rules change but the derivation elements remain unchanged, the execution device updates the node content in the logic graph based on the guidance of the derivation elements and the constraints of the new rules, thereby realizing the adaptive update of the logic graph following the rules and ensuring the applicability of the logic graph.

[0139] Scenario 2: The derivation elements corresponding to the judgment logic node change, so the rules corresponding to the judgment logic node also change, resulting in the need to regenerate the judgment logic nodes of the entire layer.

[0140] Specifically, for multi-layer judgment logic nodes in a logic graph, if a derivation element corresponding to any layer of judgment logic node changes, it means that the reasoning direction of this layer of judgment logic node has changed, and the original layer of judgment logic node is often no longer applicable. Therefore, the execution device needs to regenerate a new layer of judgment logic node.

[0141] For example, during the update of the logic graph, the execution device selects a third derivation element from the second derivation element set and determines the judgment logic node corresponding to the third derivation element in the logic graph. The judgment logic node corresponding to the third derivation element corresponds to the fourth derivation element in the first derivation element set. That is, for the judgment logic node corresponding to the third derivation element, the derivation element corresponding to this layer of judgment logic node has changed (from the original fourth derivation element to the third derivation element).

[0142] Then, based on the rule corresponding to the third derivation element in the second rule set, the execution device generates a new judgment logic node in the logic graph. This new judgment logic node replaces the judgment logic node corresponding to the third derivation element. That is, because the derivation element of this layer of judgment logic nodes in the logic graph has changed, the execution device can directly regenerate a new layer of judgment logic nodes based on the new derivation element and rules, instead of updating the original judgment logic nodes, thus ensuring the accuracy of the newly generated judgment logic nodes.

[0143] Please refer to Figure 7, which is a schematic diagram of another update logic graph provided in this application for the judgment logic nodes. As shown in Figure 7, in the logic graph, the derivation element corresponding to the second-level judgment logic node has changed from "personal identity" to "asset transfer status". Furthermore, before the logic graph update, the two judgment logic nodes in the second-level judgment logic node indicated "citizen of country A" and "not a citizen of country A", respectively. Because the derivation element corresponding to the second-level judgment logic node has changed, the execution device needs to generate a new layer of judgment logic nodes based on the new derivation element and the rules corresponding to the derivation element to replace the original layer of judgment logic nodes. For example, the execution device deletes the two judgment logic nodes in the second-level judgment logic node and generates two new judgment logic nodes. The contents of the two new judgment logic nodes are: "asset transfer occurred" and "asset transfer did not occur", respectively.

[0144] In this scheme, when the derivation elements change, the execution device regenerates new nodes to replace the original nodes in the logic graph based on the guidance of the new derivation elements and the constraints of the new rules. This enables the logic graph to be updated adaptively according to the rules, ensuring the applicability of the logic graph.

[0145] To facilitate understanding, the following will provide a detailed explanation of the construction and updating process of the logic graph using specific examples.

[0146] Please refer to Figure 8, which is a schematic diagram of a system architecture for processing logic graphs provided in this application. As shown in Figure 8, the system architecture for processing logic graphs may include a modeling module and an updating module. The modeling module is responsible for constructing the logic graph, while the updating module is responsible for updating the generated logic graph.

[0147] Specifically, the input data for the modeling module can be, for example, a mind map, a set of derivation elements, and a set of regulations provided by the user. The mind map describes the business reasoning scenario. Optionally, the mind map may also include multiple sub-texts corresponding to each derivation element in the set of derivation elements, with each sub-text describing the business reasoning content related to the derivation element. The set of derivation elements may include multiple ordered derivation elements, each indicating the direction of business reasoning. The set of regulations includes various regulations required during the business reasoning process. Combining the mind map, the set of derivation elements, and the set of regulations, the modeling module can sequentially determine the judgment logic nodes and conclusion nodes in the logic graph using a large language model, thereby constructing the logic graph. Specifically, the process of the modeling module constructing the logic graph can be referred to the embodiment corresponding to Figure 5 above, and will not be repeated here.

[0148] In the update module, to achieve automated updating of the logic graph, the execution device can collaboratively complete the update using multiple pre-defined agents. As shown in Figure 8, the update module includes Agent 1, Agent 2, and Agent 3. Agent 1 is responsible for task planning, i.e., providing a plan to complete the logic graph update task. Specifically, it can assign tasks to Agent 2 and Agent 3 during the logic graph update process. For example, Agent 2's task is to update the logic graph based on the new set of derivation elements and the new set of regulations, thereby generating corresponding derivation results. Agent 3's task is to evaluate the derivation results generated by Agent 2 and provide feedback on the evaluation results to Agent 2, enabling Agent 2 to make corresponding adjustments based on the evaluation results. For Agent 2 and Agent 3, they can rely on the same large language model or different large language models to complete their respective tasks, and they can explicitly output their thought processes during task execution, making the reasoning process visual and interpretable. Of course, in some embodiments, the execution device may also use two or more agents to update the logic graph, as long as one agent generates the updated logic graph and the other agent verifies the updated logic graph.

[0149] Please refer to Figure 9, which is a schematic diagram of a logic graph update process provided in this application. As shown in Figure 9, after agent 1 assigns corresponding tasks to agent 2 and agent 3 respectively, the process of agent 2 and agent 3 collaboratively updating the logic graph includes the following steps S1-S9.

[0150] S1, Agent 2 retrieves the remaining unprocessed derivation elements from the new set of derivation elements.

[0151] In this application, when agent 2 performs the task of updating the logic graph, it first obtains the logic graph to be updated, the new set of derivation elements, and the new set of regulations. Agent 2 needs to complete the update of the logic graph based on the new set of derivation elements and the new set of regulations.

[0152] During the process of agent 2 updating the logic graph, agent 2 takes out the derivation elements one by one from the new derivation element set as the derivation elements corresponding to the next layer of judgment logic nodes, thereby realizing the orderly update of each layer of judgment logic nodes in the logic graph.

[0153] Therefore, each time agent 2 updates a layer of judgment logic node in the logic graph, agent 2 will obtain the remaining unprocessed derivation elements (i.e. derivation elements that have been used to perform logic graph updates) from the new set of derivation elements based on the derivation elements that have been used (i.e. derivation elements that have been used to perform logic graph updates).

[0154] S2, Agent 2 will use the remaining derivation elements one by one as the next derivation elements.

[0155] If the user does not specify the order of the derivation elements in the new set of derivation elements, then agent 2 cannot determine the derivation elements required for each layer of judgment logic node in the logic graph. Therefore, agent 2 can use each of the remaining unused derivation elements as the derivation elements for the next layer to update the layer of judgment logic node in the logic graph, so that the most reasonable derivation element can be selected as the derivation element corresponding to the judgment logic node of that layer.

[0156] Specifically, agent 2 can start updating the logic graph from the root node and proceed layer by layer. Therefore, when agent 2 begins updating the root node, no derivation elements are currently used in the new set of derivation elements. Agent 2 then selects one derivation element from the new set as the derivation element corresponding to the root node. After agent 2 has updated one or more layers of nodes in the logic graph, some derivation elements are currently used in the new set. Therefore, agent 2 selects one of the remaining derivation elements as the next derivation element.

[0157] It should be noted that if the user provides the order of each derivation element in the new derivation element set, the agent can directly select the corresponding derivation element as the next derivation element in sequence according to the order of each derivation element to realize the update of the next layer of judgment logic node, without having to use all the remaining derivation elements as the next derivation element to perform node update.

[0158] S3, the agent determines whether the derivation element is consistent with the original derivation element corresponding to the node in the logic graph.

[0159] When a certain derivation element is selected as the derivation element corresponding to a certain layer node in the logic graph, agent 2 can determine whether the derivation element selected from the new derivation set is consistent with the derivation element originally corresponding to this layer node in the logic graph.

[0160] S4. If the derivation element is inconsistent with the original derivation element corresponding to the node in the logic graph, agent 2 generates a new judgment logic node according to the new regulations.

[0161] If the derivation element selected from the new derivation set is inconsistent with the derivation element originally corresponding to this layer of the logic graph, it means that the derivation direction has changed and the original layer of the logic graph is no longer applicable. Therefore, agent 2 can determine the new law corresponding to the selected derivation element from the new law set, and generate a new layer of judgment logic node based on the new derivation element and the new law to replace the original layer of judgment logic node.

[0162] S5, if the derivation element is consistent with the original derivation element corresponding to the node in the logic graph, agent 2 determines whether the old and new regulations corresponding to the derivation element are consistent.

[0163] If the derivation element selected from the new derivation set is consistent with the derivation element originally corresponding to this layer of the logic graph, it means that the derivation direction has not changed. Agent 2 can determine the new law corresponding to the selected derivation element from the new law set and judge whether the new law is consistent with the old law originally corresponding to this layer of judgment logic node.

[0164] S6, if the old and new regulations corresponding to the derivation elements are consistent, the judgment logic node in the logic graph of agent 2 remains unchanged.

[0165] Specifically, if the derivation element corresponding to a layer of judgment logic node in the logic graph remains unchanged, and the old and new regulations corresponding to the derivation element are also consistent, then agent 2 can determine that this layer of judgment logic node in the logic graph remains unchanged, that is, there is no need to update this layer of judgment logic node.

[0166] S7. If the old and new regulations corresponding to the derivation elements are inconsistent, agent 2 updates the judgment logic node based on the new regulations.

[0167] Specifically, agent 2 can update the entire layer of judgment logic nodes based on the derivation elements corresponding to the current layer of judgment logic nodes and new regulations, such as adding judgment logic nodes, deleting judgment logic nodes, or modifying the content of judgment logic nodes.

[0168] S8, Agent 3 judges whether the adjustment result of Agent 2 for a layer of logic node in the logic graph is reasonable.

[0169] After steps S4, S6 and S7 above, agent 2 will provide agent 3 with the adjustment results (no adjustment, update of judgment logic nodes or generation of new judgment logic nodes) for the first-level judgment logic nodes in the logic graph. Agent 3 will then judge whether the adjustment results of agent 2 for the first-level judgment logic nodes in the logic graph are reasonable.

[0170] Specifically, agent 3 can determine whether agent 2's adjustment result is reasonable based on the determined preceding nodes in the logic graph (one or more judgment logic nodes whose adjustment results are determined and located before the current judgment logic node) and the new set of regulations. For example, agent 3 can generate prompt words based on the content of the determined preceding nodes in the logic graph, the new set of regulations, and agent 2's adjustment result (i.e., the content of the adjusted layer of judgment logic nodes), and input the prompt words into the large language model to instruct the large language model to determine whether the reasoning logic indicated by the content of the adjusted layer of judgment logic nodes is consistent with the reasoning logic indicated by the determined preceding nodes in the logic graph and the new set of regulations. At this point, if the output of the large language model indicates that the reasoning logic indicated by the content of the adjusted first-level judgment logic node is consistent with the content of the determined preceding nodes in the logic graph and the reasoning logic indicated by the new set of regulations, then the adjustment result of agent 2 is reasonable; if the output of the large language model indicates that the reasoning logic indicated by the content of the adjusted first-level judgment logic node is inconsistent with the content of the determined preceding nodes in the logic graph and the reasoning logic indicated by the new set of regulations, then the adjustment result of agent 2 is unreasonable.

[0171] If agent 3 determines that agent 2's adjustment result is unreasonable, then agent 3 will report the unreasonableness to agent 2 and provide corresponding adjustment suggestions so that agent 2 can readjust according to the suggestions. These adjustment suggestions can be obtained by agent 3 when identifying the reasonableness of the adjustment result based on a large language model. Specifically, the adjustment suggestions can be to advise agent 2 to adjust the logic graph in response to the target content of the new regulations. Alternatively, the adjustment suggestions can be to advise agent 2 to adjust a certain layer of the logic graph's decision logic node based on other deductive elements.

[0172] S9. If agent 3 determines that agent 2's adjustment result is reasonable, then add the adjustment result to the result set and sort the adjustment results.

[0173] Because agent 2 updates each decision logic node at each level of the logic graph by sequentially using each remaining derivation element as the corresponding derivation element for that level of decision logic node, agent 2 can obtain one or more adjustment results for each level of decision logic node. At this point, agent 3 can add reasonable adjustment results to the result set and sort the results according to their reasonableness, allowing the user to select the best adjustment result. The result set records the various adjustment results (i.e., the updated logic graphs) generated by agent 2 based on the new set of derivation elements and verified as reasonable by agent 3. Furthermore, in the result set, all adjustment results are actually generated based on the same new set of derivation elements; only the different adjustment results are generated based on different orders of derivation elements.

[0174] For example, in the result set, adjustment result 1 is the updated logic graph obtained sequentially based on derivation element 1, derivation element 2, and derivation element 3, and the ordered multi-level judgment logic nodes in the updated logic graph correspond to derivation element 1, derivation element 2, and derivation element 3, respectively. Similarly, in the result set, adjustment result 2 is the updated logic graph obtained sequentially based on derivation element 1, derivation element 3, and derivation element 2, and the ordered multi-level judgment logic nodes in the updated logic graph correspond to derivation element 1, derivation element 3, and derivation element 2, respectively.

[0175] It should be noted that steps S1-S9 above describe the process by which agents 2 and 3 update a specific layer of the logic graph's decision logic node. In practical applications, agents 2 and 3 will repeatedly execute steps S1-S9 to update each layer of the logic graph's decision logic node and conclusion node sequentially, ultimately completing the update of the entire logic graph.

[0176] The method provided in this application has been described in detail above. Next, the device provided in this application for performing the above method will be described.

[0177] Please refer to Figure 10, which is a schematic diagram of the structure of a logic graph generation device provided in this application. As shown in Figure 10, the logic graph generation device includes: an acquisition module 1001, used to acquire business reasoning data, a first derivation element set, and a first rule set. The business reasoning data includes multiple texts connected in a tree structure, which are used to describe business reasoning logic. The first derivation element set includes multiple ordered derivation elements used to indicate the direction of reasoning. The first rule set includes rules on which the execution of the business reasoning process depends. A processing module 1002 is used to determine the target rules corresponding to the multiple texts in the first rule set based on the multiple texts and the derivation elements corresponding to the multiple texts. The multiple texts include a first text, and the target rule corresponding to the first text is determined based on the first text and the derivation elements corresponding to the first text. The elements are determined from multiple ordered derivation elements based on the position of the first text in multiple texts; the processing module 1002 is also used to generate a logic graph through the first model based on the multiple texts, the derivation elements corresponding to the multiple texts, and the target rules. The logic graph is a tree-like connection diagram including multiple judgment logic nodes and multiple conclusion nodes. The multiple judgment logic nodes correspond to multiple texts respectively, and the first judgment logic node among the multiple judgment logic nodes is generated based on the first text, the derivation elements corresponding to the first text, and the target rules. The first judgment logic node is used to indicate the conditions that the business needs to meet. The first conclusion node among the multiple conclusion nodes is used to indicate the business reasoning result, and the business corresponding to the business reasoning result satisfies the conditions indicated by the judgment logic node related to the first conclusion node.

[0178] In one possible implementation, multiple judgment logic nodes are divided into a tree-connected multi-level judgment logic node, and one derivation element in the first derivation element set corresponds to one or more judgment logic nodes in the same level of judgment logic nodes, and different judgment logic nodes in the same level of judgment logic nodes are used to indicate different conditions belonging to the same reasoning direction.

[0179] In one possible implementation, the first model is a large language model. The processing module 1002 is further configured to: generate prompt words based on the first text, the inference elements corresponding to the first text, and the target rules. The prompt words are used to indicate the business reasoning logic described by the first text and the reasoning direction indicated by the inference elements corresponding to the first text. Based on the constraint content described by the target rules corresponding to the first text, the conditions that the business needs to meet are generated. The prompt words are input into the first model to obtain the output result of the first model. The output result of the first model is used as the condition indicated by the first judgment logic node to generate the first judgment logic node in the logic graph.

[0180] In one possible implementation, the conclusion node is a leaf node in the logic graph, and the judgment logic nodes associated with the conclusion node include the judgment logic nodes traversed from the root node to the leaf node in the logic graph.

[0181] In one possible implementation, the processing module 1002 is further configured to: verify, based on the first text and the derivation elements corresponding to the first text, whether the reasoning logic of the first judgment logic node in the logic graph is consistent with the target reasoning logic through the second model, wherein the target reasoning logic is the reasoning logic embodied by the first text and the derivation elements corresponding to the first text; if the verification of the first judgment logic node fails, modify the first judgment logic node through the first model based on the modification opinions output by the second model, wherein the modification opinions are used to indicate that the first judgment logic node is modified by giving priority to the target content in the target rule corresponding to the first text.

[0182] In one possible implementation, the acquisition module 1001 is further configured to acquire a second set of derivation elements and a second set of rules, both of which are used to guide the updating of the logic graph; the processing module 1002 is further configured to update the logic graph through the first model based on the second set of derivation elements and the second set of rules, thereby obtaining the updated logic graph.

[0183] In one possible implementation, the processing module 1002 is further configured to: determine the judgment logic node corresponding to the second derivation element in the logic graph, wherein both the first derivation element set and the second derivation element set include the second derivation element; update the condition indicated by the judgment logic node corresponding to the second derivation element in the logic graph based on the rule corresponding to the second derivation element in the second rule set; wherein the rule corresponding to the second derivation element in the second rule set is different from the rule corresponding to the second derivation element in the first rule set.

[0184] In one possible implementation, the processing module 1002 is further configured to: determine the judgment logic node corresponding to the third derivation element in the logic graph, wherein the judgment logic node corresponding to the third derivation element corresponds to the fourth derivation element in the first derivation element set; and generate a new judgment logic node in the logic graph based on the rule corresponding to the third derivation element in the second rule set, wherein the new judgment logic node is used to replace the judgment logic node corresponding to the third derivation element.

[0185] In one possible implementation, the first set of rules includes regulations or pre-defined business rules.

[0186] In one possible implementation, the first model is a large language model.

[0187] Both the acquisition module 1001 and the processing module 1002 can be implemented in software or in hardware. For example, the implementation of the processing module 1002 will be described below. Similarly, the implementation of the acquisition module 1001 can be referenced to that of the processing module 1002.

[0188] As an example of a software functional unit, processing module 1002 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, module A may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0189] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0190] As an example of a hardware functional unit, the processing module 1002 may include at least one computing device, such as a server. Alternatively, the processing module 1002 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-chip (SoC), an offload card, an accelerator card, or any combination thereof.

[0191] The processing module 1002 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the processing module 1002 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the processing module 1002 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.

[0192] Please refer to Figure 11, which is a schematic diagram of a computing device provided in this application. The computing device 1100 shown in Figure 11 can be used to execute the logic diagram generation method provided in this embodiment. As shown in Figure 11, the computing device 1100 includes: a bus 1102, a processor 1104, a memory 1106, and a communication interface 1108. The processor 1104, the memory 1106, and the communication interface 1108 communicate with each other via the bus 1102. The computing device 1100 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 1100.

[0193] Bus 1102 can be a Peripheral Component Interconnect Express (PCIe) bus, or an Extended Industry Standard Architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. Bus 1102 can be divided into address bus, data bus, control bus, etc. Among them, the unified bus is also called the Lingqu bus. For ease of representation, only one line is used in Figure 11, but this does not mean that there is only one bus or one type of bus. Bus 1102 can include a path for transmitting information between various components of computing device 1100 (e.g., memory 1106, processor 1104, communication interface 1108).

[0194] The processor 1104 can be implemented using a central processing unit (CPU), a microprocessor (MP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system-on-chip (SoC), or any combination thereof.

[0195] The memory 1106 may include volatile memory, such as random access memory (RAM). The processor 1104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0196] The memory 1106 stores executable program code, and the processor 1104 executes the executable program code to implement the functions of the aforementioned acquisition module and processing module, thereby realizing the above-described method for generating the logic diagram. That is, the memory 1106 stores instructions for executing the method for generating the logic diagram.

[0197] The communication interface 1108 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 1100 and other devices or communication networks.

[0198] It should be understood that the computing device 1100 of this application is used to execute the method for generating the logic diagram as shown in Figures 2 to 9, and can correspond to the execution device in executing the method of this application. For the sake of brevity, it will not be described in detail here.

[0199] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0200] Please refer to Figure 12, which is a schematic diagram of a computing device cluster provided in this application. As shown in Figure 12, the computing device cluster includes at least one computing device 1100. The memory 1106 of one or more computing devices 1100 in the computing device cluster may store the same instructions for executing the logic diagram generation method.

[0201] In some possible implementations, the memory 1106 of one or more computing devices 1100 in the computing device cluster may also store partial instructions for executing the logic graph generation method. In other words, a combination of one or more computing devices 1100 can jointly execute the instructions for executing the logic graph generation method.

[0202] It should be noted that the memory 1106 in different computing devices 1100 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the data processing device. That is, the instructions stored in the memory 1106 of different computing devices 1100 can implement the functions of one or more of the aforementioned acquisition and processing modules.

[0203] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 13 illustrates one possible implementation. Figure 13 is also a schematic diagram of another computing device cluster structure provided in this application. As shown in Figure 13, in computing device cluster 1300, two computing devices 1100A and 1100B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 1106 in computing device 1100A stores instructions for executing the functions of the acquisition module. Simultaneously, the memory 1106 in computing device 1100B stores instructions for executing the functions of the processing module.

[0204] It should be understood that the functions of computing device 1100A shown in Figure 13 can also be performed by multiple computing devices 1100. Similarly, the functions of computing device 1100B can also be performed by multiple computing devices 1100.

[0205] It should be understood that the computing device 1100 or computing device cluster 1300 in this application can correspond to the logic diagram generation apparatus in FIG10 of this application, and can also correspond to the execution device that performs the logic diagram generation method in FIG2 of this application. Furthermore, the above-mentioned and other operations and / or functions of each module in the computing device 1100 or computing device cluster 1300 are respectively for implementing the corresponding flow of the logic diagram generation method in FIG2, and for the sake of brevity, will not be elaborated further here.

[0206] This application also provides a chip comprising a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in a storage unit to cause the chip within the electronic device to perform the methods described in the above embodiments. Optionally, the storage unit may be an in-chip storage unit, such as a register or cache. Alternatively, the storage unit may be an external storage unit located within a wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).

[0207] Specifically, please refer to Figure 14, which is a schematic diagram of the structure of a chip provided in this application. The chip can be represented as a neural processing unit (NPU), a graphics processing unit (GPU), or a tensor processing unit (TPU). The following description will use an NPU 1400 as an example. The NPU 1400 is mounted as a coprocessor on the host CPU, and tasks are assigned by the host CPU. The core of the NPU is the arithmetic circuit 1403, which is controlled by a controller 1404 to retrieve matrix data from memory and perform multiplication operations.

[0208] In some implementations, the arithmetic circuit 1403 internally includes multiple processing engines (PEs). In some implementations, the arithmetic circuit 1403 is a two-dimensional pulsating array. The arithmetic circuit 1403 can also be a one-dimensional pulsating array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1403 is a general-purpose matrix processor.

[0209] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1402 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1401 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is ​​stored in the accumulator 1408.

[0210] Unified memory 1406 is used to store input and output data. Weight data is directly transferred to weight memory 1402 via Direct Memory Access Controller (DMAC) 1405. Input data is also transferred to unified memory 1406 via DMAC.

[0211] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1409.

[0212] The Bus Interface Unit (BIU) 1410 is used by the instruction fetch memory 1409 to fetch instructions from external memory, and also by the memory access controller 1405 to fetch the original data of the input matrix A or the weight matrix B from external memory.

[0213] The DMAC is mainly used to move input data from external memory DDR to unified memory 1406, or to weight data to weight memory 1402, or to input data to input memory 1401.

[0214] The vector computation unit 1407 includes multiple arithmetic processing units that, when needed, further process the output of the computation circuit 1403, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.

[0215] In some implementations, the vector computation unit 1407 can store the processed output vector in the unified memory 1406. For example, the vector computation unit 1407 can apply a linear function, or a nonlinear function, to the output of the computation circuit 1403, such as performing linear interpolation on feature planes extracted from a convolutional layer, or, for example, accumulating a vector of values ​​to generate activation values. In some implementations, the vector computation unit 1407 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as activation input to the computation circuit 1403, for example, for use in subsequent layers of the neural network.

[0216] The instruction fetch buffer 1409 connected to the controller 1404 is used to store the instructions used by the controller 1404;

[0217] Unified memory 1406, input memory 1401, weighted memory 1402, and instruction fetch memory 1409 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.

[0218] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.

[0219] It should be understood that the chip in Figure 14 of this application may correspond to the logic diagram generation device in Figure 10 of this application, or be deployed on the computing device 1100 or computing device cluster 1300 of this application. Furthermore, the chip in Figure 14 of this application may correspond to the execution device that performs the logic diagram generation method in Figure 2 of this application. The above-mentioned and other operations and / or functions of each module in the chip respectively implement the corresponding flow of the logic diagram generation method in Figure 2, which will not be elaborated here for the sake of brevity. In addition, in this application, the chip structure is not limited to the chip structure shown in Figure 14, and may include more or fewer hardware structures to implement the functions of the method shown in Figure 2.

[0220] Referring to Figure 15, which is a schematic diagram of the structure of a computer-readable storage medium provided in this application. This application also provides a computer-readable storage medium in which, in some embodiments, the method disclosed in Figure 2 above can be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of art.

[0221] Figure 15 schematically illustrates a conceptual partial view of an example computer-readable storage medium arranged according to at least some of the embodiments shown herein, the example computer-readable storage medium including a computer program for executing computer processes on a computing device. In one embodiment, the computer-readable storage medium 1500 is provided using a signal bearer medium 1501. The signal bearer medium 1501 may include one or more program instructions 1502 that, when executed by one or more processors, can provide the functionality or part of the functionality described above with respect to Figure 2.

[0222] In some examples, the signal carrying medium 1501 may include a computer-readable medium 1503, such as, but not limited to, a hard disk drive, a compact disc (CD), a digital video disc (DVD), a digital magnetic tape, a memory, ROM, or RAM, etc.

[0223] In some embodiments, the signal-bearing medium 1501 may comprise a computer-recordable medium 1504, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, and so on. In some embodiments, the signal-bearing medium 1501 may comprise a communication medium 1505, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, and so on). Therefore, for example, the signal-bearing medium 1501 may be transmitted by a wireless communication medium 1505 (e.g., a wireless communication medium conforming to the IEEE 1202.X standard or other transmission protocols).

[0224] One or more program instructions 1502 may be, for example, computer-executable instructions or logical implementation instructions. In some examples, the computing device may be configured to provide various operations, functions, or actions in response to one or more program instructions 1502 conveyed to the computing device via a computer-readable medium 1503, a computer-recordable medium 1504, and / or a communication medium 1505.

[0225] It should be understood that the computer-readable storage medium 1500 in this application may be deployed on the logic diagram generation apparatus shown in FIG10, or on the computing device 1100 or computing device cluster 1300 of this application. In this way, the logic diagram generation apparatus, computing device 1100 or computing device cluster 1300 provided in this application implements the logic diagram generation method shown in FIG2 by reading one or more program instructions 1502 on the computer-readable storage medium 1500.

[0226] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0227] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods of the various embodiments of this application.

[0228] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0229] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, computer instructions can be transferred from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0230] The above are merely specific embodiments of this application. Any variations or substitutions conceived by those skilled in the art based on the specific embodiments provided in this application should be covered within the protection scope of this application.

Claims

1. A method of generating a logical map, characterized by, The method is executed by an execution device, and the method includes: Acquire business reasoning data, a first set of derivation elements, and a first set of rules. The business reasoning data includes multiple texts connected in a tree structure, which are used to describe business reasoning logic. The first set of derivation elements includes multiple ordered derivation elements used to indicate the direction of reasoning. The first set of rules includes rules on which the execution of the business reasoning process depends. Based on the plurality of texts and the derivation elements corresponding to the plurality of texts respectively, target rules corresponding to the plurality of texts are determined in the first rule set, wherein the plurality of texts include a first text, and the target rule corresponding to the first text is determined based on the first text and the derivation elements corresponding to the first text. The derivation elements corresponding to the first text are determined from a plurality of ordered derivation elements based on the position of the first text in the plurality of texts. Based on the multiple texts, the corresponding derivation elements and target rules, a logic graph is generated through a first model. The logic graph is a tree-like connection diagram including multiple judgment logic nodes and multiple conclusion nodes. The multiple judgment logic nodes correspond to the multiple texts respectively, and the first judgment logic node among the multiple judgment logic nodes is generated based on the first text, the corresponding derivation elements and target rules. The first judgment logic node is used to indicate the conditions that the business needs to meet. The first conclusion node among the multiple conclusion nodes is used to indicate the business reasoning result, and the business corresponding to the business reasoning result satisfies the conditions indicated by the judgment logic node related to the first conclusion node.

2. The method of claim 1, wherein, The multiple judgment logic nodes are divided into a tree-connected multi-layer judgment logic node. One derivation element in the first derivation element set corresponds to one or more judgment logic nodes in the same layer of judgment logic nodes. Different judgment logic nodes in the same layer of judgment logic nodes are used to indicate different conditions belonging to the same reasoning direction.

3. The method of claim 2, wherein, The first model is a large language model, and the generation of a logical graph through the first model includes: Based on the first text, the derivation elements corresponding to the first text, and the target rule, prompt words are generated. The prompt words are used to indicate the business reasoning logic described by the first text and the reasoning direction indicated by the derivation elements corresponding to the first text in the first model. Based on the constraint content described by the target rule corresponding to the first text, the conditions that the business needs to meet are generated. Input the prompt word into the first model to obtain the output result of the first model; The output of the first model is used as the condition indicated by the first judgment logic node, and the first judgment logic node is generated in the logic graph.

4. The method according to any one of claims 1 to 3, characterized in that, The conclusion node is a leaf node in the logic graph, and the judgment logic nodes associated with the conclusion node include the judgment logic nodes traversed from the root node in the logic graph to the leaf node.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Based on the first text and the derivation elements corresponding to the first text, the second model is used to verify whether the reasoning logic of the first judgment logic node in the logic graph is consistent with the target reasoning logic. The target reasoning logic is the reasoning logic embodied by the first text and the derivation elements corresponding to the first text. If the first judgment logic node fails the verification, the first judgment logic node is corrected based on the correction opinion output by the second model, wherein the correction opinion is used to indicate that the first judgment logic node is corrected by giving priority to the target content in the target rule corresponding to the first text.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Obtain a second set of derivation elements and a second set of rules, both of which are used to guide the updating of the logic graph; Based on the second set of derivation elements and the second set of rules, the logic graph is updated using the first model to obtain the updated logic graph.

7. The method of claim 6, wherein, The step of updating the logical graph through the first model includes: In the logic graph, the judgment logic node corresponding to the second derivation element is determined, and both the first derivation element set and the second derivation element set include the second derivation element; Based on the rule corresponding to the second derivation element in the second rule set, update the condition indicated by the judgment logic node corresponding to the second derivation element in the logic graph; The rule corresponding to the second derivation element in the second rule set is different from the rule corresponding to the second derivation element in the first rule set.

8. The method according to claim 6 or 7, characterized in that, The step of updating the logical graph through the first model includes: In the logic graph, the judgment logic node corresponding to the third derivation element is determined, and the judgment logic node corresponding to the third derivation element corresponds to the fourth derivation element in the first set of derivation elements; Based on the rule corresponding to the third derivation element in the second rule set, a new judgment logic node is generated in the logic graph, and the new judgment logic node is used to replace the judgment logic node corresponding to the third derivation element.

9. The method according to any one of claims 1 to 8, characterized in that, The first set of rules includes regulations or pre-defined business rules.

10. The method according to any one of claims 1 to 9, characterized in that, The first model is a large language model.

11. An apparatus for generating a logical map, characterized by include: The acquisition module is used to acquire business reasoning data, a first set of derivation elements, and a first set of rules. The business reasoning data includes multiple texts connected in a tree structure, which are used to describe business reasoning logic. The first set of derivation elements includes multiple ordered derivation elements used to indicate the direction of reasoning. The first set of rules includes the rules on which the business reasoning process depends. The processing module is configured to determine the target rules corresponding to the multiple texts in the first rule set based on the multiple texts and the derivation elements corresponding to the multiple texts respectively, wherein the multiple texts include a first text, and the target rule corresponding to the first text is determined based on the first text and the derivation elements corresponding to the first text. The derivation elements corresponding to the first text are determined from multiple ordered derivation elements based on the position of the first text in the multiple texts. The processing module is further configured to generate a logic graph through a first model based on the plurality of texts, the inference elements corresponding to the plurality of texts, and the target rules. The logic graph is a tree-like connection diagram including a plurality of judgment logic nodes and a plurality of conclusion nodes. The plurality of judgment logic nodes correspond to the plurality of texts respectively, and the first judgment logic node among the plurality of judgment logic nodes is generated based on the first text, the inference elements corresponding to the first text, and the target rules. The first judgment logic node is used to indicate the conditions that the business needs to meet. The first conclusion node among the plurality of conclusion nodes is used to indicate the business reasoning result, and the business corresponding to the business reasoning result satisfies the conditions indicated by the judgment logic node related to the first conclusion node.

12. A computing device, comprising: The device includes a memory and a processor; the memory stores code, and the processor is configured to execute the code, wherein when the code is executed, the computing device performs the method as described in any one of claims 1 to 10.

13. A cluster of computing devices, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the operational steps of the method as described in any one of claims 1 to 10.

14. A chip system, characterized by The chip system includes a processor and a communication interface, the communication interface being used to communicate with modules outside the chip system, and the processor being used to execute the method as described in any one of claims 1 to 10.

15. A computer storage medium, comprising, The computer storage medium stores instructions that, when executed by the computer, cause the computer to perform the method according to any one of claims 1 to 10.

16. A computer program product, characterised in that, The computer program product stores instructions that, when executed by a computer, cause the computer to perform the method described in any one of claims 1 to 10.