CN110930254A - Data processing method, device, terminal and medium based on block chain - Google Patents

Data processing method, device, terminal and medium based on block chain Download PDF

Info

Publication number
CN110930254A
CN110930254A CN201911139847.7A CN201911139847A CN110930254A CN 110930254 A CN110930254 A CN 110930254A CN 201911139847 A CN201911139847 A CN 201911139847A CN 110930254 A CN110930254 A CN 110930254A
Authority
CN
China
Prior art keywords
data
analyzed
sets
weight
intelligent contract
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911139847.7A
Other languages
Chinese (zh)
Inventor
李茂材
王宗友
刘攀
张劲松
朱耿良
孔利
时一防
黄焕坤
刘区城
杨常青
蓝虎
崔嘉辉
周开班
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911139847.7A priority Critical patent/CN110930254A/en
Publication of CN110930254A publication Critical patent/CN110930254A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The embodiment of the invention discloses a data processing method, a device, a terminal and a medium based on a block chain, wherein the method comprises the following steps: acquiring a plurality of data to be analyzed from a plurality of application objects, clustering the plurality of data to be analyzed to obtain a plurality of data sets to be analyzed, determining the weight of each data set to be analyzed in the plurality of data sets to be analyzed, and selecting a target data set to be analyzed from the plurality of data sets to be analyzed according to the weights; and selecting any data to be analyzed from the target data set to be analyzed as target data, and applying the target data to the intelligent contract. By the mode, the most reliable data can be screened from the obtained data and sent to the intelligent contract, and the most reliable data does not need to be sent to other nodes for consensus verification, so that the data verification process is simplified, and the efficiency and reliability of the intelligent contract for obtaining the data are improved.

Description

