CN112948438A - Data query method, computer device and storage medium - Google Patents

Data query method, computer device and storage medium Download PDF

Info

Publication number
CN112948438A
CN112948438A CN202110245524.7A CN202110245524A CN112948438A CN 112948438 A CN112948438 A CN 112948438A CN 202110245524 A CN202110245524 A CN 202110245524A CN 112948438 A CN112948438 A CN 112948438A
Authority
CN
China
Prior art keywords
data
node
generating
bits
geographic
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.)
Granted
Application number
CN202110245524.7A
Other languages
Chinese (zh)
Other versions
CN112948438B (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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202110245524.7A priority Critical patent/CN112948438B/en
Publication of CN112948438A publication Critical patent/CN112948438A/en
Application granted granted Critical
Publication of CN112948438B publication Critical patent/CN112948438B/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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • 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
    • 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/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Remote Sensing (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data query method, computer equipment and a storage medium, wherein the method comprises the following steps: in response to querying the first block data, generating first data according to first archived data to which the first block data belongs; generating second data according to the first number of bits of the first data; generating data query request information comprising first data and second data; finding a plurality of first nodes according to the second data and a preconfigured node searching method; sending data query request information to each first node; when first archival data is received, querying the first block data according to the first archival data; and when the first archived data is not received, regenerating second data according to the first second quantity bits of the first data, and returning and generating data query request information comprising the first data and the second data. The load of each node is more balanced.

Description

Data query method, computer device and storage medium
Technical Field
The present application relates to the field of block chain technology, and in particular, to a data query method, a computer device, and a storage medium.
Background
In the prior art, the blockchain network is combined with dht to achieve distributed blockchain data storage. Since the nodes in dht that are logically close together have similar routing tables, queries for the same data will always hit the same nodes. For example, one copy of data1 is stored in 10 nodes of node1 to node 10. Due to the kad principle, when inquiring specific data, no matter where the routing request is initiated, the routing request is always routed to the vicinity of the data1 routing space, and due to the similarity of the routing tables of the nodes with close logical distances, the routing always hits the same node with priority.
The above mechanism will result in one node always being much more loaded than the other nodes.
Disclosure of Invention
In view of the above-mentioned deficiencies or inadequacies in the prior art, it would be desirable to provide a load-balanced data query method, computer device, and storage medium.
In a first aspect, the present invention provides a data query method, including:
in response to querying the first block data, generating first data according to first archived data to which the first block data belongs;
generating second data according to the first number of bits of the first data;
generating data query request information comprising first data and second data;
finding a plurality of first nodes according to the second data and a preconfigured node searching method;
sending data query request information to each first node for:
locally inquiring whether first data are stored:
if yes, returning the first archived data;
when first archival data is received, querying the first block data according to the first archival data;
when the first archived data is not received, regenerating second data according to the first second quantity bits of the first data, and returning to generate data query request information comprising the first data and the second data; wherein the second number is greater than the first number.
In a second aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a data query method provided according to embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the data query method provided according to the embodiments of the present invention.
The data query method, the computer device and the storage medium provided by the embodiments of the invention generate first data according to first archived data to which the first block data belongs by responding to query of the first block data; generating second data according to the first number of bits of the first data; generating data query request information comprising first data and second data; finding a plurality of first nodes according to the second data and a preconfigured node searching method; sending data query request information to each first node; when first archival data is received, querying the first block data according to the first archival data; when the first archived data is not received, the second data is regenerated according to the first second quantity bits of the first data, and a method for generating data query request information comprising the first data and the second data is returned, so that the load of each node is more balanced.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a data query method according to an embodiment of the present invention.
Fig. 2 is a flowchart of step S14 in a preferred embodiment of the method shown in fig. 1.
Fig. 3 is a flowchart of step S14 in another preferred embodiment of the method shown in fig. 1.
FIG. 4 is a flow diagram of a preferred embodiment of the method shown in FIG. 1.
FIG. 5 is a flow chart of a preferred embodiment of the method shown in FIG. 4.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In the prior art, a block chain node generates predetermined data in 1000 blocks in succession, that is, generates archive data (1 to 1000) from block (1) to block (1000), generates archive data (1001 to 2000) from block (1001) to block (2000), and so on.
Suppose there are block chain nodes 1-node 1000 in the block chain network; taking the node100 as an example, the node100 generates archival data (1-1000) according to block (1) -block (1000), the archival data (1-1000) is not permanently stored, the node100 generates a chunkhash1 according to the archival data (1-1000), and calculates the exclusive or value of the chunkhash1 and the node ID of each block chain node to find the block chain node with the minimum exclusive or value, which is assumed to be node 1; the node100 sends the archived data (1-1000) to the node1, and the node1 stores the archived data (1-1000); the node1 finds 9 nodes with the minimum XOR value for broadcasting the archived data (1-1000) according to the dynamic balancing method of kad, such as node 2-node 10, and node 2-node 10 also store the archived data (1-1000); after a period of time, all the block chain nodes delete block (1) -block (1000). Only the nodes 1-10 in the time zone blockchain network store archive data (1-1000).
Other blockchain nodes or off-chain devices can request the nodes 1-10 if some blockchain data in the archived data (1-1000) need to be acquired. Assuming that a certain block data belonging to the archived data (1-1000) is requested by other blockchain nodes or equipment outside the chain, calculating a chunkhash1 according to the archived data (1-1000), and calculating the exclusive or value of the chunkhash1 and the node ID of each blockchain node respectively to find 10 blockchain nodes with the minimum exclusive or value so as to find a node storing the chunkhash 1; since node1 is the node with the smallest exclusive-or value, the route will always hit node1 with priority, no matter where the route request originates.
The prior art mechanism would result in node1 being much more loaded than nodes 2-10 when querying some chunks of data in the archive data (1-1000).
Fig. 1 is a flowchart of a data query method according to an embodiment of the present invention. As shown in fig. 1, in the present embodiment, the present invention provides a data query method, including:
s13: in response to querying the first block data, generating first data according to first archived data to which the first block data belongs;
s14: generating second data according to the first number of bits of the first data;
s15: generating data query request information comprising first data and second data;
s16: finding a plurality of first nodes according to the second data and a preconfigured node searching method;
s17: sending data query request information to each first node for:
locally inquiring whether first data are stored:
if yes, returning the first archived data;
s181: when first archival data is received, querying the first block data according to the first archival data;
s182: when the first archived data is not received, regenerating second data according to the first second quantity bits of the first data, and returning to generate data query request information comprising the first data and the second data; wherein the second number is greater than the first number.
Specifically, S14 includes "when the current device is a tile link point, generating second data according to a first number of bits before the first data and a third number of bits after the node ID of the current node; wherein the third number is a difference between the number of bits of the first data and the first number, "S16 includes" calculating an exclusive or value of the second data and the node IDs of the respective block chain nodes to find 10 block link points having the smallest exclusive or value ", the second number is the first number plus ten, and the first number is 240 for example; assuming that the first archived data to which the first chunk data belongs is archived data (1-1000), node 1-node 10 store the archived data (1-1000);
the node executes step S13, and generates a chunkhash1 according to the archive data (1-1000) in response to the query of the first block data;
the node executes step S14, and generates a chunkhash2 according to the first 240 bits of the chunkhash1 and the last 16 bits of the node ID of the current node;
the node executes the step S15, and generates data query request information including chunkhash1 and chunkhash 2;
the node executes step S16, and calculates the xor values of the chunkhash2 and the node IDs of the blockchain nodes to find the 10 blockchain nodes with the smallest xor values, assuming that the found blockchain nodes are node20 to node 30;
the node executes the step S17, and sends data query request information to the node 20-node 30; those skilled in the art should understand that node 20-node 30 do not have a sequential ordering, and here, the node may send the data query request information to node20, and end if the archived data (1-1000) is returned, and send the data query request information to node21 if there is no feedback, and so on; or simultaneously sending data query request information to the node 20-node 30;
the method is ended because the first data are not locally stored in the node 20-node 30;
the node executes step S182, and regenerates the chunkhash2 according to the first 250 bits of the chunkhash1 and the last 6 bits of the node ID of the current node;
the node returns to the step S15 to generate data query request information comprising chunkhash1 and chunkhash 2;
the node executes step S16, and calculates the xor values of the chunkhash2 and the node IDs of the blockchain nodes to find the 10 blockchain nodes with the smallest xor values, assuming that the found blockchain nodes are node5 to node 15;
the node executes the step S17, and sends data query request information to the node 5-node 15; those skilled in the art should understand that node 5-node 15 do not have a sequential ordering, and here, the node may send the data query request information to node5, and end if the archived data (1-1000) is returned, and send the data query request information to node6 if there is no feedback, and so on; or simultaneously sending data query request information to the node 5-node 15;
since the node 5-node 10 store the first data, the node receives the returned archive data (1-1000);
the node executes step S181, and queries the first block data according to the archived data (1-1000).
In further embodiments, S14 may also be configured according to actual requirements, for example, configured to generate the second data according to the first number of bits of the first data and the randomly generated third number of bits of data; wherein the third number is a difference between the number of bits of the first data and the first number; or, configured to find block link points for which the first number of bits of the 10 node IDs is the same as the first number of bits of the second data; the same technical effect can be achieved. It will be appreciated by those skilled in the art that the method may be used at this point in the process either as a block link point or as an off-chain device.
In further embodiments, the second number may be configured according to actual requirements, for example, configured as the first number plus any value, and the same technical effect may be achieved. To further ensure that the first archived data is received, the second quantity may be cached and to ensure that the regenerated second quantity is different from the cached second quantity.
In further embodiments, the first number may also be configured according to actual requirements, for example, configured as 245, and the same technical effect may be achieved.
In further embodiments, regenerating the second data according to the previous second quantity bits of the first data may also be configured according to actual requirements, for example, configured to determine the previous second quantity bits according to a preconfigured quantity bit calculation method, and regenerate the second data according to the previous second quantity bits of the first data; the pre-configured number bit calculation method may be configured according to actual requirements, for example, the pre-configured number bit calculation method is configured such that, in the first calculation, the second number is equal to the first number plus any one value; the second quantity is equal to the original second quantity plus any value, excluding the first calculation; or configured such that, at the time of the first calculation, the second number is equal to the sum of the first number and a half of the difference between the first number and the number of bits of the first data, i.e., 240+ (256-240)/2; when the first calculation is eliminated, the second number is equal to the sum of the half of the difference between the number of bits of the first data and the original second number, taking the second calculation as an example, i.e. 248+ (256-248)/2; the same technical effect can be achieved.
In the above mechanism, when some block data in the archive data (1-1000) are queried, all of the nodes 1-10 may be hit, and the load is more balanced.
Fig. 2 is a flowchart of step S14 in a preferred embodiment of the method shown in fig. 1. As shown in fig. 2, in a preferred embodiment, step S14 includes:
s141: generating second data according to the first number of bits of the first data and randomly generated third number of bits of data; wherein the third number is a difference between the number of bits of the first data and the first number.
The data query principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Fig. 3 is a flowchart of step S14 in another preferred embodiment of the method shown in fig. 1. As shown in fig. 3, in a preferred embodiment, step S14 includes:
s142: when the current equipment is a block link point, generating second data according to a first number bit before the first data and a third number bit after the node ID of the current node; wherein the third number is a difference between the number of bits of the first data and the first number.
The data query principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
FIG. 4 is a flow diagram of a preferred embodiment of the method shown in FIG. 1. As shown in fig. 4, in a preferred embodiment, before step S13, the method further includes:
s10: when a current node starts a block chain service, first geographical position information of the current node is requested from a third-party server;
s11: when the first geographical position information is different from each historical geographical position information, generating geographical identification information according to a pre-configured longitude and latitude coding rule and the first geographical position information;
s12: generating a node ID of the current node according to the geographical identification information and a pre-configured decodable coding rule; and the node ID is used for other block chain nodes to determine the geographical position information of the current node.
Specifically, a pre-configured longitude and latitude coding rule is used as a GeoHash coding rule, and the method for generating geographic identification information according to the pre-configured longitude and latitude coding rule and first geographic position information is configured into the method for generating an 8-bit GeoHash geographic information code according to the GeoHash coding rule and the first geographic position information; performing base32 decoding on the GeoHash geographic information code to generate 40-bit binary geographic identification information ", and correspondingly configuring the node ID of the current node generated according to the geographic identification information and a pre-configured decodable coding rule to randomly generate a 216-bit first binary character string; generating a node identifier from the 40-bit binary geographic identifier information and the first binary string; assume that the first geographical location information of the current node is 30.244901, 120.145346; the historical geographic position information of the current node is null;
the node executes step S10, and when the current node starts the block chain service, requests the geographical location information of the current node from the third-party server;
third party server returns 30.244901, 120.145346;
because the historical geographic position information of the current node is empty, the historical geographic position information of 30.244901, 120.145346 is different from the historical geographic position information of the current node, the node executes the step S11, and generates an 8-bit GeoHash geographic information code wtmkjczj according to GeoHash coding rules, 30.244901, 120.145346; base32 decoding the GeoHash GIS code to generate 40-bit binary GIS information 1110011001100111001010001010111111110001;
the node performs step S12 to randomly generate a 216-bit binary string (assuming that each bit represented by 00000.... is 0); the node generates a node identifier of M according to the following sequence of the 40-bit binary geographic identification information and the 216-bit binary character string 00000.. 00000, wherein the node identifier of M is 111001100110011100101000101011111111000100000.. 00000;
other blockchain nodes determine the geographical location information of the current node from the first 40 bits (i.e., 1110011001100111001010001010111111110001) of the current node identification.
In more embodiments, the length of the GeoHash code may also be configured according to actual requirements, for example, the length is configured to 9 bits, the longer the length of the GeoHash code is, the more accurate the area corresponding to the GeoHash code is, correspondingly, the length of the first binary string needs to be adjusted correspondingly, when the length of the GeoHash code is 9 bits (i.e., 45-bit binary geographic identification information is generated), the length of the first binary string is adjusted to 211 bits, and then the node identifier of the current node is generated according to the 45-bit binary geographic identification information and the 211-bit first binary string, which may achieve the same technical effect.
In more embodiments, the pre-configured longitude and latitude coding rule can be configured to be a PlusCode coding rule according to actual requirements, and correspondingly, "generating geographical identification information according to the pre-configured longitude and latitude coding rule and the first geographical location information" is configured to "generating a 10-bit PlusCode geographical information code according to the PlusCode coding rule and the first geographical location information; performing base64 decoding on the PlusCode geographic information code to generate 60-bit binary geographic identification information, and configuring ' generating the node identification of the current node according to the geographic identification information and a pre-configured decodable coding rule ' to ' randomly generate a 196-bit second binary character string; the same technical effect can be achieved by generating the node ID "from the 60-bit binary geographic identification information and the second binary string. Similarly, when the pre-configured longitude and latitude coding rule is PlusCode, the order of the binary geographic identification information and the second binary string may also be configured according to actual requirements, for example, the binary geographic identification information is configured before the second binary string, and the same technical effect may be achieved after the binary geographic identification information. The length of the PlusCode geographic information code can be configured according to actual requirements, and correspondingly, the length of the second binary character string needs to be correspondingly adjusted, so that the same technical effect can be achieved.
In further embodiments, the condition for triggering the generation of the geographic identification information according to the preconfigured longitude and latitude coding rule and the first geographic location information may also be configured according to actual requirements, for example, configured to trigger when the first geographic location information is different from the latest version of the historical geographic location information, and the same technical effect may be achieved.
The embodiment integrates the geographical position information into the node identifier, reduces the data storage of the geographical position information, reduces the request interaction for acquiring the geographical position information among different block chain nodes, gives the node identifier the meaning of the geographical position information, and is convenient for network node classification and subsequent route optimization while increasing the readability of the node identifier.
FIG. 5 is a flow chart of a preferred embodiment of the method shown in FIG. 4. As shown in fig. 5, in a preferred embodiment, step S11 includes:
s111: generating an 8-bit GeoHash geographic information code according to a GeoHash coding rule and the first geographic position information;
s112: base32 decoding the GeoHash geographic information code to generate 40-bit binary geographic identification information;
step S12 includes:
s121: randomly generating a 216-bit first binary string;
s122: and generating a node ID according to the 40-bit binary geographic identification information and the first binary character string.
The data query principle of the above embodiment can refer to the method shown in fig. 4, and is not described herein again.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention. As shown in fig. 6, as another aspect, the present application also provides a computer apparatus including one or more Central Processing Units (CPUs) 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the computer apparatus are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a computer-readable storage medium that exists separately and is not assembled into a computer device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (8)

1. A method for querying data, comprising:
in response to querying first block data, generating first data according to first archived data to which the first block data belongs;
generating second data according to a first number of bits before the first data;
generating data query request information comprising the first data and the second data;
finding a plurality of first nodes according to the second data and a preconfigured node searching method;
sending the data query request information to each of the first nodes for:
locally inquiring whether the first data are stored:
if yes, returning the first archived data;
upon receiving the first archived data, querying the first block data according to the first archived data;
when the first archived data is not received, regenerating the second data according to the first second quantity bits of the first data, and returning the data query request information which comprises the first data and the second data; wherein the second number is greater than the first number.
2. The method of claim 1, wherein generating second data from a first number of bits of the first data comprises:
generating second data according to the first number of bits of the first data and randomly generated third number of bits of data; wherein the third number is a difference between the number of bits of the first data and the first number.
3. The method of claim 1, wherein generating second data from a first number of bits of the first data comprises:
when the current equipment is a block link point, generating second data according to a first number bit before the first data and a third number bit after the node ID of the current node; wherein the third number is a difference between the number of bits of the first data and the first number.
4. The method of claim 3, wherein before responding to the query for the first chunk data, further comprising:
when a current node starts a block chain service, first geographical position information of the current node is requested from a third-party server;
when the first geographical position information is different from each historical geographical position information, generating geographical identification information according to a pre-configured longitude and latitude coding rule and the first geographical position information;
generating a node ID of the current node according to the geographic identification information and a pre-configured decodable coding rule; and the node ID is used for other block chain nodes to determine the geographical position information of the current node.
5. The method of claim 4, wherein the longitude and latitude encoding rule is a GeoHash encoding rule, and the generating the geographic identification information according to the pre-configured longitude and latitude encoding rule and the first geographic location information comprises:
generating an 8-bit GeoHash geographic information code according to a GeoHash coding rule and the first geographic position information;
base32 decoding the GeoHash geographic information code to generate 40-bit binary geographic identification information;
the generating a node ID of a current node according to the geographical identification information and a pre-configured decodable encoding rule includes:
randomly generating a 216-bit first binary string;
generating the node ID from the 40-bit binary geographic identification information and the first binary string.
6. The method of any of claims 1-5, wherein the first number is 240.
7. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-6.
8. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-6.
CN202110245524.7A 2021-03-05 2021-03-05 Data query method, computer device and storage medium Active CN112948438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110245524.7A CN112948438B (en) 2021-03-05 2021-03-05 Data query method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110245524.7A CN112948438B (en) 2021-03-05 2021-03-05 Data query method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN112948438A true CN112948438A (en) 2021-06-11
CN112948438B CN112948438B (en) 2022-06-24

Family

ID=76247832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110245524.7A Active CN112948438B (en) 2021-03-05 2021-03-05 Data query method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN112948438B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391557A (en) * 2017-03-24 2017-11-24 北京瑞卓喜投科技发展有限公司 Block chain Series poll method and system for setting errata outside chain
US20200104428A1 (en) * 2018-09-27 2020-04-02 Palo Alto Research Center Incorporated Integrated index blocks and searching in blockchain systems
CN111143371A (en) * 2019-12-27 2020-05-12 中国银联股份有限公司 Data query method, device, equipment, system and medium
CN111382119A (en) * 2018-12-29 2020-07-07 华为技术有限公司 Block data archiving method and related equipment
CN111641734A (en) * 2020-06-08 2020-09-08 杭州复杂美科技有限公司 Node identifier generation method, device and storage medium
CN112182029A (en) * 2020-09-30 2021-01-05 杭州复杂美科技有限公司 Data query method, device and storage medium
CN112364209A (en) * 2020-12-09 2021-02-12 杭州复杂美科技有限公司 Distributed data storage method, data query method, device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391557A (en) * 2017-03-24 2017-11-24 北京瑞卓喜投科技发展有限公司 Block chain Series poll method and system for setting errata outside chain
US20200104428A1 (en) * 2018-09-27 2020-04-02 Palo Alto Research Center Incorporated Integrated index blocks and searching in blockchain systems
CN111382119A (en) * 2018-12-29 2020-07-07 华为技术有限公司 Block data archiving method and related equipment
CN111143371A (en) * 2019-12-27 2020-05-12 中国银联股份有限公司 Data query method, device, equipment, system and medium
CN111641734A (en) * 2020-06-08 2020-09-08 杭州复杂美科技有限公司 Node identifier generation method, device and storage medium
CN112182029A (en) * 2020-09-30 2021-01-05 杭州复杂美科技有限公司 Data query method, device and storage medium
CN112364209A (en) * 2020-12-09 2021-02-12 杭州复杂美科技有限公司 Distributed data storage method, data query method, device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李华威: "适应节点差异的区块链分片间负载均衡研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Also Published As

Publication number Publication date
CN112948438B (en) 2022-06-24

Similar Documents

Publication Publication Date Title
US9189280B2 (en) Tracking large numbers of moving objects in an event processing system
JP2016053951A (en) System and method for maintaining distributed and fault-tolerant state over information centric network
CN108062419B (en) File storage method, electronic equipment, system and medium
US20160048430A1 (en) Method of operating a shared nothing cluster system
US10904316B2 (en) Data processing method and apparatus in service-oriented architecture system, and the service-oriented architecture system
CN111464630B (en) Transaction broadcasting method, apparatus and storage medium
CN113342854B (en) Method and system for generating unique ID of mobile equipment
CN110557423A (en) message pushing method and system
US20210158353A1 (en) Methods, systems, apparatuses, and devices for processing request in consortium blockchain
US9848059B2 (en) Content handling method, apparatus, and system
WO2019095668A1 (en) Directional data transmission method, directional data transmission control device and computer readable storage medium
WO2021248876A1 (en) Distributed data storage method, device, and storage medium
CN111641734A (en) Node identifier generation method, device and storage medium
CN104580428A (en) Data routing method, data management device and distributed storage system
CN112948438B (en) Data query method, computer device and storage medium
US20140310321A1 (en) Information processing apparatus, data management method, and program
US7475128B2 (en) Information processing device, information processing method, and computer program
CN116662022B (en) Distributed message processing method, system, device, communication equipment and storage medium
CN112055077B (en) Block link access method, device and storage medium
CN108241685B (en) Data query method and query client
WO2018000647A1 (en) Method, device, terminal, and server for file downloading
CN113992664B (en) Cluster communication method, related device and storage medium
CN109741180B (en) Block chain continuous transaction sequence number generation method and device and block chain network node
CN112688870A (en) Routing method, routing device and node equipment
CN115002205B (en) Kapacitor clustering method based on table routing proxy mode

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