CN-114896338-B - Data uplink method, system, equipment and computer readable storage medium
Abstract
The application discloses a data uplink method, a system, equipment and a computer readable storage medium, wherein the method comprises the steps of receiving data to be uplink; and if the number of the target data is detected to be smaller than the first preset number, selecting a plurality of pieces of data to be uplinked as target data, putting the target data into a target data pool, requesting the blockchain platform to uplinks the target data for storage, and moving the target data subjected to the uplinking storage out of the target data pool. Unlike available technology, which can only uplink one data and needs to wait for the completion of uplink of one data to obtain the uplink result before the next data is uplink, the present application can uplink several data simultaneously and can uplink the subsequent data without waiting for the uplink result of the previous uplink data, and this raises the efficiency of data uplink.
Inventors
- QI RONG
- HE WEI
- LI YI
- LU JING
- Cheng Hanlei
Assignees
- 远光软件股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20220506
Claims (8)
- 1. The utility model provides a data chaining method which is characterized in that is applied to data chaining system, data chaining system includes the service module of linking, upward chain module, first inquiry module and second inquiry module are mutually independent, the method includes: The third party service module is used for storing second class to-be-uplinked data, wherein the first class to-be-uplinked data is to-be-uplinked data with the receiving time not exceeding a preset time and the second class to-be-uplinked data is to-be-uplinked data with the receiving time exceeding the preset time, or the first class to-be-uplinked data is to-be-uplinked data with the state not being successful in uplinking and the second class to-be-uplinked data is to-be-uplinked data with the state being successful in uplinking; If the quantity of the target data is detected to be smaller than a first preset quantity, the uplink module subscribes a plurality of pieces of data to be uplink to the uplink service module as the target data and puts the target data into a target data pool, wherein the first preset quantity is the maximum quantity of the data which is processed by the data uplink system simultaneously, and the quantity of the selected pieces of data to be uplink is smaller than or equal to the difference between the first preset quantity and the current quantity of the target data; If the first query module detects that the number of the first data to be queried is smaller than the second preset number, subscribing the data for requesting uplink storage by the uplink service module, receiving the data sent by the uplink service module as the first data to be queried, and querying the blockchain platform for the uplink task condition of the first data to be queried, wherein the uplink task condition comprises uplink success and uplink failure; And if the second query module detects that the number of the second data to be queried is smaller than a third preset number, subscribing the data with the successful uplink task condition by the uplink service module, receiving the data sent by the uplink service module as the second data to be queried, and querying the blockchain platform for an uplink result of the second data to be queried, wherein the uplink result comprises uplink completion and uplink failure.
- 2. The method according to claim 1, wherein the method further comprises: and the uplink module of the data uplink system sends a task identifier to the uplink service module of the data uplink system, wherein the task identifier is generated by the blockchain platform for the target data.
- 3. The method of claim 1, wherein querying the blockchain platform for the uplink task status of the first data to be queried comprises: the first query module queries the blockchain platform for the uplink task condition of the first data to be queried according to a task identification generated by the blockchain platform for the target data and/or, The method further comprises the steps of: And the first query module sends the uplink task condition to the uplink service module.
- 4. The method according to claim 1, wherein the method further comprises: and the second query module sends the uplink result to the uplink service module.
- 5. The method according to claim 1, wherein the method further comprises: receiving a data acquisition request, wherein the data acquisition request comprises a data identifier of data to be acquired; inquiring a uplink result of the data to be acquired according to the data identifier; And if the uplink result is that the uplink is completed, acquiring the data to be acquired from the blockchain platform, and receiving an acquisition result sent by the blockchain platform, wherein the acquisition result comprises prompt information of unauthorized acquisition or the data to be acquired.
- 6. The data uplink system is characterized by comprising a uplink service module, a uplink module, a first query module and a second query module, wherein the uplink module, the first query module and the second query module are mutually independent; the system comprises a first module for receiving and storing first-class uplink data, a third module for storing second-class uplink data, wherein the first-class uplink data is the uplink data which is not received for more than a preset time and is stored in a target data pool, or the first-class uplink data is the uplink data which is not successfully uplink and is successfully uplink, the uplink module is used for subscribing a plurality of pieces of uplink data as the target data to the uplink module if the quantity of the target data is detected to be less than a first preset quantity, and placing the target data into the target data pool, and simultaneously requesting the block chain platform to store each piece of uplink data in the target data in a uplink mode, and moving the target data stored in the uplink out of the target data pool, wherein the first preset quantity is the uplink data which is successfully uplink, and the quantity of the target data is different from the current quantity of the target data when the first preset quantity is equal to the quantity of the target data which is simultaneously recovered by the system, the method comprises the steps of obtaining data to be uplinked from a first service module and/or a third service module for uplinking, wherein the first inquiry module is used for subscribing the data for requesting for uplinking storage if the quantity of the first data to be inquired is detected to be smaller than a second preset quantity, receiving the data sent by the uplinking service module as the first data to be inquired, inquiring the uplinking task condition of the first data to be inquired from a blockchain platform, wherein the uplinking task condition comprises uplinking success and uplinking failure, and the second inquiry module is used for subscribing the data with the uplinking task condition of uplinking success if the quantity of the second data to be inquired is detected to be smaller than a third preset quantity, receiving the data sent by the uplinking service module as the second data to be inquired, and inquiring the uplinking result of the second data to be inquired from the blockchain platform, wherein the uplinking result comprises uplinking completion and uplinking failure.
- 7. A data-chaining device, characterized in that the device comprises a processor and a memory for storing program data, the processor being adapted to execute the program data for implementing the method according to any of claims 1-5.
- 8. A computer readable storage medium for storing program data, the program data being executable to implement the method of any one of claims 1-5.
Description
Data uplink method, system, equipment and computer readable storage medium Technical Field The present application relates to the field of blockchain technologies, and in particular, to a data uplink method, system, device, and computer readable storage medium. Background Blockchain technology is a technology in which distributed nodes participate in accounting together and maintain a complete distributed database together, and a consensus mechanism can ensure consistency of transaction information stored on the blockchain. The data stored in the blockchain has the characteristics of 'non-counterfeitable', 'whole-process trace', 'traceable', 'open transparent', 'collective maintenance', and the like, and the use of the blockchain technology to store the data is also becoming common, and the storage of the data into the blockchain can also be referred to as data uplink. In the long-term research and development process, the applicant of the present application finds that, generally, if there are multiple data to be linked in the prior art, the multiple data need to be sequenced, and meanwhile, only one data can be linked, and the linking of the next data can be performed after the previous data is linked, so that the efficiency of data linking is lower. Disclosure of Invention The application mainly solves the technical problem of providing a data uplink method, a system, equipment and a computer readable storage medium, which can improve the efficiency of data uplink. In order to solve the technical problem, the technical scheme adopted by the application is that the data uplink method comprises the steps of receiving data to be uplink, selecting a plurality of pieces of data to be uplink as target data and putting the target data into a target data pool if the number of the target data is detected to be smaller than a first preset number, requesting the target data to be uplink to be stored from a block chain platform, and moving the target data subjected to uplink storage out of the target data pool. The receiving the data to be uplink comprises the step that the uplink service module receives the data to be uplink. If the number of the target data is detected to be smaller than the first preset number, selecting a plurality of pieces of data to be uplinked as the target data comprises the step that the uplink service module subscribes a plurality of pieces of data to be uplinked to be the target data if the number of the target data is detected to be smaller than the first preset number, and the step that the uplink module receives the data to be uplinked sent by the uplink service module to be the target data and puts the data to a target data pool. The method further comprises the step that the uplink module sends a task identifier to the uplink service module, wherein the task identifier is generated by the block chain platform for target data. The method further comprises the steps of selecting first data to be queried, wherein the first data to be queried is data for requesting uplink storage, and querying a blockchain platform for the uplink task condition of the first data to be queried, wherein the uplink task condition comprises uplink success and uplink failure. The first query module receives data sent by the uplink service module as first data to be queried, wherein the first data to be queried is selected by the first query module, and the first query module subscribes to request the data stored in the uplink to be used as the first data to be queried if the first query module detects that the number of the first data to be queried is smaller than a second preset number. The first query module queries the blockchain platform for the uplink task condition of the first data to be queried according to a task identifier, wherein the task identifier is generated by the blockchain platform for target data. The method further comprises the step that the first query module sends the uplink task condition to the uplink service module. The method further comprises the steps of selecting second data to be queried, wherein the second data to be queried is the data with successful uplink task conditions, and querying a blockchain platform for an uplink result of the second data to be queried, wherein the uplink result comprises uplink completion and uplink failure. The second query module receives data sent by the uplink service module as second data to be queried, wherein the second data to be queried is selected by the second query module, and if the second query module detects that the number of the second data to be queried is smaller than a third preset number, the uplink service module subscribes the data with the uplink task condition of successful uplink to be used as the second data to be queried. The method further comprises the step that the second query module sends the uplink result to the uplink service module. The method further comprises the steps of receiving a data acquisition request,