Data processing method, device, terminal and medium based on block chain
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus based on a block chain, a terminal, and a medium.
Background
The block chain is a decentralized database in nature, namely a series of data blocks which are generated by using a cryptographic method in a correlation manner, wherein each data block comprises a batch of transaction information and is used for verifying the validity of the transaction information and generating a next block. However, the blockchain is a closed environment, and real world data outside the chain cannot be actively acquired on the chain. This is mainly because the blockchain cannot actively initiate a network call, and the intelligent contract on the chain passively receives data. Secondly, the intelligent contract is not "intelligent" in nature, and it only reaches the program in the trigger state when the corresponding conditions are met. And the intelligent contract can judge whether the corresponding conditions are met currently or not only by acquiring external data.
When the existing intelligent contract needs to acquire data, an acquisition request needs to be sent to a predictive engine contract deployed in a block chain network, after the predictive engine contract takes an access request sent by the intelligent contract, the external network is used for acquiring the data, and the data is uploaded to the block chain network, so that the intelligent contract takes the data from the block chain, and the chaining operation can be completed only by the participation of a plurality of common identification nodes, which causes that the efficiency of the intelligent contract for acquiring the data is low.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a device, a terminal and a medium based on a block chain, which can screen out the most reliable data from a plurality of acquired data and send the most reliable data to an intelligent contract, thereby improving the efficiency and reliability of acquiring data by the intelligent contract.
In a first aspect, an embodiment of the present invention provides a data processing method based on a block chain, which is applied to a block chain network, where an intelligent contract is configured in the block chain network, and the method includes:
acquiring a plurality of data to be analyzed from a plurality of application objects;
clustering the data to be analyzed to obtain a plurality of data sets to be analyzed, wherein the data sets to be analyzed store the same type of data to be analyzed;
determining the weight of each data set to be analyzed in the multiple data sets to be analyzed, and selecting a target data set to be analyzed from the multiple data sets to be analyzed according to the weight;
and selecting any data to be analyzed from the target data set to be analyzed as target data, and applying the target data to the intelligent contract.
In a second aspect, an embodiment of the present invention provides a data processing apparatus based on a blockchain, which is applied to a blockchain network, where an intelligent contract is configured in the blockchain network, and the apparatus includes:
the acquisition module is used for acquiring a plurality of data to be analyzed from a plurality of application objects;
the processing module is used for clustering the data to be analyzed to obtain a plurality of data sets to be analyzed, and each data set to be analyzed stores the data to be analyzed of the same type;
a determining module, configured to determine a weight of each data set to be analyzed in the plurality of data sets to be analyzed;
the selecting module is used for selecting a target data set to be analyzed from the multiple data sets to be analyzed according to the weight;
the selection module is further used for selecting any one piece of data to be analyzed from the target data set to be analyzed as target data;
and the application module is used for applying the target data to the intelligent contract.
In a third aspect, an embodiment of the present invention provides a terminal, including a processor, an input interface, an output interface, and a memory, where the processor, the input interface, the output interface, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program includes program instructions, which, when executed by a processor, cause the processor to execute the method of the first aspect.
In the embodiment of the invention, a terminal acquires a plurality of data to be analyzed from a plurality of application objects, clusters the plurality of data to be analyzed to obtain a plurality of data sets to be analyzed, determines the weight of each data set to be analyzed in the plurality of data sets to be analyzed, and selects a target data set to be analyzed from the plurality of data sets to be analyzed according to the weight; and the terminal selects any one piece of data to be analyzed from the target data set to be analyzed as target data and applies the target data to the intelligent contract. By the method, the most reliable data can be screened from the obtained data and sent to the intelligent contract, and the most reliable data does not need to be sent to other nodes for consensus verification, so that the data verification process is simplified, and the efficiency and reliability of the intelligent contract for obtaining the data are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a data processing method based on a block chain according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another data processing method based on a blockchain according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a consensus verification process according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a blockchain network according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a block chain according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data processing apparatus based on a block chain according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The block chain is a decentralized database in nature, namely a series of data blocks which are generated by using a cryptographic method in a correlation manner, wherein each data block comprises a batch of transaction information and is used for verifying the validity of the transaction information and generating a next block. However, the blockchain is a closed environment, and real world data outside the chain cannot be actively acquired on the chain. This is mainly because the blockchain cannot actively initiate a network call, and the intelligent contract on the chain passively receives data. Secondly, the intelligent contract is not "intelligent" in nature, and it only reaches the program in the trigger state when the corresponding conditions are met. And the intelligent contract can judge whether the corresponding conditions are met currently or not only by acquiring external data.
When the existing intelligent contract needs to acquire data, an acquisition request needs to be sent to a predictive engine contract deployed in a block chain network, after the predictive engine contract takes an access request sent by the intelligent contract, the external network is used for acquiring the data, and the data is uploaded to the block chain network, so that the intelligent contract takes the data from the block chain, and the chaining operation can be completed only by the participation of a plurality of common identification nodes, which causes that the efficiency of the intelligent contract for acquiring the data is low, and the predictive engine contract cannot check the reliability of the acquired data, possibly causing that the intelligent contract acquires unreliable data.
Based on the above description, an embodiment of the present invention provides a data processing method based on a blockchain, where the data processing method is mainly implemented based on a blockchain technology, where a blockchain is a novel application of distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm, and other computer technologies, and is essentially a decentralized database, that is, a string of data blocks generated by using a cryptography method in association, and each data block contains a batch of transaction information for verifying the validity of the transaction information and generating a next block. The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and the identity information management comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like. The specific implementation steps can include that the terminal acquires a plurality of data to be analyzed from a plurality of application objects, clusters the plurality of data to be analyzed to obtain a plurality of data sets to be analyzed, determines the weight of each data set to be analyzed in the plurality of data sets to be analyzed, and selects a target data set to be analyzed from the plurality of data sets to be analyzed according to the weight; and the terminal selects any one piece of data to be analyzed from the target data set to be analyzed as target data and applies the target data to the intelligent contract.
In summary, by using the block chain-based data processing method, when an intelligent contract needs to acquire data, a terminal directly acquires corresponding data from the outside, determines a target set based on the weight of a set formed by the data acquired by different data sources, selects data needed by the intelligent contract from the target set, and directly returns the data to the intelligent contract after determining the data, so that the intelligent contract determines whether a trigger condition is met based on the received data. By implementing the method, the terminal can directly verify the acquired data and send the data to the intelligent contract after the verification is passed, so that the process of carrying out consensus verification on the data by other nodes is simplified, and the efficiency and reliability of acquiring the data by the intelligent contract are improved.
Based on the above description, an embodiment of the present invention provides a data processing method based on a block chain, please refer to fig. 1, where the data processing process based on the block chain may include the following steps S101 to S104:
s101, the terminal acquires a plurality of data to be analyzed from a plurality of application objects.
In the embodiment of the present invention, a terminal may be any node in a blockchain network, including a mobile phone, a computer, a tablet computer, and the like, where an intelligent contract is deployed in the blockchain network, a predictive contract is deployed in the terminal, and the predictive contract can obtain a data obtaining request generated based on the intelligent contract, where the data obtaining request includes information of a plurality of application objects, where the application objects may specifically be application programs, such as a weather application program, a ball game relay application program, and the like, and the data obtaining request may be used to obtain target data meeting preset requirements, and in a specific implementation, the application objects in the data obtaining request may include a plurality of application programs of the same type, each application object may respectively provide corresponding data meeting requirements of the intelligent contract, and data meeting requirements of the intelligent contract stored in different application objects may be the same or different, if the data acquisition request sent by the intelligent contract is used for acquiring the scoring condition of the team A in the first game, the data provided by the first application object is '15', the data provided by the second application object is '15', and the data provided by the third application object is '16'. The reason for the difference may be that the data source objects provide data at different times, and the data may change over time, resulting in deviation of the data provided by the data source objects.
Specifically, when a user sets an intelligent contract, a contract triggering condition can be set in the intelligent contract, the contract triggering condition can be that the temperature is 30 degrees, the ball game is carried out to section 4, and the like, when the intelligent contract detects that the triggering condition is met, a task corresponding to the intelligent contract is executed, the task can be that the A transfers 100 yuan to the B, and the B sends goods to the A, and the like. However, the intelligent contract needs to acquire external target data (such as the current temperature or the running condition of the ball game) to judge whether the contract triggering condition is met currently, so the intelligent contract can send a data acquisition request to a predictive engine contract in the terminal, and the terminal acquires a plurality of data to be analyzed from a plurality of application objects according to the data acquisition request received by the predictive engine contract.
It should be noted that each node in the block chain network provided in the embodiment of the present invention may be deployed with a preplan contract and configured to receive a data acquisition request generated based on an intelligent contract, where a terminal is any node in the block chain network, and a specific manner for the terminal to acquire the data acquisition request generated based on the intelligent contract may be that the block chain network generates the data acquisition request based on the intelligent contract at regular time and sends the data acquisition request to the preplan contract of the terminal, so that the terminal acquires the data acquisition request generated based on the intelligent contract at regular time, or the block chain network may also generate the data acquisition request based on the intelligent contract and send the data acquisition request to the preplan contract of the terminal when a trigger event is detected, where the trigger event may be that a transaction occurs between nodes of the block chain network, Nodes in the network are newly added or quitted, and the like, and specifically, a user can set in an intelligent contract in the block chain network in advance. Or, a plurality of data acquisition nodes for data acquisition may be set in the blockchain network in advance, the data acquisition nodes periodically acquire the data acquisition request generated based on the intelligent contract from the blockchain network, and the terminal is any one of the data acquisition nodes. After the terminal acquires the data acquisition request sent by the intelligent contract, a plurality of data to be analyzed are acquired from a plurality of application objects carried by the data acquisition request.
Further, after the terminal acquires the data acquisition request generated based on the intelligent contract, the data to be analyzed is acquired from each application object according to the data acquisition request. For example, the data acquisition request is used to acquire the score of team a in the first game, the application objects include a game application 1, a game application 2, and a game application 3, and the terminal may acquire the score of team a as the first score from the game application 1, acquire the score of team a as the second score from the game application 2, acquire the score of team a as the third score from the game application 3, and determine the 3 pieces of data to be analyzed as the acquired 3 pieces of data to be analyzed.
In one implementation mode, a preplanning machine contract is deployed in a terminal in advance, the preplanning machine contract includes a data acquisition code, the terminal acquires data to be analyzed from each application object according to a data acquisition request, and a specific mode for acquiring a data set to be analyzed may be that the terminal adds information of each application object to the data acquisition code in a parameter form to acquire a target data acquisition code; the terminal executes a target data acquisition code in the prediction machine contract to send a data acquisition request to each application object; and receiving a plurality of data to be analyzed returned by each application object. The information of the application object may be a name or an access address of the application object, that is, the terminal specifically acquires the corresponding data to be analyzed according to the deployed prompter contract.
S102, clustering the data to be analyzed by the terminal to obtain a plurality of data sets to be analyzed.
In the embodiment of the invention, after the terminal acquires a plurality of data to be analyzed, the acquired data to be analyzed are clustered to obtain a plurality of data sets to be analyzed, wherein each data set to be analyzed stores the same type of data to be analyzed. And if the contents in the data to be analyzed are the same, determining the data to be analyzed as the same type.
Specifically, the terminal acquires the content of each data to be analyzed in the multiple data to be analyzed, and adds the data to be analyzed with the same content into the same data set to be analyzed to obtain multiple data sets to be analyzed. For example, if the data to be analyzed is temperature value data, and the contents of the temperature value data acquired by the terminal are "30, 31, 29, 31", respectively, the terminal determines that there are 3 sets of data to be analyzed containing the same contents, and establishes 3 sets of data to be analyzed, which are a first set {29, 29}, a second set {30, 30} and a third set {31, 31}, respectively. For another example, the data to be analyzed is the score value of team a in the third section, and the contents of the multiple score values obtained by the terminal are "22, 21, 22", respectively, then the terminal determines that there are 2 groups of data to be analyzed containing the same content, and establishes 2 data sets to be analyzed, which are the first set {21} and the second set {22, 22}, respectively.
It should be noted that, in order to ensure the reliability of the data to be analyzed, the data to be analyzed may also carry key information, where the key information may specifically be a character string, a fingerprint, and the like, after the terminal acquires each data to be analyzed, the terminal may also detect the reliability of the source of each data to be analyzed according to the key information carried by the data to be analyzed, and specifically, verify the key information carried in the data to be analyzed, where a specific verification manner may be to verify whether the key information satisfies a preset arrangement rule, or to verify whether the key information matches the key information stored in a preset database, and the like. If the verification result indicates that the verification is passed, the terminal determines that the source of the data to be analyzed is reliable and performs clustering processing on the data to be analyzed, and if the verification result indicates that the key information carried by the target data to be analyzed is not passed, the terminal determines that the source of the target data to be analyzed is unreliable and removes the target data to be analyzed from the plurality of data to be analyzed before performing clustering processing on the plurality of data to be analyzed, so that the terminal is prevented from performing clustering processing on the unreliable data to be analyzed.
S103, the terminal determines the weight of each data set to be analyzed in the multiple data sets to be analyzed, and selects a target data set to be analyzed from the multiple data sets to be analyzed according to the weight.
In the embodiment of the invention, after the terminal clusters the acquired multiple data to be analyzed to obtain multiple data sets to be analyzed, the weight of each data set to be analyzed in the multiple data sets to be analyzed is determined.
In an implementation manner, the weight is specifically determined by the number of data to be analyzed in the data set to be analyzed, that is, the specific manner in which the terminal determines the weight of each data set to be analyzed in the multiple data sets to be analyzed may be that the terminal obtains the number of data to be analyzed in each data set to be analyzed, and determines the weight of each data set to be analyzed according to the correspondence between the number and the weight. The correspondence between the number and the weight may be that the higher the number is, the higher the weight is, and the specific correspondence may be set in advance by a developer. For example, if the number and the weight correspond to each other in the same manner, the terminal obtains 2 sets of data to be analyzed based on the obtained 6 pieces of data to be analyzed "30, 29, 30", where the sets include a first set {30, 30} and a second set {29, 29}, the number of the data to be analyzed in the first set is 4, and the number of the data to be analyzed in the second set is 2, the terminal determines that the weight of the first set is 4, and the weight of the second set is 2.
In an implementation manner, a specific manner of determining, by the terminal, the weight of each to-be-analyzed data set in the multiple to-be-analyzed data sets may also be that the terminal obtains each application object corresponding to each to-be-analyzed data in each to-be-analyzed data set, determines a weighting factor corresponding to each to-be-analyzed data according to a correspondence between the application object and the weighting factor, and determines the weight of the to-be-analyzed data set according to a sum of the weighting factors corresponding to all to-be-analyzed data in each to-be-analyzed data set, where the application object corresponding to the to-be-analyzed data is an application object providing the to-be-analyzed data, and the weighting factor corresponding to the to-be-analyzed data is a weighting factor corresponding to the application object providing the to-be-analyzed data.
In the following, a manner of determining a weight of a first data set to be analyzed in a plurality of data sets to be analyzed is specifically described, where the first data set to be analyzed is any one of the data sets to be analyzed. Specifically, the terminal acquires each first application object corresponding to each data to be analyzed in the first data set to be analyzed, and determines each first weighting factor corresponding to each first application object according to the corresponding relationship between the application object and the weighting factor; and the terminal calculates the sum of the first weighting factors and determines the calculated sum as the weight of the first data set to be analyzed. For example, the first data set to be analyzed includes data to be analyzed 1, data to be analyzed 2, and data to be analyzed 3, where the data to be analyzed 1 corresponds to the application object 1, the data to be analyzed 2 corresponds to the application object 2, the data to be analyzed 3 corresponds to the application object 3, the weighting factor corresponding to the application object 1 is 1, the weighting factor corresponding to the application object 2 is 0.9, and the weighting factor corresponding to the application object 3 is 0.8, and then it may be determined that the weighting factor corresponding to the first data set to be analyzed is 1+0.9+0.8 — 2.7.
It should be noted that the corresponding relationship between the application object and the weighting factor may be preset by a developer, or the terminal may determine the weighting factor corresponding to the application object based on the accuracy of the historical data to be analyzed provided by the application object history, specifically, the terminal obtains the accuracy of the historical data to be analyzed provided by each application object in the multiple application objects in the history record, the accuracy is determined by the same number of times between the historical data to be analyzed and the historical target data, and specifically, a ratio between the same number of times between the historical data to be analyzed and the historical target data provided by the application object and the total number of times that the application object provides the data to be analyzed is provided. The historical data to be analyzed comprises data to be analyzed provided by the application object history, and the historical target data comprises target data applied to the intelligent contract in history. For example, if the application object history provides 10 times of data to be analyzed, and 9 times of the 10 times of data to be analyzed are the same as the data ultimately applied to the target data of the smart contract, the accuracy of the application object is determined to be 90%. Further, the terminal determines a weighting factor corresponding to each application object according to the accuracy of the historical data to be analyzed provided by each application object, and establishes a corresponding relationship between the application object and the weighting factor. The higher the accuracy is, the higher the corresponding weighting factor is, for example, the accuracy is the same as the weighting factor, the corresponding weighting factor is 1 when the accuracy is 100%, and the corresponding weighting factor is 0.9 when the accuracy is 90%.
Further, after the terminal determines the weight of each data set to be analyzed, a target data set to be analyzed is selected from the multiple data sets to be analyzed according to the weight. Specifically, the terminal may select a data set to be analyzed with the largest weight as a target data set to be analyzed, for example, the terminal performs clustering processing on a plurality of data to be analyzed to obtain two data sets to be analyzed, where the two data sets to be analyzed include a first set {30, 30} and a second set {29, 29}, the weight of the first set is 4, and the weight of the second set is 2, and the terminal determines the first combination as the target data set to be analyzed. Optionally, if the terminal only obtains one data set to be analyzed after performing clustering processing on a plurality of data to be analyzed, the terminal may directly determine the data set to be analyzed as the target data set to be analyzed, and execute step S104.
S104, the terminal selects any data to be analyzed from the target data set to be analyzed as target data, and the target data is applied to the intelligent contract.
In the embodiment of the present invention, after the terminal determines the target data set to be analyzed, any one of the data to be analyzed is selected from the target data set to be analyzed as the target data, for example, the target data set to be analyzed is {30, 30}, and then the terminal may determine "30" of the data to be analyzed as the target data, and further, the terminal applies the target data to the intelligent contract.
Specifically, the specific way of applying the target data to the intelligent contract by the terminal may be that the terminal directly returns the target data to the intelligent contract, so that the intelligent contract applies the target data, that is, whether the target data meets the task triggering condition is determined according to the target data. For example, if the intelligent contract is that when the temperature is greater than 20 degrees, a transfers 100 units to B, and the target data is 30, the intelligent contract determines that the current temperature is greater than 20 degrees, and performs the task of transferring 100 units to B to apply the target data. Specifically, the terminal can return to the intelligent contract through the forecast machine contract deployed in the terminal.
In the embodiment of the invention, a terminal acquires a plurality of data to be analyzed from a plurality of application objects, clusters the plurality of data to be analyzed to obtain a plurality of data sets to be analyzed, determines the weight of each data set to be analyzed in the plurality of data sets to be analyzed, and selects a target data set to be analyzed from the plurality of data sets to be analyzed according to the weight; and the terminal selects any one piece of data to be analyzed from the target data set to be analyzed as target data and applies the target data to the intelligent contract. By the method, the terminal can perform clustering processing on the data acquired from different data sources, after the data set is obtained, the target data set is determined based on the weight of the data set, and the data required by the intelligent contract is determined from the target data set.
An embodiment of the present invention provides another data processing method based on a block chain, please refer to fig. 2, where the data processing process based on the block chain may include the following steps S201 to S205:
s201, the terminal acquires a plurality of data to be analyzed from a plurality of application objects.
In the embodiment of the invention, a terminal can be any node in a block chain network, an intelligent contract is deployed in the block chain network, a preplan contract is deployed in the terminal, the preplan contract in the terminal can acquire a data acquisition request which is sent by the block chain network and generated based on the intelligent contract, and acquire a plurality of data to be analyzed from a plurality of application objects according to the acquired data acquisition request, wherein the data acquisition request is used for acquiring target data meeting preset requirements, the data acquisition request comprises information of the plurality of application objects, and each application object can provide one data to be analyzed for the terminal. In one implementation manner, the terminal may periodically acquire the data acquisition request generated based on the intelligent contract from the block chain network through a predictive engine contract configured in the terminal, and the user may configure the interval duration of the periodic acquisition in the predictive engine contract in advance.
In one implementation, each application object may specifically be each application program, after the terminal acquires the data acquisition request generated based on the smart contract, it may detect whether or not it has an access right for each application program in the data acquisition request, and if there is a target application program that does not have an access right, the terminal feeds back to the blockchain network that it does not have an access right for accessing the target application program, that is, cannot acquire the data to be analyzed provided by the target application program, in the above case, the blockchain network may automatically modify the data acquisition request generated based on the smart contract, that is, the target application program is removed from the data acquisition request including the application object, and sends a new data acquisition request to the terminal again, where the new data acquisition request does not include the target application program, so that the terminal acquires the data to be analyzed from each application object according to the new data acquisition request, or the terminal sends the data acquisition request to other nodes with the access right of the target application program in the block chain network, so that the other nodes acquire the data to be analyzed from the target application program, and the terminal acquires the data to be analyzed provided by the target application program from the other nodes.
S202, the terminal carries out clustering processing on the data to be analyzed to obtain a plurality of data sets to be analyzed.
In the embodiment of the invention, after the terminal acquires a plurality of data to be analyzed, the plurality of data to be analyzed are clustered to obtain a plurality of data sets to be analyzed. And each data set to be analyzed stores the data to be analyzed of the same type. In a specific implementation, if the contents of the data to be analyzed are the same, the data to be analyzed is determined to be of the same type, specifically, the terminal obtains the content of each data to be analyzed in the multiple data to be analyzed, and adds the data to be analyzed having the same content to the same data set to be analyzed, so as to obtain multiple data sets to be analyzed, optionally, if the contents of the multiple data to be analyzed are all the same, the terminal clusters the multiple data to be analyzed into 1 data set to be analyzed.
S203, the terminal obtains the number of sets corresponding to the plurality of data sets to be analyzed.
In the embodiment of the invention, after the terminal carries out clustering processing on the data to be analyzed, the set number corresponding to a plurality of data sets to be analyzed is obtained, if the set number is less than the preset number, the terminal determines that most of the acquired data to be analyzed is consistent, may determine target data required by the intelligent contract based on the acquired data to be analyzed, and perform step S204, if the number of sets is greater than or equal to a preset number, the terminal determines that the consistency of the acquired data to be analyzed is low, if the target data required by the intelligent contract is determined from the multiple data sets to be analyzed, the reliability of the obtained target data is low, the terminal can obtain a plurality of new analysis data from a plurality of application objects again, and selecting target data required by the intelligent contract from the plurality of new analysis data, wherein the target data can be the data to be analyzed with the highest occurrence frequency in the new data to be analyzed. For example, the preset number is 4, the data set to be analyzed constructed by the multiple data to be analyzed acquired by the terminal includes a first set {2, 2}, a second set {3}, a third set {4, 4}, a fourth set, {5, 5}, and a fifth set {6}, the terminal determines that the number of the data set to be analyzed is greater than the preset number, the data to be analyzed are not consistent, the terminal acquires new data to be analyzed again and includes "4, 3, 4", and the terminal determines the data to be analyzed "4" with the highest frequency of occurrence in the multiple new data to be analyzed as target data required by the intelligent contract.
S204, if the number of the sets is smaller than the preset number, the terminal determines the weight of each data set to be analyzed in the multiple data sets to be analyzed, and selects a target data set to be analyzed from the multiple data sets to be analyzed according to the weight.
In the embodiment of the invention, after the terminal clusters the acquired multiple data to be analyzed to obtain multiple data sets to be analyzed, if the number of the sets is less than the preset number, the terminal determines the weight of each data set to be analyzed in the multiple data sets to be analyzed.
In the mode 1, the weight is specifically determined by the number of the data to be analyzed in the data set to be analyzed, that is, the specific mode of the terminal determining the weight of each data set to be analyzed in the multiple data sets to be analyzed may be that the terminal obtains the number of the data to be analyzed in each data set to be analyzed, and determines the weight of each data set to be analyzed according to the corresponding relationship between the number and the weight, where the corresponding relationship between the number and the weight may be that the number and the weight are the same.
In the mode 2, a specific mode of determining the weight of each to-be-analyzed data set in the multiple to-be-analyzed data sets by the terminal may also be that the terminal obtains each application object corresponding to each to-be-analyzed data in each to-be-analyzed data set, determines the weighting factor corresponding to each to-be-analyzed data according to the corresponding relationship between the application object and the weighting factor, and determines the weight of the to-be-analyzed data set by the terminal according to the sum of the weighting factors corresponding to all to-be-analyzed data in each to-be-analyzed data set, where the application object corresponding to the to-be-analyzed data is the application object providing the to-be-analyzed data, and the weighting factor corresponding to the to-be-analyzed data is the weighting factor corresponding to the application object providing the to-be-. The corresponding relationship between the application object and the weighting factor may be preset by a research and development staff, or the terminal may determine the weighting factor corresponding to the application object based on the accuracy of the historical data to be analyzed provided by the application object history, specifically, the terminal obtains the accuracy of the historical data to be analyzed provided by each application object in the multiple application objects in the history record, the accuracy is determined by the same times between the historical data to be analyzed and the historical target data, and specifically, the terminal may provide a ratio between the same times between the historical data to be analyzed and the historical target data provided by the application object and the total times of providing the data to be analyzed by the application object. The historical data to be analyzed comprises data to be analyzed provided by the application object history, and the historical target data comprises target data applied to the intelligent contract in history.
Further, after the terminal determines the weight of each data set to be analyzed, a target data set to be analyzed is selected from the multiple data sets to be analyzed according to the weight. The target data set to be analyzed may specifically be a data set to be analyzed with the largest weight, and it should be noted that, if the terminal determines that the weights of at least two data sets to be analyzed are the same by using the method 1, the terminal may re-determine the weights of the data sets to be analyzed by using the method 2, or, if the terminal determines that the weights of at least two data sets to be analyzed are the same by using the method 2, the terminal may re-determine the weights of the data sets to be analyzed by using the method 2. If the mode 1 and the mode 2 both determine that at least two to-be-analyzed data sets with the same weight exist in the plurality of to-be-analyzed data sets, the terminal may acquire the to-be-analyzed data from other data objects again, change the weight of the at least two to-be-analyzed data sets with the same weight after newly acquiring the to-be-analyzed data, and select the target to-be-analyzed data set based on the changed weight. For example, the terminal obtains 2 data sets to be analyzed based on the obtained 6 data "30, 29" to be analyzed, including a first set {30, 30} and a second set {29, 29}, where the terminal determines that the weight of the first set is 3 and the weight of the second set is 3, at this time, the terminal obtains new data "30" to be analyzed from a new application object again, and adds the data to the first set, so that the weight of the first set is increased, and the first set is determined as a target data set to be analyzed.
S205, the terminal selects any data to be analyzed from the target data set to be analyzed as target data, and applies the target data to the intelligent contract.
In the embodiment of the present invention, after the terminal determines the target data set to be analyzed, any one of the data to be analyzed is selected from the target data set to be analyzed as the target data, for example, the target data set to be analyzed is {30, 30}, and then the terminal may determine "30" of the data to be analyzed as the target data. Further, after the terminal determines the target data, the terminal may directly return the target data to the intelligent contract, so that the intelligent contract applies the target data, that is, whether the task triggering condition is currently met is determined according to the target data. Specifically, the terminal can return to the intelligent contract through the forecast machine contract deployed in the terminal.
After the terminal applies the target data to the intelligent contract, the intelligent contract judges whether the target data meets contract triggering conditions or not, wherein the contract triggering conditions are preset in the intelligent contract, the contract triggering conditions can be that the temperature is 20 ℃, the ball game is carried out to section 4, and the like, when the intelligent contract detects that the triggering conditions are met, tasks corresponding to the intelligent contract are executed, the tasks can be that the A transfers 100 yuan to the B, and the B sends goods to the A, and the like. Further, when the intelligent contract determines that the target data meets the task triggering condition, the triggering terminal broadcasts the target data and the task executed by the intelligent contract to at least one second node in the block chain network, so that the at least one second node in the block chain network performs consensus check on the target data. Specifically, the process of performing consensus check on the target data by the at least one second node may be that each second node also obtains second data to be analyzed from the application object, and detects whether the second target data obtained based on the second data to be analyzed is the same as the target data broadcast by the terminal, and if the second target data obtained based on the second data to be analyzed is the same as the target data broadcast by the terminal, it is determined that the check result for the target data passes the check, as shown in fig. 3, the second node includes a node 1, a node 2, a node 3, and a node 4, the application object carried in the data obtaining request includes the application object 1, the application object 2, the application object 3, and the application object 4, and the node 1, the node 2, the node 3, and the node 4 may obtain corresponding data to be analyzed from each application object, so as to complete the consensus check on.
And if the target data is verified by at least one second node in the block chain network, packaging the target data into blocks by the terminal, and adding the blocks into the block chain network. By the mode, after the target data acquired from the outside is used by the intelligent contract, chaining is performed on the external data, so that the efficiency of acquiring the data by the intelligent contract is improved, and the common identification check is performed on the target data by the at least one second node based on the data acquired from the application object, so that the process of the common identification check is simplified, and the efficiency of data chaining is improved.
In the embodiment of the invention, a terminal acquires a plurality of data to be analyzed from a plurality of application objects, clusters the plurality of data to be analyzed to obtain a plurality of data sets to be analyzed, determines the weight of each data set to be analyzed in the plurality of data sets to be analyzed if the number of the data sets to be analyzed is less than the preset number, and selects a target data set to be analyzed from the plurality of data sets to be analyzed according to the weight; and the terminal selects any one piece of data to be analyzed from the target data set to be analyzed as target data and applies the target data to the intelligent contract. By the method, the most reliable data can be screened from the obtained data and sent to the intelligent contract, and the most reliable data does not need to be sent to other nodes for consensus verification, so that the data verification process is simplified, and the efficiency and reliability of the intelligent contract for obtaining the data are improved.
As shown in fig. 4, for a block chain network provided in an embodiment of the present invention, referring to the block chain network shown in fig. 4, the block chain network refers to a system for performing data sharing between nodes, the block chain network may include a plurality of nodes 401, and the plurality of nodes 401 may refer to respective terminals in the block chain network. Each node may receive input information during normal operation and maintain shared data within the blockchain network based on the received input information. In order to ensure information intercommunication in the blockchain network, information connection can exist between each node in the blockchain network, and information transmission can be carried out between the nodes through the information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain network are consistent.
Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store node identifiers of other nodes in the blockchain network, so that the generated block can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
Each node in the blockchain network stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 5, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores the version number of the input information, the hash value of the previous block and the Merkle root node, and the block main body stores the input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the version number of the parent block, the hash value of the previous block and the Merkle root node, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured. In a specific implementation, revenue information uploaded by each node may be stored in each block.
When each block in the block chain is generated, when a node where the block chain is located receives input information, the input information is verified, after the verification is completed, the input information is stored in a memory pool, and a hash tree used for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the block chain network where the newly generated blocks are located according to the node identifications of the other nodes in the block chain network, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
Based on the above description of the embodiment of the data processing method based on the blockchain, the embodiment of the present invention further discloses a data processing apparatus based on the blockchain, where the data processing apparatus based on the blockchain may be a computer program (including a program code) running in the terminal, or may be an entity apparatus included in the terminal. The blockchain based data processing apparatus may perform the method shown in fig. 1 or fig. 2. Referring to fig. 6, the block chain-based data processing apparatus 60 includes: the device comprises an acquisition module 601, a processing module 602, a determination module 603, a selection module 604 and an application module 605.
An obtaining module 601, configured to obtain multiple data to be analyzed from multiple application objects;
the processing module 602 is configured to perform clustering processing on the multiple data to be analyzed to obtain multiple data sets to be analyzed, where each data set to be analyzed stores data to be analyzed of the same type;
a determining module 603, configured to determine a weight of each data set to be analyzed in the plurality of data sets to be analyzed;
a selecting module 604, configured to select a target data set to be analyzed from the multiple data sets to be analyzed according to the weight;
the selecting module 604 is further configured to select any one of the data to be analyzed from the target data set to be analyzed as target data;
an application module 605, configured to apply the target data to the intelligent contract.
In an implementation manner, the determining module 603 is specifically configured to:
acquiring the content of each data to be analyzed in the data to be analyzed;
and adding the data to be analyzed with the same content into the same data set to be analyzed to obtain a plurality of data sets to be analyzed.
In one implementation, the processing module 602 is specifically configured to:
acquiring each first application object corresponding to each data to be analyzed in a first data set to be analyzed, wherein the first data set to be analyzed is any one data set to be analyzed in the multiple data sets to be analyzed;
determining each first weighting factor corresponding to each first application object according to the corresponding relation between the application object and the weighting factor;
calculating a sum of the first weighting factors and determining the sum as a weight of the first set of data to be analyzed.
In an implementation manner, the determining module 603 is specifically configured to:
acquiring the accuracy of historical data to be analyzed provided by each application object in the plurality of application objects in the historical records, wherein the accuracy is determined by the same times between the historical data to be analyzed and the historical target data, the historical data to be analyzed comprises the data to be analyzed provided by the application object history, and the historical target data comprises target data applied to the intelligent contract in the history;
and determining the weighting factor corresponding to each application object according to the accuracy of the historical data to be analyzed provided by each application object, and establishing the corresponding relation between the application object and the weighting factor.
In an implementation manner, the determining module 603 is specifically configured to:
acquiring the quantity of the data to be analyzed in each data set to be analyzed;
and determining the weight of each data set to be analyzed according to the corresponding relation between the number and the weight.
In one implementation, the processing module 602 is further configured to:
acquiring the number of sets corresponding to the plurality of data sets to be analyzed;
and if the number of the sets is less than the preset number, executing a step of determining the weight of each data set to be analyzed in the plurality of data sets to be analyzed.
In one implementation, the processing module 602 is further configured to:
if the set number is larger than or equal to a preset number, acquiring a plurality of new analysis data from the plurality of application objects again;
target data applied to the intelligent contract is selected from the plurality of new analysis data.
In the embodiment of the present invention, an obtaining module 601 obtains a plurality of data to be analyzed from a plurality of application objects, a processing module 602 performs clustering processing on the plurality of data to be analyzed to obtain a plurality of data sets to be analyzed, a determining module 603 determines a weight of each data set to be analyzed in the plurality of data sets to be analyzed, and a selecting module 604 selects a target data set to be analyzed from the plurality of data sets to be analyzed according to the weight; any data to be analyzed is selected from the target data set to be analyzed as target data, and the application module 605 applies the target data to the intelligent contract. By the method, the most reliable data can be screened from the obtained data and sent to the intelligent contract, and the most reliable data does not need to be sent to other nodes for consensus verification, so that the data verification process is simplified, and the efficiency and reliability of the intelligent contract for obtaining the data are improved.
Fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in fig. 7, the terminal includes: at least one processor 701, an input device 703, an output device 704, a memory 705, at least one communication bus 702. Wherein a communication bus 702 is used to enable connective communication between these components. The memory 705 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 705 may optionally be at least one memory device located remotely from the processor 701. Wherein the processor 701 may be combined with the apparatus described in fig. 6, the memory 705 stores a set of program codes, and the processor 701, the input device 703 and the output device 704 call the program codes stored in the memory 705 to perform the following operations:
a processor 701, configured to obtain a plurality of data to be analyzed from a plurality of application objects;
the processor 701 is configured to perform clustering processing on the multiple data to be analyzed to obtain multiple data sets to be analyzed, where each data set to be analyzed stores data to be analyzed of the same type;
a processor 701, configured to determine a weight of each data set to be analyzed in the multiple data sets to be analyzed, and select a target data set to be analyzed from the multiple data sets to be analyzed according to the weight;
and the processor 701 is configured to select any one of the data to be analyzed from the target data set to be analyzed as target data, and apply the target data to the intelligent contract.
In one implementation, the processor 701 is specifically configured to:
acquiring the content of each data to be analyzed in the data to be analyzed;
and adding the data to be analyzed with the same content into the same data set to be analyzed to obtain a plurality of data sets to be analyzed.
In one implementation, the processor 701 is specifically configured to:
acquiring each first application object corresponding to each data to be analyzed in a first data set to be analyzed, wherein the first data set to be analyzed is any one data set to be analyzed in the multiple data sets to be analyzed;
determining each first weighting factor corresponding to each first application object according to the corresponding relation between the application object and the weighting factor;
calculating a sum of the first weighting factors and determining the sum as a weight of the first set of data to be analyzed.
In one implementation, the processor 701 is specifically configured to:
acquiring the accuracy of historical data to be analyzed provided by each application object in the plurality of application objects in the historical records, wherein the accuracy is determined by the same times between the historical data to be analyzed and the historical target data, the historical data to be analyzed comprises the data to be analyzed provided by the application object history, and the historical target data comprises target data applied to the intelligent contract in the history;
and determining the weighting factor corresponding to each application object according to the accuracy of the historical data to be analyzed provided by each application object, and establishing the corresponding relation between the application object and the weighting factor.
In one implementation, the processor 701 is specifically configured to:
acquiring the quantity of the data to be analyzed in each data set to be analyzed;
and determining the weight of each data set to be analyzed according to the corresponding relation between the number and the weight.
In one implementation, the processor 701 is specifically configured to:
acquiring the number of sets corresponding to the plurality of data sets to be analyzed;
and if the number of the sets is less than the preset number, executing a step of determining the weight of each data set to be analyzed in the plurality of data sets to be analyzed.
In one implementation, the processor 701 is specifically configured to:
if the set number is larger than or equal to a preset number, acquiring a plurality of new analysis data from the plurality of application objects again;
target data applied to the intelligent contract is selected from the plurality of new analysis data.
In the embodiment of the invention, a processor 701 acquires a plurality of data to be analyzed from a plurality of application objects, the processor 701 performs clustering processing on the plurality of data to be analyzed to obtain a plurality of data sets to be analyzed, the processor 701 determines the weight of each data set to be analyzed in the plurality of data sets to be analyzed, and the processor 701 selects a target data set to be analyzed from the plurality of data sets to be analyzed according to the weight; and any one of the data to be analyzed is selected from the target data set to be analyzed as target data, and the processor 701 applies the target data to the intelligent contract. By the method, the most reliable data can be screened from the obtained data and sent to the intelligent contract, and the most reliable data does not need to be sent to other nodes for consensus verification, so that the data verification process is simplified, and the efficiency and reliability of the intelligent contract for obtaining the data are improved.
The module in the embodiment of the present invention may be implemented by a general-purpose integrated circuit, such as a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC).
It should be understood that, in the embodiment of the present invention, the Processor 701 may be a Central Processing Unit (CPU), and the Processor may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The bus 702 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Enhanced ISA (EISA) bus, or the like, and the bus 702 may be divided into an address bus, a data bus, a control bus, or the like, where fig. 7 illustrates only one bold line for ease of illustration, but does not illustrate only one bus or one type of bus.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The computer-readable storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A data processing method based on a block chain is applied to a block chain network, and an intelligent contract is configured in the block chain network, and the method is characterized by comprising the following steps:
acquiring a plurality of data to be analyzed from a plurality of application objects;
clustering the data to be analyzed to obtain a plurality of data sets to be analyzed, wherein the data sets to be analyzed store the same type of data to be analyzed;
determining the weight of each data set to be analyzed in the multiple data sets to be analyzed, and selecting a target data set to be analyzed from the multiple data sets to be analyzed according to the weight;
and selecting any data to be analyzed from the target data set to be analyzed as target data, and applying the target data to the intelligent contract.
2. The method according to claim 1, wherein the clustering the plurality of data to be analyzed to obtain a plurality of data sets to be analyzed comprises:
acquiring the content of each data to be analyzed in the data to be analyzed;
and adding the data to be analyzed with the same content into the same data set to be analyzed to obtain a plurality of data sets to be analyzed.
3. The method of claim 1, wherein the determining a weight for each of the plurality of data sets to be analyzed comprises:
acquiring each first application object corresponding to each data to be analyzed in a first data set to be analyzed, wherein the first data set to be analyzed is any one data set to be analyzed in the multiple data sets to be analyzed;
determining each first weighting factor corresponding to each first application object according to the corresponding relation between the application object and the weighting factor;
calculating a sum of the first weighting factors and determining the sum as a weight of the first set of data to be analyzed.
4. The method according to claim 3, wherein before determining each first weighting factor corresponding to each first application object according to the corresponding relationship between the application object and the weighting factor, the method further comprises:
acquiring the accuracy of historical data to be analyzed provided by each application object in the plurality of application objects in the historical records, wherein the accuracy is determined by the same times between the historical data to be analyzed and the historical target data, the historical data to be analyzed comprises the data to be analyzed provided by the application object history, and the historical target data comprises target data applied to the intelligent contract in the history;
and determining the weighting factor corresponding to each application object according to the accuracy of the historical data to be analyzed provided by each application object, and establishing the corresponding relation between the application object and the weighting factor.
5. The method of claim 1, wherein the determining a weight for each of the plurality of data sets to be analyzed comprises:
acquiring the quantity of the data to be analyzed in each data set to be analyzed;
and determining the weight of each data set to be analyzed according to the corresponding relation between the number and the weight.
6. The method of claim 1, wherein prior to determining the weight for each of the plurality of data sets to be analyzed, the method further comprises:
acquiring the number of sets corresponding to the plurality of data sets to be analyzed;
and if the number of the sets is less than the preset number, executing a step of determining the weight of each data set to be analyzed in the plurality of data sets to be analyzed.
7. The method of claim 6, further comprising:
if the set number is larger than or equal to a preset number, acquiring a plurality of new analysis data from the plurality of application objects again;
target data applied to the intelligent contract is selected from the plurality of new analysis data.
8. A data processing device based on a block chain is applied to a block chain network, and an intelligent contract is configured in the block chain network, and the device comprises:
the acquisition module is used for acquiring a plurality of data to be analyzed from a plurality of application objects;
the processing module is used for clustering the data to be analyzed to obtain a plurality of data sets to be analyzed, and each data set to be analyzed stores the data to be analyzed of the same type;
a determining module, configured to determine a weight of each data set to be analyzed in the plurality of data sets to be analyzed;
the selecting module is used for selecting a target data set to be analyzed from the multiple data sets to be analyzed according to the weight;
the selection module is further used for selecting any one piece of data to be analyzed from the target data set to be analyzed as target data;
and the application module is used for applying the target data to the intelligent contract.
9. A terminal, comprising a processor, an input interface, an output interface, and a memory, the processor, the input interface, the output interface, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN201911139847.7A 2019-11-19 2019-11-19 Data processing method, device, terminal and medium based on block chain Pending CN110930254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911139847.7A CN110930254A (en) 2019-11-19 2019-11-19 Data processing method, device, terminal and medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911139847.7A CN110930254A (en) 2019-11-19 2019-11-19 Data processing method, device, terminal and medium based on block chain

