Disclosure of Invention
In view of this, the present invention provides a method for exchanging blacklist data and an application server, so as to solve the problem of how to standardize the exchange and management of blacklist data.
Firstly, in order to achieve the above object, the present invention provides a blacklist data exchange method, which is applied to an application server, wherein the application server is a master node and performs data communication with a plurality of sub-nodes, and the method includes the steps of:
monitoring blacklist data exchange requests and responses among the sub-nodes;
distributing corresponding responsibility to each sub-node according to the monitoring result;
notifying the sub-nodes not participating in the exchange as a monitor, and verifying the exchange conditions of the two exchange parties; and
and informing the sub-nodes which pass the exchange condition check to carry out data exchange one by one.
Optionally, the method further comprises, before the monitoring, the steps of:
pre-checking blacklist data uploaded by the branch nodes;
and performing verification grading processing on the sub-nodes according to the pre-verification result.
Optionally, the pre-verification process is that the master node verifies whether the blacklist data meets requirements according to a preset rule, where the preset rule includes: the data format is correct, the privacy of a user cannot be written, and repeated, missing and false data cannot exist.
Optionally, the verifying and grading process is to set a corresponding exchange level for the corresponding sub-node according to the normalization of the blacklist data, and then authorize and allocate a corresponding transaction currency to the sub-node.
Optionally, the verifying grading process further includes:
when the normalization of the blacklist data is higher, the sub-nodes exchange more data with less transaction coins;
and distributing a corresponding number of transaction coins for the sub-nodes according to the data volume of the blacklist data and a preset proportion.
Optionally, the step of allocating corresponding responsibilities to each sub-node according to the monitoring result specifically includes:
configuring the sub-node sending the blacklist data exchange request as a data requesting party, configuring the sub-node agreeing with the blacklist data exchange request as a data providing party, and configuring the sub-node which does not send the blacklist data exchange request and a response or a feedback result in the response as the sub-node which does not agree with the blacklist data exchange request or selecting one or more of the sub-nodes as a supervising party.
Optionally, the exchange condition includes whether blacklist data provided by the data provider meets the preset rule and whether the data requester has enough transaction coins, and when both the exchange parties reach the exchange condition, that is, the blacklist data provided by the data provider meets the preset rule and the data requester has enough transaction coins corresponding to the blacklist data, it indicates that the verification is passed.
Optionally, the step of notifying that the data exchange is performed one-to-one by the sub-nodes verified by the exchange condition specifically includes:
calculating the transaction currency required to be paid by the data requesting party according to the exchange level of the data requesting party and the data amount of the blacklist data;
and when the data requester successfully pays, copying and synchronizing the blacklist data uploaded by the data provider to the data requester.
In addition, to achieve the above object, the present invention further provides an application server, which includes a memory, a processor, and a blacklist data exchange system stored on the memory and operable on the processor, where the blacklist data exchange system, when executed by the processor, implements the steps of the blacklist data exchange method as described above.
Further, to achieve the above object, the present invention also provides a computer readable storage medium storing a blacklist data exchange system, which is executable by at least one processor to cause the at least one processor to perform the steps of the blacklist data exchange method as described above.
Compared with the prior art, the blacklist data exchange method, the application server and the computer readable storage medium provided by the invention can use one central unit as a main node of the block chain and other cooperative mechanisms as sub-nodes, and carry out blacklist data exchange and management by using an intelligent contract technology based on the block chain. The blacklist data uploaded by the branch nodes is subjected to pre-verification and verification grading treatment, the branch nodes which do not participate in the exchange are used as supervision parties, and the exchange conditions of the two exchange parties are verified, so that the real compliance of the exchange data is guaranteed. Due to the clear and transparent exchange process, the blacklist data sharing is beneficial to the business development of each organization, and the worry of uploading data by the cooperation organization is eliminated. The central unit can establish a data ecosphere for quality protection driving and protection navigation of data exchange.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an alternative application environment according to various embodiments of the present invention.
In the present embodiment, the present invention can be applied to an application environment including, but not limited to, the terminal device 1, the application server 2, and the network 3. The application server 2, the blockchain network 3 and the plurality of terminal devices 1 together form a blockchain network system to exchange and manage blacklist data.
The application server 2 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and is configured to centrally store and manage blacklist data to be exchanged, which is a master node of the blockchain network system. The application server 2 may be a computer, or may be a single network server, a server group composed of a plurality of network servers, or a cloud based on cloud computing and composed of a large number of hosts or network servers.
The blockchain network 3 is used for data transmission and interaction in the blockchain network system. The application server 2 performs data communication with the plurality of terminal devices 1 through the blockchain network 3, and the network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
The terminal device 1 is configured to perform exchange of the blacklist data among each other, and is a sub-node of the block chain network system. The terminal apparatus 1 may be a mobile apparatus such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, a car-mounted device, etc., and a fixed terminal such as a digital TV, a desktop computer, a notebook, a server, etc.
Fig. 2 is a schematic diagram of an alternative hardware architecture of the application server 2 in fig. 1. In this embodiment, the application server 2 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13, which may be communicatively connected to each other through a system bus. It is noted that fig. 2 only shows the application server 2 with components 11-13, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the application server 2, such as a hard disk or a memory of the application server 2. In other embodiments, the memory 11 may also be an external storage device of the application server 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the application server 2. Of course, the memory 11 may also comprise both an internal storage unit of the application server 2 and an external storage device thereof. In this embodiment, the memory 11 is generally used for storing an operating system installed in the application server 2 and various types of application software, such as program codes of the blacklist data exchange system 200. Furthermore, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is generally configured to control the overall operation of the application server 2, such as performing control and processing related to data interaction or communication with the terminal device 1. In this embodiment, the processor 12 is configured to run the program codes stored in the memory 11 or process data, for example, run the blacklist data exchange system 200.
The network interface 13 may comprise a wireless network interface or a wired network interface, and the network interface 13 is generally used for establishing a communication connection between the application server 2 and other electronic devices. In this embodiment, the network interface 13 is mainly configured to connect the application server 2 with one or more terminal devices 1 through the blockchain network 3, and establish a data transmission channel and a communication connection between the application server 2 and the one or more terminal devices 1.
The application environment and the hardware structure and function of the related devices of the various embodiments of the present invention have been described in detail so far. Hereinafter, various embodiments of the present invention will be proposed based on the above-described application environment and related devices.
First, the present invention provides a blacklist data exchange system 200.
Referring to FIG. 3, a block diagram of a first embodiment of a blacklist data exchange system 200 is shown.
In this embodiment, the blacklist data exchange system 200 includes a series of computer program instructions stored on the memory 11, and when the computer program instructions are executed by the processor 12, the blacklist data exchange operation of each embodiment of the present invention can be implemented. In a block chain for exchanging blacklist data, one central unit is used as a main node, and other cooperative mechanisms are used as sub-nodes. The application server 2 is a central unit in a block chain for exchanging blacklist data, i.e. a master node. The plurality of terminal devices 1 are other cooperating entities, i.e., sub-nodes, in a block chain for exchanging blacklist data. And the blacklist data is exchanged and managed among all nodes according to an agreed exchange rule by using an intelligent contract technology based on a block chain, so that the whole data exchange process is fair and transparent, and the process for acquiring the data by a cooperative mechanism is standard and reasonable.
In some embodiments, blacklisted data exchange system 200 may be divided into one or more modules based on the particular operations implemented by the portions of the computer program instructions. For example, in fig. 3, the blacklist data exchange system 200 may be partitioned into a monitoring module 201, an assignment module 202, and a notification module 203. Wherein:
the monitoring module 201 is configured to monitor blacklist data exchange requests and responses between the sub-nodes.
Specifically, each sub-node having a data exchange requirement sequentially sends out a blacklist data exchange request to other sub-nodes through the blockchain network 3. The request comprises the identifier of the request, the information of the requested blacklist data, the identity identifier of the demand sub-node and the like. And the sub-node receiving the blacklist data exchange request judges whether to agree to carry out the blacklist data exchange according to the self-demand and the number of the remaining transaction coins, and then responds to the blacklist data exchange request. The response comprises the identification of the response, the information of the corresponding blacklist data, the identification of the demand sub-node, the identification of the response sub-node, the feedback result of the request and the like. The feedback result includes agreement with the blacklist data exchange request and disagreement with the blacklist data exchange request. And the feedback result indicates that the sub-node which does not agree with the blacklist data exchange request or does not send the response does not participate in the data exchange. The monitoring module 201 may monitor requests and responses between various sub-nodes. The sub-nodes receiving the blacklist data exchange request automatically respond, try to start data exchange with the data provider, and broadcast the exchange behavior to other sub-nodes in a public way.
The allocating module 202 is configured to allocate corresponding responsibilities to each sub-node according to the monitoring result.
For example, the allocating module 202 configures the sub-node that issues the blacklist data exchange request as a data requester, configures the sub-node that agrees with the blacklist data exchange request as a data provider, and configures the sub-node (or one or more selected sub-nodes) that do not issue the blacklist data exchange request and respond to or disagree with the blacklist data exchange request as a supervisor.
The notifying module 203 is configured to notify the sub-node not participating in the current exchange as a supervising party, and verify the exchange conditions of the two exchanging parties.
Specifically, before the exchange of the blacklist data is performed, each sub-node uploads the blacklist data to the main node (the application server 2), and the main node allocates a certain number of transaction coins (bitcoins) to each sub-node for subsequent exchange. The supervisor can obtain the blacklist data provided by the data provider (i.e. the blacklist data uploaded to the host node by the data provider) from the host node, and perform verification. The exchange conditions comprise whether blacklist data provided by the data provider meets preset rules and whether the data requester has enough transaction coins. In this embodiment, the preset rule may include: the data format is correct, the privacy of the user cannot be written, and repeated data, missing data, false data and the like cannot be generated. In addition, according to the data amount of the blacklist data and a preset ratio (the ratio between the data amount and the number of the transaction coins), the data requesting party needs to pay the corresponding number of the transaction coins. And when both the exchange parties reach the exchange condition, namely the blacklist data provided by the data provider accords with the preset rule and the data requester has enough transaction coins corresponding to the blacklist data, the verification is passed, and the exchange can be continued.
The notifying module 203 is further configured to notify the sub-nodes checked by the switching condition to perform data switching one to one.
Specifically, after the exchange conditions of the two exchange parties are verified, the notification module 203 notifies the data requester and the data provider that the data exchange starts. And the data supplier shares the pre-stored blacklist data (related data are copied and synchronized to the data supplier), and the data supplier pays the corresponding amount of transaction coins to the data supplier according to the exchange level corresponding to the node and the data amount of the blacklist data. The notification module 203 needs to calculate the transaction currency that the data requester needs to pay according to the exchange level of the data requester and the data amount of the blacklist data, and when the data requester successfully pays, the blacklist data uploaded by the data provider is copied and synchronized to the data requester.
Referring to FIG. 4, a block diagram of a second embodiment of a blacklist data exchange system 200 is shown. In this embodiment, the blacklist data exchange system 200 includes a series of computer program instructions stored on the memory 11, and when the computer program instructions are executed by the processor 12, the blacklist data exchange operation of each embodiment of the present invention can be implemented. In a block chain for exchanging blacklist data, one central unit is used as a main node, and other cooperative mechanisms are used as sub-nodes. The application server 2 is a central unit in a block chain for exchanging blacklist data, i.e. a master node. The plurality of terminal devices 1 are other cooperating entities, i.e., sub-nodes, in a block chain for exchanging blacklist data.
In this embodiment, the blacklist data exchange system 200 includes a pre-verification module 204 and a ranking module 205, in addition to the monitoring module 201, the distribution module 202 and the notification module 203 in the first embodiment.
The pre-check module 204 is configured to pre-check blacklist data uploaded by a corresponding node.
Specifically, when a child node uploads blacklist data to a master node (the application server 2), pre-verification is performed with the master node. The pre-verification process is that the pre-verification module 204 verifies whether the blacklist data meets the requirements according to a preset rule. In this embodiment, the preset rule may include: the data format is correct, the privacy of the user cannot be written, and repeated data, missing data, false data and the like cannot be generated.
The grading module 205 is configured to perform a verification grading process on the sub-nodes according to a pre-verification result.
Specifically, the grading module 205 performs a verification grading process on the blacklist data according to a verification result of the blacklist data, mainly sets a corresponding exchange level for the corresponding sub-node according to the normalization of the blacklist data, and then authorizes and allocates a corresponding transaction coin to the sub-node. For example, when the specification of the blacklist data is high, the sub-node may subsequently exchange more data with fewer transaction coins. And after the blacklist data passes the verification, the main node authorizes the subnodes to exchange the blacklist data, and distributes corresponding transaction coins for the subnodes according to the data volume of the blacklist data and a preset proportion.
In addition, the invention also provides a blacklist data exchange method.
Fig. 5 is a schematic flowchart illustrating a blacklist data exchange method according to a first embodiment of the present invention. In a block chain for exchanging blacklist data, one central unit is used as a main node, and other cooperative mechanisms are used as sub-nodes. The application server 2 is a central unit in a block chain for exchanging blacklist data, i.e. a master node. The plurality of terminal devices 1 are other cooperating entities, i.e., sub-nodes, in a block chain for exchanging blacklist data. And the blacklist data is exchanged and managed among all nodes according to an agreed exchange rule by using an intelligent contract technology based on a block chain, so that the whole data exchange process is fair and transparent, and the process for acquiring the data by a cooperative mechanism is standard and reasonable.
In this embodiment, the execution order of the steps in the flowchart shown in fig. 5 may be changed and some steps may be omitted according to different requirements. The method comprises the following steps:
step S600, monitoring blacklist data exchange requests and responses among the sub-nodes.
Specifically, each sub-node having a data exchange requirement sequentially sends out a blacklist data exchange request to other sub-nodes through the blockchain network 3. The request comprises the identifier of the request, the information of the requested blacklist data, the identity identifier of the demand sub-node and the like. And the sub-node receiving the blacklist data exchange request judges whether to agree to carry out the blacklist data exchange according to the self-demand and the number of the remaining transaction coins, and then responds to the blacklist data exchange request. The response comprises the identification of the response, the information of the corresponding blacklist data, the identification of the demand sub-node, the identification of the response sub-node, the feedback result of the request and the like. The feedback result includes agreement with the blacklist data exchange request and disagreement with the blacklist data exchange request. And the feedback result indicates that the sub-node which does not agree with the blacklist data exchange request or does not send the response does not participate in the data exchange. The application server 2, acting as a master node, may monitor requests and responses between the various sub-nodes. The sub-nodes receiving the blacklist data exchange request automatically respond, try to start data exchange with the data provider, and broadcast the exchange behavior to other sub-nodes in a public way.
And step S602, distributing corresponding responsibility to each sub-node according to the monitoring result.
For example, the application server 2 configures a sub-node that issues a blacklist data exchange request as a data requester, configures a sub-node that agrees with the blacklist data exchange request as a data provider, and configures a sub-node (or one or more selected sub-nodes) that does not issue a blacklist data exchange request and respond to or disagree with the blacklist data exchange request as a supervisor.
Step S604, notifying the sub-node not participating in the exchange as a monitor, and checking the exchange conditions of the two exchange parties.
Specifically, before the exchange of the blacklist data is performed, each sub-node uploads the blacklist data to the main node (the application server 2), and the main node allocates a certain number of transaction coins (bitcoins) to each sub-node for subsequent exchange. The supervisor can obtain the blacklist data provided by the data provider (i.e. the blacklist data uploaded to the host node by the data provider) from the host node, and perform verification. The exchange conditions comprise whether blacklist data provided by the data provider meets preset rules and whether the data requester has enough transaction coins. In this embodiment, the preset rule may include: the data format is correct, the privacy of the user cannot be written, and repeated data, missing data, false data and the like cannot be generated. In addition, according to the data amount of the blacklist data and a preset ratio (the ratio between the data amount and the number of the transaction coins), the data requesting party needs to pay the corresponding number of the transaction coins. And when both the exchange parties reach the exchange condition, namely the blacklist data provided by the data provider accords with the preset rule and the data requester has enough transaction coins corresponding to the blacklist data, the verification is passed, and the exchange can be continued.
Step S606, the sub-nodes checked by the switching condition are notified to perform data switching one to one.
Specifically, when the exchange conditions of the two exchanging parties are verified, the application server 2 notifies the data requesting party and the data providing party to start data exchange. And the data supplier shares the pre-stored blacklist data (related data are copied and synchronized to the data supplier), and the data supplier pays the corresponding amount of transaction coins to the data supplier according to the exchange level corresponding to the node and the data amount of the blacklist data. The application server 2 needs to calculate the transaction currency that the data requester needs to pay according to the exchange level of the data requester and the data amount of the blacklist data, and when the data requester pays successfully, the blacklist data uploaded by the data provider is copied and synchronized to the data requester.
And after the transaction currency is used up, the sub-node can acquire the transaction currency again by uploading new blacklist data.
Fig. 6 is a schematic flow chart of a blacklist data exchange method according to a second embodiment of the present invention. In this embodiment, steps S704 to S710 of the method for exchanging blacklist data are similar to steps S600 to S606 of the first embodiment, except that the method further includes steps S700 to S702.
The method comprises the following steps:
and step S700, pre-checking blacklist data uploaded by the partial nodes.
Specifically, when a child node uploads blacklist data to a master node (the application server 2), pre-verification is performed with the master node. And the pre-verification process is that the main node verifies whether the blacklist data meets the requirements according to a preset rule. In this embodiment, the preset rule may include: the data format is correct, the privacy of the user cannot be written, and repeated data, missing data, false data and the like cannot be generated.
And step S702, performing verification grading processing on the sub-nodes according to the pre-verification result.
Specifically, the master node performs authentication grading processing on the blacklist data according to the authentication result of the blacklist data, mainly sets a corresponding exchange level for the corresponding sub-node according to the normalization of the blacklist data, and then authorizes and distributes corresponding transaction coins to the sub-node. For example, when the specification of the blacklist data is high, the sub-node may subsequently exchange more data with fewer transaction coins. And after the blacklist data passes the verification, the main node authorizes the subnodes to exchange the blacklist data, and distributes corresponding transaction coins for the subnodes according to the data volume of the blacklist data and a preset proportion.
Step S704, monitoring the blacklist data exchange request and response between the sub-nodes.
Specifically, each of the sub-nodes having a data exchange requirement sequentially sends out a blacklist data exchange request to other sub-nodes through the blockchain network 3. The request comprises the identifier of the request, the information of the requested blacklist data, the identity identifier of the demand sub-node and the like. And the sub-node receiving the blacklist data exchange request judges whether to agree to carry out the blacklist data exchange according to the self-demand and the number of the remaining transaction coins, and then responds to the blacklist data exchange request. The response comprises the identification of the response, the information of the corresponding blacklist data, the identification of the demand sub-node, the identification of the response sub-node, the feedback result of the request and the like. The feedback result includes agreement with the blacklist data exchange request and disagreement with the blacklist data exchange request. And the feedback result indicates that the sub-node which does not agree with the blacklist data exchange request or does not send the response does not participate in the data exchange. The application server 2, acting as a master node, may monitor requests and responses between the various sub-nodes. The sub-nodes receiving the blacklist data exchange request automatically respond, try to start data exchange with the data provider, and broadcast the exchange behavior to other sub-nodes in a public way.
And step S706, distributing corresponding responsibilities to each sub-node according to the monitoring result.
For example, the application server 2 configures a sub-node that issues a blacklist data exchange request as a data requester, configures a sub-node that agrees with the blacklist data exchange request as a data provider, and configures a sub-node (or one or more selected sub-nodes) that does not issue a blacklist data exchange request and respond to or disagree with the blacklist data exchange request as a supervisor.
Step S708, the sub-node not participating in the present exchange is notified as a supervising party, and the exchange conditions of both exchanging parties are verified.
Specifically, the supervisor may obtain blacklist data provided by the data provider from the host node (i.e., blacklist data uploaded to the host node by the data provider), and perform verification. The exchange condition comprises whether blacklist data provided by a data provider meets the preset rule and whether a data requester has enough transaction coins. And when both the exchange parties reach the exchange condition, namely the blacklist data provided by the data provider accords with the preset rule and the data requester has enough transaction coins corresponding to the blacklist data, the verification is passed, and the exchange can be continued.
Step S710, notifying the sub-nodes checked by the switching condition to perform data switching one to one.
Specifically, when the exchange conditions of the two exchanging parties are verified, the application server 2 notifies the data requesting party and the data providing party to start data exchange. And the data supplier shares the pre-stored blacklist data (related data are copied and synchronized to the data supplier), and the data supplier pays the corresponding amount of transaction coins to the data supplier according to the exchange level corresponding to the node and the data amount of the blacklist data. The application server 2 needs to calculate the transaction currency that the data requester needs to pay according to the exchange level of the data requester and the data amount of the blacklist data, and when the data requester pays successfully, the blacklist data uploaded by the data provider is copied and synchronized to the data requester.
And after the transaction currency is used up, the sub-node can acquire the transaction currency again by uploading new blacklist data.
In addition, according to the pre-check condition of the blacklist data subsequently uploaded by the subnode and the performance in the data exchange process, the exchange level corresponding to the subnode can be adjusted.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.