Public resource transaction data analysis method and system based on blockchain technology

By parsing and processing blockchain transaction data and using smart contracts for data fusion and analysis, the problem of blockchain transaction data errors and tampering is solved, accurate analysis and repair of data is achieved, and the integrity and security of transaction data are ensured. sex.

CN118229424BActive Publication Date: 2024-08-27GUANGZHOU TRADING GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410639437.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-08-27
Estimated Expiration
2044-05-22

AI Technical Summary

Technical Problem

Public resource transaction data in blockchain technology are prone to errors or tampering, leading to data inconsistency and loss. It is difficult to effectively analyze and repair these errors with existing technology.

Method used

By obtaining the transaction data of each participating chain, parsing and broadcasting it in the relay chain, calling the data fusion smart contract for processing, determining the abnormality of the transaction data, and using the preset data analysis smart contract to analyze the transaction data to determine whether there are abnormalities. .

Benefits of technology

It achieves accurate analysis and abnormal judgment of blockchain transaction data, ensures the accuracy of data analysis, and avoids data repair difficulties caused by the non-tamperability of the blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118229424B
    Figure CN118229424B
Patent Text Reader

Abstract

The present invention relates to the field of blockchain technology, solves the problem of abnormalities in chain data, and discloses a method and system for analyzing public resource transaction data based on blockchain technology, the method comprising: obtaining transaction data sent by each participating chain and parsing it, and broadcasting it in a relay chain; based on transaction information, transaction timestamp and digital signature, calling a first data fusion smart contract for processing to obtain a first data fusion result; based on the first data fusion result, transaction identification information and target block identification, calling a second data fusion smart contract for processing to obtain a second data fusion result; the master node of the relay chain matches the block through the second data fusion result, determines the target block, and sends the transaction data to the target block; the target block calls a preset data analysis smart contract to analyze the transaction data to determine whether the transaction data is abnormal. The present invention can analyze the transaction data and determine whether there is an abnormality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a public resource transaction data analysis method and system based on blockchain technology. Background Art

[0002] Blockchain is a distributed database technology that stores data in the form of blocks and uses cryptography to ensure the security and integrity of data. It has now been widely used in various fields, including cryptocurrency, smart contracts, supply chain management, digital identity authentication, etc.

[0003] Blockchain consists of three basic elements, namely transactions, blocks and chains. Each block in the blockchain stores data records (i.e. transactions) within a specified time period, and constructs a secure and reliable chain through cryptography to form an unalterable, distributed ledger shared by all members. Blockchain is a ledger that records all historical transactions. Different nodes hold a copy of each, and the nodes use a consensus algorithm to ensure that everyone's ledger eventually converges. Therefore, blockchain has the characteristic of being unalterable.

[0004] Transaction data on the blockchain refers to the record of all transactions conducted on the blockchain network. These transaction data contain various information about the transaction, such as the initiator and recipient addresses of the transaction, the transaction amount, the timestamp, the transaction fee, etc. Each transaction is packaged into a block, broadcast and verified through the blockchain network, and finally added to the irreversible sequence of the blockchain. To conduct digital asset transactions through the blockchain, first register the off-chain assets on the chain and convert them into standardized digital assets on the blockchain. This can not only store transactions, but also achieve settlement at the same time as the transaction, improve transaction efficiency, and reduce the cost of communication and collaboration between institutions.

[0005] The fact that blockchain cannot be tampered with does not mean that data errors will not occur. Common data errors generally occur in the following situations:

[0006] 1. Human errors may occur when creating and broadcasting transactions, such as incorrectly entered addresses, incorrect transaction amounts, etc., which may lead to the loss or mistransfer of assets, or human operations or interference may lead to errors in blockchain data, such as malicious node operations, tampering by insiders, etc.;

[0007] 2. The blockchain network may be subject to various types of attacks, which may cause transaction data to be tampered with or deleted, destroying the integrity and security of the blockchain;

[0008] 3. Vulnerabilities or errors in smart contracts may lead to unexpected behaviors, which may cause errors in contract data or loss of assets;

[0009] 4. Due to inconsistencies between network nodes, the blockchain network may be forked, that is, two or more different chains may appear. In this case, transaction data may be inconsistent on different chains, which requires mediation and repair;