Publications (1)

Publication Number Publication Date
CN110930254A true CN110930254A (en) 2020-03-27

Family

ID=69850388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911139847.7A Pending CN110930254A (en) 2019-11-19 2019-11-19 Data processing method, device, terminal and medium based on block chain

Country Status (1)

Country Link
CN (1) CN110930254A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905554A (en) * 2021-02-07 2021-06-04 全链通有限公司 Data sharing method and device based on block chain
CN113065167A (en) * 2021-04-06 2021-07-02 北京瑞卓喜投科技发展有限公司 Method and device for updating downlink data authorization prediction machine and electronic equipment
CN113379371A (en) * 2021-05-19 2021-09-10 海南师范大学 Method and system for automatically classifying event works
CN113822641A (en) * 2021-05-19 2021-12-21 海南师范大学 Online event review supervision method and system
CN112905554B (en) * 2021-02-07 2024-05-10 全链通有限公司 Block chain-based data sharing method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905554A (en) * 2021-02-07 2021-06-04 全链通有限公司 Data sharing method and device based on block chain
CN112905554B (en) * 2021-02-07 2024-05-10 全链通有限公司 Block chain-based data sharing method and device
CN113065167A (en) * 2021-04-06 2021-07-02 北京瑞卓喜投科技发展有限公司 Method and device for updating downlink data authorization prediction machine and electronic equipment
CN113379371A (en) * 2021-05-19 2021-09-10 海南师范大学 Method and system for automatically classifying event works
CN113822641A (en) * 2021-05-19 2021-12-21 海南师范大学 Online event review supervision method and system

