Data identification method, device, storage medium and electronic device based on blockchain
By using the identification method of sensor nodes and base station nodes in the blockchain network, the problem that the attacker is not easily discovered when the data is reproduced is solved, and effective identification of data attackers and data security is improved.
Patent Information
- Application Number
- CN202210713609.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-06-22
AI Technical Summary
In the prior art, when data is replayed, the problem that attackers are not easily discovered has not been effectively solved.
By using sensor nodes to monitor the event data sent by the target data source in the blockchain network, after generating and encrypting the data, the base station nodes are used to identify it, and the number of occurrences of event data after preset tag verification and decryption is determined whether the data source is a threat Data source, thereby realizing the identification of data attackers.
Effectively identifying and exposing data attackers reduces the risk of confidential data replay attacks and improves the security of data transmission.
Smart Images

Figure CN115086051B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and more specifically, to a blockchain-based data identification method, device, storage medium, and electronic device. Background Art
[0002] A wireless peer-to-peer network is a temporary network composed of wireless sensors with the characteristics of self-organization. In a wireless peer-to-peer network, malicious nodes can inject messages into the network, spread false messages or illegally eavesdrop on information through camouflage technology, and obtain the spatial location of the event. In order to prevent information leakage, the sender of the information generally needs to hide the digital signature, and the receiver of the information needs to identify the accuracy of the message source in order to hide the spatial location information and prevent leakage during the information transmission process. Since the spatial information generated by wireless sensors has the characteristics of confidentiality, privacy and sensitivity, the design of wireless peer-to-peer networks puts forward high requirements for the security and privacy protection of transmission and storage, such as private whereabouts, exclusive information, asset transactions, etc., especially when leaked to third-party institutions, private records and commercial secrets are easily stolen through association analysis and other means, while the receiver needs to judge the authenticity of the information obtained to prevent forged information intrusion or replay attacks. The traditional privacy protection method against replay attacks is to verify and authorize the identity of the accessing user to ensure that the legitimate user can safely access the confidential information, or to authenticate the wireless sensor to prevent malicious nodes from illegally accessing and accessing the spatial location information. Before users access transaction data through smart contracts, they must provide identity verification using a digital certificate to ensure the security and confidentiality of data sharing, similar to the identity authentication performed by a certification center as a third-party notary.
[0003] However, digital identity authentication technology still has shortcomings in preventing privacy leaks. When an eavesdropper has a legitimate digital identity, he can still send repeated signature information through the wireless network, or repeatedly report on the same hot event, affecting the recipient's judgment of the hot event and increasing the risk of confidential data replay attacks.
[0004] With regard to the problem in related technologies that when data is attacked by replay, data attackers are not easily discovered, and no effective solution has been proposed so far. Summary of the invention
[0005] The main purpose of this application is to provide a blockchain-based data identification method, device, storage medium and electronic device to solve the problem in the related technology that when data is attacked by replay, the data attacker is not easy to be discovered.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a data identification method of a blockchain is provided. The method includes: applying a data traceable signature in a blockchain network, wherein the blockchain network includes at least: at least one sensor node and at least one base station node, wherein the sensor node monitors multiple event data sent by a target data source; processes the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset label; sends the multiple processed event data to the base station node, identifies the multiple processed event data through the base station node, and obtains an identification result; determines whether the target data source is a threat data source according to the identification result.
[0007] Furthermore, after the sensor node monitors multiple event data sent by the target data source, the method further includes: using a key generation function to generate key information corresponding to the sensor node, wherein the key information includes: a public key corresponding to the sensor node and a private key corresponding to the sensor node.
[0008] Furthermore, processing multiple event data to obtain multiple processed event data includes: encrypting multiple event data using key information to obtain multiple encrypted event data; processing the multiple encrypted event data according to a label generation function to obtain multiple processed event data.
[0009] Furthermore, before sending multiple processed event data to the base station node and identifying the multiple processed event data through the base station node, the method also includes: decrypting the multiple processed event data through the base station node to obtain multiple decrypted event data; detecting whether there is abnormal data in the target event data among the multiple decrypted event data; if it is detected that the target event data has abnormal data, executing an identification step for data other than the target event data in the multiple decrypted event data; if it is detected that there is no abnormal data in the target event data, executing an identification step for all data in the multiple decrypted event data.
[0010] Furthermore, multiple processed event data are sent to a base station node, and the multiple processed event data are identified by the base station node, including: when it is detected that there is no abnormal data in the target event data, the legitimacy of the multiple decrypted event data is verified by a label verification function to obtain a verification result; if the verification result indicates that all event data in the multiple decrypted event data are legal data, the number of occurrences of the first decrypted event data with the same preset label in the multiple decrypted event data is counted, and the number of occurrences of the first decrypted event data is used as the identification result; if the verification result indicates that there is target event data in the multiple decrypted event data that is not legal data, the number of occurrences of the second decrypted event data in the multiple decrypted event data is counted, wherein the second decrypted event data is event data with the same preset label other than the target event data in the multiple decrypted event data, and the number of occurrences of the second decrypted event data is used as the identification result.
[0011] Further, determining whether the target data source is a threat data source according to the identification result includes one of the following: if the number of times the first decrypted event data appears in the identification result is greater than a preset number of times, determining that the target data source is a threat data source; if the number of times the first decrypted event data appears in the identification result is not greater than a preset number of times, determining that the target data source is not a threat data source; if the number of times the second decrypted event data appears in the identification result is greater than a preset number of times, determining that the target data source is a threat data source; if the number of times the second decrypted event data appears in the identification result is not greater than a preset number of times, determining that the target data source is not a threat data source.
[0012] Furthermore, the blockchain network also includes: an accounting node. After determining that the target data source is not a threat data source, the method also includes: synchronizing event data that is legitimate data among multiple decrypted event data to the target node in the blockchain network through the accounting node, wherein the target node is a node in the blockchain network other than the accounting node, the base station node, and the sensor node.
[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a data identification device of a blockchain is provided. The device includes: a data traceable signature applied to a blockchain network, wherein the blockchain network includes at least: at least one sensor node and at least one base station node, wherein a monitoring unit is used to monitor multiple event data sent by a target data source through the sensor node; a processing unit is used to process the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset label; an identification unit is used to send the multiple processed event data to the base station node, and the multiple processed event data are identified by the base station node to obtain an identification result; a determination unit is used to determine whether the target data source is a threat data source according to the identification result.
[0014] Through this application, the following steps are adopted: monitor multiple event data sent by the target data source through the sensor node; process the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset tag; send the multiple processed event data to the base station node, identify the multiple processed event data through the base station node, and obtain an identification result; determine whether the target data source is a threat data source based on the identification result. Through this application, the problem that the data attacker is not easy to be discovered when the data is replayed in the related technology is solved. By identifying the event data carrying the corresponding preset tag, the effect of making the data attacker easy to be discovered when the data is replayed is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1 It is a flowchart of a blockchain data identification method provided in an embodiment of the present application;
[0017] Figure 2 It is a schematic diagram of generating a traceable signature according to the data identification method of the blockchain provided in an embodiment of the present application;
[0018] Figure 3 It is a schematic diagram of a wireless peer-to-peer network traceable signature message format according to the blockchain data identification method provided in an embodiment of the present application;
[0019] Figure 4 This is a schematic diagram of a traceable signature system verification method for a blockchain data identification method provided in an embodiment of the present application;
[0020] Figure 5It is a traceable signature system access flow chart of the blockchain data identification method provided in the embodiment of the present application;
[0021] Figure 6 It is a schematic diagram of a traceable signature system according to the data identification method of the blockchain provided in an embodiment of the present application;
[0022] Figure 7 This is a schematic diagram of information access to a traceable signature system according to a data identification method of a blockchain provided in an embodiment of the present application;
[0023] Figure 8 This is a schematic diagram of a data identification device for a blockchain according to an embodiment of the present application. Figure 1 ;
[0024] Fig. 9 This is a schematic diagram of a data identification device for a blockchain according to an embodiment of the present application. Figure 2 ;
[0025] Fig.10 This is a schematic diagram of the network architecture of the blockchain data identification electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0030] Wireless Peer-to-Peer Network (WSN): A wireless sensor network is a distributed sensor network. The terminals are sensors that can sense the outside world. The sensors communicate wirelessly to form a multi-hop, self-organizing network. WSN is flexible in setting, the location of the device can be changed at any time, and it can establish wireless or wired connections with the Internet.
[0031] Threshold Signatures: A digital signature algorithm that refers to a group established by multiple signatories, in which the digital signatures generated by some subgroups are authorized as the digital signatures of the entire group.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0033] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flowchart of a blockchain data identification method provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0034] Step S101, a data traceable signature is applied to a blockchain network, wherein the blockchain network includes at least: at least one sensor node and at least one base station node, wherein the sensor node monitors multiple event data sent by a target data source.
[0035] Specifically, in a wireless peer-to-peer blockchain network, wireless sensor nodes (corresponding to the sensor nodes in this application) are deployed in large numbers inside or near the sensed objects through various means. The wireless sensor nodes form a wireless network through self-organization, and perceive, collect and process specific information in the network coverage area in a collaborative manner. It is possible to collect, process and analyze focus events (corresponding to event data in this application, the same below) provided by the target data source for information at any location at any time, where the target data source in this application can be the publisher of the focus event or the provider of the focus information.
[0036] Step S102, processing the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset label.
[0037] Specifically, when a wireless sensor node monitors multiple event data, it is necessary to generate a wireless sensor node public key and a private key in advance before digitally signing the focus information generated by the focus event using the wireless peer-to-peer network focus event hidden signature algorithm.
[0038] Optionally, in the blockchain data identification method provided in the embodiment of the present application, after monitoring multiple event data sent by the target data source through the sensor node, the method also includes: using a key generation function to generate key information corresponding to the sensor node, wherein the key information includes: a public key corresponding to the sensor node, and a private key corresponding to the sensor node.
[0039] Specifically, the key generation function Gen is executed to generate the public and private keys of the wireless sensor network.
[0040] The public and private keys of i∈[1,n] are {pk i ,sk i}, select a random number x i (x i ∈Z q ),calculate:
[0041]
[0042] Then the public and private keys are {pk i ,sk i} is represented as:
[0043] pk i = {Gid i ,g,y i ,G}
[0044] sk i ={pk i ,x i}
[0045] Gen is formally expressed as:
[0046] Gen(g,G,q,i)={pk i ,sk i}
[0047] Next, the focus event traceable signature is calculated. Optionally, in the blockchain data identification method provided in the embodiment of the present application, multiple event data are processed to obtain multiple processed event data, including: encrypting multiple event data using key information to obtain multiple encrypted event data; processing multiple encrypted event data according to a label generation function to obtain multiple processed event data.
[0048] Specifically, Figure 2As shown, the traceable signature function Sign is executed to generate the focus event signature. Let the focus event m∈{0,1} * , the event label is represented as: L = {issue, pk N}, where issue represents the event number, pk N Represents the sender's public key. The processing flow of the tag generation function Sign is as follows:
[0049] Initialize security parameters:
[0050] Calculate the hash value of event label L: h = H (L)
[0051] Calculate intermediate variables where x i (x i ∈Z q ) is a random number
[0052] Let the sender be i, and calculate A 0 =H′(L,m),
[0053] For any wireless sensor node i≠j, the initialization is as follows: j =A 0 A 1 j ∈G.
[0054] Suppose the signature of (L,m) is (c N ,z N ), the traceable signature function Sign is expressed as:
[0055] S=Sign(L,m)={c N ,z N}
[0056] Where S is the traceable signature, c N =(c 1 ,...,c n ), z N =(z 1 ,...,z n ). i ,z i Satisfy the following formulas respectively:
[0057] c i =c-Σ i≠j c j (modq)
[0058] z i =w i -c i x i (modq)
[0059] Among them, w i ,x i ∈z q Is a random number.
[0060] Specifically, the focus event with the preset label (corresponding to the traceable signature in this application) generated above is output, and S is set as the traceable signature. The event data after processing is formally represented as:
[0061] S=(A 1 ,c N ,z N )
[0062] P M Indicates the wireless peer-to-peer network focus information message, in the form of:
[0063] P M =(Gid 1 ,...,Gid n ,q,g,S,m,pk1,pk2,...pkn,param,chksum)
[0064] Among them, Gid 1 ,...,Gid n It represents the identification number of multiple subjects of transaction data, q is a prime number, g is the generator of G, m is the transaction information, S represents the traceable signature, pk1...pkn is the public key of the wireless sensor node, params is the encryption security parameter, chksum is the check digit, and the specific wireless peer-to-peer network traceable signature message format can be found in Figure 3 shown.
[0065] Step S103: sending the multiple processed event data to a base station node, and identifying the multiple processed event data through the base station node to obtain an identification result.
[0066] Step S104: determine whether the target data source is a threat data source according to the identification result.
[0067] Specifically, the base station node obtains multiple identity encrypted data messages of processed event data through the consensus accounting node of the blockchain network, executes the signature verification function ChkSign(S), identifies and verifies the signature information of the sender, and returns true if the signature verification is successful, otherwise returns false.
[0068] Optionally, in the data identification method of the blockchain provided in the embodiment of the present application, before sending multiple processed event data to the base station node and identifying the multiple processed event data through the base station node, the method also includes: decrypting the multiple processed event data through the base station node to obtain multiple decrypted event data; detecting whether there is abnormal data in the target event data among the multiple decrypted event data; if it is detected that the target event data has abnormal data, executing an identification step for data other than the target event data in the multiple decrypted event data; if it is detected that the target event data does not have abnormal data, executing an identification step for all data in the multiple decrypted event data.
[0069] Specifically, the sink node (base station node, the same below) decrypts multiple processed event data, and verifies the integrity of multiple decrypted time data transmissions through the chksum function, that is, by checking whether the integrity of each message data is normal. If an abnormality is found, the message processing flow is exited, otherwise, the next step is continued.
[0070] Optionally, in the data identification method of the blockchain provided in the embodiment of the present application, multiple processed event data are sent to a base station node, and the multiple processed event data are identified by the base station node, including: when it is detected that there is no abnormal data in the target event data, the legitimacy of the multiple decrypted event data is verified by a label verification function to obtain a verification result; if the verification result indicates that all event data in the multiple decrypted event data are legal data, the number of occurrences of the first decrypted event data with the same preset label in the multiple decrypted event data is counted, and the number of occurrences of the first decrypted event data is used as the identification result; if the verification result indicates that there is target event data in the multiple decrypted event data that is not legal data, the number of occurrences of the second decrypted event data in the multiple decrypted event data is counted, wherein the second decrypted event data is event data with the same preset label other than the target event data in the multiple decrypted event data, and the number of occurrences of the second decrypted event data is used as the identification result.
[0071] Specifically, Figure 4 As shown, when it is detected that there is no abnormal data in the target event data, the Chksign() function is used to verify the legitimacy of multiple decrypted event data. The specific verification formula for each decrypted event data is as follows:
[0072] The Chksign() function calculates whether S satisfies the following verification congruence formula:
[0073] H″(L,m,A 0 ,A 1 ,aN ,b N )≡∑ i∈N c i (modq)
[0074] Among them, a N =(a 1 ,...,a n ), b N =(b 1 ,...,b n ), for any i∈N, Function H″:{0,1}*→G is a threshold function. If the above check succeeds, the output is true, indicating that the signature verification is successful (that is, the corresponding decrypted event data is legal), otherwise it outputs false, indicating that the signature verification fails (that is, the corresponding decrypted event data is illegal).
[0075] Specifically, according to the execution of the traceable function TraceSign, the number of replays of the legitimate data in the decrypted event data is counted. The specific implementation formula is:
[0076] The TraceSign() function compares the relationship between two pairs of tuples (m, δ) and (m′, δ′) to see whether they have the same event label L (that is, event data with the same preset label), where δ = (A 1 ,c N ,z N ),δ′=(A 1 ′,c N ′,z N ′). The inspection steps are as follows:
[0077] L = {issue, pk N}, h = H (L), intermediate variable A 0 =H′(L,m),
[0078] Through the above function calculation, the information of focus events can be deduplicated to prevent malicious nodes from manipulating the spread of events, greatly reducing the risk of confidential focus event information leakage and replay attacks.
[0079] Optionally, in the data identification method of the blockchain provided in the embodiment of the present application, determining whether the target data source is a threat data source according to the identification result includes one of the following: if the number of times the first decrypted event data appears in the identification result is greater than a preset number of times, determining that the target data source is a threat data source; if the number of times the first decrypted event data appears in the identification result is not greater than a preset number of times, determining that the target data source is not a threat data source; if the number of times the second decrypted event data appears in the identification result is greater than a preset number of times, determining that the target data source is a threat data source; if the number of times the second decrypted event data appears in the identification result is not greater than a preset number of times, determining that the target data source is not a threat data source.
[0080] For example, for any i∈N, if δ i =δ′ i , then the TraceSign function returns pk i , indicating that the number of occurrences of the decrypted legitimate event data is greater than 1 (corresponding to the preset number in this application) or the number of replays is greater than 0, then the target data source is determined to be a threat data source; when the TraceSign function returns a null value, indicating that the number of replays is 0 or the number of occurrences of the decrypted legitimate event data is 1, then the target data source is determined not to be a threat data source. Through the above function calculation, the information of the focus event is deduplicated to prevent malicious nodes from manipulating the spread of events, greatly reducing the risk of confidential focus event information leakage and replay attacks. Further improve data security.
[0081] Optionally, in the blockchain data identification method provided in the embodiment of the present application, the blockchain network also includes: an accounting node. After determining that the target data source is not a threat data source, the method also includes: synchronizing event data that is legitimate data among multiple decrypted event data to a target node in the blockchain network through the accounting node, wherein the target node is a node in the blockchain network other than the accounting node, the base station node, and the sensor node.
[0082] Specifically, Figure 5As shown below, to implement the above steps, it includes: First, issue digital certificates to wireless peer-to-peer network nodes and assign digital identities Gid; Let G be a multiplicative group of order prime number q, and g be a generator of G, and define hash functions respectively; The infinite sensor node executes the traceable signature function Sign() to generate a focus event signature; The sink node receives the event data packet PM through the infinite receiving device, unpacks it, reads the chksum, and verifies the integrity of data transmission; Check whether the integrity of the packet data is normal. If an abnormality is found, exit this processing flow, otherwise continue to execute the next step; The sink node calculates a1,..., an and b1,..., bn for each i (i < N); The sink node calculates the chksign() function. If the equation holds, it indicates successful signature verification and outputs true, otherwise outputs false; The sink node calculates the traceSign() function, compares the relationship between the two pairs of tuples, whether they have the same event label L, and outputs the replay count; Determine whether the signature verification is normal. If it fails, exit, otherwise continue to execute subsequent operations; The consensus accounting node executes the smart contract, synchronizes the packet PM to all the consensus accounting nodes in the whole network, and then sends a message passing completion notification to the sink node.
[0083] Optionally, Figure 6 is a schematic diagram of a traceable signature system for the data recognition method of the blockchain provided by the embodiment of the present application, as Figure 6 shown, it includes: Blockchain infrastructure cloud 1, blockchain consensus accounting node (i.e., the accounting node in the present application) 2, identity authentication agency 3, sink node 4, wireless sensor; Blockchain infrastructure cloud 1: Responsible for providing and allocating network resources, computing resources, and storage resources according to the user's network formation resource request, creating a blockchain network formation service, supporting the selection of blockchain product images according to the user's blockchain product standard, configuring virtual node resources, and creating a blockchain network; Blockchain consensus accounting node 2: In the blockchain infrastructure cloud 1, the blockchain consensus accounting node is a virtual computing node and is a basic component of the blockchain network. The blockchain network has several blockchain consensus accounting nodes. As blockchain computing nodes, they are mainly responsible for blockchain transaction access and processing, providing smart contract execution, transaction consensus, and transaction accounting; At the same time, it also provides security services such as data encryption, decryption, and identity authentication for transaction data; Identity authentication agency 3: Responsible for certificate distribution and identity verification of transaction participants accessing the blockchain network nodes, and providing security encryption algorithms and public parameters.
[0084] Optionally, Figure 7 is a schematic diagram of information access of a traceable signature system for the data recognition method of the blockchain provided by the embodiment of the present application, as Figure 7As shown, it includes: focus event 20, wireless sensor 21, eavesdropper 22, sink node 23, blockchain network 24, consensus accounting node 25, and identity authentication node 26, wherein the focus event 20 refers to an emergency event that can be detected and sensed by the wireless sensor 21 and occurs near the wireless sensor, and in form includes data information such as the time of the event, the location of the event, the spatial location of the event, and a description of the event. The eavesdropper 22 refers to a malicious node that illegally invades a wireless peer-to-peer network through a wireless network. The eavesdropper 22 obtains the event focus information transmitted by the wireless sensor node through message monitoring, interception, camouflage, intrusion, etc., so as to illegally obtain the spatial information of the event and maliciously inject false information into the wireless peer-to-peer network, causing information leakage or destroying the normal operation of the wireless peer-to-peer network.
[0085] It should be noted that in the blockchain network, all wireless sensor nodes, base stations, etc. have unique identifiers, which are registered in the blockchain network and constitute the blockchain network global digital identity ID (abbreviated as Gid), which is formally expressed as:
[0086] Gid={id|id={0,1} *}
[0087] The length of the Gid in this application is set to 128 bits, which is synchronized to the consensus accounting node through the blockchain network and stored in the block. The blockchain network provides smart contracts and provides query services for visitors.
[0088] In summary, the data identification method of the blockchain provided in the embodiment of the present application is to monitor multiple event data sent by the target data source through the sensor node; process the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset label; send the multiple processed event data to the base station node, identify the multiple processed event data through the base station node, and obtain an identification result; determine whether the target data source is a threat data source according to the identification result. Through this application, the problem that the data attacker is not easy to be discovered when the data is replayed in the related technology is solved. By identifying the event data carrying the corresponding preset label, the effect of making the data attacker easy to be discovered when the data is replayed is achieved.
[0089] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0090] The embodiment of the present application also provides a data identification device for a blockchain. It should be noted that the data identification device for a blockchain in the embodiment of the present application can be used to execute the data identification method for a blockchain provided in the embodiment of the present application. The data identification device for a blockchain provided in the embodiment of the present application is introduced below.
[0091] Figure 8 This is a schematic diagram of a data identification device of a blockchain according to an embodiment of the present application. Figure 1 .like Figure 8 As shown, the device includes: a monitoring unit 801, a processing unit 802, an identification unit 803, and a determination unit 804.
[0092] Specifically, the data traceability signature is applied in a blockchain network, wherein the blockchain network includes at least: at least one sensor node and at least one base station node, wherein the monitoring unit 801 is used to monitor multiple event data sent by a target data source through the sensor node;
[0093] The processing unit 802 is used to process the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset label;
[0094] The identification unit 803 is used to send the multiple processed event data to the base station node, and the base station node identifies the multiple processed event data to obtain an identification result;
[0095] The determination unit 804 is configured to determine whether the target data source is a threat data source according to the identification result.
[0096] In summary, the data identification device of the blockchain provided in the embodiment of the present application monitors multiple event data sent by the target data source through the sensor node by the monitoring unit 801; the processing unit 802 processes the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset label; the identification unit 803 sends the multiple processed event data to the base station node, and identifies the multiple processed event data through the base station node to obtain an identification result; the determination unit 804 determines whether the target data source is a threat data source according to the identification result, which solves the problem that the data attacker is not easy to be discovered when the data is replayed in the related technology. By identifying the event data carrying the corresponding preset label, the effect of making the data attacker easy to be discovered when the data is replayed is achieved.
[0097] Optionally, in the data identification device of the blockchain provided in the embodiment of the present application, the device also includes: a generation unit, which is used to generate key information corresponding to the sensor node using a key generation function after monitoring multiple event data sent by the target data source through the sensor node, wherein the key information includes: a public key corresponding to the sensor node, and a private key corresponding to the sensor node.
[0098] Optionally, in the data identification device of the blockchain provided in the embodiment of the present application, the processing unit includes: an encryption module, used to encrypt multiple event data using key information to obtain multiple encrypted event data; a processing module, used to process the multiple encrypted event data according to a label generation function to obtain multiple processed event data.
[0099] Optionally, in the data identification device of the blockchain provided in the embodiment of the present application, the device also includes: a decryption unit, which is used to decrypt the multiple processed event data through the base station node before sending the multiple processed event data to the base station node and identifying the multiple processed event data through the base station node to obtain multiple decrypted event data; a detection unit, which is used to detect whether there is abnormal data in the target event data among the multiple decrypted event data; a first execution unit, which is used to execute an identification step for data other than the target event data in the multiple decrypted event data if it is detected that the target event data has abnormal data; and a second execution unit, which is used to execute an identification step for all data in the multiple decrypted event data if it is detected that the target event data does not have abnormal data.
[0100] Optionally, in the data identification device of the blockchain provided in the embodiment of the present application, the identification unit includes: a verification module, which is used to verify the legitimacy of multiple decrypted event data through a label verification function to obtain a verification result when it is detected that there is no abnormal data in the target event data; a first statistical module, which is used to count the number of occurrences of the first decrypted event data with the same preset label in the multiple decrypted event data if the verification result indicates that all event data in the multiple decrypted event data are legal data, and use the number of occurrences of the first decrypted event data as the identification result; a second statistical module, which is used to count the number of occurrences of the second decrypted event data in the multiple decrypted event data if the verification result indicates that there is target event data in the multiple decrypted event data that is not legal data, wherein the second decrypted event data is event data with the same preset label other than the target event data in the multiple decrypted event data, and use the number of occurrences of the second decrypted event data as the identification result.
[0101] Optionally, in the data identification device of the blockchain provided in the embodiment of the present application, the determination unit includes one of the following: a first determination module, used to determine that the target data source is a threat data source if the number of times the first decrypted event data appears in the identification result is greater than a preset number of times; a second determination module, used to determine that the target data source is not a threat data source if the number of times the first decrypted event data appears in the identification result is not greater than a preset number of times; a third determination module, used to determine that the target data source is a threat data source if the number of times the second decrypted event data appears in the identification result is greater than a preset number of times; a fourth determination module, used to determine that the target data source is not a threat data source if the number of times the second decrypted event data appears in the identification result is not greater than a preset number of times.
[0102] Optionally, in the data identification device of the blockchain provided in the embodiment of the present application, the device also includes: a synchronization unit, which is used for the blockchain network also includes: an accounting node, after determining that the target data source is not a threat data source, the event data belonging to legal data among multiple decrypted event data are synchronized to the target node in the blockchain network through the accounting node, wherein the target node is a node in the blockchain network other than the accounting node, the base station node, and the sensor node.
[0103] Optionally, Fig. 9 This is a schematic diagram of a data identification device for a blockchain according to an embodiment of the present application. Figure 2 ,like Fig. 9 As shown, the main control unit, sensor module, event data processing unit, and wireless communication module. Among them, the main control unit: This module is responsible for data transmission and the overall call of each processing module. Sensor module: This module is used to sense the focus event and generate event focus information m. Data execution processing unit: Responsible for executing the symmetric encryption algorithm Encrypt() to encrypt information, executing the symmetric encryption algorithm Decrypt() to decrypt information, executing Sign(m) to sign the transaction data, and executing ChkSign(S) to verify the transaction data. It includes a traceable digital signature unit, a traceable digital verification unit, and a traceable signature checking unit.
[0104] The data identification device of the blockchain includes a processor and a memory. The above-mentioned monitoring unit 801, processing unit 802, identification unit 803, determination unit 804, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0105] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the blockchain data can be identified by adjusting the kernel parameters.
[0106] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0107] An embodiment of the present invention provides a computer-readable storage medium having a program stored thereon, which implements a blockchain data identification method when the program is executed by a processor.
[0108] An embodiment of the present invention provides a processor, which is used to run a program, wherein the data identification method of the blockchain is executed when the program is running.
[0109] like Fig.10 As shown, an embodiment of the present invention provides an electronic device, the device includes a processor, a memory and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program: a data traceable signature applied to a blockchain network, wherein the blockchain network includes at least: at least one sensor node and at least one base station node, wherein the sensor node monitors multiple event data sent by a target data source; processes the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset label; sends the multiple processed event data to the base station node, and identifies the multiple processed event data through the base station node to obtain an identification result; determines whether the target data source is a threat data source according to the identification result.
[0110] When the processor executes the program, the following steps are also implemented: after the sensor node monitors multiple event data sent by the target data source, a key generation function is used to generate key information corresponding to the sensor node, wherein the key information includes: a public key corresponding to the sensor node and a private key corresponding to the sensor node.
[0111] When executing the program, the processor also implements the following steps: encrypting multiple event data using key information to obtain multiple encrypted event data; processing the multiple encrypted event data according to the label generation function to obtain multiple processed event data.
[0112] When the processor executes the program, the following steps are also implemented: before sending multiple processed event data to the base station node and identifying the multiple processed event data through the base station node, the multiple processed event data are decrypted through the base station node to obtain multiple decrypted event data; detecting whether there is abnormal data in the target event data among the multiple decrypted event data; if it is detected that the target event data has abnormal data, executing the identification step of the data other than the target event data in the multiple decrypted event data; if it is detected that the target event data does not have abnormal data, executing the identification step of all the data in the multiple decrypted event data.
[0113] When the processor executes the program, the following steps are also implemented: when it is detected that there is no abnormal data in the target event data, the legitimacy of multiple decrypted event data is verified through a label verification function to obtain a verification result; if the verification result indicates that all event data in the multiple decrypted event data are legal data, the number of occurrences of the first decrypted event data with the same preset label in the multiple decrypted event data is counted, and the number of occurrences of the first decrypted event data is used as the identification result; if the verification result indicates that there is target event data in the multiple decrypted event data that is not legal data, the number of occurrences of the second decrypted event data in the multiple decrypted event data is counted, wherein the second decrypted event data is event data with the same preset label other than the target event data in the multiple decrypted event data, and the number of occurrences of the second decrypted event data is used as the identification result.
[0114] When the processor executes the program, the following steps are also implemented: if the number of times the first decrypted event data appears in the identification result is greater than a preset number of times, it is determined that the target data source is a threat data source; if the number of times the first decrypted event data appears in the identification result is not greater than the preset number of times, it is determined that the target data source is not a threat data source; if the number of times the second decrypted event data appears in the identification result is greater than the preset number of times, it is determined that the target data source is a threat data source; if the number of times the second decrypted event data appears in the identification result is not greater than the preset number of times, it is determined that the target data source is not a threat data source.
[0115] When the processor executes the program, the following steps are also implemented: The blockchain network also includes: an accounting node, which, after determining that the target data source is not a threat data source, synchronizes the event data that is legitimate data among multiple decrypted event data to the target node in the blockchain network through the accounting node, wherein the target node is a node in the blockchain network other than the accounting node, the base station node, and the sensor node.
[0116] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0117] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: monitoring multiple event data sent by a target data source through a sensor node; processing the multiple event data to obtain multiple processed event data, wherein each processed event data carries a corresponding preset label; sending the multiple processed event data to a base station node, identifying the multiple processed event data through the base station node to obtain an identification result; and determining whether the target data source is a threat data source based on the identification result.
[0118] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: after monitoring multiple event data sent by a target data source through a sensor node, using a key generation function to generate key information corresponding to the sensor node, wherein the key information includes: a public key corresponding to the sensor node and a private key corresponding to the sensor node.
[0119] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: encrypting multiple event data using key information to obtain multiple encrypted event data; processing the multiple encrypted event data according to a label generation function to obtain multiple processed event data.
[0120] When executed on a data processing device, it is also suitable for executing an initialized program having the following method steps: before sending a plurality of processed event data to a base station node and identifying the plurality of processed event data by the base station node, the plurality of processed event data are decrypted by the base station node to obtain a plurality of decrypted event data; detecting whether there is abnormal data in the target event data among the plurality of decrypted event data; if it is detected that the target event data has abnormal data, executing an identification step for data other than the target event data in the plurality of decrypted event data; if it is detected that there is no abnormal data in the target event data, executing an identification step for all data in the plurality of decrypted event data.
[0121] When executed on a data processing device, it is also suitable for executing an initialized program having the following method steps: when it is detected that there is no abnormal data in the target event data, the legitimacy of multiple decrypted event data is verified by a label verification function to obtain a verification result; if the verification result indicates that all event data in the multiple decrypted event data are legal data, the number of occurrences of the first decrypted event data with the same preset label in the multiple decrypted event data is counted, and the number of occurrences of the first decrypted event data is used as the identification result; if the verification result indicates that there is target event data in the multiple decrypted event data that is not legal data, the number of occurrences of the second decrypted event data in the multiple decrypted event data is counted, wherein the second decrypted event data is event data with the same preset label other than the target event data in the multiple decrypted event data, and the number of occurrences of the second decrypted event data is used as the identification result.
[0122] When executed on a data processing device, it is also suitable for executing a program that is initialized with the following method steps: if the number of times the first decrypted event data appears in the identification result is greater than a preset number of times, it is determined that the target data source is a threat data source; if the number of times the first decrypted event data appears in the identification result is not greater than the preset number of times, it is determined that the target data source is not a threat data source; if the number of times the second decrypted event data appears in the identification result is greater than the preset number of times, it is determined that the target data source is a threat data source; if the number of times the second decrypted event data appears in the identification result is not greater than the preset number of times, it is determined that the target data source is not a threat data source.
[0123] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: the blockchain network also includes: an accounting node, after determining that the target data source is not a threat data source, synchronizing the event data belonging to legal data in multiple decrypted event data to the target node in the blockchain network through the accounting node, wherein the target node is a node in the blockchain network other than the accounting node, the base station node, and the sensor node.
[0124] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0125] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. 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.
[0126] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising 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.
[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing 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.
[0128] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0129] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0130] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0131] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt 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.) that contain computer-usable program code.
[0133] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A data identification method based on blockchain, characterized in that: A data traceable signature applied to a blockchain network, wherein the blockchain network comprises at least: at least one sensor node and at least one base station node, wherein: Monitoring multiple event data sent by a target data source through the sensor node; Processing the plurality of event data to obtain a plurality of processed event data, wherein each processed event data carries a corresponding preset label; The multiple processed event data are sent to the base station node, and the multiple processed event data are decrypted by the base station node to obtain multiple decrypted event data; whether the target event data in the multiple decrypted event data has abnormal data; if it is detected that the target event data has abnormal data, then the step of identifying the data other than the target event data in the multiple decrypted event data is performed; if it is detected that the target event data does not have abnormal data, then the step of identifying all the data in the multiple decrypted event data is performed; The multiple processed event data are identified by the base station node to obtain an identification result, including: when it is detected that there is no abnormal data in the target event data, the legitimacy of the multiple decrypted event data is verified by a label verification function to obtain a verification result; if the verification result indicates that all event data in the multiple decrypted event data are legal data, the number of occurrences of the first decrypted event data with the same preset label in the multiple decrypted event data is counted, and the number of occurrences of the first decrypted event data is used as the identification result; if the verification result indicates that there is target event data in the multiple decrypted event data that does not belong to the legal data, the number of occurrences of the second decrypted event data in the multiple decrypted event data is counted, wherein the second decrypted event data is event data with the same preset label other than the target event data in the multiple decrypted event data, and the number of occurrences of the second decrypted event data is used as the identification result; Determine whether the target data source is a threat data source according to the identification result.
2. The method according to claim 1, characterized in that After monitoring the multiple event data sent by the target data source through the sensor node, the method further includes: A key generation function is used to generate key information corresponding to the sensor node, wherein the key information includes: a public key corresponding to the sensor node and a private key corresponding to the sensor node.
3. The method according to claim 2, characterized in that The plurality of event data are processed to obtain a plurality of processed event data including: Encrypting the plurality of event data using the key information to obtain a plurality of encrypted event data; The plurality of encrypted event data are processed according to a label generation function to obtain the plurality of processed event data.
4. The method according to claim 1, characterized in that: Determining whether the target data source is a threat data source according to the identification result includes one of the following: If the number of occurrences of the first decrypted event data in the identification result is greater than a preset number, determining that the target data source is a threat data source; If the number of occurrences of the first decrypted event data in the identification result is not greater than the preset number of occurrences, determining that the target data source is not a threat data source; If the number of occurrences of the second decrypted event data in the identification result is greater than the preset number, determining that the target data source is a threat data source; If the number of occurrences of the second decrypted event data in the identification result is not greater than the preset number of occurrences, it is determined that the target data source is not a threat data source.
5. The method according to claim 4, characterized in that The blockchain network further includes: an accounting node. After determining that the target data source is not a threat data source, the method further includes: The event data that is legal data among the multiple decrypted event data are synchronized to the target node in the blockchain network through the accounting node, wherein the target node is a node in the blockchain network other than the accounting node, the base station node, and the sensor node.
6. A data identification device based on blockchain, characterized in that: A data traceable signature applied to a blockchain network, wherein the blockchain network comprises at least: at least one sensor node and at least one base station node, wherein: A monitoring unit, used for monitoring a plurality of event data sent by a target data source through the sensor node; A processing unit, configured to process the plurality of event data to obtain a plurality of processed event data, wherein each processed event data carries a corresponding preset label; An identification unit, configured to send the plurality of processed event data to the base station node, and identify the plurality of processed event data through the base station node to obtain an identification result; a determination unit, configured to determine whether the target data source is a threat data source according to the identification result; The blockchain-based data identification device also includes: a decryption unit, which is used to decrypt the multiple processed event data through the base station node before sending the multiple processed event data to the base station node and identifying the multiple processed event data through the base station node to obtain multiple decrypted event data; a detection unit, which is used to detect whether there is abnormal data in the target event data among the multiple decrypted event data; a first execution unit, which is used to perform an identification step on the data other than the target event data in the multiple decrypted event data if it is detected that the target event data has abnormal data; and a second execution unit, which is used to perform an identification step on all the data in the multiple decrypted event data if it is detected that the target event data does not have abnormal data; The identification unit includes: a verification module, which is used to verify the legitimacy of multiple decrypted event data through a label verification function to obtain a verification result when it is detected that there is no abnormal data in the target event data; a first statistical module, which is used to count the number of occurrences of the first decrypted event data with the same preset label in the multiple decrypted event data if the verification result indicates that all event data in the multiple decrypted event data are legal data, and use the number of occurrences of the first decrypted event data as the identification result; a second statistical module, which is used to count the number of occurrences of the second decrypted event data in the multiple decrypted event data if the verification result indicates that there is target event data in the multiple decrypted event data that is not legal data, wherein the second decrypted event data is event data with the same preset label in the multiple decrypted event data except the target event data, and use the number of occurrences of the second decrypted event data as the identification result.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, wherein the program executes the method according to any one of claims 1 to 5.
8. An electronic device, characterized in that: The method comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of claims 1 to 5.