[0010] 5. Due to node failure, storage medium failure or other reasons, blockchain data may be erroneous or corrupted, which may result in loss or inconsistency of transaction data.

[0011] Once data errors occur and are uploaded to the chain, various unnecessary troubles will arise due to its non-tamperable nature. If you want to modify the data, the current common method is to adjust the data by adding new ones, and then repair the data, which increases the workload. How can we analyze the public resource transaction data and determine whether the data is wrong or the data is true or false? Summary of the invention

[0012] In view of the shortcomings of the prior art, the present invention provides a public resource transaction data analysis method and system based on blockchain technology.

[0013] In order to solve the above technical problems, the present invention is solved through the following technical solutions: a public resource transaction data analysis method based on blockchain technology, comprising the following steps: obtaining and parsing the transaction data sent by each participating chain, at least obtaining transaction identification information, transaction information, transaction timestamp, digital signature and target block identification, and broadcasting in the relay chain; based on the transaction information, transaction timestamp and digital signature, calling the first data fusion smart contract for processing to obtain the first data fusion result; based on the first data fusion result, transaction identification information and target block identification, calling the second data fusion smart contract for processing to obtain the second data fusion result; the master node of the relay chain matches the block through the second data fusion result, determines the target block, and sends the transaction data to the target block; the target block calls the preset data analysis smart contract to analyze the transaction data to determine whether there is any abnormality in the transaction data.

[0014] As an implementable method, the method calls the first data fusion smart contract for processing based on the transaction information, transaction timestamp and digital signature to obtain the first data fusion result, including the following steps: determining the fusion sequence value and fusion weight corresponding to the transaction information, transaction timestamp and digital signature, wherein the fusion sequence value corresponds to the position in the first data fusion result; constructing a first data fusion model based on the fusion sequence value and the fusion weight based on the receiving protocol of the participating chain and the target block; calling the first data fusion smart contract, and fusing the transaction identifier, transaction type identifier, transaction timestamp and digital signature through the first data fusion model to generate the first data fusion result.

[0015] As an implementable method, the second data fusion smart contract is called for processing based on the first data fusion result, transaction identification information and target block identification to obtain the second data fusion result, including the following steps: determining the first sequence value and the second sequence value corresponding to the transaction identification information and the target block identification respectively, wherein the first sequence value and the second sequence value correspond to the positions of the transaction identification information and the target block identification in the second data fusion result; based on the receiving protocol of the participating chain and the target block, a second data fusion model is constructed based on the first sequence value and the second sequence value; the second data fusion smart contract is called to fuse the transaction identification information, the target block identification and the first data fusion result through the second data fusion model to generate a second data fusion result.

[0016] As an implementable method, the master node of the relay chain matches the block through the second data fusion result, determines the target block, and sends the transaction data to the target block, including the following steps: presetting a block matching index, in which the transaction identification information, the target block identification and the block are in a corresponding relationship; with the help of the master node, the second data fusion result is matched with the block based on the block matching index to determine the target block.

[0017] As an implementable method, the target block calls a preset data analysis smart contract to analyze the transaction data to determine whether the transaction data has an abnormality, including the following steps: calling a preset data analysis smart contract to segment the second data fusion result according to a preset segmentation model to obtain a data segmentation result; judging each data segmentation result through a preset judgment model to obtain a judgment result, and judging whether each data segmentation result has an abnormality based on the judgment result, and marking the corresponding data segmentation result if it is abnormal; presetting a reasonable range for each data segmentation result, and constructing an abnormal probability model through the reasonable range and fluctuation range; calculating the abnormal probability of each data in the abnormally marked data segmentation result based on the abnormal probability model to obtain the abnormal probability of each data in the data segmentation result; if the abnormal probability exceeds the preset probability threshold, the corresponding data is abnormal.

[0018] As an implementable method, each data splitting result is judged by a preset judgment model to obtain a judgment result, including the following steps: presetting multiple constraint rules for the data splitting result, and building a judgment model based on the multiple constraint rules; judging each data splitting result by the judgment model, if it exceeds a preset threshold, the corresponding data splitting result is abnormal; the judgment model is expressed as follows: in, express Under the prerequisite 1 if the condition is true, express The constraint rule matching threshold of the data splitting result, Indicates the number of constraint rules.