Similar Documents

Publication Publication Date Title
CN111444210B (en) Block chain consensus node management method, device, equipment and storage medium
CN111382456B (en) Proposal message processing method, device, equipment and storage medium
CN110928880B (en) Data processing method, device, terminal and medium based on block chain
WO2021233049A1 (en) Blockchain–based data processing method, apparatus, device, and readable storage medium
CN110995513B (en) Data sending and receiving method in Internet of things system, internet of things equipment and platform
CN110930254A (en) Data processing method, device, terminal and medium based on block chain
CN112134762B (en) Testing method, device, terminal and storage medium for block chain network structure
CN111654395B (en) Voting information processing method, device, equipment and storage medium
CN110690974A (en) Block chain based data verification method, device, equipment and readable storage medium
CN111461885A (en) Consensus network management method, device, computer and readable storage medium
CN110597917A (en) Tourism data management method, device, terminal and medium
CN111679978B (en) Program testing method, program testing device, electronic equipment and storage medium
CN111556115A (en) Data processing method, device and equipment based on block chain and storage medium
CN111368008B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN111488626A (en) Data processing method, device, equipment and medium based on block chain
CN111259428A (en) Data processing method and device based on block chain, node equipment and storage medium
CN112200680B (en) Block link point management method, device, computer and readable storage medium
CN110990790A (en) Data processing method and equipment
CN110647583A (en) Block chain construction method, device, terminal and medium
CN109544165B (en) Resource transfer processing method, device, computer equipment and storage medium
CN111343212B (en) Message processing method, device, equipment and storage medium
CN112417052B (en) Data synchronization method, device, equipment and storage medium in block chain network
CN112698932A (en) Industrial application program calling method and device, computer equipment and storage medium
CN111159988A (en) Model processing method and device, computer equipment and storage medium
CN111711537B (en) Method, device and equipment for updating standby main node list

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination