Disclosure of Invention
The invention aims to provide a block chain big data processing system capable of increasing safety and processing efficiency.
The invention relates to a block chain big data processing method based on an ant algorithm, which comprises the following steps
Acquiring first data;
verifying the security of the first data;
encrypting and broadcasting the first data to other nodes in a block chain;
other nodes in the block chain verify the safety of the first data and decrypt the first data received by verification, and when more than half of the nodes verify the first data successfully, the first data is judged to be successfully sent;
acquiring second data;
searching first data with the highest similarity to second data, and if the similarity between the second data and the first data with the highest similarity to the second data is greater than or equal to a preset threshold value, directly sending the second data to other nodes of the block chain, and judging that the second data is successfully sent; and if the similarity between the second data and the first data with the highest similarity with the second data is smaller than a preset threshold value, verifying the security of the second data and encrypting and broadcasting the second data to other nodes of the block chain, and when more than half of the nodes verify that the second data is successful, judging that the second data is successfully sent.
The invention relates to a block chain big data processing method based on an ant algorithm, wherein the step of searching first data with the highest similarity to second data comprises the following steps:
constructing a part-of-speech database, and configuring a preset angle matched with each type of predicate by each type of predicate;
obtaining a predicate and an object of each first datum;
configuring quantifier in the object of the first data into a vector module, and configuring the quantifier into a vector included angle between the vector and an X axis according to a preset angle matched with the predicate of the first data to construct a first data vector;
configuring quantifier in the object of the second data into a vector module, and configuring the quantifier into a vector included angle between the vector and the X axis according to a preset angle matched with the predicate of the second data to construct a second data vector;
making a difference between a first projection vector of a first data vector on an X axis and a second projection vector of a second data vector on the X axis, and if the reciprocal of the difference vector is the similarity between the second data and the first data;
and outputting the similarity.
The invention relates to a block chain big data processing method based on an ant algorithm, wherein the method for constructing a part of speech database comprises the following steps:
classifying the verbs according to semanteme;
corresponding each class verb to first data of the occurrence of the class verb;
and outputting a preset angle R according to the following formula according to the probability Pi configuration of completing the forward result of the first data i:
and corresponding the class of verbs to the preset angle.
The invention relates to a block chain big data processing method based on an ant algorithm, wherein a preset threshold S is generated according to the following formula: s | × sin (preset angle) of the first data vector.
According to the invention, the preset threshold value is judged according to the product of the modulus of the first data vector and the sine value of the preset angle, so that the judgment threshold of the similarity between the positive energy and the negative energy can be increased to a certain extent, and the requirements of the first data and the second data which are judged to be similar are further increased, so that the database is more rigorous in composition, and the data safety is increased.
The invention relates to a big data processing method of a block chain based on an ant algorithm, wherein the block chain comprises a plurality of nodes.
The invention relates to a block chain big data processing method based on an ant algorithm, wherein the way of acquiring the predicate and object of each first data and each second data is as follows: the predicate and object of the first data, the second data are determined by the translation software client.
The invention relates to a block chain big data processing method based on an ant algorithm, wherein if the similarity between second data and first data with the highest similarity with the second data is smaller than a preset threshold, the steps of verifying the security of the second data and competing for the billing right by using a Hash algorithm comprise the following steps:
each node of the block chain constructs a first value by using second data, current time and a random constant, and repeatedly calculates the first value by using a hash algorithm to generate a hash value until a bit is 0 before the generation of the hash value;
configuring a node which calculates the hash value at first as an accounting right node;
the accounting right node broadcasts the first value and the second data to other nodes, and if the other nodes verify successfully, the second data is stored and a receipt is sent;
wherein, a is output according to the following formula: 3+5 XSinR.
The invention relates to a system of a block chain big data processing method based on an ant algorithm, which comprises
A first input module for acquiring first data;
a first disinfection module for verifying security of the first data;
the block chain broadcasting module is used for encrypting the first data and broadcasting the first data to other nodes in a block chain;
the receiving verification module is used for verifying the security of the first data and decrypting the first data received by verification, and when more than half of nodes verify that the first data is successful, the first data is judged to be successfully sent;
a second input module for obtaining second data;
the control module is used for searching first data with the highest similarity to second data, and if the similarity between the second data and the first data with the highest similarity to the second data is larger than or equal to a preset threshold value, directly sending the second data to other nodes of the block chain, and judging that the second data is successfully sent; and if the similarity between the second data and the first data with the highest similarity with the second data is smaller than a preset threshold value, verifying the security of the second data by using a second antivirus module, encrypting and broadcasting the second data to other nodes of the block chain, and judging that the second data is successfully sent when more than half of the nodes verify the second data successfully.
The difference between the block chain big data processing method based on the ant algorithm and the prior art is that the block chain big data processing method based on the ant algorithm can construct the first data into the stored data in advance through the mode, the second data is the data which is not sent yet, and the traditional mode is to continuously verify the security, the encryption broadcast, the receiving decryption verification and the verification of the second data, so the speed is slow. The invention judges whether the closest data is similar to the stored first data or not by verifying the similarity of the closest data, if so, the data is safe and reliable and is directly sent to other nodes without verifying the security and encrypting and decrypting, and the data is regarded as being successfully sent, thereby improving the transmission efficiency and speed of the block chain. According to the ant algorithm, the ants can judge the nearest route according to the odor left by the ants walking before, so that the shortest route is taken between the nest and the food. The ant algorithm is applied to the process of sending and storing the block chain data, so that the data transmission speed is increased, and the data security is also ensured.
The following describes a block chain big data processing method based on ant algorithm with reference to the accompanying drawings.
Detailed Description
As shown in FIG. 1, the method for processing big data of block chain based on ant algorithm of the present invention comprises
Acquiring first data;
verifying the security of the first data;
encrypting and broadcasting the first data to other nodes in a block chain;
other nodes in the block chain verify the safety of the first data and decrypt the first data received by verification, and when more than half of the nodes verify the first data successfully, the first data is judged to be successfully sent;
acquiring second data;
searching first data with the highest similarity to second data, and if the similarity between the second data and the first data with the highest similarity to the second data is greater than or equal to a preset threshold value, directly sending the second data to other nodes of the block chain, and judging that the second data is successfully sent; and if the similarity between the second data and the first data with the highest similarity with the second data is smaller than a preset threshold value, verifying the security of the second data and encrypting and broadcasting the second data to other nodes of the block chain, and when more than half of the nodes verify that the second data is successful, judging that the second data is successfully sent.
According to the invention, the first data can be constructed into the stored data in advance, the second data is the data which is not transmitted yet, and the traditional mode is to continuously verify the security of the second data, encrypt the broadcast, receive the decryption verification, so that the speed is slow. The invention judges whether the closest data is similar to the stored first data or not by verifying the similarity of the closest data, if so, the data is safe and reliable and is directly sent to other nodes without verifying the security and encrypting and decrypting, and the data is regarded as being successfully sent, thereby improving the transmission efficiency and speed of the block chain.
According to the ant algorithm, the ants can judge the nearest route according to the odor left by the ants walking before, so that the shortest route is taken between the nest and the food. The ant algorithm is applied to the process of sending and storing the block chain data, so that the data transmission speed is increased, and the data security is also ensured.
And sending the second data to other nodes of the block chain directly. In the step of' sending directly, the second data does not need to be verified in security and encrypted and broadcast to other nodes, and then decrypting and verifying are not needed, so that the processing speed of the block chain is improved.
Wherein the blockchain includes a plurality of nodes.
Wherein the first data represents previously entered data and the second data represents the just entered input. That is, each time the second data is input and the first data is input before.
The step of verifying the security of the first data may be performed by antivirus software, that is, if the similarity is high, the antivirus software does not need to be run.
Preferably, the searching for the first data with the highest similarity to the second data comprises the following steps:
constructing a part-of-speech database, and configuring a preset angle matched with each type of predicate by each type of predicate;
obtaining a predicate and an object of each first datum;
configuring quantifier in the object of the first data into a vector module, and configuring the quantifier into a vector included angle between the vector and an X axis according to a preset angle matched with the predicate of the first data to construct a first data vector;
configuring quantifier in the object of the second data into a vector module, and configuring the quantifier into a vector included angle between the vector and the X axis according to a preset angle matched with the predicate of the second data to construct a second data vector;
making a difference between a first projection vector of a first data vector on an X axis and a second projection vector of a second data vector on the X axis, and if the reciprocal of the difference vector is the similarity between the second data and the first data;
and outputting the similarity.
The invention can construct the positive energy data into the data with the preset angle between [0,90] degrees by constructing the data vector, thereby constructing the negative energy data into the data between (90,180], and representing the modulus of the vector by the quantifier in the object, namely the actual length of the vector, thereby judging the positive energy or the negative energy of the second data in total by the projection of the vector on the X axis to judge the similarity and the association degree of the second data and the semanteme thereof.
The reciprocal of the difference vector itself may be the similarity, and of course, the reciprocal of the modulus of the difference vector may also be the similarity. That is, the smaller the difference vector, the greater the similarity.
The similarity determined by the preset threshold is preferably the reciprocal of the modulus of the difference vector. Since the difference vector can be 0, and the reciprocal of 0 is infinity, the similarity can also be infinity, that is, both are infinitely similar, that is, both are identical.
In addition, since many verb predicates are between positive energy and negative energy in the verb predicates of chinese and the degrees of the positive energy and the negative energy represented by the different verb predicates are different, the similarity between two data can be better determined by determining the X-axis vector of the vector by corresponding to the preset angle.
The operation of obtaining the predicate and the object may be generated by semantic recognition software such as translation software.
Preferably, the method for constructing the part of speech database includes the following steps:
classifying the verbs according to semanteme;
corresponding each class verb to first data of the occurrence of the class verb;
and outputting a preset angle R according to the following formula according to the probability Pi configuration of completing the forward result of the first data i:
and corresponding the class of verbs to the preset angle.
Specifically, when Pi is 100%, R is 0, and when Pi is 0%, R is 180, and when Y is arccos X, the present invention increases the weight of the first data having the complete positive energy and the complete negative energy by arranging the vector having Pi between 0% and 100% as a vector having a smaller X-axis vector and increasing the vector between the positive energy and the negative energy, as seen from the image having the greater probability of Pi being 0% and Pi being 0%.
Where verbs are semantically categorized, they may be understood as synonyms or synonyms.
The predetermined angle can be understood as an angle between the vector and the upper side of the X-axis. When the preset angle exceeds 90 degrees and is less than 180 degrees, the vector points to the rear side of the X axis.
The word class database is constructed, and each class of predicate is configured with a preset angle matched with the class of predicate, which can indicate that predicate verbs of each class and related synonyms of the class are classified into one class, and the predicate verbs of the class correspond to each preset angle, as shown in the following table:
verb predicate
|
Preset angle
|
Buy in
|
0.1
|
Buy
|
0.1
|
Buy into
|
0.1
|
Sell
|
179.9
|
Sell out
|
179.9
|
Sell
|
179.9
|
Booking
|
10
|
Appointment
|
10
|
Loan
|
30
|
Can buy
|
45
|
May be sold out
|
135 |
Preferably, the preset threshold S is generated according to the following formula: s | × sin (preset angle) of the first data vector.
According to the invention, the preset threshold value is judged according to the product of the modulus of the first data vector and the sine value of the preset angle, so that the judgment threshold of the similarity between the positive energy and the negative energy can be increased to a certain extent, and the requirements of the first data and the second data which are judged to be similar are further increased, so that the database is more rigorous in composition, and the data safety is increased.
Preferably, the block chain comprises a plurality of nodes.
Preferably, the way of obtaining the predicate and object of each of the first data and the second data is as follows: the predicate and object of the first data, the second data are determined by the translation software client.
Preferably, if the similarity between the second data and the first data with the highest similarity to the second data is smaller than a preset threshold, the step of verifying the security of the second data and competing for the accounting right by using a hash algorithm includes the following steps:
each node of the block chain constructs a first value by using second data, current time and a random constant, and repeatedly calculates the first value by using a hash algorithm to generate a hash value until a bit is 0 before the generation of the hash value;
configuring a node which calculates the hash value at first as an accounting right node;
the accounting right node broadcasts the first value and the second data to other nodes, and if the other nodes verify successfully, the second data is stored and a receipt is sent;
wherein, a is output according to the following formula: 3+5 XSinR.
According to the invention, the angle R is preset to be a random variable, and when the preset angle R indicates that the second data is close to positive energy or negative energy, the requirement for generating the hash value is increased, so that on one hand, a hacker can be prevented from competing for the accounting right and tampering and randomly sending the second data to the block link point by fixedly using the first few bits by increasing the preset angle R as a variable, and on the other hand, the data transmission safety is also increased by the mode.
If the similarity between the second data and the first data with the highest similarity with the second data is smaller than a preset threshold, verifying the security of the second data and encrypting and broadcasting the second data to other nodes of the block chain, and when more than half of the nodes verify that the second data is successful, determining that the second data is successfully transmitted, in the step, each node is required to contend for accounting right through a hash algorithm, for example, each node takes the second data, the existing time and a random constant as values, and generates a hash value through a SHA256 algorithm. And firstly, broadcasting the value, the hash value and the second data to other nodes by the node with the first 5 bits of the hash value being 0, verifying the value and the hash value by the other nodes, and if the values and the hash value are successful, saving the second data and sending a receipt to finish the sending of the second data.
The invention relates to a system of a block chain big data processing method based on an ant algorithm, which comprises
A first input module for acquiring first data;
a first disinfection module for verifying security of the first data;
the block chain broadcasting module is used for encrypting the first data and broadcasting the first data to other nodes in a block chain;
the receiving verification module is used for verifying the security of the first data and decrypting the first data received by verification, and when more than half of nodes verify that the first data is successful, the first data is judged to be successfully sent;
a second input module for obtaining second data;
the control module is used for searching first data with the highest similarity to second data, and if the similarity between the second data and the first data with the highest similarity to the second data is larger than or equal to a preset threshold value, directly sending the second data to other nodes of the block chain, and judging that the second data is successfully sent; and if the similarity between the second data and the first data with the highest similarity with the second data is smaller than a preset threshold value, verifying the security of the second data by using a second antivirus module, encrypting and broadcasting the second data to other nodes of the block chain, and judging that the second data is successfully sent when more than half of the nodes verify the second data successfully.
The first input module and the second input module can be the same module.
The first antivirus module and the second antivirus module can be the same module.
The above-mentioned embodiments are merely illustrative of the preferred embodiments of the present invention, and do not limit the scope of the present invention, and various modifications and improvements of the technical solution of the present invention by those skilled in the art should fall within the protection scope defined by the claims of the present invention without departing from the spirit of the present invention.