[0019] As an implementable method, the abnormal probability model is expressed as follows: in, is the abnormal probability of each data in the data splitting result, For each data's reasonable range, For the fluctuation range of each data, The length of the result of data splitting.

[0020] As an implementable method, the transaction identification information includes at least account information, other account related information, account identification information and account fund flow information; the transaction information includes at least transaction amount information.

[0021] A public resource transaction data analysis system based on blockchain technology includes: a data acquisition module, which is used to acquire and parse the transaction data sent by each participating chain, at least obtain transaction identification information, transaction information, transaction timestamp, digital signature and target block identification, and broadcast it in the relay chain; a first fusion module, based on the transaction identification information, transaction information, transaction timestamp and digital signature, calls a first data fusion smart contract for processing to obtain a first data fusion result; a second fusion module, based on the data fusion result and the target block identification, calls a second data fusion smart contract for processing to obtain a second data fusion result; a block matching module, which is configured such that the master node of the relay chain matches the block through the transaction information and the second data fusion result, determines the target block, and sends the transaction data to the target block; an analysis and determination module, which is configured such that the target block calls a preset data analysis smart contract to analyze the transaction data to determine whether the transaction data has an abnormality.

[0022] As an implementable embodiment, the analysis and determination module is configured to: call a preset data analysis smart contract, segment the second data fusion result according to a preset segmentation model, and obtain a data segmentation result; judge each data segmentation result through a preset judgment model to obtain a judgment result, and judge whether each data segmentation result has an abnormality based on the judgment result, and if it is abnormal, mark the corresponding data segmentation result; preset a reasonable range for each data segmentation result, and construct an abnormal probability model through the reasonable range and fluctuation range; calculate the abnormal probability of each data in the abnormally marked data segmentation result based on the abnormal probability model to obtain the abnormal probability of each data in the data segmentation result; if the abnormal probability exceeds the preset probability threshold, the corresponding data is abnormal.

[0023] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0024] A public resource transaction data analysis device based on blockchain technology includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.

[0025] The present invention has significant technical effects due to the adoption of the above technical solutions: through the method of the present invention, the transaction data sent by each participating chain can be analyzed and whether there is an abnormality can be determined; various data are fused according to the data fusion model and finally matched to the corresponding block; the target block first splits the data, and then calls the preset data analysis smart contract to analyze the transaction data to determine whether there is an abnormality in the transaction data. The split data splitting result is not consistent with the order of data fusion, but is split in a disrupted order to ensure the accuracy of data analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0027] Figure 1 It is a schematic diagram of the overall process of the method of the present invention;

[0028] Figure 2 It is a schematic diagram of the overall structure of the system of the present invention;

[0029] Figure 3-Figure 5 It is a schematic diagram of the flow chart corresponding to several embodiments of the present invention. DETAILED DESCRIPTION

[0030] The present invention is further described in detail below in conjunction with embodiments. The following embodiments are for explanation of the present invention but the present invention is not limited to the following embodiments.

[0031] Example 1

[0032] A method for analyzing public resource transaction data based on blockchain technology, such as Figure 1 As shown, the following steps are included:

[0033] S100, obtain the transaction data sent by each participating chain and parse it, obtain at least the transaction identification information, transaction information, transaction timestamp, digital signature and target block identification, and broadcast it in the relay chain;

[0034] S200, based on the transaction information, transaction timestamp and digital signature, calling the first data fusion smart contract for processing to obtain a first data fusion result;

[0035] S300, based on the first data fusion result, the transaction identification information and the target block identification, calling the second data fusion smart contract for processing to obtain the second data fusion result;

[0036] S400, the master node of the relay chain matches the block through the second data fusion result, determines the target block, and sends the transaction data to the target block;

[0037] S500: The target block calls a preset data analysis smart contract to analyze the transaction data to determine whether there is any abnormality in the transaction data.

