Blockchain-based rule determination method and device, equipment and storage medium
By establishing a shared rule set on blockchain among multiple business parties, the problem of opaque rule determination process was solved, achieving open and transparent rule determination and enhancing trust.
Patent Information
- Application Number
- CN202310808108.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-07-03
AI Technical Summary
In the process of determining rules among multiple business parties, the results and processes are not open and transparent, resulting in low trust levels.
By building a blockchain among multiple business parties, sharing a set of rules, and making rule judgments based on the shared rules on the blockchain, the calculation results of sub-rule judgments and overall rule judgments are obtained, making the calculation process and results of each party open and transparent.
It increases trust among multiple business stakeholders, makes the rule-making process open and transparent, and enhances the credibility and transparency of business decisions.
Smart Images

Figure CN117094725B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a rule determination method, apparatus, device and storage medium based on blockchain. Background Technology
[0002] Blockchain technology is a decentralized distributed ledger technology that securely stores data, ensuring information is immutable and transparent. Transaction confirmation on the blockchain is achieved through consensus among all nodes on a block; once consensus is successful, the transaction is packaged and written into the block. The blockchain stores all transactions on the network, and every node has a complete copy of the ledger, thus guaranteeing information immutability, enabling information sharing, and improving the efficiency of information flow.
[0003] Currently, in the business processing of various fields, different rules need to be applied to different businesses, and then the rule judgment results are output. The rule judgment process usually uses a rule engine to judge the input data and then output the rule judgment results. Rule judgment methods are often used in risk control, e-commerce, and finance, and are mostly applied in a single business party / trust domain scenario. When the rules and data involve multiple business parties / trust domains, the rule judgment process is executed independently by multiple business parties. Such a judgment process is easily affected by one party, resulting in low trust between multiple business parties. Summary of the Invention
[0004] The main purpose of this application is to provide a rule determination method, device, equipment and storage medium based on blockchain, which aims to solve the technical problem in related technologies where multiple business parties independently execute rule determination, and the results and process of rule determination cannot be made public and transparent, resulting in low trust between multiple business parties.
[0005] To achieve the above objectives, embodiments of this application provide a rule-based determination method based on blockchain, the method comprising:
[0006] Obtain the first business rule corresponding to the business data of multiple business parties executing the rule determination, wherein a blockchain is built among the multiple business parties, and the first business rule is selected from the shared rule set on the blockchain;
[0007] Based on the first business rule, the business data is subjected to rule determination, and the sub-rule determination result is calculated.
[0008] The sub-rule determination results are calculated to obtain the overall rule determination result, wherein the overall rule determination result is obtained by multiple business parties jointly executing rule determination.
[0009] In one possible implementation of this application, the first business rule includes on-chain contract rules and off-chain general rules;
[0010] The step of performing rule determination on the business data based on the first business rule and calculating the sub-rule determination result includes:
[0011] If the first business rule is an on-chain contract rule, then according to the on-chain contract rule, the business data is invoked through a contract to calculate the sub-rule determination result;
[0012] If the first business rule is an off-chain general rule, then based on the business party, the business data is judged according to the off-chain general rule, and the sub-rule judgment result is calculated.
[0013] Receive the sub-rule judgment result executed by the business party corresponding to the first business rule.
[0014] In one possible implementation of this application, before the step of obtaining the first business rule corresponding to the business data of multiple business parties executing rule determination, the method includes:
[0015] Based on the business name corresponding to the business data, determine the business rule identifier of the rule to be used;
[0016] Based on the rule parameters, select the first business rule corresponding to the business data from the shared rule set.
[0017] In one possible implementation of this application, the rule parameters include a business rule identifier;
[0018] The step of selecting the first business rule corresponding to the business data in the shared rule set according to the rule parameters includes:
[0019] Based on the business rule identifier, query whether a corresponding business rule exists in the shared rule set;
[0020] If the shared rule set contains a business rule corresponding to the business data, then the business rule corresponding to the business data shall be used as the first business rule.
[0021] If the business rule corresponding to the business data does not exist in the shared rule set, then the first business rule uploaded by the business party is received according to the permission instructions of multiple business parties.
[0022] In one possible implementation of this application, the step of receiving the first business rule uploaded by the business party according to the permission instructions of multiple business parties includes:
[0023] Send upload requests to multiple business parties in the blockchain and receive permission instructions from multiple business parties;
[0024] According to the permission instruction, the first business rule uploaded by the business party is received.
[0025] In one possible implementation of this application, the step of calculating the sub-rule determination result to obtain the total rule determination result includes:
[0026] Based on the preset rule expression of the blockchain, the sub-rule judgment results are calculated, and the overall rule judgment result is output.
[0027] In one possible implementation of this application, the business rules in the shared rule set can be freely combined. When there is no business rule corresponding to the business data in the shared rule set, multiple business rules are combined, and the combined business rule is used as the first business rule corresponding to the rule determination.
[0028] This application also provides a blockchain-based rule determination device, which further includes:
[0029] The acquisition module is used to acquire the first business rule corresponding to the business data of multiple business parties executing the rule judgment, wherein a blockchain is built among the multiple business parties, and the first business rule is selected from the shared rule set on the blockchain;
[0030] The determination module is used to perform rule determination on the business data based on the first business rule and calculate the sub-rule determination result;
[0031] The calculation module is used to calculate the sub-rule judgment results to obtain the overall rule judgment result, wherein the overall rule judgment result is obtained by multiple business parties jointly performing rule judgment.
[0032] This application also provides a blockchain-based rule determination device, which is a physical node device. The blockchain-based rule determination device includes: a memory, a processor, and a program of the blockchain-based rule determination method stored in the memory and executable on the processor. When the program of the blockchain-based rule determination method is executed by the processor, it can implement the steps of the blockchain-based rule determination method as described above.
[0033] To achieve the above objectives, a storage medium is also provided, on which a blockchain-based rule determination program is stored, wherein when the blockchain-based rule determination program is executed by a processor, the steps of any of the blockchain-based rule determination methods described above are implemented.
[0034] This application provides a rule determination method, apparatus, device, and storage medium based on blockchain. Compared to related technologies where multiple business parties independently execute rule determination, resulting in a lack of transparency in the determination process and low trust among these parties, this application obtains business rules corresponding to business data from multiple business parties executing rule determination. A blockchain is established among these business parties, and the business rules are selected from a shared rule set on the blockchain. Based on these business rules, rule determination is performed on the business data to calculate sub-rule determination results. The sub-rule determination results are then calculated to obtain a total rule determination result, which is obtained by multiple business parties jointly executing rule determination. In this application, business rules required for business parties to perform rule judgments are obtained from a shared rule set. A blockchain is established between multiple business parties to enable communication between them. Since the shared rule set is used by multiple business parties and the judgment results of multiple sub-rules calculated based on business rules are public, the calculation process and results of multiple business parties can be made public, making the rule judgment process of each business party open and transparent. The overall rule judgment result is obtained by multiple business parties jointly performing rule judgments, so the overall business judgment process needs to be jointly decided by multiple business parties, thereby increasing the trust between multiple business parties. Attached Figure Description
[0035] Figure 1 This is a flowchart illustrating the first embodiment of the rule-based determination method based on blockchain in this application;
[0036] Figure 2 This is a detailed flowchart of step S20 in the first embodiment of the rule determination method based on blockchain in this application;
[0037] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application;
[0038] Figure 4 This is a schematic diagram of the system architecture involved in the rule determination method based on blockchain in this application. Detailed Implementation
[0039] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0040] This application provides a rule determination method based on blockchain. In the first embodiment of the rule determination method based on blockchain in this application, referring to... Figure 1 The method includes:
[0041] Step S10: Obtain the first business rule corresponding to the business data of multiple business parties executing the rule determination, wherein a blockchain is built among the multiple business parties, and the first business rule is selected from the shared rule set on the blockchain;
[0042] Step S20: Based on the first business rule, perform rule determination on the business data and calculate the sub-rule determination result;
[0043] Step S30: Calculate the sub-rule determination result to obtain the overall rule determination result, wherein the overall rule determination result is obtained by multiple business parties jointly executing rule determination.
[0044] This embodiment aims to establish a blockchain among multiple business parties involved in processing business, enabling communication between them. By sharing rule sets and uploading the sub-rule judgment results of each business party to the blockchain, the calculation process and results of each business party are made public and transparent, thereby increasing the level of trust among them.
[0045] The specific steps are as follows:
[0046] Step S10: Obtain the first business rule corresponding to the business data of multiple business parties executing the rule determination, wherein a blockchain is built among the multiple business parties, and the first business rule is selected from the shared rule set on the blockchain;
[0047] As an example, the blockchain-based rule determination method can be applied to a blockchain-based rule determination device, which belongs to a blockchain-based rule determination system, and the blockchain-based rule determination system belongs to a blockchain-based rule determination device.
[0048] As an example, the business party can be a company, organization, institution, bank, government agency, etc.
[0049] As an example, when determining the outcome of business transactions between multiple business parties, corresponding rules are needed to evaluate the business data and obtain the business processing result. For instance, when a user or company applies for a credit card, the user needs to initiate the credit card application process. The system evaluates the user's eligibility based on the uploaded user information. This evaluation process requires pre-setting rules, such as requiring the user to be at least 18 years old to apply. If this condition is not met, the user is deemed ineligible and subsequent business processing cannot proceed.
[0050] As an example, the above example is just a simple unilateral judgment process. In the rule judgment process, multiple business parties are often involved. Each business party needs to perform the corresponding rule judgment process. Each business party then uploads the rule judgment results it has calculated to other companies. After the rule judgment results are reviewed by other business parties or companies, the subsequent business processing is completed.
[0051] As an example, business data can include business type, business name, business dynamics, and related business information. Business data can also be the private data of a business party or shared data monitored by multiple business parties. When business data is shared data, the rule determination process can be more transparent.
[0052] As an example, a blockchain can be a public blockchain, a private blockchain, or a consortium blockchain. Consortium blockchains are generally considered semi-decentralized. A group designates multiple pre-selected nodes as ledger keepers or administrators. The generation of each block is jointly determined by all pre-selected nodes (the pre-selected nodes participate in the consensus process). Other access nodes can participate in transactions but do not interfere with the ledger process (essentially still escrow ledger management, just distributed; the number of pre-selected nodes and how to determine the ledger keeper for each block are the main risks of this blockchain). Anyone else can perform limited queries through the blockchain's open API. In this embodiment, a consortium blockchain will be used as an example for detailed explanation.
[0053] As an example, a blockchain can be defined as a chain of multiple blocks. By building a blockchain among multiple business parties, the blockchain is stored on servers corresponding to each business party. The advantage of a blockchain is that as long as one server in the entire system is working, the entire blockchain is secure. Each business party's server is a node in the blockchain. The biggest advantages of a blockchain are that the data is difficult to tamper with and that it is decentralized. These two characteristics can ensure that the information recorded on the blockchain is more authentic and reliable, and can help solve the problem of low trust among people.
[0054] Prior to the step of obtaining the first business rule corresponding to the business data of multiple business parties executing rule determination, the following steps are included:
[0055] Step A1: Determine the rule parameters of the rule to be used based on the business name corresponding to the business data;
[0056] As an example, the required business rules can be determined based on the business name and business stage, and the rule parameters can be obtained. Then, based on the rule parameters, the corresponding business rule can be selected from the shared rule set as the target business rule.
[0057] As an example, rule parameters can be rule number, decision parameters, request reference number, etc. For example, the rule number of the called rule is C1, the decision parameter is param=2, and the request reference number is busnbrxx1. Once the rule parameters are determined, the corresponding rule can be selected.
[0058] As an example, business rules can be determined by querying the relationship table between business name, business stage, and rule parameters. This relationship table can be pre-edited by relevant operations and maintenance personnel and continuously updated as new business processes and rules are added.
[0059] Step A2: Select the first business rule corresponding to the business data from the shared rule set according to the rule parameters.
[0060] As an example, each business rule in the shared rule set corresponds to a rule parameter, and the corresponding business rule can be accurately extracted based on the rule parameter.
[0061] The rule parameters include a business rule identifier;
[0062] The step of selecting the first business rule corresponding to the business data in the shared rule set according to the rule parameters includes:
[0063] Step B1: Based on the business rule identifier, query whether a corresponding business rule exists in the shared rule set;
[0064] As an example, a shared rule set is specifically a combination of rules uploaded to the blockchain, i.e., on-chain contract rules.
[0065] As an example, on-chain contract rules are rules that have been uploaded to the blockchain. During the entire rule invocation process, the rules used can be on-chain contract rules or ordinary off-chain rules.
[0066] As an example, when selecting a corresponding business rule from a shared rule set, it is necessary to first determine whether the corresponding business rule exists in the shared rule set, and then determine the subsequent execution steps based on the existence / non-existence result.
[0067] Step B2: If the shared rule set contains a business rule corresponding to the business data, then the business rule corresponding to the business data shall be used as the first business rule.
[0068] As an example, when the business rules corresponding to the business data exist in the shared rule set, the corresponding business rule is directly selected as the first business rule.
[0069] Step B3: If there is no business rule corresponding to the business data in the shared rule set, then the first business rule uploaded by the business party is received according to the permission instructions of multiple business parties.
[0070] As an example, if the business rules corresponding to the business data do not exist in the shared rule set, new business rules need to be uploaded. Due to the characteristics of blockchain, unified permission from all business parties is required before the upload of business rules can be completed.
[0071] As an example, after receiving permission instructions from multiple business parties, the corresponding first business rule is uploaded to the blockchain.
[0072] As an example, the first business rule can be the business rule corresponding to the business data, or it can be a part of the business rule corresponding to the business data. When the latter is the case, the business rule corresponding to the business data is obtained by combining the first business rule with the existing on-chain contract rules.
[0073] As an example, the first business rule to be uploaded can be the business party determined by the current execution rule, or it can be another business party; there is no specific limitation.
[0074] As an example, by layering and combining rules, new rules can be created by combining all previously published rules to form a parent-child rule relationship.
[0075] As an example, the various business rules are described using an expression language, which is a pluggable programming language that can be configured by users or administrators. The expression language is used to parse the rules.
[0076] As an example, after obtaining the combination rules, the new combination rules are used as the business rules corresponding to the business data, thereby completing the judgment of the business data.
[0077] The step of receiving the first business rule uploaded by the business party according to the permission instructions of multiple business parties includes:
[0078] Step C1: Send upload requests to multiple business parties in the blockchain and receive permission instructions from multiple business parties.
[0079] Step C2: Receive the first business rule uploaded by the business party according to the permission instruction.
[0080] As an example, before uploading the first business rule to the blockchain, an upload request needs to be sent to multiple business parties on the blockchain. Only when all multiple business parties agree to the upload request can the new rule be uploaded to the blockchain.
[0081] As an example, the required rule instructions are uploaded to the blockchain according to the permitted instructions, so that they can be easily combined with on-chain contract rules or directly invoked in the future.
[0082] Step S20: Based on the first business rule, perform rule determination on the business data and calculate the sub-rule determination result;
[0083] As an example, a shared rule set is a set of rules jointly determined by all business parties / trust domains. The shared rule set is recorded in the system where the blockchain resides, and each business party can invoke the business rules in the shared rule set through the blockchain.
[0084] As an example, each of the first business rules has a corresponding identifier or number, which corresponds to different business data. The first business rule with the corresponding number can be selected based on the type of business data.
[0085] As an example, the rule determination process can involve calling business rules. When the business rule corresponds to an on-chain contract, a request is sent to the corresponding smart contract to obtain an automatic response result. When the business rule corresponds to a regular contract, the business party listens to business information on the blockchain, executes the rule determination on the business data, and then uploads it to the blockchain.
[0086] As an example, the sub-rule judgment result can be the rule judgment result made separately by each business party based on business data, or it can be the judgment result calculated directly on the blockchain using on-chain contract rules. Finally, the sub-rule judgment result is uploaded to the blockchain, and then the sub-rule judgment results on the blockchain are integrated and calculated to obtain the total rule judgment result.
[0087] As an example, each sub-rule judgment result has a corresponding number. In the existing rule judgment process, since each business party independently completes the business judgment process and uploads it to the system, it is not possible to trace the source of each processing result / judgment result in the business process. Numbering the sub-rule judgment results can better trace the source of the judgment results.
[0088] As an example, not only are the sub-rule judgment results numbered, but the corresponding business rules also have corresponding numbers. The numbering of business rules is to facilitate user selection and identification.
[0089] As an example, by executing different rule judgment processes for different types of business rules and uploading them to the blockchain, it is ensured that business parties can view the corresponding rule judgment processes of each business party. The process is traceable and tamper-proof, thereby improving the credibility of collaborative judgments among multiple parties.
[0090] Step S30: Calculate the sub-rule determination result to obtain the overall rule determination result, wherein the overall rule determination result is obtained by multiple business parties jointly executing rule determination.
[0091] As an example, in the process of exchanging rule judgment results among multiple business parties, each business party performs its own calculation, and then the calculation results of each business party are calculated according to a predetermined formula to obtain the corresponding business processing result.
[0092] The step of calculating the sub-rule determination results to obtain the overall rule determination result includes:
[0093] Step S31: Calculate the sub-rule determination result according to the preset rule expression of the blockchain, and output the total rule determination result.
[0094] As an example, a preset rule expression can be an expression that calculates the sub-rule determination result based on the contract method.
[0095] As an example, a contract specifically defines the content between multiple business parties. By processing the sub-rule judgment results through the agreed contract content, the corresponding rule judgment results are obtained.
[0096] As an example, the overall rule determination result is the result of the combined effect of multiple business parties making rule determinations separately.
[0097] As an example, the blockchain-based rule-determination method is also applied to a blockchain-based rule-determination system, as illustrated in the diagram below. Figure 4 As shown, the rule management module is used to maintain on-chain rules. Each party uses its own on-chain identity to call the rule management module to upload and publish new rules, or update or delete rules under its permissions. The rule logic execution module is mainly responsible for the parsing and execution of rules. Based on the execution results of each sub-rule and the relationship between each sub-rule, the module calculates the total result. The rule contract module is used to manage rules of contract type.
[0098] This application provides a rule determination method, apparatus, device, and storage medium based on blockchain. Compared to related technologies where multiple business parties independently execute rule determination, resulting in a lack of transparency in the determination process and low trust among these parties, this application obtains business rules corresponding to business data from multiple business parties executing rule determination. A blockchain is established among these business parties, and the business rules are selected from a shared rule set on the blockchain. Based on these business rules, rule determination is performed on the business data to calculate sub-rule determination results. The sub-rule determination results are then calculated to obtain a total rule determination result, which is obtained by multiple business parties jointly executing rule determination. In this application, business rules required for business parties to perform rule judgments are obtained from a shared rule set. A blockchain is established between multiple business parties to enable communication between them. Since the shared rule set is used by multiple business parties and the judgment results of multiple sub-rules calculated based on business rules are public, the calculation process and results of multiple business parties can be made public, making the rule judgment process of each business party open and transparent. The overall rule judgment result is obtained by multiple business parties jointly performing rule judgments, so the overall business judgment process needs to be jointly decided by multiple business parties, thereby increasing the trust between multiple business parties.
[0099] Furthermore, based on the first embodiment of this application, another embodiment of this application is provided, in which reference is made to... Figure 2 The first business rule includes on-chain contract rules and off-chain general rules;
[0100] The step of performing rule determination on the business data based on the first business rule and calculating the sub-rule determination result includes:
[0101] Step S201: If the first business rule is an on-chain contract rule, then according to the on-chain contract rule, the business data is invoked to calculate the sub-rule determination result.
[0102] As an example, on-chain contract rules are specifically business rules uploaded to the blockchain, where on-chain contract rules follow the calling method of smart contracts.
[0103] As an example, contract invocation is a process of execution through the smart contract's execution process and processing logic. The advantages of contract invocation are that it is faster to compute, and the computation process is transparent and secure, with the corresponding rule-based judgment process being made public.
[0104] As an example, after the contract is invoked, the calculated sub-rule determination result is uploaded to the blockchain.
[0105] Step S202: If the business rule is an off-chain general rule, then based on the business party, the business data is judged according to the off-chain general rule, and the sub-rule judgment result is calculated.
[0106] As an example, off-chain general rules are the business rules used by each business party when executing rule judgments, and off-chain general rules are not uploaded to the blockchain.
[0107] As an example, when the business rule used is an off-chain ordinary rule, the business party completes the calculation process itself and then uploads the obtained sub-rule judgment result to the blockchain. At this time, the rule judgment process executed by the business party is not public, but other business parties can see the sub-rule judgment result calculated by the current business party.
[0108] As an example, when using off-chain general rules, each business party can also share the rule set they use. After obtaining the consent of the relevant business party, the business party can upload it to the blockchain.
[0109] Step S203: Receive the sub-rule judgment result executed by the business party corresponding to the first business rule.
[0110] As an example, after the business party corresponding to the first business rule completes the rule judgment, it uploads the obtained sub-rule judgment result to the blockchain, thereby making the rule judgment result of each business party public and transparent.
[0111] In this embodiment, the rule determination of each business party is executed by on-chain contract rules and off-chain ordinary rules respectively. While protecting the privacy of the business parties, the results or processes of each rule determination are made public. By combining expression language with business rules, the rule execution is automated and the rule determination process is made more secure.
[0112] Furthermore, based on the first and second embodiments of this application, another embodiment of this application is provided. In this embodiment, the business rules in the shared rule set can be freely combined. When there is no business rule corresponding to the business data in the shared rule set, multiple business rules are combined, and the combined business rule is used as the first business rule corresponding to the rule determination.
[0113] As an example, the rule determination process can be performed by a single rule or by combining multiple rules to obtain the corresponding rule determination result.
[0114] As an example, when there is no business rule corresponding to the business data in the shared rule set, and the required first business rule can be obtained by combining other business rules in the shared rule set, then the other business rules are combined, and the combined rule is used as the business rule required when executing the rule judgment. For example, if business party A needs rule a to execute the business judgment, it can combine rule b and rule c in the shared rule set to obtain rule a. Then, business party A selects rule a to execute the rule judgment.
[0115] As an example, combined rules can be generated based on business rules in a shared rule set without uploading new business rules, reducing other unnecessary operations. At the same time, other business parties can also monitor the combined rules being executed by the business party currently making rule determinations, making the rule determination process open and transparent.
[0116] In this embodiment, by combining the rules in the shared business rules, the rules required by the business party are obtained, avoiding the need for the business party to upload new rules, reducing unnecessary manual operations, and the rule determination process can also be monitored, improving the credibility of the collaborative determination among multiple parties.
[0117] Reference Figure 3 , Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.
[0118] like Figure 3 As shown, the blockchain-based rule-determination device may include: a processor 1001, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005.
[0119] Optionally, the blockchain-based rule-making device may also include a user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, a WiFi module, etc. The user interface may include a display screen and an input submodule such as a keyboard; optional user interfaces may also include standard wired or wireless interfaces. The network interface may include standard wired or wireless interfaces (such as a Wi-Fi interface).
[0120] Those skilled in the art will understand that Figure 3 The structure of the blockchain-based rule determination device shown does not constitute a limitation on the blockchain-based rule determination device. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0121] like Figure 3As shown, the memory 1005, serving as a storage medium, may include an operating system, a network communication module, and a blockchain-based rule-determination program. The operating system is a program that manages and controls the hardware and software resources of the blockchain-based rule-determination device, supporting the operation of the blockchain-based rule-determination program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the blockchain-based rule-determination system.
[0122] exist Figure 3 In the blockchain-based rule determination device shown, the processor 1001 is used to execute the blockchain-based rule determination program stored in the memory 1005 to implement the steps of the blockchain-based rule determination method described above.
[0123] The specific implementation method of the rule determination device based on blockchain in this application is basically the same as the embodiments of the rule determination method based on blockchain described above, and will not be repeated here.
[0124] This application also provides a blockchain-based rule determination device, which includes:
[0125] The acquisition module is used to acquire the first business rule corresponding to the business data of multiple business parties executing the rule judgment, wherein a blockchain is built among the multiple business parties, and the first business rule is selected from the shared rule set on the blockchain;
[0126] The determination module is used to perform rule determination on the business data based on the first business rule and calculate the sub-rule determination result;
[0127] The calculation module is used to calculate the sub-rule judgment results to obtain the overall rule judgment result, wherein the overall rule judgment result is obtained by multiple business parties jointly performing rule judgment.
[0128] In one possible implementation of this application, the determination module includes:
[0129] The calling unit is used to, if the first business rule is an on-chain contract rule, call the business data according to the on-chain contract rule and calculate the sub-rule judgment result;
[0130] The first calculation unit is used to, if the first business rule is an off-chain general rule, perform rule determination on the business data based on the business party and the off-chain general rule, and calculate the sub-rule determination result.
[0131] The first receiving unit is used to receive the sub-rule judgment result executed by the business party corresponding to the first business rule.
[0132] In one possible implementation of this application, the blockchain-based rule determination device further includes:
[0133] The determination module is used to determine the business rule identifier of the rule to be used based on the business name corresponding to the business data;
[0134] The selection module is used to select the first business rule corresponding to the business data from the shared rule set according to the rule parameters.
[0135] In one possible implementation of this application, the selection module includes:
[0136] The query unit is used to query whether a corresponding business rule exists in the shared rule set based on the business rule identifier;
[0137] The determining unit is configured to, if the shared rule set contains a business rule corresponding to the business data, then use the business rule corresponding to the business data as the first business rule.
[0138] The second receiving unit is configured to receive the first business rule uploaded by the business party according to the permission instructions of multiple business parties if there is no business rule corresponding to the business data in the shared rule set.
[0139] In one possible embodiment of this application, the receiving unit includes:
[0140] The sending unit is used to send upload requests to multiple business parties in the blockchain and receive permission instructions from multiple business parties.
[0141] The third receiving unit is used to receive the first business rule uploaded by the business party according to the permission instruction.
[0142] In one possible implementation of this application, the computing module further includes:
[0143] The second calculation unit is used to calculate the sub-rule judgment result according to the preset rule expression of the blockchain and output the total rule judgment result.
[0144] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0145] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better 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 storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0147] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A rule-based determination method based on blockchain, characterized in that, The method includes the following steps: Obtain the first business rule corresponding to the business data of multiple business parties executing the rule determination, wherein a blockchain is built among the multiple business parties, and the first business rule is selected from the shared rule set on the blockchain; Based on the first business rule, the business data is subjected to rule determination, and the sub-rule determination result is calculated. The sub-rule determination results are calculated to obtain the overall rule determination result, wherein the overall rule determination result is obtained by multiple business parties jointly executing rule determination. Before the step of obtaining the first business rule corresponding to the business data of multiple business parties' execution rule determination, the following steps are included: Based on the business name corresponding to the business data, determine the rule parameters of the rule to be used; Based on the rule parameters, select the first business rule corresponding to the business data from the shared rule set; The rule parameters include the business rule identifier; The step of selecting the first business rule corresponding to the business data in the shared rule set according to the rule parameters includes: Based on the business rule identifier, query whether a corresponding business rule exists in the shared rule set; If the shared rule set contains a business rule corresponding to the business data, then the business rule corresponding to the business data shall be used as the first business rule. If there is no business rule corresponding to the business data in the shared rule set, then the first business rule uploaded by the business party is received according to the permission instructions of multiple business parties; The business rules in the shared rule set can be freely combined. When there is no business rule corresponding to the business data in the shared rule set, multiple business rules are combined and the combined business rule is used as the first business rule corresponding to the rule determination.
2. The rule-based determination method based on blockchain as described in claim 1, characterized in that, The first business rule includes on-chain contract rules and off-chain general rules; The step of performing rule determination on the business data based on the first business rule and calculating the sub-rule determination result includes: If the first business rule is an on-chain contract rule, then according to the on-chain contract rule, the business data is invoked through a contract to calculate the sub-rule determination result; If the business rule is an off-chain general rule, then based on the business party, the business data is judged according to the off-chain general rule, and the sub-rule judgment result is calculated. Receive the sub-rule judgment result executed by the business party corresponding to the first business rule.
3. The rule-based determination method based on blockchain as described in claim 1, characterized in that, The step of receiving the first business rule uploaded by the business party according to the permission instructions of multiple business parties includes: Send upload requests to multiple business parties in the blockchain and receive permission instructions from multiple business parties; According to the permission instruction, the first business rule uploaded by the business party is received.
4. The rule determination method based on blockchain as described in claim 1, characterized in that, The step of calculating the sub-rule determination results to obtain the overall rule determination result includes: Based on the preset rule expression of the blockchain, the sub-rule judgment results are calculated, and the overall rule judgment result is output.
5. A rule-determination device based on blockchain, characterized in that, The blockchain-based rule determination device includes: The acquisition module is used to acquire the first business rule corresponding to the business data of multiple business parties executing the rule judgment, wherein a blockchain is built among the multiple business parties, and the first business rule is selected from the shared rule set on the blockchain; The determination module is used to perform rule determination on the business data based on the first business rule and calculate the sub-rule determination result; The calculation module is used to calculate the sub-rule judgment result to obtain the total rule judgment result, wherein the total rule judgment result is obtained by multiple business parties jointly performing rule judgment. Before the step of obtaining the first business rule corresponding to the business data of multiple business parties' execution rule determination, the following steps are included: Based on the business name corresponding to the business data, determine the rule parameters of the rule to be used; Based on the rule parameters, select the first business rule corresponding to the business data from the shared rule set; The rule parameters include the business rule identifier; The step of selecting the first business rule corresponding to the business data in the shared rule set according to the rule parameters includes: Based on the business rule identifier, query whether a corresponding business rule exists in the shared rule set; If the shared rule set contains a business rule corresponding to the business data, then the business rule corresponding to the business data shall be used as the first business rule. If there is no business rule corresponding to the business data in the shared rule set, then the first business rule uploaded by the business party is received according to the permission instructions of multiple business parties; The business rules in the shared rule set can be freely combined. When there is no business rule corresponding to the business data in the shared rule set, multiple business rules are combined and the combined business rule is used as the first business rule corresponding to the rule determination.
6. A rule-determination device based on blockchain, characterized in that, The device includes: a memory, a processor, and a blockchain-based rule determination program stored in the memory and executable on the processor, the blockchain-based rule determination program being configured to implement the steps of the blockchain-based rule determination method as described in any one of claims 1 to 4.
7. A computer storage medium, characterized in that, The computer storage medium stores a blockchain-based rule determination program, which, when executed by a processor, implements the steps of the blockchain-based rule determination method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Data processing method and device based on block chains
CN110533318A
Blockchain-based consensus process
CN111417946A
