CN110471922B - Content extension method and device for accounting node and computer readable storage medium - Google Patents

Content extension method and device for accounting node and computer readable storage medium Download PDF

Info

Publication number
CN110471922B
CN110471922B CN201910732883.8A CN201910732883A CN110471922B CN 110471922 B CN110471922 B CN 110471922B CN 201910732883 A CN201910732883 A CN 201910732883A CN 110471922 B CN110471922 B CN 110471922B
Authority
CN
China
Prior art keywords
data
accounting node
data content
timestamp
accounting
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.)
Active
Application number
CN201910732883.8A
Other languages
Chinese (zh)
Other versions
CN110471922A (en
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.)
Iallchain Co Ltd
Original Assignee
Iallchain 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 Iallchain Co Ltd filed Critical Iallchain Co Ltd
Priority to CN201910732883.8A priority Critical patent/CN110471922B/en
Publication of CN110471922A publication Critical patent/CN110471922A/en
Application granted granted Critical
Publication of CN110471922B publication Critical patent/CN110471922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Computing Systems (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a content extension method and equipment of an accounting node and a computer readable storage medium. The accounting node respectively generates a random number for each of the stored plurality of first data contents; processing each first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content; circularly executing the steps from generating random numbers to obtaining second data contents until obtaining a preset number of data contents; and when the number of the data contents in the accounting node reaches the storage upper limit of the accounting node, if third data contents to be stored exist, deleting one or more second data contents to make the storage space free for storing the third data contents. The scheme provided by the embodiment of the invention can expand the quantity of the data content stored by the accounting node, and improve the fairness and the enthusiasm of the accounting node for obtaining the accounting right in the scene of judging the accounting right by taking the quantity of the stored data.

Description

Content extension method and device for accounting node and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a content extension method and device of an accounting node and a computer-readable storage medium.
Background
In the related art, a consensus mechanism based on stored contents exists on the blockchain, namely, who stores more contents in a plurality of accounting nodes of the blockchain, and the probability of obtaining accounting rights is high. But in the early development of the block chain or in the case that some accounting nodes do not have more storage opportunities, the content stored by the accounting nodes is limited. Therefore, the right and the enthusiasm of the accounting nodes for accounting are deprived, the development of a block chain is not facilitated, and the probability of collision among the nodes is increased under the condition that the number of the contents stored by a plurality of accounting nodes is the same.
Disclosure of Invention
The embodiment of the invention provides a transaction information recording method, equipment and a computer-readable storage medium, which are used for expanding the quantity of data contents stored by an accounting node and improving the fairness and the enthusiasm of the accounting node for acquiring the accounting right in a scene of judging the accounting right by using the quantity of the stored data.
In a first aspect, an embodiment of the present invention provides a content extension method for a billing node, where the method includes:
the accounting node respectively generates a random number aiming at each data content in the stored plurality of first data contents;
the accounting node processes each first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content;
the accounting node circularly executes the steps from generating random numbers to obtaining the second data content until obtaining a preset number of data contents;
and when the number of the data contents in the accounting node reaches the storage upper limit of the accounting node, if third data contents to be stored exist, deleting one or more second data contents by the accounting node to make a storage space for storing the third data contents.
In a second aspect, an embodiment of the present invention provides an accounting node, including:
a memory;
a processor;
a communication interface; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to:
generating a random number for each of the stored plurality of first data contents;
processing each first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content;
circularly executing the steps from generating random numbers to obtaining the second data content until obtaining a preset number of data contents;
and when the number of the data contents reaches the upper storage limit, if third data contents to be stored exist, deleting one or more second data contents to free up a storage space to store the third data contents.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method described in the first aspect.
According to the content extension method, the content extension device and the computer-readable storage medium of the accounting node, a random number is respectively generated by the accounting node for each data content in a plurality of stored first data contents; then, processing each first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content, and circularly executing the steps from generating the random number to obtaining the second data content until a preset number of data contents are obtained; and when the number of the stored data contents reaches the storage upper limit, if third data contents to be stored exist, deleting one or more second data contents, and storing the third data contents in an empty storage space.
Drawings
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present invention;
FIG. 2 is a flow chart of a content extension method of a billing node according to an embodiment of the present invention;
FIG. 3 is a flow chart of a transaction information recording method according to an embodiment of the present invention;
FIG. 4 is a flow chart of a transaction information recording method according to another embodiment of the present invention
Fig. 5 is a schematic structural diagram of an accounting node according to an embodiment of the present invention.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. The drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the disclosed concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
The content extension method of the accounting node provided by the embodiment of the invention can be applied to the communication system shown in figure 1. As shown in fig. 1, the communication system includes: the system comprises a user node, an accounting node, a cloud storage node 1, a cloud storage node 2, a cloud storage node 3, a cloud storage node 4 and a cloud storage node 5. The user node, the accounting node, the cloud storage node 1, the cloud storage node 2, the cloud storage node 3, the cloud storage node 4 and the cloud storage node 5 are participating nodes in the block chain network. It is understood that the description is only illustrative and does not limit the number and types of nodes in the blockchain network. The cloud storage node can be one or a plurality of cloud servers, the cloud servers are a server cluster, a plurality of servers are arranged, the server cluster is similar to a universal computer framework, and the cloud servers comprise processors, hard disks, memories, system buses and the like. The user node may specifically be a user terminal, e.g. a smartphone, a tablet, a personal computer, etc.
The content extension method of the accounting node provided by the embodiment of the invention aims to solve the technical problems in the prior art.
The following describes the technical solution of the present invention and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a content expansion method of an accounting node according to an embodiment of the present invention, and as shown in fig. 2, the embodiment expands the content of the accounting node based on the following method:
step 101, the accounting node generates a random number for each of the stored plurality of first data contents.
In this embodiment, the user node may store the data to be stored in the user node in a plurality of cloud storage nodes, and the user node may also sign the hash value of the data to be stored by using its own private key, and broadcast the signed hash value to the blockchain network. The accounting node in this embodiment may be a node participating in block accounting in the blockchain network, or the accounting node may also be a cloud storage node in the blockchain network. In this embodiment, the accounting node not only has the function of block chain accounting, but also has the function of data storage.
There are a plurality of account keeping nodes in the blockchain network in the scene of this embodiment, and a plurality of account keeping nodes snatch the account keeping right of blockchain account book, and the more data content who stores among a plurality of account keeping nodes is the more probability that who obtains the account keeping right is big more.
In order to ensure that the accounting node with less stored data content obtains the right of accounting right, the embodiment expands the number of data contents stored by the accounting node based on the random number by generating the random data.
In the operation of generating the random number, the accounting node generates a random number for each data content (hereinafter referred to as a first data content) that is currently stored, where the first data content may be a data content stored by the user node, or a second data content obtained by expanding the data content by the method of the present embodiment before the current expanding operation.
And 102, processing each first data content and the corresponding random number by the accounting node by adopting a preset algorithm to obtain a second data content.
For example, assuming that data 1 is stored in the current accounting node, and the random number generated for data 1 in step 101 is random number 1, the second data content obtained by expanding based on data 1 and random number 1 may be f (data 1, random number 1), or f (data 1, random number 1, identification of user node 1); in another embodiment, the accounting node may process each first data content, the identifier of the user node storing the first data content, and the corresponding random number based on a preset algorithm to obtain a second data content, where if the first data content is data obtained by expanding itself, the identifier of the user node corresponding to the first data content may be the identifier of the user node corresponding to the original data corresponding to the first data content.
And 103, circularly executing the steps from generating random numbers to obtaining the second data content by the accounting node until obtaining a preset number of data contents.
In an embodiment, the preset number may be a fixed value that is set arbitrarily in this embodiment, that is, the value of the preset number is fixed regardless of the number of expansion operations performed, for example, the fixed value n, n is a positive integer, that is, as the set value of the preset number is different, the number of data contents expanded in this embodiment may be different, or may be arbitrary.
In another embodiment, the preset number referred to in this embodiment may also be a variable value, for example, after an expansion operation is performed, the value of the preset number applicable to the next expansion operation may be determined according to the number of the currently stored data content and the upper limit of the storage space of the accounting node itself.
In the above two modes, the expansion operation is performed once from the start of the expansion operation until the number of the expanded data contents reaches the preset number.
And 104, when the number of the data contents in the accounting node reaches the storage upper limit of the accounting node, if third data contents to be stored exist, deleting one or more second data contents by the accounting node to make a storage space for storing the third data contents.
In the content extension method, device and computer-readable storage medium of the accounting node provided in this embodiment, a random number is generated by the accounting node for each of the stored plurality of first data contents; then processing each first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content, and circularly executing the steps from generating the random number to obtaining the second data content until obtaining the preset number of data contents; and when the number of the stored data contents reaches the storage upper limit, if a third data content to be stored exists, deleting one or more second data contents, and storing the third data content in an empty storage space.
Fig. 3 is a flowchart of a transaction information recording method according to an embodiment of the present invention. As shown in fig. 3, on the basis of the content expansion method provided in the embodiment of fig. 2, the embodiment of the present invention further provides a transaction information recording method, which includes the following specific steps:
step 201, the accounting node determines a number N according to the hash value of the previous block in the blockchain network.
In practice, the blocks in the blockchain ledger are end-to-end, that is, the current block records information of the previous block, for example, the current block records a hash value of the previous block.
Taking an accounting node as an example, the accounting node may determine a number N according to the hash value of the previous block in the blockchain network, for example, the accounting node may take the 5 th byte of the hash value of the previous block and calculate the number N according to the bit value of the 5 th byte according to the predetermined algorithm.
In step 202, the accounting node determines the nth data block of each data content in the plurality of data contents stored by the accounting node.
In this embodiment, each accounting node has a data storage function, and accordingly, one accounting node may store a plurality of data contents, which may be data uploaded from different user nodes. Assume that one accounting node stores 3 data contents, e.g., data content 1, data content 2, and data content 3. The accounting node extracts the nth data block from the data content 1, the data content data 2 and the data content 3, i.e. the nth data block of the data content 1, the nth data block of the data content 2 and the nth data block of the data content 3, respectively. In this embodiment, the size of each data block may be 256 bytes, or the size of each data block may be a fixed number of bytes that is uniformly specified in the blockchain network.
Step 203, the accounting node calculates a remainder of dividing data corresponding to the nth data block of each data content by the block chain difficulty value.
After the accounting node extracts the nth data block of the data content 1, the nth data block of the data content 2, and the nth data block of the data content 3, a remainder of dividing data corresponding to the nth data block of the data content 1 by the block chain difficulty value, a remainder of dividing data corresponding to the nth data block of the data content 2 by the block chain difficulty value, and a remainder of dividing data corresponding to the nth data block of the data content 3 by the block chain difficulty value may be further calculated. The remainder represents the expiration time Deadline. The expiration time refers to a time interval from a last tile generation time to a new tile generation time. Optionally, the value of the remainder is equal to the value of the Deadline, which may be in milliseconds or seconds.
Step 204, the accounting node determines the minimum remainder of the remainders corresponding to the plurality of data contents respectively.
Further, the accounting node determines the minimum remainder among the respective remainders for data content 1, data content 2, and data content 3. It is assumed that the remainder of the data corresponding to the nth data block of the data content 3 divided by the block chain difficulty value is the minimum remainder among the remainders corresponding to the data content 1, the data content 2, and the data content 3, respectively. Assuming that the minimum remainder is 23, the expiration time Deadline for the minimum remainder is 23 milliseconds or seconds.
Step 205, the accounting node generates a new block at a preset time after the last block is generated, where the preset time corresponds to the minimum remainder.
For example, the accounting node may generate a new chunk 23 seconds after the last chunk was generated.
Optionally, the generating, by the accounting node, a new block at a preset time after the last block is generated includes: and in the preset time after the last block is generated, if the minimum remainder is not determined by other accounting nodes, the accounting nodes generate a new block.
For example, there is more than one accounting node in the blockchain network, and other accounting nodes also store a plurality of data contents, and the other accounting nodes also use the method described above to find the minimum remainders in the remainders corresponding to the plurality of data contents stored by themselves.
For example, 23 seconds after the last block was generated, if no remainder less than 23 is calculated by other accounting nodes, the new block generation is successful. That is, each accounting node can calculate the minimum remainder corresponding to a plurality of data contents stored by itself. The minimum remainder calculated by each accounting node may be different, so that it can be determined which accounting node has the smallest calculated minimum remainder. Thus, which accounting node calculated the smallest remainder, the accounting node can successfully create a new block. Theoretically, if a certain accounting node stores more data, the probability that the accounting node finds the minimum remainder is larger. Therefore, in order for the accounting node to calculate the minimum remainder to successfully create a new block and obtain accounting rights for the new block, the accounting node needs to store more data so that there is a greater chance to calculate the minimum remainder. Therefore, the method of the embodiment can promote each accounting node to actively provide more storage services for the blockchain network.
Further, after a new block is generated, the accounting node needs to submit corresponding evidence (including a hash value of the original data content, or if the number of the extended content is multiple, a random number used for generating the extended content is submitted at the same time) in the blockchain network, other nodes in the blockchain network find the corresponding original data content, the nth data block, the random number and the like according to the evidence submitted by the accounting node to verify the minimum remainder determined in step 204, and if the verification is successful, the accounting node can account for the new block.
Step 206, the accounting node records transaction information on the new block.
The accounting node may record transaction information in the new block.
In the embodiment of the invention, a number N is determined by an accounting node according to the hash value of a previous block in a block chain network, the Nth data block of each data content in a plurality of data contents stored by the accounting node is determined, the remainder after dividing the data corresponding to the Nth data block of each data content by the block chain difficulty value is calculated, and further, the minimum remainder in the remainders respectively corresponding to the plurality of data contents is determined, wherein the minimum remainder is related to the expiration time generated by a new block. Therefore, in order for the accounting node to calculate the minimum remainder to successfully create a new block and obtain the accounting right of the new block, the accounting node needs to store more data, so that there is a greater chance to calculate the minimum remainder. Therefore, by the method of the embodiment, each accounting node can be promoted to actively provide more storage services for the blockchain network, and the resource utilization rate of the accounting node is improved.
Fig. 4 is a flowchart of a transaction information recording method according to another embodiment of the invention. On the basis of the above embodiment, after the accounting node generates a new block at a preset time after the last block is generated, the method further includes the following steps:
step 301, the accounting node sends the minimum remainder to a timestamp server, the timestamp server marks a timestamp on the minimum remainder, and a private key of the timestamp server is used for signing the minimum remainder of the timestamp on the mark.
When a certain accounting node finds the minimum remainder, namely the minimum Deadline, and generates a new block, the accounting node needs to be immediately time stamped by the time stamp server for the minimum remainder. If two or more accounting nodes find the same minimum remainder, the minimum remainder with the earliest time stamp is taken as the standard.
For example, when a certain accounting node finds the minimum remainder, i.e., the minimum Deadline, and generates a new block, the accounting node immediately transmits the minimum remainder to the timestamp server. When the timestamp server receives the minimum remainder, a timestamp is marked on the minimum remainder, and the minimum remainder of the timestamp on the mark is signed by adopting a private key of the timestamp server. Further, the timestamp server sends the minimum remainder of the timestamp on the signed identifier to the accounting node.
Step 302, the accounting node receives the minimum remainder of the timestamp on the signed identifier sent by the timestamp server.
Correspondingly, the accounting node receives the minimum remainder of the timestamp on the signed identifier sent by the timestamp server.
Step 303, the accounting node sends a broadcast message in the blockchain network, where the broadcast message includes the minimum remainder of the timestamp on the signed identifier and a hash value of the data content corresponding to the minimum remainder.
When the accounting node receives the minimum remainder of the timestamp on the signed identifier sent by the timestamp server, the accounting node immediately sends a broadcast message in the blockchain network, wherein the broadcast message comprises the minimum remainder of the timestamp on the identifier signed by the timestamp server private key and a hash value of data content corresponding to the minimum remainder. For example, if the remainder of the division of the nth data block of the data content 3 by the block chain difficulty value is the smallest, the data content corresponding to the smallest remainder is the data content 3, and the hash value of the data content corresponding to the smallest remainder is the hash value of the data content 3. The accounting node sends the hash value of the data content 3 to avoid having other accounting nodes in the blockchain network falsify the minimum remainder to rob accounting. When other accounting nodes in the blockchain network receive the broadcast message, the accounting node may be acknowledged.
Optionally, before the accounting node sends the broadcast message in the blockchain network, the method further includes: the accounting node signs the broadcast message by adopting a private key of the accounting node; the accounting node sends a broadcast message in the blockchain network, including: and the accounting node broadcasts the signed broadcast message to the block chain network.
For example, when the accounting node sends the broadcast message, the accounting node may first sign the broadcast message by using its own private key, and then broadcast the signed broadcast message to the blockchain network.
Fig. 5 is a schematic structural diagram of an accounting node according to an embodiment of the present invention. The accounting node provided in the embodiment of the present invention may execute the processing flow provided in the embodiment of the content extension method of the accounting node, as shown in fig. 5, the accounting node 40 includes: memory 41, processor 42, computer programs and communication interface 43; wherein the computer program is stored in the memory 41 and is configured to be executed by the processor 42 for: generating a random number for each of the stored plurality of first data contents; processing each first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content; circularly executing the steps from generating random numbers to obtaining the second data content until obtaining a preset number of data contents; and when the number of the data contents reaches the upper storage limit, if third data contents to be stored exist, deleting one or more second data contents to free up a storage space to store the third data contents.
Optionally, when the processor processes each first data content and the corresponding random number by using a preset algorithm to obtain a second data content, the processor is configured to:
and processing each first data content, the identifier of the user node storing the first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content.
Optionally, the processor is further configured to:
determining a number N according to the hash value of the last block in the block chain network;
determining an Nth data block of each data content in a plurality of data contents stored by the data content storage device;
calculating a remainder of dividing data corresponding to the Nth data block of each data content by the block chain difficulty value;
determining the minimum remainder in the remainders respectively corresponding to the plurality of data contents;
generating a new block at a preset time after the last block is generated, wherein the preset time corresponds to the minimum remainder;
and recording transaction information on the new block.
Optionally, after the processor generates a new block at a preset time after the last block is generated, the processor is further configured to:
sending the minimum remainder to a timestamp server, marking a timestamp on the minimum remainder identifier by the timestamp server, and signing the minimum remainder of the timestamp on the identifier by adopting a private key of the timestamp server;
and receiving the minimum remainder of the timestamp on the signed identifier sent by the timestamp server.
Optionally, after receiving the minimum remainder of the timestamp on the signed identifier sent by the timestamp server, the processor is further configured to:
and sending a broadcast message in the blockchain network, wherein the broadcast message comprises the minimum remainder of the timestamp on the signed identifier and a hash value of data content corresponding to the minimum remainder.
The accounting node of the embodiment shown in fig. 5 may be configured to implement the technical solution of the above method embodiment, and the implementation principle and the technical effect are similar, and are not described herein again.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the content extension method of the accounting node described in the above embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the spirit of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A content extension method for a billing node, comprising:
the accounting node respectively generates a random number for each of the stored plurality of first data contents;
the accounting node processes each first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content;
the accounting node circularly executes the steps from generating random numbers to obtaining the second data content until obtaining a preset number of data contents;
and when the number of the data contents in the accounting node reaches the storage upper limit of the accounting node, if third data contents to be stored exist, deleting one or more second data contents by the accounting node to make a storage space for storing the third data contents.
2. The method of claim 1, wherein the processing, by the accounting node, each of the first data contents and the corresponding random number by using a predetermined algorithm to obtain a second data content comprises:
and the accounting node processes each first data content, the identifier of the user node storing the first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
the accounting node determines a number N according to the hash value of the last block in the block chain network;
the accounting node determines the Nth data block of each data content in the plurality of data contents stored by the accounting node;
the accounting node calculates the remainder of the division of the data corresponding to the Nth data block of each data content by the block chain difficulty value;
the accounting node determines the minimum remainder in the remainders respectively corresponding to the plurality of data contents;
the accounting node generates a new block at the preset time after the last block is generated, wherein the preset time corresponds to the minimum remainder;
the accounting node records transaction information on the new block.
4. The method of claim 3, wherein after the accounting node generates a new block a preset time after the last block is generated, the method further comprises:
the accounting node sends the minimum remainder to a timestamp server, the timestamp server marks a timestamp on the minimum remainder, and a private key of the timestamp server is adopted to sign the minimum remainder of the timestamp on the mark;
and the accounting node receives the minimum remainder of the timestamp on the signed identifier sent by the timestamp server.
5. The method of claim 4, wherein after the billing node receives the minimum remainder of the timestamp on the signed identifier sent by the timestamp server, the method further comprises:
and the accounting node sends a broadcast message in the blockchain network, wherein the broadcast message comprises the minimum remainder of the timestamp on the signed identifier and a hash value of data content corresponding to the minimum remainder.
6. An accounting node, comprising:
a memory;
a processor;
a communication interface; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to:
generating a random number for each of the stored plurality of first data contents;
processing each first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content;
circularly executing the steps from generating random numbers to obtaining the second data content until obtaining a preset number of data contents;
and when the number of the data contents reaches the upper storage limit, if third data contents to be stored exist, deleting one or more second data contents to make a storage space free for storing the third data contents.
7. An accounting node as claimed in claim 6, wherein the processor, when processing each first data content and the corresponding random number using a predetermined algorithm to obtain the second data content, is configured to:
and processing each first data content, the identifier of the user node storing the first data content and the corresponding random number by adopting a preset algorithm to obtain a second data content.
8. The accounting node of claim 6 or 7, wherein the processor is further configured to:
determining a number N according to the hash value of the last block in the block chain network;
determining an nth data block of each of a plurality of data contents stored therein;
calculating a remainder of data corresponding to the nth data block of each data content after dividing the data by the block chain difficulty value;
determining the minimum remainder in the remainders respectively corresponding to the plurality of data contents;
generating a new block at a preset time after the last block is generated, wherein the preset time corresponds to the minimum remainder;
and recording transaction information on the new block.
9. The accounting node of claim 8, wherein the processor, after generating a new block a preset time after the last block is generated, is further configured to:
sending the minimum remainder to a timestamp server, marking a timestamp on the minimum remainder identifier by the timestamp server, and signing the minimum remainder of the timestamp on the identifier by adopting a private key of the timestamp server;
and receiving the minimum remainder of the timestamp on the signed identifier sent by the timestamp server.
10. The accounting node of claim 9, wherein the processor, after receiving the minimum remainder for the timestamp on the signed identifier sent by the timestamp server, is further configured to:
and sending a broadcast message in the blockchain network, wherein the broadcast message comprises the minimum remainder of the timestamp on the signed identifier and a hash value of data content corresponding to the minimum remainder.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201910732883.8A 2019-08-09 2019-08-09 Content extension method and device for accounting node and computer readable storage medium Active CN110471922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910732883.8A CN110471922B (en) 2019-08-09 2019-08-09 Content extension method and device for accounting node and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910732883.8A CN110471922B (en) 2019-08-09 2019-08-09 Content extension method and device for accounting node and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110471922A CN110471922A (en) 2019-11-19
CN110471922B true CN110471922B (en) 2023-02-03

Family

ID=68511611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910732883.8A Active CN110471922B (en) 2019-08-09 2019-08-09 Content extension method and device for accounting node and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110471922B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111627530B (en) * 2020-05-19 2023-11-17 全链通有限公司 Medical image identification method, device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10291627B2 (en) * 2016-10-17 2019-05-14 Arm Ltd. Blockchain mining using trusted nodes
CN109102287B (en) * 2018-08-13 2021-09-07 中国联合网络通信集团有限公司 Block chain accounting method, device, equipment and storage medium
CN109408595B (en) * 2018-10-26 2020-08-11 全链通有限公司 Block chain accounting method, device and computer readable storage medium
CN109741039B (en) * 2019-01-07 2021-01-19 深圳市红砖坊技术有限公司 Accounting method, mine pool server, terminal equipment, mine excavation node and mine pool

Also Published As

Publication number Publication date
CN110471922A (en) 2019-11-19

Similar Documents

Publication Publication Date Title
CN107480990B (en) Block chain accounting method and device
CN107276765B (en) Processing method and device for consensus in block chain
CN109102287B (en) Block chain accounting method, device, equipment and storage medium
CN108270874B (en) Application program updating method and device
CN107493340B (en) Data distribution verification method, device and system in block chain network
CN109067724B (en) Block chain data transaction method, device, equipment and storage medium
CN110351363B (en) Data backup method, device and computer readable storage medium
WO2019201039A1 (en) Method and system for updating application and application server
CN111770350B (en) Method and device for pulling message in live broadcast room, computer equipment and storage medium
CN111831748B (en) Data synchronization method, device and storage medium
EP4300323A1 (en) Data processing method and apparatus for blockchain network, computer device, computer readable storage medium, and computer program product
CN109408595B (en) Block chain accounting method, device and computer readable storage medium
CN111949666B (en) Identification generation method and device, electronic equipment and storage medium
CN114092252B (en) Block chain transaction execution method, device, equipment and readable storage medium
CN110351276B (en) Data processing method, device and computer readable storage medium
CN112492048B (en) Message synchronization method and device, electronic equipment and readable storage medium
EP3370166B1 (en) Method and apparatus for model parameter fusion
CN110351364B (en) Data storage method, device and computer readable storage medium
CN110471922B (en) Content extension method and device for accounting node and computer readable storage medium
CN111275495A (en) Advertisement putting monitoring method, device and system based on block chain
CN111431818A (en) Cross-domain request traffic distribution method and device, storage medium and computer equipment
CN110489231B (en) Transaction information recording method, apparatus and computer readable storage medium
CN107172165B (en) Data synchronization method and device
CN110888892A (en) Block synchronization method, device and storage medium
CN112584380A (en) Verification method, data synchronization method, device, network element and medium

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
GR01 Patent grant
GR01 Patent grant