[0038] The method of the present invention can analyze the transaction data sent by each participating chain and determine whether there is an anomaly; various data are integrated according to the data fusion model and finally matched to the corresponding block; the target block first splits the data, and then calls the preset data analysis smart contract to analyze the transaction data to determine whether there is an anomaly in the transaction data. The split data splitting result is not consistent with the order of data fusion, but is split in a disrupted order to ensure the accuracy of data analysis.

[0039] Due to the immutability of blockchain, there are many types of transactions based on blockchain. For example, they can be divided according to the field to which the transaction belongs, such as financial business, judicial business, supply chain business, etc.; of course, they can also be divided according to application scenarios, such as letter of credit deposit business, product traceability business; they can also be divided according to the scale of cross-chain business, the attributes of the target chain and the source chain. This application does not specifically limit how to divide transaction types. This application does not currently involve cross-chain consensus or processing. The focus of this application is on abnormal analysis and judgment of transaction data.

[0040] In blockchain technology, transaction ID, transaction type ID and transaction timestamp are three key elements in transaction records, which together ensure the uniqueness, type distinction and time order of transactions. Transaction ID is a unique identifier for each transaction in the blockchain. It is usually obtained by hashing the transaction content through a hash function. It is used to quickly find and identify specific transactions and is an important part of transaction verification and recording. Transaction type ID is used to distinguish different types of transactions, because the blockchain network may support multiple transaction types, such as ordinary payments, smart contract calls, token issuance, etc. The specific implementation and use of transaction type ID may vary depending on the blockchain system. Transaction timestamp is an element that records the time when the transaction occurred, usually a combination of date and time. Timestamps help determine the order of transactions and provide a historical record in the blockchain's immutable ledger.

[0041] In one embodiment, based on the transaction information, transaction timestamp and digital signature, the first data fusion smart contract is called for processing to obtain a first data fusion result, such as Figure 3 As shown, the following steps are included:

[0042] S210, determining a fusion sequence value and a fusion weight corresponding to the transaction information, the transaction timestamp, and the digital signature, wherein the fusion sequence value corresponds to a position in the first data fusion result;

[0043] S220, based on the receiving protocol of the participating chain and the target block, construct a first data fusion model based on the fusion sequence value and the fusion weight;

[0044] S230. Call the first data fusion smart contract, and fuse the transaction identifier, transaction type identifier, transaction timestamp and digital signature through the first data fusion model to generate the first data fusion result.

[0045] In this embodiment, the first data fusion model can be implemented relying on the existing data fusion model. During the implementation process, the fusion sequence value and the fusion weight will be taken into account. The transaction information, transaction timestamp and digital signature will be sorted according to their corresponding fusion sequence values, and the transaction information, transaction timestamp and digital signature will be weighted according to their corresponding fusion weights. Then, the first data fusion smart contract will be called to obtain the first data fusion result through the first data fusion model.

[0046] In one embodiment, based on the first data fusion result, transaction identification information and target block identification, the second data fusion smart contract is called for processing to obtain the second data fusion result, such as Figure 4 As shown, the following steps are included:

[0047] S310, determining a first sequence value and a second sequence value corresponding to the transaction identification information and the target block identification respectively, wherein the first sequence value and the second sequence value correspond to positions of the transaction identification information and the target block identification in the second data fusion result;

[0048] S320, based on the receiving protocol of the participating chain and the target block, construct a second data fusion model based on the first sequence value and the second sequence value;

[0049] S330, calling the second data fusion smart contract, and fusing the transaction identification information, the target block identification and the first data fusion result through the second data fusion model to generate a second data fusion result.

[0050] In this embodiment, the second data fusion model can be implemented relying on the existing data fusion model. During the implementation process, the first sequence value and the second sequence value will be taken into account, and the transaction identification information and the target block identification will be sorted by their respective corresponding first sequence values ​​and second sequence values, and then the second data fusion smart contract will be called to obtain the second data fusion result through the second data fusion model.

[0051] The purpose of data fusion is to fuse data from different sources or sort them in a random order to obtain a first data fusion result, and then obtain a second data fusion result. The second data fusion result will be reprocessed and anomaly judgment will be made to finally determine whether the data is abnormal. If it is abnormal, it cannot be processed on the chain.

