Service inference method and related apparatus
By automating business reasoning using AI models and logic graphs in enterprises, the problem of relying on expert experience for complex business reasoning has been solved, improving efficiency and accuracy and enhancing the analytical capabilities of AI models.
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
Enterprises rely heavily on expert experience in complex business reasoning scenarios, resulting in low efficiency in business reasoning and making it difficult to meet the needs of business development.
The AI model is used to perform business reasoning based on the logic graph. By acquiring factual data, determining the reasoning path in the logic graph, and using a large language model and rule engine to automatically determine whether the judgment node conditions are met, automated business reasoning is achieved.
It improves the efficiency and accuracy of business reasoning, enhances the analytical reasoning capabilities of AI models in specific business scenarios, and ensures the interpretability and rule compliance of business reasoning results.
Smart Images

Figure CN2025130828_02072026_PF_FP_ABST
Abstract
Description
A business reasoning method and related apparatus
[0001] This application claims priority to two Chinese patent applications filed with the State Intellectual Property Office on December 27, 2024, application number 202411981738.0, entitled "A Professional Domain Analysis and Decision-Making Method and Related Equipment Based on Enterprise Logic Graph" and on March 28, 2025, application number 202510389823.6, entitled "A Business Reasoning Method and Related Device", 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 business reasoning method and related apparatus. Background Technology
[0003] With the development of information technology, enterprises, schools, and other institutions often need to analyze and reason about large amounts of business data in their daily operations to obtain the results. For example, in a company's tax rate calculation scenario, the company may need to calculate the tax rate corresponding to each income from different sources. Another example is in a company or school's code review scenario, where the company or school needs to review whether the generated code is up to standard.
[0004] Taking enterprises as an example, in business reasoning scenarios, the internal and external business rules and logic of an enterprise often have clear and rigorous expressions, with explicit analytical steps and dependencies. The reasoning chain is long and complex, sometimes even involving complex analytical logic such as logical judgments and calculations. Therefore, current business reasoning scenarios usually rely on experts to complete them. For example, in the scenario of calculating enterprise tax rates, the tax rate corresponding to each revenue in the enterprise is analyzed and reasoned by specialized financial personnel within the enterprise.
[0005] Currently, complex business reasoning scenarios in enterprises heavily rely on expert experience, requiring experts to manually perform business reasoning, resulting in low efficiency and difficulty in meeting the business development needs of enterprises. Summary of the Invention
[0006] This application provides a business reasoning method, a business reasoning apparatus, a computer-readable storage medium, a computer program product, a chip, a computer device, and a computer device cluster, which can effectively improve the efficiency of business reasoning.
[0007] Firstly, a business reasoning method is provided, applied to using AI models to perform business reasoning based on logical graphs. The business reasoning method includes: executing a device to acquire a business analysis task, which instructs the analysis of the target business based on factual data related to the target business. The factual data related to the target business can be factual data generated by the enterprise during its operations, and this factual data is relevant to the target business.
[0008] Then, based on the business scenario to which the target business belongs, the execution device determines the logical graph used to perform the business analysis task. The logical graph is a tree-like connection diagram including multiple nodes, such as judgment nodes and conclusion nodes. Judgment nodes indicate the conditions that the business must meet, while conclusion nodes indicate the business analysis result. The business corresponding to the analysis result satisfies the conditions indicated by the judgment nodes related to the conclusion nodes. The logical graph also records the methods for obtaining data related to the judgment nodes from the factual data. That is, the execution device can obtain the data related to the judgment nodes based on the data acquisition methods recorded in the logical graph, and then combine the obtained data to determine whether the conditions indicated by the judgment nodes are met.
[0009] Secondly, the execution device uses an AI model to determine the reasoning path of the target business in the logic graph. The reasoning path is the path from the root node of the logic graph to the target conclusion node, and the factual data satisfies the conditions indicated by the judgment nodes on the reasoning path.
[0010] Finally, the execution device obtains the target analysis result corresponding to the target business according to the reasoning path. The target analysis result is the business analysis result indicated by the target conclusion node.
[0011] In this solution, during business reasoning, a logic graph is first located based on the business scenario to which the target business belongs. The logic graph includes judgment nodes indicating the conditions that business objects must meet and conclusion nodes indicating the business reasoning results. It also records the methods for obtaining factual data related to the judgment nodes. Therefore, during business reasoning, the conclusion node corresponding to the target business can be located by obtaining the relevant factual data and determining the judgment nodes that the target business must meet, thus obtaining the business reasoning result. Furthermore, based on the methods for obtaining the judgment node-related data recorded in the logic graph, the factual data involved in the judgment nodes in the logic graph can be accurately obtained, ensuring that business reasoning can be executed automatically and reliably, effectively improving the efficiency of business reasoning. Moreover, by using the logic graph as the framework and knowledge supplement for AI model analysis and reasoning, the interpretability of AI model reasoning and the compliance with internal and external rule logic can be improved, thereby enhancing the AI model's analytical reasoning capabilities in specific business scenarios.
[0012] In one possible implementation, the logic graph comprises a tree-connected multi-layered decision node. The execution device starts from the root node of the logic graph and, through an AI model, determines the decision node corresponding to the target service layer by layer within the multi-layered decision node, thus obtaining the inference path. The inference path includes the decision node corresponding to the target service within the multi-layered decision node, and the factual data related to the target service satisfies the conditions indicated by the corresponding decision node.
[0013] In this solution, when performing business reasoning, the execution device instructs the AI model to start from the root node and reason along the tree-like connections in the logic graph, thereby transforming complex analytical reasoning problems into simple, multi-step reasoning at each level, ensuring the accuracy of the final business reasoning result.
[0014] In one possible implementation, during the process of determining the judgment node corresponding to the business data layer by layer among multiple judgment nodes using an AI model, the execution device obtains the target judgment node corresponding to the target business in the first target layer judgment node, where the first target layer judgment node is one layer in the multi-layer judgment node system. Then, the execution device determines multiple candidate judgment nodes connected to the target judgment node in the second target layer judgment node, where the second target layer judgment node is the layer following the first layer judgment node. Furthermore, based on the conditions indicated by the multiple candidate judgment nodes, the execution device uses the AI model to determine the judgment node corresponding to the target business among the multiple candidate judgment nodes.
[0015] In other words, after the execution device has determined the target judgment node corresponding to the business data in the first target layer judgment node, when processing the subsequent second target layer judgment node, the execution device does not necessarily need to use all judgment nodes in the second target layer judgment node as input to determine the judgment node corresponding to the target business. The execution device only uses the judgment nodes connected to the target judgment nodes in the first target layer judgment node as candidate nodes, thereby further determining the judgment node corresponding to the target business from these candidate nodes, narrowing down the range of nodes to be determined, and thus improving the efficiency of the AI model in executing business inference.
[0016] In one possible implementation, the AI model is a large language model. When determining the inference path, the execution device first generates a prompt word based on the conditions indicated by the first decision node in the logic graph and the related data of the first decision node. The prompt word is used to instruct the AI model to determine whether the target business meets the conditions in the prompt word. Then, the execution device inputs the prompt word into the AI model and obtains the output result of the AI model. This output result is used to determine whether to add the first decision node to the inference path.
[0017] In this solution, prompt words for a large language model are constructed based on the data related to the judgment nodes and the conditions indicated by the judgment nodes. Then, the semantic understanding and reasoning capabilities of the large language model are used to automatically determine whether the target business meets the conditions indicated by the judgment nodes. Finally, the reasoning path of the target business in the logic graph is determined, thereby automating the reasoning of the business and improving the efficiency of business reasoning.
[0018] In one possible implementation, to generate accurate prompts, the execution device retrieves reference knowledge from a knowledge base based on the conditions indicated by the first judgment node. This reference knowledge includes at least one of business cases, expert knowledge, rule sets, and terminology explanations. Then, based on the reference knowledge, the conditions indicated by the first judgment node, and related data, the execution device generates prompts that instruct the AI model to determine whether the target business meets the conditions specified in the prompts using the reference knowledge.
[0019] In this solution, the execution device retrieves and adds relevant reference knowledge related to the current conditions to the prompt words, enabling the large language model to better understand the data and conditions in the prompt words, thereby improving the accuracy of the large language model's inference.
[0020] In one possible implementation, when the execution device has the method of acquiring the first data related to the first judgment node in the factual data recorded in the logic graph, it generates a prompt word based on the first data and the conditions indicated by the first judgment node, wherein the prompt word is used to instruct the AI model to determine whether the first data meets the conditions in the prompt word.
[0021] In this solution, by extracting data that has a mapping relationship with the conditions of the judgment node from the factual data related to the target business, the data related to the judgment node can be accurately extracted, thereby constructing concise prompt words, which helps to improve the reasoning efficiency and reasoning accuracy of the AI model.
[0022] In one possible implementation, if the logical graph does not record the method for acquiring data related to the first judgment node, the execution device performs data extraction and / or data inference on the business analysis task using an AI model based on the conditions indicated by the first judgment node to obtain second data, which is related to the conditions indicated by the first judgment node. Then, the execution device generates prompt words based on the second data and the conditions indicated by the first judgment node. These prompt words instruct the AI model to determine whether the second data satisfies the conditions in the prompt words.
[0023] In other words, if there is no data in the factual data related to the target business that has a clear mapping relationship with the first judgment node, then the execution device often finds it difficult to directly extract the data related to the first judgment node from the factual data. Therefore, the execution device can leverage the semantic understanding and reasoning capabilities of AI models to extract the data related to the first judgment node from the business analysis task in order to construct the prompt words.
[0024] In one possible implementation, the AI model is a large language model. The execution device, based on the conditions indicated by the second decision node in the logic graph, performs data extraction and / or data inference on the business analysis task using the AI model to obtain third data, which is related to the conditions indicated by the second decision node. Furthermore, if the conditions indicated by the second decision node are represented by preset rules, the execution device uses a rule engine to determine whether the third data satisfies the conditions indicated by the second decision node, thereby determining whether to add the second decision node to the inference path.
[0025] In other words, if the conditions indicated by a certain judgment node can be represented by pre-set rules, the execution device no longer needs to use an AI model to determine whether the target business meets the conditions indicated by the judgment node. Instead, it can perform the judgment process based on a pre-built rigorous rule engine, thereby minimizing the illusionary influence caused by AI model reasoning and ensuring the accuracy of node judgment.
[0026] In one possible implementation, the preset rules are rules that include logical operation expressions and / or arithmetic operation expressions.
[0027] In one possible implementation, when acquiring the logical graph, the execution device determines the logical graph that matches the scenario description data in the logical graph set based on the scenario description data in the business data; wherein, the logical graph set includes multiple logical graphs corresponding to different business scenarios.
[0028] In a second aspect, a business reasoning apparatus is provided, comprising modules for executing the business reasoning method in the first aspect or any possible implementation thereof.
[0029] Thirdly, a business inference 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 business inference apparatus to perform the methods of any of the above aspects.
[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 is provided, the chip including a processor and a communication interface for communicating with a module other than the chip, the processor for running computer programs or instructions such that a device on which the chip is mounted can perform the methods of any of the above aspects.
[0033] In a seventh aspect, a computing device is provided, the computing device including a business inference device of the third aspect or a chip of the sixth aspect, wherein the business inference device or the chip 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 business reasoning method provided in this application;
[0038] Figure 3 is a schematic diagram of the logic graph in a tax rate reasoning scenario provided in this application;
[0039] Figure 4 is a schematic diagram of a method provided in this application for filtering the input of the next layer node based on the reasoning result of the previous layer node;
[0040] Figure 5 is a schematic diagram of the system architecture in one application scenario provided in this application;
[0041] Figure 6 is a schematic diagram of a business reasoning process based on a logic graph provided in this application;
[0042] Figure 7 is a schematic diagram of a pattern for identifying and judging nodes provided in this application;
[0043] Figure 8 is a schematic diagram of a reasoning method for determining judgment nodes based on the pattern of judgment nodes provided in this application;
[0044] Figure 9A is a schematic diagram of a method for retrieving reference knowledge based on business elements provided in this application;
[0045] Figure 9B is a schematic diagram of a method for generating prompt words provided in this application;
[0046] Figure 10 is a schematic diagram of the structure of a business reasoning device provided in this application;
[0047] Figure 11 is a schematic diagram of the structure of a computing device provided in this application;
[0048] Figure 12 is a schematic diagram of the structure of a computing device cluster provided in this application;
[0049] Figure 13 is a schematic diagram of another computing device cluster provided in this application;
[0050] Figure 14 is a schematic diagram of the structure of a chip provided in this application;
[0051] Figure 15 is a schematic diagram of the structure of a computer-readable storage medium provided in this application. Detailed Implementation
[0052] To facilitate understanding, some technical terms used in this application will be introduced below.
[0053] (1) Large Language Model
[0054] 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.
[0055] 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.
[0056] Currently, large language models are mainly composed of Transformer networks.
[0057] (2) Transformer network
[0058] 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.
[0059] 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.
[0060] (3) Prompt
[0061] 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.
[0062] 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.
[0063] (4) Rule Engine
[0064] A rules engine separates rules from hard-coded rules into configuration files or configuration items, allowing business experts and other rule configuration personnel to write business decisions and form business rules without writing code, through predefined semantic modules.
[0065] A rule engine typically consists of a rule base, an inference engine, and an executor. The rule base stores business rules, the inference engine parses and executes the rules, and the executor performs corresponding operations based on the inference engine's results.
[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 business data and logical graphs.
[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 perform business reasoning.
[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 business reasoning method provided in this application, thereby obtaining the business reasoning result.
[0073] Optionally, during the process of the execution device 110 implementing the business reasoning method, the local device 101 can provide the execution device 110 with business data and other data required for the business reasoning process, so that the execution device 110 can implement business reasoning. Furthermore, after the execution device 110 executes the business reasoning method and obtains the business reasoning result, it can feed the business reasoning result back to the local device 101.
[0074] In another implementation, one or more aspects of the execution device 110 may be implemented by a local device. For example, the local device 101 may obtain a logic graph from the execution device 110 to execute the business reasoning method provided in this application and realize the processing of local business data.
[0075] It should be noted that the system architecture 100 provided in this application can be applied to any business reasoning scenario, such as the business reasoning scenarios of enterprises, schools, hospitals or research institutes, and this application does not limit the specific business reasoning scenario.
[0076] Please refer to Figure 2, which is a flowchart illustrating a business reasoning method provided in this application. As shown in Figure 2, the business reasoning method can be applied to execution devices within an enterprise. These execution devices can be physical devices such as servers, server clusters, personal computers, laptops, and smartphones, or virtual devices such as virtual machines. The business reasoning method includes the following steps 201-204.
[0077] Step 201: Execute the device to acquire business analysis task. The business analysis task is used to instruct the target business to be analyzed based on factual data related to the target business.
[0078] In this application, the execution device triggers the execution of a business reasoning process by obtaining a business analysis task provided by the user. Specifically, the execution device may obtain the analysis task by receiving instructions issued by the user. For example, if a business analysis system runs on the execution device, the user can issue an analysis task to the execution device by clicking the "Business Analysis" button on the system's interface. Alternatively, the execution device may also obtain the analysis task by receiving messages from other devices (such as the user's local device).
[0079] Specifically, a business analysis task can refer to analyzing a target business to determine whether it meets the rule requirements of the current business scenario. For example, a business analysis task could be to determine whether a company's board member change plan complies with regulatory requirements. Alternatively, a business analysis task can refer to analyzing a target business to obtain analytical results. For example, a business analysis task could be to determine the tax rate corresponding to a company's revenue over a certain period. Furthermore, when the execution device performs analysis on the target business, it needs to rely on factual data related to the target business. This factual data can be factual data generated by the company during its operations, and the factual data is related to the target business. For example, if the target business is a change in the company's board members, the relevant factual data could be various personnel information of the company; or, if the target business is to calculate the tax on the company's revenue over a certain period, the factual data could be various sales revenue data of the company.
[0080] Furthermore, factual data related to the target business can be organized and stored in the database in a certain form (such as in tabular or graphical form) during the company's operations. Because the database stores a large amount of data, users often find it difficult to directly locate the required factual data when requesting business analysis. Therefore, the business analysis task may simply instruct that the analysis should be performed based on the factual data related to the target business in the database, without directly providing the corresponding factual data. For example, a specific business analysis task could be "Does the company's board member change plan meet regulatory requirements?" The factual data related to the target business generated during the company's operations is often organized and stored in the database using simple and easily understood fields (such as "director's name," "age," and "years of service").
[0081] Step 202: The execution device determines the logical graph for performing business analysis tasks based on the business scenario to which the target business belongs. The logical graph is a tree-like connection graph with multiple nodes, including judgment nodes and conclusion nodes. Judgment nodes are used to indicate the conditions that the business needs to meet, and conclusion nodes are used to indicate the business analysis results. The business corresponding to the business analysis results meets the conditions indicated by the judgment nodes related to the conclusion nodes. The logical graph also records the acquisition methods of the data related to the judgment nodes in the factual data.
[0082] Based on the obtained business analysis task, the execution device can determine the appropriate logical graph from multiple pre-built logical graphs, according to the business scenario to which the target business indicated by the business analysis task belongs. Specifically, in some scenarios, an enterprise may have multiple logical graphs built internally to handle different business scenarios. In this case, the execution device can first filter the appropriate logical graph based on the target business.
[0083] Specifically, the business analysis tasks acquired by the execution device include scenario description data. This scenario description data can be descriptive text used to describe the business scenario corresponding to the business data. For example, when the business analysis task is a corporate tax rate reasoning scenario in the tax field, the scenario description data might be: "The current business reasoning scenario is a corporate income tax rate reasoning scenario, which requires combining corporate information to reason about the corporate income tax rate." Another example is a disease reasoning scenario in the medical field, where the scenario description data might be: "The current business reasoning scenario is a disease reasoning scenario, which requires combining patient symptom information to reason about the disease." Yet another example is a corporate profit reasoning scenario in the financial field, where the scenario description data might be: "The current business reasoning scenario is a corporate net profit reasoning scenario, which requires combining corporate income and expense information to reason about the corporate net profit."
[0084] In this way, the execution device determines the logical graph that matches the scenario description data from the logical graph set based on the scenario description data in the business data. The logical graph set includes multiple logical graphs corresponding to different business scenarios. Specifically, the execution device can input the scenario description data and the logical graph set into an AI model, which then determines the logical graph that best matches the scenario description data. Alternatively, the execution device can also select a logical graph that matches the scenario description data from the logical graph set through semantic matching.
[0085] The logic graph is a tree-like connection diagram containing multiple nodes connected by a tree structure. Simply put, the logic graph organizes objects using 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 nodes in the logic graph, there are two types: decision nodes and conclusion nodes. Any decision 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.
[0086] In the logic graph, each decision node indicates a condition that the business logic must meet during the business reasoning process, and different decision nodes indicate different conditions. That is, decision nodes are actually used to indicate the decision logic in the business reasoning process to determine which conditions the business data actually meets. Conclusion nodes, on the other hand, indicate the result of the business reasoning, and the business logic corresponding to the result satisfies the conditions indicated by the decision nodes associated with the conclusion nodes.
[0087] Furthermore, since the execution device needs to determine whether the target service meets the conditions indicated by the judgment node based on the data related to the judgment node in the factual data when processing the judgment node, and since the factual data is stored in a database, the logic graph records the methods for obtaining the data related to the judgment node in the factual data. In this way, the execution device can obtain the data related to the judgment node based on the data acquisition methods recorded in the logic graph, and then combine the obtained data to determine whether the conditions indicated by the judgment node are met.
[0088] The logic graph can record the mapping relationship between decision nodes and one or more fields in the database. This allows for the retrieval of data recorded under those fields based on the mapping relationship, thereby obtaining the data related to the decision nodes. In most business reasoning scenarios within enterprises (such as those in the financial sector), the accuracy of the reasoning results is crucial (errors can cause significant losses). Therefore, the accuracy requirements for business reasoning results are often very high. Given that an enterprise's database stores a large amount of data, and only a portion of the factual data relevant to the target business can be used for business reasoning, by pre-determining and recording the methods for acquiring data related to decision nodes during the construction of the logic graph, the execution device can efficiently and accurately acquire the data related to decision nodes during business reasoning, thus enabling an accurate business reasoning process.
[0089] For example, please refer to Figure 3, which is a schematic diagram of a logic graph in a tax rate reasoning scenario provided by this application. As shown in Figure 3, in the logic graph, the connection relationship between nodes is constructed in a tree-like connection graph, thereby constructing multiple layers of judgment nodes and one layer of conclusion nodes.
[0090] For example, in the first-level judgment node of the logic graph, there is only one judgment node "taxable entity is enterprise", and this judgment node is the root node, which means that the taxable entity targeted by this logic graph is an enterprise.
[0091] The second-level decision node in the logic graph includes two decision nodes, which respectively indicate the following two conditions: "Income comes from country A" and "Income comes from country B".
[0092] Similarly, the third-level decision nodes in the logic graph include decision nodes such as "revenue from sales of goods," "revenue from donations received," and "revenue from providing services," which are used to indicate conditions regarding the company's revenue sources. The fourth-level decision nodes in the logic graph include decision nodes such as "amount falls within range 1," "amount falls within range 2," "amount falls within range 3," and "amount falls within range 4," which are used to indicate conditions regarding the size of the company's revenue amount.
[0093] The last node in the logic graph is the conclusion node, which represents the specific tax rate of the company's revenue when the conditions indicated by the relevant judgment nodes are met.
[0094] Step 203: The execution device determines the reasoning path of the target business in the logic graph through the AI model. The reasoning path is the path from the root node of the logic graph to the target conclusion node. The factual data satisfies the conditions indicated by the judgment nodes on the reasoning path.
[0095] Because the decision nodes in the logic graph record various conditions that the target business needs to satisfy, the execution device can combine the factual data related to the target business with the powerful semantic understanding capabilities of the AI model to determine the conditions satisfied by the target business in the logic graph, and thus determine the reasoning path of the target business in the logic graph. The reasoning path includes one or more decision nodes and a target conclusion node, and the nodes on the reasoning path are sequentially connected in the logic graph. The factual data related to the target business satisfies the conditions indicated by all the decision nodes on the reasoning path.
[0096] Step 204: The execution device obtains the target analysis result corresponding to the target business according to the reasoning path. The target analysis result is the business analysis result indicated by the target conclusion node.
[0097] After obtaining the inference path, the execution device can determine the target inference result corresponding to the target service as the service inference result indicated by the target conclusion node on the inference path based on the target conclusion node on the inference path.
[0098] In this solution, during business reasoning, a logic graph is first located based on the business scenario to which the target business belongs. This logic graph includes judgment nodes indicating the conditions that business objects must meet and conclusion nodes indicating the business reasoning results. It also records the methods for obtaining the factual data related to the judgment nodes. Therefore, during business reasoning, the conclusion node corresponding to the target business can be located by obtaining the relevant factual data and determining the judgment nodes that the target business must meet, thus obtaining the business reasoning result. Furthermore, based on the methods for obtaining the judgment node-related data recorded in the logic graph, the factual data involved in the judgment nodes in the logic graph can be accurately obtained, ensuring that business reasoning can be executed automatically and reliably, effectively improving the efficiency of business reasoning.
[0099] Optionally, the aforementioned logical graph includes a tree-connected multi-layered decision node. When determining the inference path corresponding to business data, the execution device can start from the root node of the logical graph and use the AI model to determine the decision node corresponding to the business data layer by layer in the multi-layered decision node to obtain the inference path. The inference path includes the decision node corresponding to the target business in the multi-layered decision node, and the factual data related to the target business satisfies the conditions indicated by the corresponding decision node.
[0100] Generally, within the same layer of a logic graph, different decision nodes indicate different and non-overlapping conditions. Therefore, for a target business, the factual data related to that target business will typically only satisfy one decision node within the same layer. Thus, for each layer of decision nodes, the execution device only needs to use an AI model to determine the decision node corresponding to the target business-related factual data at that current layer, and add that decision node to the inference path, thereby achieving layer-by-layer analysis of the logic graph and obtaining the inference path.
[0101] In simple terms, since the logic graph itself is a tree-like connection graph, when the execution device performs business reasoning, it can instruct the AI model to start from the root node and reason along the tree-like connections in the logic graph. This transforms complex analytical reasoning problems into simple, multi-step reasoning at each level. In this way, during the layer-by-layer reasoning process, for a given decision node, the AI model only needs to determine which decision node in that level satisfies the condition indicated by the business data. It then uses the decision node that satisfies the condition as a decision node on the reasoning path and continues to execute the reasoning for the next layer of decision nodes, ultimately obtaining the entire reasoning path.
[0102] As shown in Figure 3, assuming the factual data related to the target business includes revenue A and related information, the execution device determines the corresponding judgment node for revenue A at each level of the logical graph, starting from the root node. Specifically, since revenue A belongs to the enterprise, it satisfies the condition indicated by the root node (i.e., the taxable entity is an enterprise), and therefore the root node is added to the inference path. In the second-level judgment node, the execution device uses an AI model combined with the relevant information of revenue A to determine whether revenue A originates from country A or country B, and adds the judgment node "revenue originates from country A" to the inference path based on the AI model's judgment result. This process continues, with the execution device using the AI model to determine the corresponding judgment node for revenue A at each level, thus obtaining the inference path.
[0103] The reasoning path derived from business inference based on revenue A includes all nodes from the root node of the logic graph to the first conclusion node. That is, the reasoning path sequentially passes through the "taxable entity is a company" judgment node, the "company revenue originates from country A" judgment node, the "revenue from sales of goods" judgment node, and the "amount falls within range 1" judgment node. Therefore, revenue A matching the first conclusion node actually satisfies the conditions indicated by all judgment nodes on the reasoning path. In other words, assuming we are reasoning about 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 range 1, then we can deduce that the tax rate for revenue A is tax rate 1.
[0104] Optionally, in the process of determining the judgment node corresponding to the target business through the AI model layer by layer in the multi-layer judgment nodes, the execution device can filter candidate judgment nodes that can be used as nodes on the inference path in the next layer judgment nodes based on the judgment node selected in the previous layer judgment node, thereby narrowing the scope of node judgment and improving the efficiency of business inference as much as possible.
[0105] For example, during the determination of the inference path, the execution device obtains the target judgment node corresponding to the first target layer judgment node for the target service. That is, for the target judgment node, the factual data related to the target service satisfies the conditions indicated by the target judgment node in the first target layer judgment node. Here, the first target layer judgment node is a judgment node in a multi-layer judgment node. For example, the first target layer judgment node can be any judgment node in the multi-layer judgment node except for the last judgment node.
[0106] Then, the execution device determines multiple candidate decision nodes connected to the target decision node in the second target layer decision node. The second target layer decision node is the decision node at the layer following the first target layer decision node. That is, the second target layer decision node is the next layer decision node in the tree-connected logical graph from the first target layer decision node to the leaf node. Furthermore, based on the conditions indicated by the multiple candidate decision nodes, the execution device uses an AI model to determine the decision node corresponding to the target service from the multiple candidate decision nodes.
[0107] In other words, after the execution device has determined the target judgment node corresponding to the business data in the first target layer judgment node, when processing the subsequent second target layer judgment node, the execution device does not necessarily need to use all judgment nodes in the second target layer judgment node as input to determine the judgment node corresponding to the business data. The execution device only uses the judgment nodes connected to the target judgment nodes in the first target layer judgment node as candidate nodes, thereby further determining the judgment node corresponding to the target business from these candidate nodes, narrowing down the range of nodes to be determined, and thus improving the efficiency of the AI model in performing business inference.
[0108] Please refer to Figure 4, which is a schematic diagram of how this application filters the input of the next-level node based on the inference result of the previous-level node. As shown in Figure 4, after the execution device adds the root node to the inference path, it inputs the two judgment nodes connected to the root node in the second-level judgment node (i.e., the "income comes from country A" judgment node and the "income comes from country B" judgment node) as candidate judgment nodes into the AI model for judgment. After determining to add the "income comes from country A" judgment node in the second-level judgment node to the inference path, the execution device then inputs the two judgment nodes connected to this judgment node in the third-level judgment node (i.e., the "sales revenue" judgment node and the "donation revenue" judgment node) as candidate judgment nodes into the AI model for judgment. This process continues, with the execution device determining the candidate judgment nodes for the next level based on the inference result of the previous-level judgment node (i.e., the judgment nodes determined to be added to the inference path), thereby narrowing the filtering range of each level of judgment node and helping to improve the inference efficiency of the AI model.
[0109] The above describes how the execution device uses an AI model to analyze nodes in the logic graph layer by layer to generate inference paths and obtain inference results corresponding to factual data related to the target business. For ease of understanding, the following will explain how the execution device uses an AI model to determine whether the factual data related to the target business meets the conditions indicated by the judgment nodes in the logic graph.
[0110] In one possible implementation, the AI model is a large language model. For the first judgment node in the logic graph, the execution device first generates a prompt word based on the conditions indicated by the first judgment node and the related data. The prompt word instructs the AI model to determine whether the target business meets the conditions in the prompt word. The conditions in the prompt word include those indicated by the first judgment node. Taking the logic graph shown in Figure 4 as an example, the prompt word generated by the execution device based on a judgment node in the second-level judgment node of the logic graph and the related data of the first judgment node could be, for example: "In the target business XXX, the given business data is XXX; please determine whether the target business XXX meets the following condition, specifically <revenue comes from country A>."
[0111] Then, the execution device inputs the prompt words into the AI model and obtains the output of the AI model. The output is used to determine whether to add the first judgment node to the inference path. Specifically, the output of the AI model can indicate whether the target service meets the conditions indicated by the first judgment node. Therefore, based on the output of the AI model, the execution device can determine whether to add the first judgment node to the inference path.
[0112] In this solution, prompt words for a large language model are constructed based on the conditions indicated by the judgment nodes and the data related to the judgment nodes. Then, the semantic understanding and reasoning capabilities of the large language model are used to automatically determine whether the business data meets the conditions indicated by the judgment nodes. Finally, the reasoning path of the target business in the logic graph is determined, thereby automating the business reasoning and improving the efficiency of business reasoning.
[0113] It should be noted that in practical applications, the execution device can generate a prompt word based on the conditions indicated by a single judgment node (such as the first judgment node mentioned above) and input it into the AI model for processing. That is, one judgment node corresponds to one prompt word, and the execution device can determine whether the target service meets the conditions indicated by a certain judgment node based on the output of the AI model for that prompt word.
[0114] Of course, the execution device can also generate a prompt word based on the conditions indicated by multiple judgment nodes (such as the first judgment node mentioned above and other judgment nodes at the same level as the first judgment node) and input it into the AI model for processing. That is, multiple judgment nodes correspond to one prompt word. A prompt word simultaneously contains the conditions indicated by multiple judgment nodes, and the prompt word is used to instruct the AI model to determine which of the multiple conditions the target business satisfies. In this way, based on the AI model's output result for the prompt word, the execution device can determine which of the multiple judgment nodes' indicated conditions the target business satisfies, and then add the corresponding judgment node to the inference path.
[0115] Optionally, in some examples, to help the large language model better understand the data and conditions in the prompt words and improve the accuracy of the large language model's inference, the execution device can also add some reference knowledge related to the current conditions to the prompt words when generating them.
[0116] For example, before generating the prompt word, the execution device retrieves relevant reference knowledge related to the conditions indicated by the first judgment node from the knowledge base, based on the conditions indicated by the first judgment node. The reference knowledge includes at least one of business cases, expert knowledge, rule sets, and terminology explanations. Here, business cases refer to historical reasoning cases of the same or similar business reasoning scenarios, which can indicate the reasoning process for determining whether historical business data meets the conditions related to the first judgment node. Expert knowledge can refer to expert interpretations of the conditions indicated by the first judgment node, which can help the large language model understand the conditions indicated by the first judgment node. The rule set includes pre-defined rules required to judge the conditions indicated by the first judgment node, such as regulations or user-defined rules. Terminology explanations are detailed semantic explanations of some professional terms appearing in the conditions indicated by the first judgment node, used to facilitate the large language model's understanding of the concepts or keywords appearing in the conditions indicated by the first judgment node.
[0117] Then, the execution device generates prompt words based on the retrieved reference knowledge, the conditions indicated by the first judgment node, and the data related to the first judgment node. The prompt words are used to instruct the AI model to determine whether the target business meets the conditions in the prompt words through the reference knowledge. For example, the prompt words generated by the execution device may be: "In the target business XXX, the given business data is XXX; please determine whether the target business XXX meets the following conditions based on the given reference knowledge; where the reference knowledge includes XXX; the specific condition is <revenue comes from country A>".
[0118] Furthermore, since the factual data stored in the database may include a large amount of data of different types (for example, business data in a tax rate reasoning scenario may simultaneously include data such as the country of origin of income, the source of income, and the amount of income), and different data correspond to conditions in different judgment nodes, this application proposes, in order to ensure the conciseness of the input data to the AI model and avoid inputting too much invalid data into the AI model and affecting the reasoning accuracy of the AI model, extracting the corresponding data from the factual data according to the conditions of the judgment node as input for the AI model to determine whether the business meets the conditions of that judgment node.
[0119] Optionally, when generating prompts, the execution device first determines whether the factual data stored in the database contains data that maps to the conditions indicated by the first judgment node. If the logical graph records the acquisition methods for the first data related to the first judgment node in the factual data, the execution device can retrieve the first data from the database according to the acquisition methods, and generate prompts based on the first data and the conditions indicated by the first judgment node. The prompts are used to instruct the AI model to determine whether the first data satisfies the conditions in the prompts. That is, the prompts only include the first data extracted by the execution device from the database that is related to the conditions of the first judgment node.
[0120] In this solution, by extracting data from the database that has a mapping relationship with the conditions of the judgment node, the data related to the judgment node can be accurately extracted, thereby constructing concise prompt words, which helps to improve the reasoning efficiency and accuracy of the AI model.
[0121] Optionally, if the logic graph does not record the method for acquiring data related to the first judgment node, the execution device can extract and / or infer data from the business analysis task using an AI model based on the conditions indicated by the first judgment node to obtain second data, which is related to the conditions indicated by the first judgment node. For example, suppose the condition indicated by the first judgment node is "enterprise revenue belongs to sales revenue," but the database does not directly provide data related to the "source of revenue" field. However, the business analysis task provides the following descriptive text: "Revenue A is obtained through the sale of XX goods." In this case, the execution device can use the semantic understanding capability of the AI model to extract the following data from the business analysis task: the source of revenue A is the sale of goods. As another example, suppose the condition indicated by the first judgment node is "enterprise profit meets XX requirements," but the database does not directly provide data related to enterprise profit. Instead, the business analysis task indicates enterprise revenue and enterprise costs. In this case, the execution device can use the AI model to perform data inference on enterprise revenue and enterprise costs (i.e., enterprise revenue - enterprise revenue) to obtain the specific value of enterprise profit used to construct the prompt.
[0122] Then, the execution device generates a prompt word based on the second data and the conditions indicated by the first judgment node. The prompt word is used to instruct the AI model to determine whether the second data meets the conditions in the prompt word.
[0123] In other words, if the factual data stored in the database does not contain any data with a clear mapping relationship to the first judgment node, then the execution device often finds it difficult to directly extract data related to the first judgment node from the database. Therefore, the execution device can leverage the semantic understanding and reasoning capabilities of AI models to extract data related to the first judgment node from business analysis tasks in order to construct prompt words.
[0124] In another possible implementation, the AI model is a large language model. When determining the reasoning path through the AI model, the execution device first performs data extraction and / or data reasoning on the business analysis task based on the conditions indicated by the second judgment node in the logic graph, and obtains the third data, which is related to the conditions indicated by the second judgment node.
[0125] Then, the execution device uses a rule engine to determine whether the third data meets the conditions indicated by the second judgment node, in order to determine whether to add the second judgment node to the inference path, wherein the conditions indicated by the second judgment node are represented by preset rules.
[0126] In other words, if the condition indicated by a certain judgment node can be represented by a pre-set rule, the execution device no longer needs to use an AI model to determine whether the relevant data meets the condition indicated by the judgment node. Instead, it can perform the judgment process based on a pre-built rigorous rule engine, thereby minimizing the illusionary influence caused by AI model reasoning and ensuring the accuracy of node judgment.
[0127] Optionally, the default rules include logical operation expressions and / or arithmetic operation expressions. Logical operation expressions are meaningful formulas that connect relational expressions or logical quantities using logical operators. Examples of logical operation expressions include logical operators such as "OR", "AND", "NOT", "XOR", "equal to", "not equal to", "greater than", and "less than". Arithmetic operation expressions are formulas composed of numbers and operation functions, such as operation functions like "addition", "subtraction", "multiplication", "division", and "square".
[0128] In general, preset rules can be rules that use pre-defined expressions to perform calculations on data variables. Therefore, after the execution device obtains third data that matches the preset rules from the business data, it can perform calculations on the third data based on the rule engine to determine whether the third data meets the conditions indicated by the second judgment node.
[0129] Of course, in some embodiments, if there is a mapping relationship between data in the database and the conditions of a certain judgment node in the logical graph, and the conditions indicated by the judgment node are represented by specific rules, then the execution device can directly extract the corresponding data from the database and use a rule engine to determine whether the extracted data meets the conditions indicated by the judgment node, thus eliminating the need to rely on an AI model to implement the judgment process.
[0130] To facilitate understanding, the following will provide a detailed explanation, using specific examples, of how to implement business reasoning based on logic graphs in practical applications.
[0131] Please refer to Figure 5, which is a schematic diagram of the system architecture in one application scenario provided by this application. As shown in Figure 5, in one application scenario, the system architecture includes a business data input module, a logic graph access module, and a logic graph inference module. The business data input module receives business analysis tasks provided by the user, and these tasks may include scenario description data and indicate a database storing factual data. The scenario description data describes the business inference scenario corresponding to the target business, while the factual data is the actual data required during business operation.
[0132] The logic graph access module is used to acquire and store a logic graph set, which includes logic graphs corresponding to different business reasoning scenarios.
[0133] The logic graph reasoning module includes a node reasoning module. In actual business reasoning, the logic graph reasoning module performs business reasoning based on data, the logic graph, and the knowledge base, and calls the node reasoning module to perform business reasoning on each judgment node in the logic graph based on a large language model or rule engine, so as to form a reasoning path composed of the judgment nodes in the logic graph.
[0134] Specifically, the logic graph reasoning module determines the required logic graph from the logic graph set based on the scene description data. Furthermore, based on the conditions indicated by each decision node in the logic graph, the module identifies the data related to each decision node from the factual data. Additionally, when the logic graph reasoning module needs to use a large language model to perform node reasoning, it retrieves relevant reference knowledge from the knowledge base based on the conditions indicated by the decision node to construct prompt words. When performing reasoning for a specific decision node, the logic graph reasoning module uses the node reasoning module, which selects to call either the large language model or the rule engine based on the pattern of the decision node.
[0135] For example, please refer to Figure 6, which is a schematic diagram of a business reasoning process based on a logic graph provided in this application. As shown in Figure 6, the business reasoning process based on the logic graph includes the following steps 601-6010.
[0136] Step 601: Locate the logical graph in the logical graph set based on the scenario description data in the business data.
[0137] Since different logic graphs in the logic graph set are applied to different business reasoning scenarios, the business reasoning scenario to which the current target business belongs can be determined based on the scenario description data in the business data, and then the logic graph corresponding to the current target business can be located in the logic graph set.
[0138] Step 602: Decomposition of multi-level judgment nodes based on logical graph.
[0139] Since the logic graph contains multiple layers of ordered decision nodes, and the business reasoning process requires reasoning on each decision node layer by layer, after obtaining the logic graph, the decision nodes in the logic graph can be decomposed according to the level of the decision node, so as to determine each decision node in each layer of decision nodes, so as to process each layer of decision nodes in turn.
[0140] Step 603: Implement dynamic data routing based on the judgment nodes at each layer.
[0141] Generally, decision nodes at the same level correspond to the same or similar reasoning directions. Therefore, the factual data required for reasoning at different decision nodes at the same level is often quite similar. Thus, dynamic data routing can be performed on each decision node to associate some data from the factual data with the corresponding decision node. For example, for a specific decision node, the execution device, based on the mapping relationship between decision nodes recorded in the logic graph and fields in the database, associates data recorded in the factual data using specific fields with that decision node, achieving dynamic data routing and ultimately associating different parts of the factual data with the corresponding decision nodes.
[0142] That is, if the judgment node has a pre-established connection with certain factual data, then the execution device can actively retrieve the factual data associated with the judgment node from the database based on the connection between the judgment node and the factual data.
[0143] Step 604: When the business data lacks the necessary factual data, perform data supplementation.
[0144] After performing dynamic data routing, the execution device can determine whether the factual data required for reasoning at each decision node is complete. If the factual data required by one or more decision nodes is not provided, it means that the business data lacks necessary factual data. At this time, the execution device can generate a prompt message to instruct the user to perform data supplementation, such as instructing the user to provide some additional data when entering the business analysis task, so that the execution device can extract the required data.
[0145] Step 605: Identify and determine the pattern of the node.
[0146] Before performing reasoning on decision nodes in the logic graph, the execution device can first identify the patterns of the decision nodes to determine how to implement the reasoning for those decision nodes. Specifically, the execution device can identify the patterns of decision nodes from two aspects: the degree of data structuring and the degree of rule structuring.
[0147] For example, please refer to Figure 7, which is a schematic diagram of a pattern recognition method for judgment nodes provided in this application. As shown in Figure 7, for any judgment node in the logic graph, the execution device can identify the data structuring degree of the judgment node based on the factual data corresponding to the judgment node, and determine the rule structuring degree of the judgment node based on the conditions in the judgment node, thereby realizing node pattern recognition.
[0148] In this way, for decision nodes in different modes, the execution device can determine whether to invoke the large language model to perform semantic reasoning or to invoke the rule engine to perform rule engine reasoning, in order to achieve the reasoning for the decision node. Generally, when the execution device invokes the large language model to perform semantic reasoning, it can extract or reason about the factual data corresponding to the decision node to obtain the data required for reasoning; or, it can combine the data and conditions corresponding to the decision node and invoke the large language model to perform text reasoning to determine whether the target business meets the conditions of the decision node. When the execution device invokes the rule engine for reasoning, it can use the rule engine to determine whether the target business meets the conditions of the decision node based on the factual data and conditions corresponding to the decision node.
[0149] Step 606: Arrange the reasoning task.
[0150] After identifying the pattern of the decision node, the execution device can then orchestrate the corresponding reasoning task for each decision node that needs reasoning, i.e., whether to use a large language model or a rule engine to implement the reasoning for that decision node.
[0151] Specifically, please refer to Figure 8, which is a schematic diagram of a reasoning method for determining judgment nodes based on the pattern of judgment nodes provided in this application. As shown in Figure 8, for a judgment node, the pattern of the judgment node can be determined from the degree of data structuring of the factual data associated with the judgment node and the degree of rule structuring of the conditions indicated in the judgment node. Therefore, the pattern of each judgment node can be one of the following four patterns.
[0152] Mode 1: The factual data associated with the judgment node is structured data, and the conditions indicated by the judgment node are structured rules.
[0153] Specifically, if the factual data associated with the judgment node is structured data, it means that the actual data required for the judgment node's inference is data recorded through a specific structure, such as data recorded through tables or specific fields. Therefore, the execution device can directly obtain the actual data required for node inference through the mapping relationship between the judgment node and the factual data. For example, if the condition indicated by the judgment node is "the income amount is in the range 1", and the factual data associated with the judgment node includes data recorded with the specific field "income amount", then the execution device can obtain the actual income amount data through the mapping relationship between the judgment node and the factual data (the mapping relationship between the two is achieved through the specific field "income amount").
[0154] If the factual data associated with a judgment node is unstructured, it means that the actual data required for the judgment node's inference cannot be directly obtained through mapping relationships. In this case, the factual data associated with the judgment node is often given in the form of text within the business analysis task. For example, the actual data required for the judgment node's inference might be the company's profit, while the factual data associated with the judgment node might be a descriptive text: "The company's revenue is XXX, and the company's costs are XXX."
[0155] If the condition indicated by the decision node is a structured rule, it means that the condition in the decision node is a rule represented by logical operation expressions and / or arithmetic operation expressions. Therefore, the decision node can rely on a pre-built rule engine to perform reasoning.
[0156] If the condition indicated by the decision node is an unstructured rule, it means that the condition in the decision node is often described by text. Therefore, the decision node needs to rely on a large language model to perform the reasoning.
[0157] Therefore, in Mode 1, when the fact data associated with the judgment node is structured data and the condition indicated by the judgment node is a structured rule, the execution device can directly obtain the data required for the judgment node's reasoning based on the mapping relationship between the judgment node and the fact data (i.e., mapping data retrieval), and use a rule engine to determine whether the obtained data meets the condition indicated by the judgment node, thereby realizing the reasoning of the judgment node.
[0158] Mode 2 determines that the factual data associated with the node is unstructured data, and the conditions indicated by the node are structured rules.
[0159] In Mode 2, when the factual data associated with the judgment node is unstructured data and the condition indicated by the judgment node is a structured rule, the execution device can extract or infer data from the factual data associated with the judgment node based on the large language model, thereby obtaining the actual data required for the judgment node's inference.
[0160] Then, the execution device uses a rule engine to determine whether the actual data obtained based on the large language model meets the conditions indicated by the judgment node, thereby realizing the reasoning of the judgment node.
[0161] Mode 3 determines that the factual data associated with the judgment node is structured data, and the conditions indicated by the judgment node are unstructured rules.
[0162] In Mode 3, when the fact data associated with the judgment node is unstructured data and the condition indicated by the judgment node is a structured rule, the execution device can directly obtain the data required for the judgment node's reasoning based on the mapping relationship between the judgment node and the fact data.
[0163] Then, the execution device uses the acquired actual data and the conditions of the judgment node to construct prompt words, and then uses a large language model to infer whether the acquired actual data meets the conditions indicated by the judgment node.
[0164] Mode 4: The factual data associated with the judgment node is unstructured data, and the condition indicated by the judgment node is an unstructured rule.
[0165] In Mode 3, when the factual data associated with the judgment node is unstructured data and the condition indicated by the judgment node is a structured rule, the execution device can extract or infer data from the factual data associated with the judgment node based on the large language model, thereby obtaining the actual data required for the judgment node's inference.
[0166] Then, the execution device uses the actual data obtained through the large language model and the conditions of the judgment node to construct prompt words, and then uses the large language model to infer whether the obtained actual data meets the conditions indicated by the judgment node.
[0167] Step 607: Run the large language model to perform reasoning for the decision nodes.
[0168] In practical applications, for any judgment node that has already implemented task orchestration based on the node pattern, if the reasoning process of the judgment node needs to be implemented by running a large language model, then the execution device can specifically execute the following steps 6071-6073.
[0169] Step 6071: Retrieve reference knowledge.
[0170] Specifically, for each decision node, the conditions indicated by each node include one or more business elements. These business elements are the key objects involved in the conditions indicated by the decision node. Generally, determining whether business data satisfies the conditions indicated by a decision node essentially means determining whether the actual data corresponding to the business elements in that decision node satisfies the conditions at that node. Based on this, to facilitate the understanding of the reasoning logic by the large language model, the execution device can retrieve relevant reference knowledge from the knowledge base based on the business elements in the decision nodes, so that the large language model can refer to this knowledge during the reasoning at the execution nodes.
[0171] For example, please refer to Figure 9A, which is a schematic diagram of retrieving reference knowledge based on business elements provided in this application. As shown in Figure 9A, for any decision node to be reasoned, the execution device can obtain the business elements on that decision node. The business elements on the decision node can be pre-specified when constructing the decision node, or they can be obtained by a large language model by recognizing the conditions on the decision node. Then, the execution device can perform a retrieval in the knowledge base based on the business elements to retrieve reference knowledge related to those business elements, such as business cases, expert knowledge, and terminology explanations.
[0172] Furthermore, given a defined business element, the execution device can also determine the value space of the business element based on its type. For example, for a yes / no type business element, the value space is yes or no; for a category type business element, the value space is discrete values; and for a numerical type business element, the value space is a certain numerical range.
[0173] Step 6072: Generate prompt words.
[0174] For example, please refer to Figure 9B, which is a schematic diagram of a prompt word generation method provided by this application. As shown in Figure 9B, based on the determined value space of business elements and the retrieved reference knowledge, the execution device can generate corresponding prompt words so that the large language model can perform reasoning for the decision node based on the prompt words. The prompt words can include multiple parts, namely: role definition, input layer, constraint layer, case layer, logic layer, and explanation layer. Among them, the role definition is used to indicate the role played by the large language model so that the large language model can understand the direction of its own reasoning for performing the task. The input layer is used to provide input data and the conditions indicated by the decision node. The constraint layer indicates the constraints on the values of business elements. The case layer is used to provide existing rules and expert knowledge so that the large language model can understand the business analysis task. The explanation layer is used to provide semantic explanations of domain-specific terms so that the large language model can understand the content of the input layer.
[0175] Step 6073: Run the large language model.
[0176] After generating the prompt word, the execution device inputs the prompt word into the large language model and obtains the output of the large language model, thereby determining whether the target service meets the conditions indicated by a certain judgment node.
[0177] Step 608: Run the rule engine to perform the reasoning for the judgment node.
[0178] In practical applications, for any judgment node that has already implemented task orchestration based on the node pattern, if the condition of the judgment node is a structured rule, then the execution device can run the rule engine to perform the reasoning of the judgment node, and thus determine whether the target business meets the conditions indicated by the judgment node.
[0179] Step 609: Generate a reasoning path based on the reasoning results of the judgment nodes.
[0180] During the process of performing layer-by-layer reasoning on the decision nodes in the logic graph, the execution device can select the corresponding decision nodes to add to the reasoning path based on the reasoning results of each decision node, thereby obtaining a reasoning path consisting of multiple decision nodes and the conclusion node connected to the last decision node.
[0181] Step 6010: Output the business reasoning results and reasoning process based on the reasoning path.
[0182] Based on the conclusion node on the reasoning path, the execution device can output the business reasoning result at that conclusion node and visualize the entire reasoning process for the logic graph (such as the reasoning path and the business elements, reference knowledge, and model derivation process of each judgment node) for user review.
[0183] 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.
[0184] Please refer to Figure 10, which is a schematic diagram of the structure of a business reasoning device provided in this application. As shown in Figure 10, the business reasoning device includes: an acquisition module 1001, used to acquire a business analysis task, which instructs the target business to be analyzed based on factual data related to the target business; a processing module 1002, used to determine a logical graph for executing the business analysis task based on the business scenario to which the target business belongs, the logical graph being a tree-like connection graph including multiple nodes, including judgment nodes and conclusion nodes, the judgment nodes indicating the conditions that the business needs to meet, the conclusion nodes indicating the business analysis result, and the business corresponding to the business analysis result satisfying the conditions indicated by the judgment nodes related to the conclusion nodes, and the logical graph recording the acquisition method of the data related to the judgment nodes in the factual data; the processing module 1002 is also used to determine the reasoning path of the target business in the logical graph through an AI model, the reasoning path being the path from the root node of the logical graph to the target conclusion node, the factual data satisfying the conditions indicated by the judgment nodes on the reasoning path; the processing module 1002 is also used to obtain the target analysis result corresponding to the target business according to the reasoning path, the target analysis result being the business analysis result indicated by the target conclusion node.
[0185] In one possible implementation, the logic graph includes a tree-connected multi-layer judgment node. The processing module 1002 is further configured to: starting from the root node of the logic graph, determine the judgment node corresponding to the target business layer by layer in the multi-layer judgment node through the AI model to obtain the inference path; wherein the inference path includes the judgment node corresponding to the target business in the multi-layer judgment node, and the factual data satisfies the conditions indicated by the corresponding judgment node.
[0186] In one possible implementation, the acquisition module 1001 is further configured to: acquire the target judgment node corresponding to the first target layer judgment node of the target service, wherein the first target layer judgment node is one layer in the multi-layer judgment node; the processing module 1002 is further configured to determine multiple candidate judgment nodes connected to the target judgment node in the second target layer judgment node, wherein the second target layer judgment node is a layer judgment node after the first layer judgment node; the processing module 1002 is further configured to determine the judgment node corresponding to the target service from the multiple candidate judgment nodes based on the conditions indicated by the multiple candidate judgment nodes through an AI model.
[0187] In one possible implementation, the AI model is a large language model, and the processing module 1002 is further configured to: generate prompt words based on the conditions indicated by the first judgment node in the logic graph and the data related to the first judgment node, the prompt words being used to instruct the AI model to determine whether the target business meets the conditions in the prompt words; input the prompt words into the AI model to obtain the output result of the AI model, the output result being used to determine whether to add the first judgment node to the inference path.
[0188] In one possible implementation, the processing module 1002 is further configured to: retrieve reference knowledge from the knowledge base according to the conditions indicated by the first judgment node, the reference knowledge including at least one of business cases, expert knowledge, rule sets and terminology explanations; and generate prompt words according to the reference knowledge, the conditions indicated by the first judgment node and the data related to the first judgment node, the prompt words being used to instruct the AI model to determine whether the target business meets the conditions in the prompt words through the reference knowledge.
[0189] In one possible implementation, the processing module 1002 is further configured to: retrieve the first data from the database according to the acquisition method of the first data related to the first judgment node in the factual data recorded in the logical graph; and generate prompt words according to the first data and the conditions indicated by the first judgment node, wherein the prompt words are used to instruct the AI model to determine whether the first data meets the conditions in the prompt words.
[0190] In one possible implementation, the processing module 1002 is further configured to: when the logical graph does not record the method of acquiring data related to the first judgment node, perform data extraction and / or data reasoning on the business analysis task through an AI model according to the conditions indicated by the first judgment node to obtain second data, the second data being factual data and related to the conditions indicated by the first judgment node; generate prompt words based on the second data and the conditions indicated by the first judgment node, the prompt words being used to instruct the AI model to determine whether the second data meets the conditions in the prompt words.
[0191] In one possible implementation, the AI model is a large language model, and the processing module 1002 is further used to: perform data extraction and / or data reasoning on the business analysis task through the AI model according to the conditions indicated by the second judgment node in the logic graph, to obtain third data, the third data being related to the conditions indicated by the second judgment node; and use a rule engine to determine whether the third data satisfies the conditions indicated by the second judgment node, so as to determine whether to add the second judgment node to the reasoning path, wherein the conditions indicated by the second judgment node are represented by preset rules.
[0192] In one possible implementation, the preset rules are rules that include logical operation expressions and / or arithmetic operation expressions.
[0193] In one possible implementation, the processing module 1002 is further configured to: determine, based on the scenario description data in the business analysis task, a logical graph matching the scenario description data in the logical graph set; wherein the logical graph set includes multiple logical graphs corresponding to different business scenarios.
[0194] 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.
[0195] 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.
[0196] 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.
[0197] 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.
[0198] 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.
[0199] Please refer to Figure 11, which is a schematic diagram of the structure of a computing device provided in this application. The computing device 1100 shown in Figure 11 can be used to execute the business reasoning 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 through 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.
[0200] 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).
[0201] 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.
[0202] 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).
[0203] The memory 1106 stores executable program code, and the processor 1104 executes the executable program code to implement the functions of the aforementioned monitoring module and processing module, thereby realizing the model processing method described above. That is, the memory 1106 stores instructions for executing the model processing method.
[0204] 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.
[0205] It should be understood that the computing device 1100 according to this application is used to execute the business reasoning method shown in Figures 2 to 9B, and can correspond to the execution device in the method according to this application. For the sake of brevity, it will not be described in detail here.
[0206] 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.
[0207] 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 business inference methods.
[0208] 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 business inference methods. In other words, a combination of one or more computing devices 1100 can jointly execute instructions for executing business inference methods.
[0209] 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.
[0210] 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.
[0211] 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.
[0212] It should be understood that the computing device 1100 or computing device cluster 1300 in this application may correspond to the business inference device in FIG10 of this application, and may correspond to the execution device that executes the business inference method in FIG2 of this application. Furthermore, the above 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 process of the business inference method in FIG2, and will not be described in detail here for the sake of brevity.
[0213] 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).
[0214] 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.
[0215] 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.
[0216] 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.
[0217] 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.
[0218] 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.
[0219] 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.
[0220] 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.
[0221] 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.
[0222] 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.
[0223] The instruction fetch buffer 1409 connected to the controller 1404 is used to store the instructions used by the controller 1404;
[0224] 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.
[0225] 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.
[0226] It should be understood that the chip in Figure 14 of this application may correspond to the business inference 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 executes the business inference 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 business inference method in Figure 2, which will not be elaborated here for the sake of brevity. In addition, in this application, the structure of the chip 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.
[0227] 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.
[0228] 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.
[0229] 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.
[0230] 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).
[0231] 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.
[0232] It should be understood that the computer-readable storage medium 1500 in this application may be deployed on the business inference apparatus shown in FIG10, or on the computing device 1100 or computing device cluster 1300 of this application. In this way, the business inference apparatus, computing device 1100 or computing device cluster 1300 provided in this application implements the business inference method shown in FIG2 by reading one or more program instructions 1502 on the computer-readable storage medium 1500.
[0233] 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.
[0234] 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.
[0235] 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.
[0236] 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)).
[0237] The above are merely specific embodiments of the present invention. Those skilled in the art can conceive of variations or substitutions based on the specific embodiments provided in this application, and all such variations or substitutions should be covered within the protection scope of this application.
Claims
1. A business reasoning method, characterized by, The method is executed by an execution device, and the method includes: Obtain a business analysis task, which is used to instruct the target business to perform analysis based on factual data related to the target business. Based on the business scenario to which the target business belongs, a logical graph is determined for executing the business analysis task. The logical graph is a tree-like connection graph including multiple nodes, including judgment nodes and conclusion nodes. The judgment nodes are used to indicate the conditions that the business needs to meet, and the conclusion nodes are used to indicate the business analysis results. The business corresponding to the business analysis results meets the conditions indicated by the judgment nodes related to the conclusion nodes. The logical graph records the acquisition method of the data related to the judgment nodes in the factual data. The reasoning path of the target business in the logic graph is determined by an artificial intelligence (AI) model. The reasoning path is the path from the root node of the logic graph to the target conclusion node. The factual data satisfies the conditions indicated by the judgment nodes on the reasoning path. The target analysis result corresponding to the target business is obtained based on the reasoning path, and the target analysis result is the business analysis result indicated by the target conclusion node.
2. The method of claim 1, wherein, The logic graph includes a tree-connected multi-layered decision node structure. Determining the reasoning path of the target business within the logic graph using an AI model includes: Starting from the root node of the logic graph, the AI model determines the judgment node corresponding to the target business layer by layer in the multi-level judgment nodes to obtain the reasoning path; The reasoning path includes the judgment nodes corresponding to the target business in the multi-level judgment nodes, and the factual data satisfies the conditions indicated by the corresponding judgment nodes.
3. The method of claim 2, wherein, The step of determining the judgment node corresponding to the target business layer by layer in the multi-layer judgment nodes through the AI model includes: Obtain the target judgment node corresponding to the first target layer judgment node of the target service, where the first target layer judgment node is one of the multi-layer judgment nodes; The target judgment node is connected to multiple candidate judgment nodes in the second target layer judgment node, and the second target layer judgment node is a layer of judgment nodes after the first layer judgment node; Based on the conditions indicated by the multiple candidate decision nodes, the AI model determines the decision node corresponding to the target business among the multiple candidate decision nodes.
4. The method according to any one of claims 1 to 3, characterized in that, The AI model is a large language model. The step of determining the reasoning path of the target business within the logical graph using the AI model includes: Based on the conditions indicated by the first judgment node in the logical graph and the data related to the first judgment node, a prompt word is generated. The prompt word is used to instruct the AI model to determine whether the target business meets the conditions in the prompt word. The prompt word is input into the AI model to obtain the output result of the AI model. The output result is used to determine whether to add the first judgment node to the inference path.
5. The method of claim 4, wherein, The step of generating prompt words based on the conditions indicated by the first judgment node in the logic graph and the data related to the first judgment node includes: Based on the conditions indicated by the first judgment node, reference knowledge is retrieved from the knowledge base, and the reference knowledge includes at least one of business cases, expert knowledge, rule sets, and terminology explanations. Based on the reference knowledge, the conditions indicated by the first judgment node, and the data related to the first judgment node, the prompt word is generated. The prompt word is used to instruct the AI model to determine whether the target business meets the conditions in the prompt word by referring to the reference knowledge.
6. The method according to claim 4 or 5, characterized in that, The step of generating prompt words based on the conditions indicated by the first judgment node in the logic graph and the data related to the first judgment node includes: When the logical graph records the acquisition method of the first data related to the first judgment node in the factual data, the first data is obtained from the database according to the acquisition method of the first data. The prompt word is generated based on the first data and the conditions indicated by the first judgment node. The prompt word is used to instruct the AI model to determine whether the first data meets the conditions in the prompt word.
7. The method according to claim 4 or 5, characterized in that, The step of generating prompt words based on the conditions indicated by the first judgment node in the logic graph and the data related to the first judgment node includes: If the logical graph does not record the acquisition method of data related to the first judgment node, the AI model performs data extraction and / or data reasoning on the business analysis task according to the conditions indicated by the first judgment node to obtain the second data. The second data belongs to the factual data and is related to the conditions indicated by the first judgment node. The prompt word is generated based on the second data and the conditions indicated by the first judgment node. The prompt word is used to instruct the AI model to determine whether the second data meets the conditions in the prompt word.
8. The method according to any one of claims 1-7, characterized in that, The AI model is a large language model. The step of determining the reasoning path of the business data within the logical graph using the AI model includes: Based on the conditions indicated by the second judgment node in the logical graph, the AI model performs data extraction and / or data reasoning on the business analysis task to obtain third data, which is related to the conditions indicated by the second judgment node. The rule engine is used to determine whether the third data meets the conditions indicated by the second judgment node, so as to determine whether to add the second judgment node to the inference path, wherein the conditions indicated by the second judgment node are represented by preset rules.
9. The method according to claim 8, characterized in that, The preset rules are rules that include logical operation expressions and / or arithmetic operation expressions.
10. The method according to any one of claims 1-9, characterized in that, The step of determining the logical graph for executing the business analysis task based on the business scenario to which the target business belongs includes: Based on the scenario description data in the business analysis task, determine the logical graph that matches the scenario description data in the logical graph set; The set of logical graphs includes multiple logical graphs corresponding to different business scenarios.
11. A business reasoning device, characterized in that, include: The acquisition module is used to acquire business analysis tasks, which are used to instruct the target business to perform analysis based on factual data related to the target business. The processing module is used to determine a logical graph for executing the business analysis task based on the business scenario to which the target business belongs. The logical graph is a tree-like connection graph including multiple nodes, including judgment nodes and conclusion nodes. The judgment nodes are used to indicate the conditions that the business needs to meet, and the conclusion nodes are used to indicate the business analysis results. The business corresponding to the business analysis results meets the conditions indicated by the judgment nodes related to the conclusion nodes. The logical graph records the acquisition method of the data related to the judgment nodes in the factual data. The processing module is further configured to determine the reasoning path of the target business in the logic graph through an AI model. The reasoning path is a path from the root node of the logic graph to the target conclusion node, and the factual data satisfies the conditions indicated by the judgment nodes on the reasoning path. The processing module is further configured to obtain the target analysis result corresponding to the target business according to the reasoning path, wherein the target analysis result is the business analysis result indicated by the target conclusion node.
12. A computing device, characterized in that, 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 computing device cluster, 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 in that, 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, characterized in that, 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, characterized 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.