Trajectory determination method, device, system and electronic device based on blockchain
By communicating with multiple blockchain networks on the server side, and obtaining and merging user trajectory information, the problems of incomplete trajectory information and high resource consumption in the existing technology are solved, and a more complete and trustworthy trajectory information acquisition is achieved.
Patent Information
- Application Number
- CN202110141962.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-02
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-02-02
AI Technical Summary
When obtaining the comprehensive trajectory information of citizens, the blockchain networks only record part of the information, making it difficult to obtain more comprehensive trajectory information, and requires a large amount of social resources to investigate, increasing the risk of false information provision.
Through the server-side communication and connection with at least two blockchain networks, the client's trajectory acquisition request is received, the sub-trajectory information set matching the user's identity and query conditions is obtained, and a complete trajectory information set is generated based on time information merged and sorted to generate a complete trajectory information set , send it to the client to display.
It realizes the acquisition of relatively complete trajectory information from the blockchain networks of different institutions, improves the credibility and convenience of trajectory information, reduces the risk of false information provision, and reduces the consumption of investigation resources.
Smart Images

Figure CN112836001B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of blockchain technology and the financial field, and more specifically, to a trajectory determination method, device, system and electronic device based on blockchain. Background Art
[0002] The blockchain system encrypts and hashes data and data operation records through cryptographic methods, thus forming an open, transparent, tamper-proof and traceable distributed database accounting system. This technology can be widely used in payment and settlement, evidence storage and collection, value transfer, supply chain finance, user credit reporting, regulatory auditing and other fields.
[0003] Taking the scenario of finding a citizen's recent activity trajectory as an example, the relevant technology is mainly based on questionnaire surveys, integrating information from various parties such as telecommunications operator positioning, security videos and public transportation tickets, and obtaining the approximate activity trajectory of the citizen through manual or computer synthesis. However, this requires the integration of multiple social forces, and the requirements for the initiator of the survey are very high. Investigating a citizen's personal trajectory requires a lot of time, manpower and material resources. The above problems can be at least partially solved through blockchain technology, such as personal trajectory query, verification and self-certification of personal trajectory through blockchain technology. Each node on the blockchain can share the citizen's personal activity records. Based on the characteristics that the records on the blockchain chain cannot be modified, as long as the citizen's trajectory is queried on the blockchain, the citizen's activity records at the nodes provided by various institutions can be obtained, so there is no need to spend a lot of social resources to investigate the citizen's activity trajectory, and it also reduces the risk of citizens providing false information.
[0004] In the process of realizing the concept of the present disclosure, the applicant found that there are at least the following problems with the relevant technology: the banking system, telecommunications operating system, public security system and public transportation system usually have their own blockchain networks, and each blockchain network only records part of the trajectory information, which makes it inconvenient to obtain more comprehensive trajectory information of citizens. Summary of the invention
[0005] One aspect of the present disclosure provides a blockchain-based trajectory determination method executed by a server, wherein the server serves as a node of a data exchange network, and the data exchange network is respectively connected to at least two blockchain networks for communication. The method comprises: receiving a trajectory acquisition request from a client, wherein the trajectory acquisition request comprises a user identifier and a query condition, and the query condition comprises at least one of the following: a time range and a geographical range; in response to the trajectory acquisition request, respectively acquiring sub-trajectory information sets matching the user identifier and the query condition from at least two blockchain networks, wherein each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier including time information; merging and sorting each sub-trajectory information in one or more sub-trajectory information sets based on the time information to obtain a trajectory information set; and sending associated information of the trajectory information set to the client, so that the client displays the associated information of the trajectory information set.
[0006] One aspect of the present disclosure provides a blockchain-based trajectory determination method executed by a client, wherein the client and the server serve as nodes of a data exchange network, and the data exchange network is respectively connected to at least two blockchain networks in communication, and the method comprises: sending a trajectory acquisition request to the server, the trajectory acquisition request comprising a user identifier and a query condition, the query condition comprising at least one of the following: a time range and a geographical range; and receiving associated information of a trajectory information set from the server, and displaying the associated information of the trajectory information set; wherein the trajectory information set is a sub-trajectory information set matching the user identifier and the query condition obtained by the server from at least two blockchain networks in response to the trajectory acquisition request, and the trajectory information set is obtained by sorting each sub-trajectory information in one or more sub-trajectory information sets, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier.
[0007] Another aspect of the present disclosure provides a trajectory determination device, which is arranged on a server side, and the server side serves as a node of a data exchange network, and the data exchange network is respectively connected to at least two blockchain networks for communication, and the above-mentioned device includes: a request receiving module, which is used to receive a trajectory acquisition request from a client, and the trajectory acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range; a sub-trajectory acquisition module, which is used to respond to the trajectory acquisition request and obtain sub-trajectory information sets matching the user identifier and the query condition from at least two blockchain networks, respectively, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier including time information; the trajectory acquisition module is used to merge and sort each sub-trajectory information in one or more sub-trajectory information sets based on time information to obtain a trajectory information set; and a trajectory sending module, which sends the associated information of the trajectory information set to the client, so that the client displays the associated information of the trajectory information set.
[0008] Another aspect of the present disclosure provides a trajectory determination device, which is arranged on a client, and the client and the server serve as nodes of a data exchange network, and the data exchange network is respectively communicated with at least two blockchain networks, and the above-mentioned device includes: a request sending module, which is used to send a trajectory acquisition request to the server, and the trajectory acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range; and a trajectory receiving module, which is used to receive associated information of a trajectory information set from the server, and display the associated information of the trajectory information set; wherein the trajectory information set is a sub-trajectory information set matching the user identifier and the query condition obtained by the server in response to the trajectory acquisition request from at least two blockchain networks, and the trajectory information set is obtained by sorting each sub-trajectory information in one or more sub-trajectory information sets, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier.
[0009] Another aspect of the present disclosure provides a track query system, including: a blockchain network, an application module, a personal track query module, a front-end database, and a regional data merging module. The blockchain network is used to maintain the blockchain, the blockchain includes a sub-track information set, and each sub-track information in the sub-track information set is generated based on user activity information; the application module is used to send a track acquisition request to the front-end database, and receive the associated information of the track information set corresponding to the track acquisition request, the track acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range; the personal track query module is used to store the corresponding relationship between the user identifier and the query authority; the front-end database is used to respond to the track acquisition request, obtain the query authority corresponding to the user identifier from the personal track query module, so as to generate a sub-track request based on the track acquisition request and the query authority, and cache the sub-track information set corresponding to the sub-track request; and the regional data merging module is used to merge and sort the sub-track information set corresponding to the sub-track request to generate the associated information of the track information set corresponding to the track acquisition request.
[0010] Another aspect of the present disclosure provides a trajectory determination system, including: a data exchange network and at least two blockchain networks, the data exchange network is respectively connected to the at least two blockchain networks in communication, and the data exchange network includes a client and a server in communication connection. The client sends a trajectory acquisition request to the server, the trajectory acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range; the server responds to the trajectory acquisition request, and obtains sub-trajectory information sets that match the user identifier and the query condition from at least two blockchain networks, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier; the server merges and sorts each sub-trajectory information in one or more sub-trajectory information sets based on time information to obtain a trajectory information set; the server sends the associated information of the trajectory information set to the client; and the client displays the associated information of the trajectory information set.
[0011] Another aspect of the present disclosure provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement the method described above when executing the computer program.
[0012] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0013] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed.
[0014] According to the embodiments of the present disclosure, one or more sub-trajectory information sets for user identification are obtained from multiple blockchains. Since each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier including time information, one or more sub-trajectory information sets can be merged and sorted based on time information to obtain a trajectory information set. It is achieved that relatively complete trajectory information for user identification is obtained from the respective blockchains of different institutions, and the relatively complete trajectory information has good confidence and traceability, meeting the needs of users for citizen personal trajectory investigations, such as epidemic investigations and other scenarios.
[0015] According to the embodiments of the present disclosure, in order to share an individual's activity information on each blockchain among various blockchain networks, it is only necessary to integrate the activity information recorded by various parties on multiple blockchains, merge the search results, and use this as proof of the individual's cross-regional activity record endorsed by the blockchain provider that carries the tracks of each region.
[0016] According to the embodiments of the present disclosure, each blockchain exchanges node data and shares personal activity records in a shared area (or field), making it possible to retrieve personal trajectory records across regions, effectively improving the ability to retrieve personal cross-regional activity trajectory results. Specifically, the cross-chain communication node belongs to both the node of the original regional blockchain and the node of the data exchange network, and has read and write permissions for both networks. After satisfying the node permissions, the data exchange network analyzes the personal activity records in the area read by the node. Combined with the personal activity records provided by each blockchain, a more comprehensive activity trajectory of citizens in several fields (regions) can be obtained without the need for offline comprehensive surveys.
[0017] According to the embodiments of the present disclosure, the chain storage structure of the blockchain is used to store personal activity records. The characteristics of distributed storage make it difficult to modify personal activity records. The stored records have multiple backups. Even if a node crashes, the data can be restored to ensure data security, improve the efficiency of personal virtual asset retention, and effectively reduce the difficulty of individuals providing cross-regional activity record proof. When citizens need to use cross-regional track proof, they only need to query the track proof on other blockchains through the cross-chain communication node in the current blockchain.
[0018] According to the embodiments of the present disclosure, blockchain technology data exchange technology is used to generate cross-regional trusted personal track records each time a personal cross-region activity record is used. As more and more blockchains that save personal tracks join, the social credibility of records based on blockchains will be higher and the impact will be wider, effectively improving the scope of influence of the social credibility of personal activity records. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] For a more complete understanding of the present disclosure and its advantages, reference will now be made to the following description taken in conjunction with the accompanying drawings, in which:
[0020] Figure 1 A schematic diagram schematically shows an application scenario applicable to a blockchain-based trajectory determination method, device, system, and electronic device according to an embodiment of the present disclosure;
[0021] Figure 2 The exemplary system architecture of the method, device, system and electronic device for determining a trajectory based on blockchain according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 3 The flowchart of the trajectory determination method based on blockchain according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 4 The schematic diagram of the structure of the blockchain network according to the embodiment of the present disclosure is shown;
[0024] Figure 5A logical diagram of cross-region merging of personal trajectories according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 6 A schematic diagram of a PBFT algorithm according to an embodiment of the present disclosure is schematically shown;
[0026] Figure 7 A schematic diagram of a 3DES algorithm according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 8 A flowchart of a personal trajectory retrieval method according to an embodiment of the present disclosure is schematically shown;
[0028] Fig. 9 A logic diagram of a trajectory verification process according to an embodiment of the present disclosure is schematically shown;
[0029] Fig.10 The flowchart of a trajectory determination method based on blockchain according to another embodiment of the present disclosure is schematically shown;
[0030] Fig.11 A block diagram of a trajectory determination device according to an embodiment of the present disclosure is schematically shown;
[0031] Fig.12 A block diagram of a trajectory determination device according to another embodiment of the present disclosure is schematically shown;
[0032] Fig.13 A block diagram of a trajectory query system according to an embodiment of the present disclosure is schematically shown;
[0033] Fig.14 A block diagram schematically shows a trajectory determination system according to an embodiment of the present disclosure; and
[0034] Fig.15 A block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0035] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0036] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0037] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0038] When using expressions such as "at least one of A, B or C", they should generally be interpreted according to the meaning of the expression commonly understood by technical personnel in this field (for example, "a system having at least one of A, B or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0039] Embodiments of the present disclosure provide a blockchain-based trajectory determination method, device, system, and electronic device. The blockchain-based trajectory determination method executed by the server may include a sub-trajectory acquisition process and a trajectory merging process. In the sub-trajectory acquisition process, a trajectory acquisition request from a client is received, the trajectory acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range; then, in response to the trajectory acquisition request, sub-trajectory information sets matching the user identifier and the query condition are respectively obtained from at least two blockchain networks, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier including time information. After completing the sub-trajectory acquisition process, the trajectory merging process is entered, and each sub-trajectory information in one or more sub-trajectory information sets is merged and sorted based on the time information to obtain a trajectory information set; then, the associated information of the trajectory information set is sent to the client so that the client displays the associated information of the trajectory information set.
[0040] The trajectory determination method, device, system and electronic device provided by the present disclosure based on blockchain technology extract a set of sub-trajectory information matching the trajectory request initiated by the user from multiple blockchains. Each sub-trajectory information has a globally unique identifier, which includes time information, so that the merged sub-trajectory information can be sorted based on the time information, and a relatively complete trajectory information across regions (fields) is generated, which effectively improves the convenience, credibility and completeness of obtaining citizens' trajectory information.
[0041] Taking the determination of a citizen's recent activity trajectory in a region as an example, the method of sharing citizen activity records by each node on the blockchain, relying on the characteristics of the blockchain that the records on the chain cannot be modified, can obtain the citizen's activity records in each node institution by simply querying the citizen's trajectory on the chain, without consuming a lot of social resources to investigate a citizen's activity trajectory, and also avoiding the risk of citizens providing false information. After ensuring that the trajectory of a region is possible, the trajectory data of one region is sent to the blockchain of another region through the blockchain node data exchange technology, and the data of the two are combined to form a complete cross-regional trajectory data proof. When it is necessary to prove the personal trajectory data of citizens, there is no need to use offline means to generate a complete and credible citizen trajectory data record.
[0042] Figure 1 A schematic diagram schematically illustrates an application scenario of a trajectory determination method, device, system, and electronic device based on blockchain according to an embodiment of the present disclosure.
[0043] like Figure 1 As shown, the user handled business at the XX branch of the Industrial and Commercial Bank of China on XX / XX / XXXX. ICBC has a self-built blockchain network 101. During the process of the user handling business, the blockchain maintained by the blockchain network 101 can store information about the current business handling activities, such as user identification, organization identification, location information, time information, business information, etc. After handling the business, the user can go to ZZ Cafe to surf the Internet on YY / YY / YYY. When the user is surfing the Internet, the blockchain network 101 built by the telecommunications operator can record the user's Internet activity information, such as source address information, terminal location information, time information, request address information, etc. When the user needs to prove his or her trajectory or the organization needs to confirm the user's trajectory, a request can be sent to the data exchange network 102, and the data exchange network 102 obtains the trajectory information corresponding to the user from each blockchain network 101. Then, multiple trajectory information is sorted based on the time information to obtain the trajectory information of the user. In addition, the trajectory information can also be visualized, such as drawing the trajectory information of the user on a map. It should be noted that when users consume in a cafe, the bank’s blockchain network can also record the shopping activity information, without any limitation here.
[0044] It is understandable that the blockchain network 101 shown above is only an illustrative example and may also be a blockchain network in the insurance field, a blockchain network in the public transportation field, a blockchain network in the public security system, a blockchain network in the e-commerce field, etc.
[0045] Figure 2 The following schematically illustrates an exemplary system architecture of a method, device, system, and electronic device for determining a trajectory based on blockchain according to an embodiment of the present disclosure. It should be noted that: Figure 2The examples shown are only examples of system architectures that can be applied to the embodiments of the present disclosure, in order to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios. The trajectory determination method, device, system and electronic device based on blockchain provided by the embodiments of the present disclosure can be used in the blockchain field in cross-chain communication related aspects, and can also be used in various fields other than the blockchain field, such as the financial field. The application fields of the trajectory determination method, device, system and electronic device based on blockchain provided by the embodiments of the present disclosure are not limited.
[0046] like Figure 2 As shown, the blockchain network 200 may include nodes 201-206, at least some of which jointly maintain the blockchain. Nodes 201-206 may be various computing nodes with the same or different computing capabilities, such as personal computers, network servers, database servers, smart phones, etc., which are not limited here. Any two nodes in nodes 201-206 can communicate point-to-point.
[0047] Blockchain nodes are computers that can download relevant blockchain applications (such as cryptocurrency software, trajectory determination software, etc.) to participate in peer-to-peer networks. Blockchain node types can include full nodes, light nodes, Simplified Payment Verification nodes (SPV), etc.
[0048] Blockchain is a distributed database of blocks linked in chronological order by hash pointers. Blockchain blocks are added in chronological order. When the predetermined conditions are met, each node in the blockchain network allows the current node to create a block and add the block to the blockchain. The added block is used as the latest block on the blockchain. At a certain moment, the nodes maintaining the same blockchain obtain the same latest block from the blockchain. A blockchain network can maintain one blockchain, or it can maintain multiple blockchains at the same time, such as Figure 2 The blockchain 211 is maintained in the blockchain network. Different blockchains can be maintained by a network composed of the same nodes in the blockchain, or they can be maintained by different sub-networks composed of at least some different nodes in the blockchain network.
[0049] It should be understood that Figure 2 The scale and type of blockchain network, the number of nodes, the length of blockchain, the number of blocks, etc. in the description are only for illustration. According to actual needs, there can be any scale and type of blockchain network, any number of nodes, any length of blockchain, any number of blocks, etc., which are not limited here.
[0050] Figure 3 The flowchart of the trajectory determination method based on blockchain according to an embodiment of the present disclosure is schematically shown. The process can be applied to the server side, where the server side serves as a node of the data exchange network, and the data exchange network is respectively connected to at least two blockchain networks.
[0051] like Figure 3 As shown, the method may include the following operations S302 to S308.
[0052] In operation S302, a track acquisition request is received from a client, where the track acquisition request includes a user identifier and a query condition, where the query condition includes at least one of the following: a time range and a geographical range.
[0053] In this embodiment, the user can enter the query conditions on the interactive interface of the client, and the system can automatically read the user identification (ID) of the logged-in user. It should be noted that the user ID can generally refer to a unique ID that can identify the user, including but not limited to the narrow user ID and / or device ID. If the user ID is bound to the device ID, the device ID can replace the user ID.
[0054] In operation S304, in response to the trajectory acquisition request, sub-trajectory information sets matching the user identifier and the query condition are respectively acquired from at least two blockchain networks, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier including time information.
[0055] In this embodiment, the blockchain network can be a blockchain network jointly constructed by institutions in one field (such as finance, public transportation, justice, public services, public security, e-commerce, etc.), or a blockchain network jointly constructed by some institutions in one field, or a blockchain network jointly constructed by at least some institutions in multiple fields. For example, a blockchain network jointly constructed by multiple banks in the financial field, a blockchain network jointly constructed by bus companies in multiple regions of the public transportation system, a blockchain network jointly constructed by multiple regional institutions in the public security system, etc.
[0056] In one embodiment, the blockchain maintained by the blockchain network stores a sub-track information set, which is generated based on user activity information obtained by the blockchain network node, and the user activity information includes user identification, time information and geographical information. For example, when a user handles business, transactions, consumption and other activities, user activity information will be generated, and this user activity information can be stored on the blockchain.
[0057] It should be noted that not every blockchain has sub-trajectory information that matches the user ID and query conditions. For example, matching sub-trajectory information only exists in blockchains in the financial and telecommunications fields, but there is no matching sub-trajectory information in the public transportation field.
[0058] Figure 4 The schematic diagram shows the structure of a blockchain network according to an embodiment of the present disclosure.
[0059] like Figure 4 As shown in the figure, the blockchain network includes management nodes (CA), consensus nodes (VP), and data verification nodes (DVP). Among them, the management node (CA) is responsible for blockchain network node access and network management, the consensus node (VP) is responsible for consensus and storage of consensus results, and the data verification node (DVP) is responsible for verifying trajectory data and sending trajectory data. There is at least one management node (CA) and at least two node participants in a network. The two node participants each provide a consensus node (VP), and the number of data verification nodes (DVP) is unlimited. Each node is connected to form a blockchain network.
[0060] Table 1 Node function table of personal virtual asset management system
[0061] Node Name Node Function Management Node (CA) Manage network, node access, node permissions Consensus Node (VP) Consensus, storage of consensus results Data Verification Node (DVP) Verify trajectory data and send trajectory data
[0062] Specifically, the management node (CA) is installed with the blockchain management function, which is owned by the network administrator and has the authority to manage all network nodes, the network start or stop function, the node join or exit the network function, and the node authority grant or deprivation function. When the network is not started, the network administrator starts the network through the management node. When the network needs to be stopped, the network administrator stops the network through the management node. When the network needs to add a new node, the owner of the new node sends a joining application to the administrator. After approval, the network administrator joins the network through the management node. When the node needs to exit the network, the owner of the exiting node sends an exit application to the administrator. After approval, the network administrator exits the network through the management node. When the node needs to add new network permissions, the owner of the new permission node sends an permission addition application to the administrator. After approval, the network administrator adds the node's network permissions through the management node. When the node needs to be deprived of network permissions or reduce network permissions, the owner of the reduced permission node sends a permission reduction application to the administrator. After approval, the network administrator reduces the node's network permissions through the management node, or the network administrator directly deprives the node of its network permissions through the management node.
[0063] Consensus nodes (VP) are provided by enterprises or public utilities. The company node is responsible for blockchain network consensus, stores consensus results, and provides consensus data. In the blockchain network consensus, the consensus node provides consensus data and participates in the blockchain consensus process to provide computing power. When the consensus is completed, the consensus results are stored. After the storage is completed, each consensus node backs up each other's node data.
[0064] Data verification nodes are provided by enterprises or public utilities. Data verification nodes verify personal activity records on the blockchain network and splice activity data into personal activity tracks. After data splicing is completed, the splicing results are sent to the consensus node and wait for the network consensus to be completed. After the network consensus is completed, the first node to calculate the result sends the personal track record to the front database.
[0065] In one embodiment, the user activity information includes time information. When generating track information based on the user activity information, a unique identifier including time information (or time information, location information, and data center information, etc.) can be assigned to each track information. Among them, since different blockchains are maintained by nodes provided by different entities, if a user makes an online payment in a certain area, the user's online activity information will be recorded by the communication operator and the user's payment activity information will be recorded by the bank at the same time. There may be conflicts between the information between the two. For example, due to accuracy problems, the user's location obtained by the telecommunications server at a certain time point is located at location A, and the user's location obtained by the bank at the same time point is located at location B near location A, which will cause the two data to conflict with each other. However, if information that can be used to distinguish blockchain networks or blockchain network nodes, such as self-incrementing bits, data centers, etc., is added to the identifier of the track information, this problem can be effectively solved.
[0066] In one embodiment, the track information identifier includes: a timestamp and at least one of the following: a region identifier, a blockchain network identifier, a positive digit, a self-incrementing digit, and a data center. For example, the track information identifier includes: a positive digit, a timestamp, a region identifier, and a self-incrementing digit. For example, the track information identifier includes: a positive digit, a timestamp, a region identifier, and a data center. For example, the track information identifier includes: a positive digit, a timestamp, a region identifier, a data center, and a self-incrementing digit.
[0067] For example, in a personal trajectory file, each location record is assigned a unique ID by the system, and the IDs in a file are continuous.
[0068] The structure of a personal track file is as follows:
[0069]
[0070]
[0071] The ID structure can be as follows: positive digit (1 bit) + timestamp (41 bits) + area ID (5 bits) + data center (5 bits) + self-increment value (12 bits), a total of 64 bits of a long type.
[0072] The first bit (1 bit): The highest bit of long in Java is the sign bit, representing positive or negative. Positive numbers are 0 and negative numbers are 1. Generally, the generated ID is a positive number, so the default value is 0.
[0073] Timestamp part (41 bits): millisecond-level time, using the difference between the current timestamp and the fixed start timestamp; a 41-bit timestamp can be used for 69 years, (1L<<41) / (1000L 60 60 24 365) = 69 years.
[0074] Area ID (10 bits): The area ID of the current track record. Each area has a unique ID in the entire system.
[0075] The serial number part (12 bits) has an auto-increment value and supports the generation of 4096 IDs for the same node within the same millisecond.
[0076] In one embodiment, each blockchain network and data exchange network has at least one common node, and the common node has a first read and write permission for the data exchange network and a second read and write permission for the blockchain network where the common node is located.
[0077] This allows each blockchain to share personal activity records in the region through node data exchange, making it possible to retrieve personal trajectory records across regions. The cross-chain communication node belongs to both the node of the original regional blockchain and the node of the data exchange network, and has read and write permissions for both networks. After satisfying the node permissions, the data exchange network analyzes the personal activity records in the node reading area. Combined with the activity records provided by each blockchain, the cross-regional activity trajectory of the citizen can be easily obtained.
[0078] In operation S306, each sub-trajectory information in one or more sub-trajectory information sets is merged and sorted based on the time information to obtain a trajectory information set.
[0079] In one embodiment, sorting each sub-trajectory information in one or more sub-trajectory information sets may include the following operations. First, based on the start time and the end time of the time range, the trajectory information to be processed is filtered at a specified time interval. Then, the trajectory information to be processed is sorted based on the time information included in the trajectory information identifier of the trajectory information to be processed. The specified time interval may be a pre-set threshold, such as 1 second, 2 seconds, 3 seconds, 5 seconds, 10 seconds or longer.
[0080] It should be noted that, in the process of sorting the sub-trajectory information in one or more sub-trajectory information sets, the sub-trajectory information that conflicts with each other and has low confidence is removed, or the merging and sorting of the sub-trajectory information is prohibited.
[0081] In operation S308 , the associated information of the trajectory information set is sent to the client so that the client displays the associated information of the trajectory information set.
[0082] In this embodiment, the associated information of the trajectory information set includes, but is not limited to: the trajectory information set itself and information generated based on the trajectory information set, such as visualized trajectory information.
[0083] In one embodiment, the server side includes a front-end database server side, a personal trajectory query server side and a regional data merging server side. The front-end database server side is connected to the client side, the personal trajectory query server side and the regional data merging server side respectively. The front-end database server is used to transmit trajectory information sets and cache trajectory information sets. The personal trajectory query server side is used to maintain trajectory information and maintain the correspondence between user identification and query authority.
[0084] The following is an exemplary description of the personal trajectory retrieval process using an embodiment.
[0085] Figure 5 The following schematically shows a logic diagram of cross-region merging of personal trajectories according to an embodiment of the present disclosure.
[0086] like Figure 5 As shown, in order to break the data isolation formed by the trajectory record, the personal trajectory record can be recorded continuously in multiple areas, which is convenient for querying the trajectory records of individuals in multiple areas over a period of time. The regional personal trajectory records are merged by the data merging unit to generate multi-area personal trajectory records. This can be achieved in the following way.
[0087] First, the client initiates a multi-region trajectory record request and sends the multi-region trajectory record request to the front-end database. The format of the multi-region trajectory record request is as follows.
[0088]
[0089] Then, the front-end database randomly distributes the multi-region trajectory record requests to the data merging module in the blockchain. The data merging module parses the request and sends a request for obtaining regional trajectory record data to the data merging module of the corresponding blockchain according to the number of parsed regions.
[0090] Next, each regional trajectory retrieval system generates the personal trajectory record of each region according to the one-time generation of personal trajectory workflow in response to the request for obtaining regional trajectory record data.
[0091] Then, each regional trajectory retrieval system returns the generated personal trajectory to the data merging module that initiated the request.
[0092] Next, the data merging module finds the adjacent block personal trajectory files according to the first and last records in the trajectory file. Adjacent files are merged from the largest to the smallest according to the value of the first record in the file and the timestamp in the ID.
[0093] Then, after the retrieval records of each region are merged, it is determined whether there are abnormal records based on the record ID, and whether there are conflicting trajectory records based on the biometric usage record and longitude and latitude matching judgment logic.
[0094] Then, if there is a conflict, the system considers that it is not possible to generate a valid cross-region personal track record for this user in this time period. If there is no conflict in the check result, the system considers that a valid cross-region personal track record is generated for this user in this time period.
[0095] Then, the data merging module notifies the front-end database to generate the record results.
[0096] Next, the front-end database notifies the client to generate the record results.
[0097] Through the process shown above, the server can send the trajectory information to the client so that the client can display the trajectory information. The credibility of the trajectory information is high and the trajectory information is relatively complete.
[0098] The following is an exemplary description of the algorithms involved in the retrieval process.
[0099] Figure 6 The figure schematically shows a schematic diagram of the PBFT algorithm according to an embodiment of the present disclosure. Figure 7 A schematic diagram of a 3DES algorithm according to an embodiment of the present disclosure is schematically shown.
[0100] When all records are matched, a node completes its matching work and sends the usage results matching its own query to other consensus nodes as the usage record of the node. When sending, the data is encrypted using the TLS1.3 standard. The data verification node waits for the matching results of the consensus node.
[0101] like Figure 6 and Figure 7 As shown in the figure, after waiting for all nodes participating in the consensus to merge all the results according to the logic of matching the certificate record with the longitude and latitude, the network votes on the results through the Byzantine algorithm (PBFT). After the vote is valid, a personal trajectory file is generated, and the file is encrypted with 3DES at the same time. Then, the encrypted file is obtained and the message digest of the file is obtained through the TIGER-192-3 algorithm. The message digest is installed together with the personal trajectory result number in a general way and stored on the chain, as shown in Table 2.
[0102] Table 2 Storage format on blockchain
[0103]
[0104] Tiger is a faster hash algorithm, optimized for 64-bit machines. Tiger and md5 add data in a different way. Instead of adding a 1 and several 0s, Tiger adds a 0x01 and several 0s. Tiger's output is 192 bits, or 24 bytes. The size of the group is also the same as md5: 64 bytes.
[0105] In one embodiment, the server side includes a front-end database server side, a personal trajectory query server side and a regional data merging server side. The front-end database server side is connected to the client side, the personal trajectory query server side and the regional data merging server side respectively. The front-end database server is used to transmit trajectory information sets and cache trajectory information sets. The personal trajectory query server side is used to maintain trajectory information and maintain the correspondence between user identification and query authority.
[0106] By setting up a personal track query server, it is easy to implement the charging of track query function. For example, different query permissions can be configured for different users through the personal track query server.
[0107] For example, after receiving a trajectory acquisition request from a client, the above method may further include the following operations: determining the query authority corresponding to the user identifier, the query authority including the cache data query authority and the blockchain query authority, wherein the query authority is related to the payment mode. The payment mode includes but is not limited to: free mode, one-time payment mode and prepaid mode.
[0108] Accordingly, obtaining sub-track information sets matching the user identifier and the query condition from at least two blockchain networks may include the following operations.
[0109] For example, if the query permission corresponding to the user identifier is a cache data query permission, a sub-track information set matching the user identifier and the query condition is obtained from the cache.
[0110] For another example, if the query permission corresponding to the user identifier is a blockchain query permission, a sub-track information set matching the user identifier and the query condition is obtained from at least part of the at least two blockchain networks.
[0111] Figure 8 The flowchart of the personal trajectory retrieval method according to an embodiment of the present disclosure is schematically shown.
[0112] First, a registered user initiates a request to generate a personal trajectory in the user interaction interface of the client.
[0113] Then, the client sends a request to the front-end database. When sending the request, the data of the request is encrypted using the TLS1.3 standard.
[0114] Next, the front-end database receives the request sent by the client through the network and decrypts and unpacks it using the TLS 1.3 standard when receiving the request.
[0115] Then, the front-end database unpacks the request and parses the user information contained in the request. The front-end database sends the user information to the personal trajectory query module. When sending the user information, the user information is encrypted using the TLS 1.3 standard.
[0116] Next, the personal trajectory query module receives the request sent by the front-end database. When receiving the request, the sending request is decrypted and unpacked using the TLS 1.3 standard.
[0117] Then, after parsing the user information in the request, the personal trajectory query module transmits the user information to the personal package management unit to query the user node authority.
[0118] Next, the personal trajectory query module sends the user node permissions to the front-end database. When sending permission information, the sent data is encrypted using the TLS 1.3 standard.
[0119] Then, the front-end database receives the individual node permissions. When receiving the permission information, the permission information is decrypted and unpacked using the TLS 1.3 standard. The judgment logic is as follows: If the user sets the biometric usage permission of the node, the corresponding biometric usage is queried according to the permission. If there is no permission, the node participates in this trajectory generation request.
[0120] Next, the front-end database sends a request to the blockchain network. When sending the request, the request is encrypted using the TLS1.3 standard. The request sending format can be as follows:
[0121] Sending format:
[0122]
[0123] Return format:
[0124] {
[0125] status:ok
[0126] }
[0127] Then, when the consensus node in the blockchain network receives a request to generate a personal trajectory, it sends it to different consensus nodes (VP) to obtain the corresponding biometric usage records.
[0128] Next, after the biometric usage record is acquired, the consensus node (VP) broadcasts the acquired data to the remaining consensus nodes (VP) and data verification nodes (DVP) in the network.
[0129] Next, when a consensus node or data verification node has received all the data, it starts matching the data with longitude and latitude.
[0130] Among them, the logic of biometric usage records and latitude and longitude matching judgment: Biometric usage records contain the latitude and longitude of the location of use. When two usage records appear at the same time, but the latitude and longitude are different, the certificate with the larger total number of usage records is credible, and the certificate with the smaller total number of usage records is untrustworthy and not recorded in the personal trajectory file. When the difference between the Nth certificate usage record and the N-1th record is greater than the distance that humans can move within a certain period of time, the Nth certificate and subsequent usage records are invalidated and not recorded in the personal trajectory file.
[0131] Then, when all records are matched, a node completes its matching work and sends the usage results matching its own query to other consensus nodes as the usage record of the node.
[0132] Next, the trajectory is merged. The process can be referred to Figure 5 and Figure 6 The relevant record contents will not be described in detail here.
[0133] Then, after the blockchain network completes the personal trajectory file, the front-end database personal trajectory cache module is responsible for receiving the personal trajectory results of the blockchain network and caching the personal trajectory results. When the personal trajectory cache module receives the personal trajectory results of the blockchain network, it checks whether the returned results are valid, and the blockchain network stores the personal trajectory file in the personal trajectory system at the same time.
[0134] Among them, the blockchain network returns the personal trajectory result format:
[0135]
[0136]
[0137] Then, the personal trajectory result is returned as valid, and the personal trajectory cache module caches the result record in the database and notifies the client that the personal trajectory has been generated.
[0138] Then, when the client receives the request for completing the generation of the personal trajectory result, it unpacks the message through the request receiving module and reads the personalResultNo in the message. After the reading is successful, the client sends the download of the personal trajectory file to the front database through the network request sending unit and downloads it to the path preset by the personal terminal.
[0139] Next, the user interaction interface unit is responsible for displaying the personal application function interface, parsing the personal trajectory file and displaying the trajectory therein, and using the front-end component to display the personal trajectory.
[0140] The following is an exemplary description of the trajectory verification process.
[0141] Fig. 9 The following schematically shows a logic diagram of a trajectory verification process according to an embodiment of the present disclosure.
[0142] like Fig. 9 As shown in the figure, the citizen's trajectory can be verified regardless of whether the client is online or offline. For example, in scenarios where there is no mobile network signal or the signal is weak, verification can be performed through offline verification.
[0143] In one embodiment, the trajectory may be verified in an online verification manner.
[0144] Specifically, after sending the associated information of the trajectory information set to the client, the above method may further include the following operations.
[0145] First, a trajectory verification request is received from a client, where the trajectory verification request includes trajectory information to be verified, and the client is in an online state.
[0146] Then, the trajectory information to be verified is compared with the trajectory information stored in the blockchain maintained by the blockchain network to obtain a first comparison result. For example, the local personal trajectory file is compared with the summary information (such as MD5 value) of the file on the blockchain for consistency.
[0147] Next, the first comparison result is sent to the client so that the client displays the first comparison result.
[0148] In one embodiment, the track can be verified in an offline verification manner. For example, when the client is offline, the local personal track file can be encrypted, and the encrypted track file can be transmitted to the terminal of the data verification node based on the Bluetooth protocol, so that the terminal of the data verification node can use the private key of the blockchain network to decrypt the encrypted track file and then perform track comparison.
[0149] For example, after sending the associated information of the trajectory information set to the client, the above method may further include the following operations.
[0150] First, the encrypted trajectory information is received from the client based on the Bluetooth protocol, and the client is in an offline state. For example, the terminal of the data verification node receives the encrypted trajectory information (such as a trajectory file) based on the Bluetooth protocol.
[0151] Then, the encrypted trajectory information is sent to the blockchain network so that the blockchain network can decrypt the encrypted trajectory information using the private key to obtain the decrypted trajectory information.
[0152] Next, the decrypted trajectory information is compared with the trajectory information stored in the blockchain maintained by the blockchain network to obtain a second comparison result.
[0153] Then, the second comparison result is sent to the client so that the client displays the second comparison result.
[0154] In a specific embodiment, in order to avoid reducing the workload of proving personal tracks, by sharing the activity records of individuals on nodes on the blockchain, it is only necessary to integrate the information of all parties on the blockchain, and use the retrieval results as personal activity records, and make personal activity record certificates endorsed by the providers of each activity record.
[0155] When a user needs to prove his personal track, first, the user's client interface displays the personal track. Then, the client determines whether the current network status is online or offline.
[0156] If the client is online, the message digest value of the local personal trajectory file is compared with the message digest value of the personal trajectory file on the blockchain. If the comparison is consistent, the consistent comparison result is displayed; if the comparison is inconsistent, the inconsistent comparison result is displayed. If the comparison is consistent, it means that the personal trajectory displayed on the client's interactive interface is real and valid.
[0157] If the client is offline, the local personal trajectory file is encrypted using the public key of the blockchain network in RSA mode, and then the encrypted file is transmitted to the terminal of the data verification node based on the Bluetooth protocol, so that the data verification node terminal can decrypt it using the private key of the blockchain network. Then, after the personal trajectory file is encrypted by 3DES, its message digest information (MD5) is taken and compared with the message digest of the corresponding personal trajectory file on the blockchain. If the comparison is consistent, the consistent comparison result is displayed; if the comparison is inconsistent, the inconsistent comparison result is displayed.
[0158] This allows the data verification node terminal to generate verification results and send the results back to the sender's client.
[0159] The disclosed embodiments reduce the difficulty for individuals to provide proof of cross-regional activity records. For example, the chain storage structure of the blockchain is used to store personal activity records. The characteristics of distributed storage make it difficult to modify personal activity records. The stored records have multiple backups, and even if a node crashes, the data can be restored to ensure data security and improve the efficiency of personal virtual asset retention. When citizens need to use cross-regional trajectory proofs, they only need to query the trajectory proofs on other chains through the cross-chain communication node in the current blockchain. In addition, using blockchain technology data exchange technology, each time a personal cross-regional activity record is used, a cross-regional trusted personal trajectory record can be quickly generated. As more and more blockchains that save personal trajectories join, the records obtained on the chain will have higher social credibility and wider influence.
[0160] Another aspect of the present disclosure provides a blockchain-based trajectory determination method executed by a client, wherein the client and the server serve as nodes of a data exchange network, and the data exchange network is respectively connected to at least two blockchain networks.
[0161] Fig.10 The figure schematically shows a flowchart of a trajectory determination method based on blockchain according to another embodiment of the present disclosure.
[0162] like Fig.10 As shown, the above method may include: operations S1002 to S1004.
[0163] In operation S1002, a track acquisition request is sent to a server, the track acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range.
[0164] In operation S1004 , the associated information of the track information set is received from the server, and the associated information of the track information set is displayed.
[0165] Among them, the trajectory information set is a sub-trajectory information set that matches the user identifier and the query condition and is obtained by the server side from at least two blockchain networks in response to the trajectory acquisition request, and the trajectory information set is obtained by sorting each sub-trajectory information in one or more sub-trajectory information sets, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier.
[0166] In one embodiment, the associated information between the trajectory acquisition request and the trajectory information set is encrypted.
[0167] It should be noted that at least part of the operations of the blockchain-based trajectory determination method performed by the client can refer to the relevant operations of the blockchain-based trajectory determination method performed by the server, and will not be repeated here.
[0168] Another aspect of the present disclosure provides a trajectory determination device, which is arranged on a server side, and the server side serves as a node of a data exchange network, and the data exchange network is communicatively connected to at least two blockchain networks respectively.
[0169] Fig.11 A block diagram of a trajectory determination device according to an embodiment of the present disclosure is schematically shown.
[0170] like Fig.11 As shown, the trajectory determination device 1100 may include: a request receiving module 1110 , a sub-trajectory acquisition module 1120 , a trajectory acquisition module 1130 and a trajectory sending module 1140 .
[0171] The request receiving module 1110 is used to receive a trajectory acquisition request from a client, where the trajectory acquisition request includes a user identifier and a query condition, where the query condition includes at least one of the following: a time range and a geographical range.
[0172] The sub-trajectory acquisition module 1120 is used to respond to the trajectory acquisition request and obtain sub-trajectory information sets that match the user identifier and the query condition from at least two blockchain networks, where each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier including time information.
[0173] The trajectory acquisition module 1130 is used to merge and sort each sub-trajectory information in one or more sub-trajectory information sets based on time information to obtain a trajectory information set.
[0174] The trajectory sending module 1140 sends the associated information of the trajectory information set to the client so that the client displays the associated information of the trajectory information set.
[0175] Another aspect of the present disclosure provides a trajectory determination device, which is arranged on a client, and the client and the server serve as nodes of a data exchange network, and the data exchange network is communicatively connected with at least two blockchain networks respectively.
[0176] Fig.12 A block diagram of a trajectory determination device according to another embodiment of the present disclosure is schematically shown.
[0177] like Fig.12 As shown, the trajectory determination device 1200 may include: a request sending module 1210 and a trajectory receiving module 1220 .
[0178] The request sending module 1210 is used to send a track acquisition request to the server, where the track acquisition request includes a user identifier and a query condition, where the query condition includes at least one of the following: a time range and a geographical range.
[0179] The trajectory receiving module 1220 is used to receive the associated information of the trajectory information set from the server side, and display the associated information of the trajectory information set; wherein the trajectory information set is a sub-trajectory information set that matches the user identifier and the query condition and is obtained from at least two blockchain networks respectively by the server side in response to the trajectory acquisition request, and the trajectory information set is obtained by sorting each sub-trajectory information in one or more sub-trajectory information sets, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier.
[0180] Another aspect of the present disclosure provides a trajectory query system.
[0181] Fig.13 A block diagram of a trajectory query system according to an embodiment of the present disclosure is schematically shown.
[0182] like Fig.13 As shown, the trajectory query system may include: a blockchain network, an application module, a personal trajectory query module, a front-end database and a regional data merging module.
[0183] The blockchain network is used to maintain the blockchain, and the blockchain includes a sub-track information set, and each sub-track information in the sub-track information set is generated based on user activity information.
[0184] The application module is used to send a trajectory acquisition request to the front-end database and receive associated information of a trajectory information set corresponding to the trajectory acquisition request. The trajectory acquisition request includes a user identifier and a query condition. The query condition includes at least one of the following: a time range and a geographical range.
[0185] The personal trajectory query module is used to store the correspondence between user identification and query authority.
[0186] The front-end database is used to respond to the trajectory acquisition request, obtain the query authority corresponding to the user identification from the personal trajectory query module, generate a sub-trajectory request based on the trajectory acquisition request and the query authority, and cache the sub-trajectory information set corresponding to the sub-trajectory request.
[0187] The regional data merging module is used to merge and sort the sub-trajectory information sets corresponding to the sub-trajectory requests to generate association information of the trajectory information set corresponding to the trajectory acquisition request.
[0188] In one embodiment, the blockchain network consensus and storage consensus results, verify trajectory data and send trajectory data. The front-end database (FDB) is responsible for user management and caching personal trajectory results. The application module is responsible for personal registration, personal trajectory query, personal trajectory verification, and personal trajectory offline verification.
[0189] Table 3 Function table of modules of personal trajectory retrieval system
[0190]
[0191] Among them, blockchain network nodes are divided into management nodes (CA), consensus nodes (VP), and data verification nodes (DVP).
[0192] The front-end database is responsible for user management and personal trajectory result caching. When a user needs his or her personal trajectory, he or she first registers with the front-end database and then initiates a personal trajectory generation application. When the front-end database receives the application, it initiates a personal trajectory generation event to each consensus node in the network. After the blockchain network completes the personal trajectory generation, the first node that calculates the result sends the personal trajectory record to the front-end database. The front-end database caches the personal trajectory record, and the user can query his or her personal trajectory record in the front-end database system and download the personal trajectory record to the application module.
[0193] The application module is responsible for user personal registration, personal trajectory generation application, personal trajectory query, personal trajectory verification, and personal trajectory offline verification. The application module allows users to register as personal trajectory system users in the front-end database. The application module allows users to initiate personal trajectory generation applications to the front-end database. The application module allows users to query cached personal trajectory records in the front-end database. The application module allows users to initiate personal trajectory verification applications to the front-end database. The application module allows users to verify personal trajectory verification when they are offline or the other party is not a personal trajectory retrieval system node.
[0194] The blockchain network is connected to the front-end database. The front-end database is connected to the application module. The front-end database is connected to the personal trajectory query module.
[0195] When the user initiates a request to generate a trajectory in the application module, the trajectory acquisition request is sent to the front-end database based on the hypertext transfer protocol secure (https). The front-end database determines whether the user initiates a free trajectory retrieval or a paid trajectory retrieval. If it is a free trajectory retrieval, the database cache is queried to see whether the user's personal trajectory is cached. If it is a paid trajectory retrieval, the front-end database calls the personal trajectory query module to query whether the user has a retrieval package. If the user has a retrieval package, the retrieval package will be charged. If the user does not have a retrieval package, the number of personal trajectories will be charged. After the front-end database completes the above checks and passes, it sends the request to the blockchain network for personal trajectory generation. After the personal trajectory is generated, the blockchain network sends the results to the front-end database, the front-end database caches the results in the database, and sends a personal trajectory generation notification to the application module.
[0196] Among them, the electronic records of user activity information are shared through back-end data such as banks, securities companies, insurance companies and large public utilities, and the blockchain network is used to form personal tracks. Through the consensus mechanism of the blockchain, the consensus results have a certain credibility, so that the banks, securities companies, insurance companies and large public utilities participating in the consensus recognize the personal track results generated by the personal track retrieval system. Finally, the problem of needing to prove one's whereabouts is solved.
[0197] In one embodiment, the front-end database may include a network request sending unit, a network request receiving unit, and a personal trajectory caching unit. The front-end database is responsible for the communication between the regional data merging module, the application module, and the personal trajectory query module, and is used for the block consensus result transmission and the cache consensus result function. Each personal trajectory request forwarding and personal trajectory result caching can be completed by the front-end database.
[0198] The request sent by the request sending unit is encrypted using the TLS 1.3 standard. The request sending format is as follows:
[0199] Sending format:
[0200]
[0201]
[0202] Return format:
[0203] {
[0204] status:ok
[0205] }
[0206] The receiving unit is requested to decrypt and unpack the received data using the TLS 1.3 standard.
[0207] When the personal trajectory cache unit receives the personal trajectory result, it caches the personal trajectory result. When the personal trajectory cache unit receives the personal trajectory result from the blockchain network unit, it checks whether the returned result is valid, and the blockchain network stores the personal trajectory file in the system at the same time.
[0208] The format of the personal trajectory result returned by the blockchain network module can be as follows:
[0209]
[0210] If the personal trajectory result is returned valid, the personal trajectory cache unit caches the result record in the database and notifies the application module that the personal trajectory has been generated. The application module can download the specific personal trajectory file through the personal trajectory generation record in the database by sending a personal trajectory query request to the front database.
[0211] Regarding the application module, the application module may include a network request sending unit, a network request receiving unit, a personal trajectory caching unit and a user interaction interface. The application module is responsible for the user-oriented operation functions in the system. The application module enables individual users to conveniently use enterprise-level data services.
[0212] The network request sending unit uses TLS 1.3 standard to encrypt the request sent. The request sending format is as follows:
[0213] Sending format:
[0214]
[0215] The receiving unit is requested to decrypt and unpack the received data using the TLS 1.3 standard.
[0216] The personal track cache unit is responsible for caching the personal track file downloaded from the front-end database. When the front-end database notifies the application module that the personal track has been generated, the front-end database sends a personal track request to the application module. The request format can be as follows:
[0217] The format of the personal trajectory result returned by the front-end database to the application module can be as follows:
[0218]
[0219] When the application module receives the request for completing the generation of the personal trajectory result, it unpacks the message through the request receiving unit and reads the personal trajectory result number (personalResultNo) in the message. After reading successfully, the application module sends the download of the personal trajectory file to the front database through the network request sending unit and downloads it to the path preset by the personal terminal.
[0220] The user interaction interface is responsible for displaying the personal application function interface, parsing the personal trajectory file and displaying the trajectory therein. When the user needs to register, generate personal trajectory, query personal trajectory, display personal trajectory and verify personal trajectory, they can complete the required operations through the application module and interface operation. When the user needs to display the personal trajectory, it is combined with the global longitude and latitude, and displayed in chronological order from the start date of the file record to the end date of the file record. When each point in the file is parsed onto the map, for example, using the ECHART component to display, the personal trajectory can be displayed in the user interaction interface unit.
[0221] Regarding the personal trajectory query module, it can include a network request sending unit, a network request receiving unit, a personal authority management unit and a authority storage unit. The personal trajectory query module is mainly responsible for the user's management of personal trajectory records and query permissions in the system. The individual's permissions to each node can be managed in the personal authority management unit. The permissions of each node participating in the calculation of the trajectory will be stored in the permission unit.
[0222] When sending a request, the network request sending unit uses TLS 1.3 standard to encrypt the request.
[0223] The network request receiving unit receives the request replies sent by other modules and decrypts and unpacks the received data using the TLS 1.3 standard.
[0224] The personal package management unit is responsible for managing the authority of individuals in the system to each node.
[0225] Table 4 Storage structure of personal query permission type
[0226]
[0227] The permission storage unit is responsible for storing the query permissions of individuals on each node. Before using the system to generate personal trajectory records, individual users send a generation request to the front-end database through personal applications. The front-end database forwards the generation request to the personal trajectory query module, and the personal trajectory query module processes the permission query of each node by the permission unit. After the node permission query, the blockchain trajectory generation interface is called. When each node receives a broadcast request for record query, it first parses the permission field in the request. The node queries the corresponding personal biological usage record according to the permission of this request.
[0228] The regional data merging module is provided by each enterprise or public utility unit involved in calculating personal trajectories. Each time a personal request is made, the network management node randomly selects a node of the regional data merging module. The regional data merging module may include a network request sending unit, a network request receiving unit, a request parsing unit, and a data merging unit. The regional data merging module is mainly responsible for querying the records of the user's personal trajectory in the system and merging and verifying the trajectory data of each region.
[0229] Among them, the network request sending unit is responsible for sending requests to the front-end database and blockchain network module when communicating with the front-end database. TLS 1.3 standard is used for encryption when sending requests.
[0230] The network request receiving unit receives the request replies sent by other modules and decrypts and unpacks the received request replies using the TLS1.3 standard.
[0231] The request parsing unit is responsible for receiving the merge request sent by the personal module and parsing the merge request sent. After the request parsing is completed, the network request sending unit obtains the personal regional trajectory data from other regional trajectory query systems.
[0232] The data screening unit is responsible for receiving the personal area trajectory data returned by other areas and checking whether there are conflicting trajectory points in other areas with this area. If no conflicting trajectory points are found, the trajectory data is unpacked and arranged in chronological order. During the arrangement process, the generated personal trajectory is judged according to the logical judgment process of the personal trajectory retrieval system to determine whether it is credible. The result is returned to the personal module through the network request sending unit.
[0233] Another aspect of the present disclosure provides a trajectory determination system.
[0234] Fig.14 A block diagram of a trajectory determination system according to an embodiment of the present disclosure is schematically shown.
[0235] like Fig.14 As shown, the trajectory determination system may include: a data exchange network and at least two blockchain networks. The data exchange network is communicatively connected to the at least two blockchain networks respectively, and the data exchange network includes a client and a server end of the communication connection.
[0236] The client sends a track acquisition request to the server, and the track acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range.
[0237] In response to the trajectory acquisition request, the server side obtains sub-trajectory information sets that match the user identifier and the query condition from at least two blockchain networks, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier.
[0238] The server merges and sorts each sub-trajectory information in one or more sub-trajectory information sets based on the time information to obtain a trajectory information set.
[0239] The server sends the associated information of the trajectory information set to the client.
[0240] The client displays the associated information of the trajectory information set.
[0241] It should be noted that the implementation methods, technical problems solved, functions realized, and technical effects achieved of each module / unit in some embodiments of the device and system are the same or similar to the implementation methods, technical problems solved, functions realized, and technical effects achieved of each corresponding step in some embodiments of the method, and will not be repeated here.
[0242] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0243] For example, any multiple of the request receiving module 1110, the sub-trajectory acquisition module 1120, the trajectory acquisition module 1130, and the trajectory sending module 1140 can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the request receiving module 1110, the sub-trajectory acquisition module 1120, the trajectory acquisition module 1130, and the trajectory sending module 1140 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the request receiving module 1110 , the sub-trajectory obtaining module 1120 , the trajectory obtaining module 1130 , and the trajectory sending module 1140 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0244] Fig.15 A block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. Fig.15 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0245] like Fig.15As shown, the electronic device 1500 according to an embodiment of the present disclosure includes a processor 1501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1502 or a program loaded from a storage part 1508 into a random access memory (RAM) 1503. The processor 1501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1501 may also include an onboard memory for caching purposes. The processor 1501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0246] In RAM 1503, various programs and data required for the operation of system 1500 are stored. Processor 1501, ROM 1502, and RAM 1503 are connected to each other via bus 1504. Processor 1501 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1502 and / or RAM 1503. It should be noted that the program can also be stored in one or more memories other than ROM 1502 and RAM 1503. Processor 1501 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0247] According to an embodiment of the present disclosure, the system 1500 may further include an input / output (I / O) interface 1505, which is also connected to the bus 1504. The system 1500 may further include one or more of the following components connected to the I / O interface 1505: an input section 1506 including a keyboard, a mouse, etc.; an output section 1507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1508 including a hard disk, etc.; and a communication section 1509 including a network interface card such as a LAN card, a modem, etc. The communication section 1509 performs communication processing via a network such as the Internet. A drive 1510 is also connected to the I / O interface 1505 as needed. A removable medium 1511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1510 as needed, so that a computer program read therefrom is installed into the storage section 1508 as needed.
[0248] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1509, and / or installed from the removable medium 1511. When the computer program is executed by the processor 1501, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0249] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0250] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, which contains a program code for executing the method provided by the embodiment of the present disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the blockchain-based trajectory determination method provided by the embodiment of the present disclosure.
[0251] According to the embodiments of the present disclosure, the program code for executing the computer program provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, Python, "C" language, or similar programming languages.
[0252] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0253] It will be appreciated by those skilled in the art that, although the present disclosure has been shown and described with reference to specific exemplary embodiments of the present disclosure, it will be appreciated by those skilled in the art that, without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents, various changes in form and detail may be made to the present disclosure. Therefore, the scope of the present disclosure should not be limited to the above-described embodiments, but should be determined not only by the appended claims, but also by the equivalents of the appended claims.
Claims
1. A blockchain-based trajectory determination method executed by a server, wherein the server serves as a node of a data exchange network, wherein the data exchange network is respectively connected to at least two blockchain networks in communication, wherein the server comprises a front-end database server, a personal trajectory query server and a regional data merging server, wherein the front-end database server is respectively connected to a client, the personal trajectory query server and the regional data merging server, wherein the front-end database server is used to transmit the trajectory information set and cache the trajectory information set, wherein the personal trajectory query server is used to maintain trajectory information, and maintain the correspondence between user identification and query authority, wherein the method comprises: Receiving a trajectory acquisition request from a client, the trajectory acquisition request including a user identifier and a query condition, the query condition including at least one of the following: a time range and a geographical range; In response to the trajectory acquisition request, respectively acquiring, from the at least two blockchain networks, sub-trajectory information sets that match the user identifier and the query condition, each sub-trajectory information in the sub-trajectory information set having a trajectory information identifier including time information; Based on the time information, each sub-trajectory information in one or more sub-trajectory information sets is merged and sorted to obtain a trajectory information set; as well as The associated information of the trajectory information set is sent to the client so that the client displays the associated information of the trajectory information set.
2. The method according to claim 1, wherein: The trajectory information identifier includes: a timestamp and at least one of the following: an area identifier, a blockchain network identifier, a positive digit, a self-increment digit, and a data center.
3. The method according to claim 1, wherein: Each blockchain network and the data exchange network have at least one common node, and the common node has a first read and write permission for the data exchange network and a second read and write permission for the blockchain network where the common node is located.
4. The method according to claim 1, further comprising: After receiving the trajectory acquisition request from the client, Determine a query permission corresponding to the user identifier, wherein the query permission includes a cache data query permission and a blockchain query permission, wherein the query permission is related to a payment mode; The obtaining, from the at least two blockchain networks, a sub-track information set matching the user identifier and the query condition includes: If the query permission corresponding to the user identifier is a cache data query permission, obtaining a sub-track information set matching the user identifier and the query condition from the cache; and If the query permission corresponding to the user identifier is a blockchain query permission, a sub-track information set matching the user identifier and the query condition is obtained from at least part of the at least two blockchain networks.
5. The method according to claim 1, wherein: The blockchain maintained by the blockchain network stores a sub-track information set, where the sub-track information set is generated based on user activity information acquired by the blockchain network node, where the user activity information includes a user identifier, time information, and region information.
6. The method according to claim 1, further comprising: In the process of sorting the sub-trajectory information in the one or more sub-trajectory information sets, sub-trajectory information that conflicts with each other and has low confidence is removed.
7. The method according to claim 1, wherein: The step of sorting each sub-track information in one or more sub-track information sets comprises: Based on the start time and the end time of the time range, filter the trajectory information to be processed at a specified time interval; and The trajectory information to be processed is sorted based on time information included in the trajectory information identifier of the trajectory information to be processed.
8. The method according to any one of claims 1 to 7, further comprising: After sending the associated information of the trajectory information set to the client, receiving a trajectory verification request from the client, the trajectory verification request including trajectory information to be verified, and the client being in an online state; Comparing the trajectory information to be verified with the trajectory information stored in the blockchain maintained by the blockchain network to obtain a first comparison result; as well as The first comparison result is sent to the client so that the client displays the first comparison result.
9. The method according to any one of claims 1 to 7, further comprising: After sending the associated information of the trajectory information set to the client, Receiving encrypted trajectory information from the client based on the Bluetooth protocol, where the client is in an offline state; Sending the encrypted trajectory information to the blockchain network so that the blockchain network decrypts the encrypted trajectory information using a private key to obtain the decrypted trajectory information; Comparing the decrypted trajectory information with the trajectory information stored in the blockchain maintained by the blockchain network to obtain a second comparison result; as well as The second comparison result is sent to the client so that the client displays the second comparison result.
10. A blockchain-based trajectory determination method executed by a client, wherein the client and the server serve as nodes of a data exchange network, the data exchange network is respectively connected to at least two blockchain networks, the server comprises a front-end database server, a personal trajectory query server and a regional data merging server, the front-end database server is respectively connected to the client, the personal trajectory query server and the regional data merging server, the front-end database server is used to transmit the trajectory information set and cache the trajectory information set, the personal trajectory query server is used to maintain trajectory information, and maintain the correspondence between user identification and query authority, the method comprises: Sending a track acquisition request to the server, wherein the track acquisition request includes a user identifier and a query condition, wherein the query condition includes at least one of the following: a time range and a geographical range; as well as receiving the associated information of the track information set from the server, and displaying the associated information of the track information set; wherein, The trajectory information set is a sub-trajectory information set matching the user identifier and the query condition, respectively obtained by the server side from the at least two blockchain networks in response to the trajectory acquisition request, and a trajectory information set obtained by sorting each sub-trajectory information in one or more of the sub-trajectory information sets, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier.
11. The method according to claim 10, wherein: The associated information between the trajectory acquisition request and the trajectory information set is encrypted.
12. A trajectory determination device, arranged on a server side, the server side serves as a node of a data exchange network, the data exchange network is respectively connected to at least two blockchain networks in communication, the server side comprises a front-end database server side, a personal trajectory query server side and a regional data merging server side, the front-end database server side is respectively connected to the client side, the personal trajectory query server side and the regional data merging server side, the front-end database server side is used to transmit the trajectory information set and cache the trajectory information set, the personal trajectory query server side is used to maintain trajectory information, and maintain the correspondence between user identification and query authority, the device comprises: A request receiving module, configured to receive a trajectory acquisition request from a client, wherein the trajectory acquisition request includes a user identifier and a query condition, wherein the query condition includes at least one of the following: a time range and a geographical range; a sub-trajectory acquisition module, configured to, in response to the trajectory acquisition request, respectively acquire a sub-trajectory information set matching the user identifier and the query condition from the at least two blockchain networks, wherein each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier including time information; A trajectory acquisition module, configured to merge and sort each sub-trajectory information in one or more sub-trajectory information sets based on the time information to obtain a trajectory information set; as well as The track sending module sends the associated information of the track information set to the client so that the client displays the associated information of the track information set.
13. A trajectory determination device, arranged at a client, wherein the client and the server serve as nodes of a data exchange network, wherein the data exchange network is respectively connected to at least two blockchain networks in communication, wherein the server comprises a front-end database server, a personal trajectory query server and a regional data merging server, wherein the front-end database server is respectively connected to the client, the personal trajectory query server and the regional data merging server, wherein the front-end database server is used to transmit the trajectory information set and cache the trajectory information set, wherein the personal trajectory query server is used to maintain the trajectory information, and maintain the correspondence between the user identification and the query authority, wherein the device comprises: a request sending module, configured to send a track acquisition request to the server, wherein the track acquisition request includes a user identifier and a query condition, wherein the query condition includes at least one of the following: a time range and a geographical range; and A trajectory receiving module is used to receive the associated information of the trajectory information set from the server side and display the associated information of the trajectory information set; wherein the trajectory information set is a sub-trajectory information set matching the user identifier and the query condition obtained by the server side from the at least two blockchain networks in response to the trajectory acquisition request, and the trajectory information set is obtained by sorting each sub-trajectory information in one or more sub-trajectory information sets, and each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier.
14. A trajectory query system, in which the server side serves as a node of a data exchange network, and the data exchange network is respectively connected to at least two blockchain networks in communication, comprising: A blockchain network, used for maintaining a blockchain, wherein the blockchain includes a sub-track information set, wherein each sub-track information in the sub-track information set is generated based on user activity information; An application module is used to send a trajectory acquisition request to a front-end database, and receive associated information of a trajectory information set corresponding to the trajectory acquisition request, wherein the trajectory acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range; Personal track query module, used to store the correspondence between user identification and query authority; a front-end database, configured to obtain, in response to the trajectory acquisition request, a query authority corresponding to the user identifier from the personal trajectory query module, generate a sub-trajectory request based on the trajectory acquisition request and the query authority, and cache a sub-trajectory information set corresponding to the sub-trajectory request; as well as The regional data merging module is used to merge and sort the sub-trajectory information sets corresponding to the sub-trajectory requests to generate associated information of the trajectory information set corresponding to the trajectory acquisition request.
15. A trajectory determination system comprising: A data exchange network and at least two blockchain networks, wherein the data exchange network is communicatively connected to the at least two blockchain networks respectively, and the data exchange network includes a client and a server end that are communicatively connected; The server end includes a front-end database server end, a personal trajectory query server end and a regional data merging server end, wherein the front-end database server end is connected to the client end, the personal trajectory query server end and the regional data merging server end respectively, the front-end database server end is used to transmit the trajectory information set and cache the trajectory information set, and the personal trajectory query server end is used to maintain the trajectory information and maintain the corresponding relationship between the user identification and the query authority; The client sends a trajectory acquisition request to the server, wherein the trajectory acquisition request includes a user identifier and a query condition, and the query condition includes at least one of the following: a time range and a geographical range; The server side, in response to the trajectory acquisition request, respectively acquires sub-trajectory information sets matching the user identifier and the query condition from the at least two blockchain networks, wherein each sub-trajectory information in the sub-trajectory information set has a trajectory information identifier; The server merges and sorts each sub-trajectory information in one or more sub-trajectory information sets based on time information in the trajectory information identifier to obtain a trajectory information set; The server sends the associated information of the trajectory information set to the client; and The client displays the associated information of the trajectory information set.
16. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, is used to implement the blockchain-based trajectory determination method executed by the server as described in any one of claims 1 to 9, or to implement the blockchain-based trajectory determination method executed by the client as described in claim 10 or 11.