[0052] In one embodiment, the master node of the relay chain matches the block through the second data fusion result, determines the target block, and sends the transaction data to the target block, including the following steps: presetting a block matching index, in which the transaction identification information, the target block identification and the block are in a corresponding relationship; with the help of the master node, matching the second data fusion result with the block based on the block matching index to determine the target block.

[0053] In order to ensure the accuracy of the match, this embodiment sets a block matching index, the purpose of which is to enable the second data fusion result to be quickly matched with the block to ensure that the target block is matched.

[0054] In one embodiment, the target block calls a preset data analysis smart contract to analyze the transaction data to determine whether there are any abnormalities in the transaction data, such as Figure 5 As shown, the following steps are included:

[0055] S510, calling a preset data analysis smart contract to segment the second data fusion result according to a preset segmentation model to obtain a data segmentation result;

[0056] S520, judging each data splitting result by using a preset judgment model to obtain a judgment result, and judging whether each data splitting result is abnormal based on the judgment result, and if abnormal, marking the corresponding data splitting result;

[0057] S530, presetting a reasonable range for each data splitting result, and building an abnormal probability model through the reasonable range and fluctuation range;

[0058] S540, calculating the abnormal probability of each data in the data splitting result of the abnormal mark based on the abnormal probability model to obtain the abnormal probability of each data in the data splitting result;

[0059] S550: If the abnormal probability exceeds the preset probability threshold, the corresponding data is abnormal.

[0060] The preset segmentation model in this embodiment can be implemented by the existing segmentation model. In the segmentation process, the segmentation should not be performed in the order of the second data fusion results. The second data fusion results can be segmented in a disordered arrangement rule. This will cause all the data to be scattered, thereby ensuring the accuracy of subsequent analysis results.

[0061] Specifically, each data splitting result is judged by a preset judgment model to obtain a judgment result, including the following steps: presetting multiple constraint rules for the data splitting result, and building a judgment model based on the multiple constraint rules; judging each data splitting result by the judgment model, if it exceeds a preset threshold, the corresponding data splitting result is abnormal; wherein the judgment model is expressed as follows: in, express Under the prerequisite 1 if the condition is true, express The constraint rule matching threshold of the data splitting result, Indicates the number of constraint rules.

[0062] In other words, during the initial judgment, a variety of constraint rules will be set to determine whether there are any anomalies in each data splitting result. If there are anomalies, a secondary analysis will be performed.

[0063] In addition, the abnormal probability model can be calculated by the following calculation formula: in, is the abnormal probability of each data in the data splitting result, For each data's reasonable range, For the fluctuation range of each data, is the length of the data splitting result. This calculation formula is a derivative formula for locating abnormal data from the data set and calculating the abnormal probability. When fitting, it is necessary to set the reasonable range and fluctuation range of each data. The reasonable range and fluctuation range are based on the empirical values ​​of the historical data set, and will also be adjusted according to the time series and transaction data to ensure the accuracy of the calculation.

[0064] Of course, if the data set is large enough, other big data models can be used to train the anomaly probability model. For example, the anomaly probability model can be obtained by training the clustering model or the isolation forest model, and then the abnormal data can be identified and the anomaly probability can be calculated.

[0065] In addition, you can also rely on simpler implementation methods, such as the mean and standard deviation method. Assuming that the data splitting results follow a normal distribution, you can use the mean and standard deviation to determine whether the data is abnormal, that is, the outlier judgment condition = (data point - mean) / standard deviation > threshold; or judge the outlier based on the percentile of the data, select a data value, and if the data point exceeds a certain threshold, it can be defined as an outlier.

[0066] After calculating the abnormal probability, it is compared with the preset probability threshold to determine whether each data is abnormal. If there is abnormal data, subsequent operations are performed.

[0067] Example 2

[0068] A public resource transaction data analysis system based on blockchain technology, such as Figure 2 As shown, it includes: a data acquisition module 100, which is used to acquire and parse the transaction data sent by each participating chain, at least obtain transaction identification information, transaction information, transaction timestamp, digital signature and target block identification, and broadcast it in the relay chain; a first fusion module 200, based on the transaction identification information, transaction information, transaction timestamp and digital signature, calls the first data fusion smart contract for processing to obtain a first data fusion result; a second fusion module 300, based on the data fusion result and the target block identification, calls the second data fusion smart contract for processing to obtain a second data fusion result; a block matching module 400, which is configured to: the master node of the relay chain matches the block through the transaction information and the second data fusion result, determines the target block, and sends the transaction data to the target block; an analysis and determination module 500, which is configured to: the target block calls a preset data analysis smart contract to analyze the transaction data to determine whether the transaction data has an abnormality.

[0069] In one embodiment, the analysis and determination module 500 is configured to: call a preset data analysis smart contract, segment the second data fusion result according to a preset segmentation model, and obtain a data segmentation result; judge each data segmentation result through a preset judgment model to obtain a judgment result, and judge whether each data segmentation result is abnormal based on the judgment result, and if abnormal, mark the corresponding data segmentation result; preset a reasonable range for each data segmentation result, and construct an abnormal probability model through the reasonable range and fluctuation range; calculate the abnormal probability of each data in the abnormally marked data segmentation result based on the abnormal probability model to obtain the abnormal probability of each data in the data segmentation result; if the abnormal probability exceeds the preset probability threshold, the corresponding data is abnormal.

[0070] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0071] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0072] The present invention is described with reference to the flowcharts and / or block diagrams of the method, terminal device (system), and computer program product according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0075] It should be noted that the "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" appearing in various places throughout the specification do not necessarily refer to the same embodiment.

[0076] In addition, it should be noted that the shapes and names of the parts and components of the specific embodiments described in this specification may be different, and any equivalent or simple changes made based on the structure, features and principles described in the patent concept of the present invention are included in the protection scope of the patent of the present invention. Those skilled in the art of the present invention can make various modifications or supplements to the specific embodiments described or replace them in a similar manner, as long as they do not deviate from the structure of the present invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

Claims

1. A method for analyzing public resource transaction data based on blockchain technology, characterized in that: The following steps are involved: Obtain the transaction data sent by each participating chain and parse it, at least obtain the transaction identification information, transaction information, transaction timestamp, digital signature and target block identification, and broadcast it in the relay chain; Based on the transaction information, transaction timestamp and digital signature, the first data fusion smart contract is called for processing to obtain a first data fusion result; Based on the first data fusion result, the transaction identification information and the target block identification, the second data fusion smart contract is called for processing to obtain the second data fusion result; The master node of the relay chain matches the block through the second data fusion result, determines the target block, and sends the transaction data to the target block; The target block calls a preset data analysis smart contract to analyze the transaction data to determine whether there is any abnormality in the transaction data; The target block calls a preset data analysis smart contract to analyze the transaction data to determine whether there is an abnormality in the transaction data, including the following steps: Calling a preset data analysis smart contract to segment the second data fusion result according to a preset segmentation model to obtain a data segmentation result; Each data splitting result is judged by a preset judgment model to obtain a judgment result, and based on the judgment result, it is judged whether each data splitting result has an abnormality, and if it is abnormal, the corresponding data splitting result is marked; Preset a reasonable range for each data split result, and build an abnormal probability model through the reasonable range and fluctuation range; The abnormal probability of each data in the data splitting result of the abnormal mark is calculated based on the abnormal probability model to obtain the abnormal probability of each data in the data splitting result; If the anomaly probability exceeds the preset probability threshold, the corresponding data is abnormal; The process of judging each data splitting result by using a preset judgment model to obtain a judgment result includes the following steps: Preset multiple constraint rules for data splitting results, and build a judgment model based on multiple constraint rules; Each data splitting result is judged by the judgment model, and if it exceeds a preset threshold, the corresponding data splitting result is abnormal; The judgment model is expressed as follows: in, express Under the prerequisite 1 if the condition is true, express The constraint rule matching threshold of the data splitting result, Indicates the number of constraint rules; The abnormal probability model is expressed as follows: in, is the abnormal probability of each data in the data splitting result, For each data's reasonable range, For the fluctuation range of each data, The length of the result of data splitting.

2. The public resource transaction data analysis method based on blockchain technology according to claim 1 is characterized in that: The method of calling the first data fusion smart contract for processing based on the transaction information, the transaction timestamp and the digital signature to obtain the first data fusion result includes the following steps: Determine a fusion sequence value and a fusion weight corresponding to the transaction information, the transaction timestamp, and the digital signature, wherein the fusion sequence value corresponds to a position in the first data fusion result; Based on the receiving protocol of the participating chain and the target block, a first data fusion model is constructed based on the fusion sequence value and the fusion weight; The first data fusion smart contract is called, and the transaction identifier, transaction type identifier, transaction timestamp and digital signature are integrated through the first data fusion model to generate the first data fusion result.

3. The public resource transaction data analysis method based on blockchain technology according to claim 1 is characterized in that: The method of calling the second data fusion smart contract for processing based on the first data fusion result, the transaction identification information and the target block identification to obtain the second data fusion result includes the following steps: Determine a first sequence value and a second sequence value corresponding to the transaction identification information and the target block identification, respectively, wherein the first sequence value and the second sequence value correspond to positions of the transaction identification information and the target block identification in the second data fusion result; Based on the receiving protocol of the participating chain and the target block, a second data fusion model is constructed based on the first sequence value and the second sequence value; The second data fusion smart contract is called, and the transaction identification information, the target block identification and the first data fusion result are fused through the second data fusion model to generate a second data fusion result.

4. The public resource transaction data analysis method based on blockchain technology according to claim 1 is characterized in that: The master node of the relay chain matches the block through the second data fusion result, determines the target block, and sends the transaction data to the target block, including the following steps: A preset block matching index, in which the transaction identification information, the target block identification and the block are in a corresponding relationship; With the help of the master node, the second data fusion result is matched with the block based on the block matching index to determine the target block.

5. The public resource transaction data analysis method based on blockchain technology according to claim 1 is characterized in that: The transaction identification information at least includes account information, other account related information, account identification information and account fund flow information; the transaction information at least includes transaction amount information.

6. A public resource transaction data analysis system based on blockchain technology, characterized in that: include: The data acquisition module is used to obtain and parse the transaction data sent by each participating chain, at least obtain the transaction identification information, transaction information, transaction timestamp, digital signature and target block identification, and broadcast it in the relay chain; The first fusion module calls the first data fusion smart contract for processing based on the transaction identification information, transaction information, transaction timestamp and digital signature to obtain a first data fusion result; The second fusion module calls the second data fusion smart contract for processing based on the data fusion result and the target block identifier to obtain the second data fusion result; The block matching module is configured to: the master node of the relay chain matches the block through the transaction information and the second data fusion result, determines the target block, and sends the transaction data to the target block; The analysis and determination module is configured to: the target block calls a preset data analysis smart contract to analyze the transaction data to determine whether the transaction data is abnormal; Wherein, the analysis and determination module is configured as: Calling a preset data analysis smart contract to segment the second data fusion result according to a preset segmentation model to obtain a data segmentation result; Each data splitting result is judged by a preset judgment model to obtain a judgment result, and based on the judgment result, it is judged whether each data splitting result has an abnormality, and if it is abnormal, the corresponding data splitting result is marked; Preset a reasonable range for each data split result, and build an abnormal probability model through the reasonable range and fluctuation range; The abnormal probability of each data in the data splitting result of the abnormal mark is calculated based on the abnormal probability model to obtain the abnormal probability of each data in the data splitting result; If the anomaly probability exceeds the preset probability threshold, the corresponding data is abnormal; The process of judging each data splitting result by using a preset judgment model to obtain a judgment result includes the following steps: Preset multiple constraint rules for data splitting results, and build a judgment model based on multiple constraint rules; Each data splitting result is judged by the judgment model, and if it exceeds a preset threshold, the corresponding data splitting result is abnormal; The judgment model is expressed as follows: in, express Under the prerequisite 1 if the condition is true, express The constraint rule matching threshold of the data splitting result, Indicates the number of constraint rules; The abnormal probability model is expressed as follows: in, is the abnormal probability of each data in the data splitting result, For each data's reasonable range, For the fluctuation range of each data, The length of the result of data splitting.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

8. A public resource transaction data analysis device based on blockchain technology, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.