CN112988878B - Regional thermodynamic diagram processing method and device based on block chain and computer equipment - Google Patents

Regional thermodynamic diagram processing method and device based on block chain and computer equipment Download PDF

Info

Publication number
CN112988878B
CN112988878B CN202110490286.6A CN202110490286A CN112988878B CN 112988878 B CN112988878 B CN 112988878B CN 202110490286 A CN202110490286 A CN 202110490286A CN 112988878 B CN112988878 B CN 112988878B
Authority
CN
China
Prior art keywords
node
terminal
consensus
reporting
thermodynamic diagram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110490286.6A
Other languages
Chinese (zh)
Other versions
CN112988878A (en
Inventor
娄帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110490286.6A priority Critical patent/CN112988878B/en
Publication of CN112988878A publication Critical patent/CN112988878A/en
Application granted granted Critical
Publication of CN112988878B publication Critical patent/CN112988878B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Remote Sensing (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to a block chain-based regional thermodynamic diagram processing method and device, computer equipment and a storage medium. The method comprises the following steps: when the terminal enters the target geo-fence, the terminal is used as a node to be added into a block chain network corresponding to the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain the online state through heartbeat packets issued by the consensus nodes periodically and step by step; under the condition that the terminal is a reporting node serving as a leaf node and is in an online state, triggering step-by-step reporting of node information until a consensus node is reported; the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node. The applicable fields of the scheme include but are not limited to the fields of maps, regional planning, smart cities, smart traffic, and the like.

Description

Regional thermodynamic diagram processing method and device based on block chain and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a block chain-based regional thermodynamic diagram processing method and apparatus, a computer device, and a storage medium, and a regional thermodynamic diagram display method and apparatus, a computer device, and a storage medium.
Background
With the development of computer technology, thermodynamic diagrams for representing the density of each position point in a map by visualizing through a density function are more and more widely applied, such as people flow in an area can be visually represented through the thermodynamic diagrams of the area so as to carry out route planning. In generating the thermodynamic diagram, generally, the location data of each terminal in the area is acquired, for example, each terminal in the area is located by the mobile base station, and then the corresponding thermodynamic diagram is generated based on the acquired location data.
However, the frequency of acquiring the position data of each terminal is low, and the position of each terminal in the area changes rapidly, resulting in a delay in the acquired position data, so that the real-time performance of the thermodynamic diagram processed according to the acquired position data is low.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a block chain-based regional thermodynamic diagram processing method, an apparatus, a computer device, and a storage medium capable of improving the real-time performance of a regional thermodynamic diagram, and a regional thermodynamic diagram display method, an apparatus, a computer device, and a storage medium.
A block chain based regional thermodynamic diagram processing method, the method comprising:
when the terminal enters the target geo-fence, the terminal is used as a node to be added into a block chain network corresponding to the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain the online state through heartbeat packets issued by the consensus nodes periodically and step by step;
under the condition that the terminal is a reporting node serving as a leaf node and is in an online state, triggering step-by-step reporting of node information until a consensus node is reported; the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes:
and under the condition that the child node of the terminal is positioned outside the target geographic fence and the child node of the terminal is in an off-line state, triggering and stopping issuing the heartbeat packet which is periodically and step by step issued by the consensus node to the child node.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes:
and under the condition that the father node of the terminal is positioned outside the target geographical fence and the father node of the terminal is in an off-line state, triggering a heartbeat packet which is periodically and gradually issued according to the received common node, and updating the node relation of the terminal as the node in the block chain network.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes:
under the condition that the terminal enters a target geographic fence and the terminal fails to join a block chain network as a node, triggering to send the geographic position of the terminal to a server;
and the terminal geographic position is used for indicating the server to update the regional thermodynamic diagrams obtained by the statistics of the consensus node based on the terminal geographic position so as to obtain the updated regional thermodynamic diagrams.
In one embodiment, the node information includes a geographic position ciphertext obtained by symmetrically encrypting the geographic position of the first reporting node reported at each stage, and a key ciphertext obtained by asymmetrically encrypting a key corresponding to the geographic position ciphertext;
triggering the slave terminal to serve as the node information reported step by the first reporting node corresponding to the consensus node, and extracting to obtain the first geographical position of the first reporting node, wherein the method comprises the following steps:
decrypting the key ciphertext based on a private key corresponding to the key ciphertext to obtain a key corresponding to the geographic position ciphertext;
and decrypting the geographic position ciphertext through the key to obtain the first geographic position of the first reporting node.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes:
under the condition that the terminal is a consensus node in a block chain network, triggering to send the area thermodynamic diagram obtained through statistics to a server; the regional thermodynamic diagrams are used for instructing the server to send the regional thermodynamic diagrams to the display end for displaying.
A block chain based regional thermodynamic diagram processing apparatus, the apparatus comprising:
the node adding module is used for adding the terminal serving as a node into a block chain network corresponding to the target geo-fence after the terminal enters the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain the online state through heartbeat packets issued by the consensus nodes periodically and step by step;
the position reporting module is used for triggering the step-by-step reporting node information until reporting to the consensus node under the condition that the terminal is a reporting node serving as a leaf node and is in an online state; the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
when the terminal enters the target geo-fence, the terminal is used as a node to be added into a block chain network corresponding to the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain the online state through heartbeat packets issued by the consensus nodes periodically and step by step;
under the condition that the terminal is a reporting node serving as a leaf node and is in an online state, triggering step-by-step reporting of node information until a consensus node is reported; the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
when the terminal enters the target geo-fence, the terminal is used as a node to be added into a block chain network corresponding to the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain the online state through heartbeat packets issued by the consensus nodes periodically and step by step;
under the condition that the terminal is a reporting node serving as a leaf node and is in an online state, triggering step-by-step reporting of node information until a consensus node is reported; the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node.
According to the regional thermodynamic diagram processing method and device based on the block chain, the terminal is used as a node to join the corresponding block chain network after entering the target geographic fence, the terminal is used as a reporting node of a leaf node, and when the terminal is maintained in an online state through heartbeat packets issued by the consensus nodes in the block chain network step by step periodically, the step-by-step reporting node information is triggered until the node information is reported to the consensus nodes, so that the consensus nodes obtain the regional thermodynamic diagram according to the geographical position statistics of the reporting nodes reported by each step in the obtained node information. In the regional thermodynamic diagram processing process, a terminal in a target geographic fence is used as a node to join a block chain network, heartbeat packets are issued step by step through a consensus node to maintain an online state, a reporting node used as a leaf node triggers step by step reporting of geographic positions until the consensus node, the consensus node is instructed to count to obtain the regional thermodynamic diagram, the geographic positions are reported step by step through the reporting node of the block chain network corresponding to the constructed target geographic fence, the consensus node carries out regional thermodynamic diagram processing, the delay of acquiring geographic position data can be reduced, and the real-time performance of the regional thermodynamic diagram is improved.
A method of regional thermodynamic diagram display, the method comprising:
displaying a map page of an electronic map;
entering a thermodynamic diagram display mode in response to a thermodynamic diagram display trigger operation for the target geofence;
in an thermodynamic diagram display mode, displaying a dynamically updated regional thermodynamic diagram corresponding to a target geofence within a map region marked with the target geofence in a map page;
the regional thermodynamic diagram is obtained by counting the geographic position reported by the node in the online state in the block chain network corresponding to the target geographic fence through a consensus mechanism of the block chain network, wherein the node comprises a terminal which enters the target geographic fence and maintains the online state in the block chain network through a heartbeat packet.
In one embodiment, displaying the dynamically updated regional thermodynamic diagram corresponding to the target geofence comprises:
representing the thermodynamic density in the dynamically updated regional thermodynamic diagram corresponding to the target geofence by different marker colors;
the regional thermodynamic diagram display method further comprises the following steps:
in response to the zooming operation triggered by the regional thermodynamic diagrams, displaying the regional thermodynamic diagrams subjected to zooming processing on the regional thermodynamic diagrams through the zooming operation;
the thermal density in the scaled regional thermodynamic diagram is represented by the updated marker color.
An area thermodynamic diagram display device, the device comprising:
the map page display module is used for displaying a map page of the electronic map;
a thermodynamic diagram mode response module for entering a thermodynamic diagram display mode in response to a thermodynamic diagram display trigger operation for the target geofence;
the map display module is used for displaying a dynamically updated regional thermodynamic diagram corresponding to a target geo-fence in a map region marked with the target geo-fence in a map page in a thermodynamic diagram display mode;
the regional thermodynamic diagram is obtained by counting the geographic position reported by the node in the online state in the block chain network corresponding to the target geographic fence through a consensus mechanism of the block chain network, wherein the node comprises a terminal which enters the target geographic fence and maintains the online state in the block chain network through a heartbeat packet.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
displaying a map page of an electronic map;
entering a thermodynamic diagram display mode in response to a thermodynamic diagram display trigger operation for the target geofence;
in an thermodynamic diagram display mode, displaying a dynamically updated regional thermodynamic diagram corresponding to a target geofence within a map region marked with the target geofence in a map page;
the regional thermodynamic diagram is obtained by counting the geographic position reported by the node in the online state in the block chain network corresponding to the target geographic fence through a consensus mechanism of the block chain network, wherein the node comprises a terminal which enters the target geographic fence and maintains the online state in the block chain network through a heartbeat packet.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
displaying a map page of an electronic map;
entering a thermodynamic diagram display mode in response to a thermodynamic diagram display trigger operation for the target geofence;
in an thermodynamic diagram display mode, displaying a dynamically updated regional thermodynamic diagram corresponding to a target geofence within a map region marked with the target geofence in a map page;
the regional thermodynamic diagram is obtained by counting the geographic position reported by the node in the online state in the block chain network corresponding to the target geographic fence through a consensus mechanism of the block chain network, wherein the node comprises a terminal which enters the target geographic fence and maintains the online state in the block chain network through a heartbeat packet.
According to the regional thermodynamic diagram display method, the device, the computer equipment and the storage medium, in response to thermodynamic diagram display triggering operation aiming at the target geographic fence, in a map region where the target geographic fence is marked in a map page in a mode of displaying the thermodynamic diagram corresponding to an electronic map, dynamically updated regional thermodynamic diagrams corresponding to the target geographic fence are displayed, and the regional thermodynamic diagrams are obtained by geographic position statistics reported by a node which maintains an online state through a heartbeat packet in a block chain network corresponding to the target geographic fence based on a consensus mechanism of the block chain network, so that the delay of geographic position data corresponding to the regional thermodynamic diagrams is low, and the real-time performance of the displayed regional thermodynamic diagrams is improved.
Drawings
FIG. 1 is a diagram of an application environment of a block chain-based regional thermodynamic diagram processing method in one embodiment;
FIG. 2 is a flow diagram illustrating a block chain based regional thermodynamic diagram processing method in one embodiment;
fig. 3 is a diagram illustrating a terminal joining a blockchain network according to an embodiment;
fig. 4 is a schematic diagram illustrating a terminal reporting node information step by step in another embodiment;
fig. 5 is a schematic diagram illustrating a terminal receiving node information reported stage by stage in one embodiment;
FIG. 6 is a flow diagram illustrating a process for obtaining a geographic location in one embodiment;
FIG. 7 is a flow chart illustrating a method for displaying a regional thermodynamic diagram in one embodiment;
FIG. 8 is an interface schematic of a park area thermodynamic diagram in one embodiment;
FIG. 9 is a schematic diagram illustrating interface changes in a thermodynamic diagram of regions before and after a zoom process in one embodiment;
FIG. 10 is a diagram illustrating an application environment of a block chain-based regional thermodynamic diagram processing method according to another embodiment;
FIG. 11 is a flowchart illustrating a block chain-based regional thermodynamic diagram processing method according to the embodiment of FIG. 10;
FIG. 12 is a schematic interface diagram of a regional thermodynamic diagram in one embodiment;
FIG. 13 is a block diagram of a block chain-based regional thermodynamic diagram processing apparatus in one embodiment;
FIG. 14 is a block diagram of the structure of a regional thermodynamic diagram showing device in one embodiment;
FIG. 15 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The regional thermodynamic diagram processing method based on the block chain can be applied to the application environment shown in fig. 1. The nodes in the blockchain network include at least one level of reporting node 104 and a consensus node 106 serving as an ancestor node of the reporting node 104, and the reporting node 104 maintains an online state through heartbeat packets issued periodically and step by the consensus node 106; the consensus node 106 communicates with the server 108 through a network, and the report node 104 and the terminal 102 may also communicate with the server 108 through the network. After the terminal 102 enters the target geo-fence, the terminal is used as a node to join a corresponding block chain network, when the terminal 102 is a reporting node 104 used as a leaf node and maintains an online state through heartbeat packets issued periodically and step by a common node 106 in the block chain network, step by step reporting node information is triggered until the node information is reported to the common node 106, and a regional thermodynamic diagram is obtained by the common node 106 according to the geographical position statistics of the reporting node 104 reported by each step in the obtained node information. The area thermodynamic diagrams calculated by the consensus node 106 may be sent to the server 108, and the terminal 102 and the report node 104 may display the area thermodynamic diagrams acquired by the server 108.
The regional thermodynamic diagram display method provided by the application can be applied to the application environment shown in fig. 1. The terminal 102 may respond to the thermodynamic diagram display triggering operation for the target geo-fence, and in a map area where the target geo-fence is marked in a map page in a mode of displaying the thermodynamic diagram corresponding to the electronic map, display a dynamically updated regional thermodynamic diagram corresponding to the target geo-fence, where the regional thermodynamic diagram is obtained by requesting, by the terminal 102, from the server 108, and the regional thermodynamic diagram is obtained by geographic location statistics reported by a node that maintains an online state through a heartbeat packet in a block chain network corresponding to the target geo-fence based on a consensus mechanism of the block chain network.
The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, vehicle-mounted devices, and portable wearable devices; the reporting node 102 and the consensus node 106 may be any form of computer equipment in an access block chain network, such as various personal computers, notebook computers, smart phones, tablet computers, vehicle-mounted equipment, portable wearable equipment and other terminal equipment or servers; the server 108 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
The regional thermodynamic diagram processing method relates to a block chain technology, and the block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
The platform product service layer provides basic capability and an implementation framework of typical application, and developers can complete block chain implementation of business logic based on the basic capability and the characteristics of the superposed business. The application service layer provides the application service based on the block chain scheme for the business participants to use.
In one embodiment, as shown in fig. 2, a block chain-based regional thermodynamic diagram processing method is provided, which is described by taking the method as an example for being applied to the terminal in fig. 1, and includes the following steps:
step 202, when the terminal enters a target geo-fence, the terminal is used as a node to be added into a block chain network corresponding to the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain the online state through heartbeat packets issued by the consensus nodes step by step at regular intervals.
The thermodynamic diagram is a visual type for expressing the strength and distribution trend of data, and can be applied to population density analysis, activity analysis and the like. For example, a population distribution of a city may be analyzed for a city thermodynamic diagram, which may label population densities by different colors, with darker colors indicating higher population traffic. The regional thermodynamic diagram is a thermodynamic diagram obtained by counting the crowd flow of a certain region, and is used for analyzing the crowd distribution in the region.
The target geo-fence refers to an area where statistics of a corresponding thermodynamic diagram is needed, and specifically may be various different scene areas such as a scenic spot, a market, a school, a hospital, an airport, or a station. The target geofences are set according to actual needs, and the corresponding target geofences are determined according to the areas where the crowd density needs to be analyzed. After the target geo-fence is determined, a blockchain network corresponding to the target geo-fence is constructed, and nodes in the blockchain network may be computer devices whose positions are in the target geo-fence, such as terminal devices in the target geo-fence.
The nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, the reporting nodes can report the geographical positions to the upper level of nodes, namely father nodes step by step, until the geographical positions are reported to the consensus nodes, and the consensus nodes can obtain the regional thermodynamic diagram through statistics according to the geographical positions of the reporting nodes at all levels. In the block chain network, a father node sends a heartbeat packet to a child node, and the child node reports the geographical position to the father node, so that the father-child relationship among the nodes can be established according to the receiving-transmitting relationship of the heartbeat packet. The reporting node maintains an online state through heartbeat packets issued by the consensus node step by step periodically, so that the reporting node in the block chain network can be ensured to report the geographic position. In specific implementation, the consensus node can enable the device receiving the heartbeat packet to be added into the block chain network as a node by broadcasting the heartbeat packet within the range of the target geo-fence, and continue to broadcast the heartbeat packet, so that the diffusion of the heartbeat packet in the target geo-fence is realized, and each node forms a topological structure which maintains an online state through the heartbeat packets periodically and gradually issued by the consensus node. In a specific application, each node in the block chain network may form a DAG (Directed Acyclic Graph) topology structure according to the sending and receiving relationship of the heartbeat packet, so as to implement management of each node in the block chain network.
Specifically, in the moving process of the terminal, if the terminal enters the target geo-fence, the terminal is used as computer equipment within the range of the target geo-fence, and when the terminal needs to be added into statistics in the process of counting the regional thermodynamic diagram of the target geo-fence, the terminal is triggered to be added into a block chain network corresponding to the target geo-fence as a node, so that the terminal is accessed into the block chain network, and the geographical position is reported through each node in the block chain network, thereby realizing the regional thermodynamic diagram processing of the target geo-fence. In a specific application, as shown in fig. 3, a block chain network corresponding to a target geo-fence includes a consensus node A, B and C, a child node of the consensus node a includes 3-level reporting nodes a1, a2 and a3, a child node of the consensus node B includes 1-level reporting node B1, a child node of the consensus node C includes 1-level reporting node C1, and the consensus nodes A, B and C maintain online states of the corresponding reporting nodes by periodically issuing heartbeat packets step by step, respectively. When the terminal S enters the target geo-fence, the terminal S is added to the block chain network corresponding to the target geo-fence as a node, and if the terminal S is added to the block chain network as a child node of the reporting node a3, the terminal S may receive the heartbeat packet sent periodically step by the consensus node a from the reporting node a3 and maintain the online state.
Step 204, under the condition that the terminal is a reporting node as a leaf node and is in an online state, triggering step-by-step reporting node information until a consensus node is reported; the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node.
The leaf node refers to a reporting node at the last stage in the block chain network, that is, the leaf node does not have a corresponding child node, and the leaf node does not send a heartbeat packet which is periodically and gradually issued by the consensus node to other nodes. When all reporting nodes in the blockchain network can receive heartbeat packets sent by the consensus node step by step regularly, communication among the nodes in the blockchain network can be maintained, namely the reporting nodes are in an online state. The node information carries the geographical position of the reporting node reported at each level, and the geographical position can be a position coordinate of the reporting node corresponding to the computer equipment.
Specifically, when the terminal is a reporting node serving as a leaf node and is in an online state, the terminal triggers the gradual reporting of the node information until the node information is reported to the consensus node, specifically, the terminal can report the node information carrying the geographical position to a parent node, and after the parent node receives the node information, the geographical position of the parent node is added to the node information, and the updated node information is continuously reported to the parent node until the node information is reported to the consensus node. The consensus node may obtain an area thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node, for example, the thermodynamic distribution calculation may be performed on the geographical position in the node information, so as to obtain the area thermodynamic diagram corresponding to the target geo-fence. In specific implementation, each consensus node in the block chain network corresponding to the target geo-fence can perform consensus on the geographic position based on a consensus mechanism, so as to obtain position data of each node in the target geo-fence, and further calculate to obtain an area thermodynamic diagram corresponding to the target geo-fence.
The reporting nodes which are in an online state and serve as leaf nodes in the block chain network trigger step-by-step reporting of the node information until the reporting nodes report the node information to the consensus node, so that the consensus node obtains the node information carrying the geographical position of the reporting node reported at each step, the consensus node obtains the regional thermodynamic diagram corresponding to the target geographic fence based on the geographical position statistics of each node, distributed processing of the thermodynamic diagrams can be achieved through the consensus node in the target geographic fence, the delay of geographical position collection of each node is low, and the real-time performance of regional thermodynamic diagram processing is improved.
In a specific application, as shown in fig. 4, when the terminal S is in an online state, the terminal S is used as a reporting node of a leaf node, and when the terminal S is in the online state, the reporting node information carrying the geographic position of the reporting node reported at each stage is triggered to be reported to the consensus node a, and the consensus nodes A, B and C can obtain the regional thermodynamic diagrams corresponding to the target geofence based on the consensus geographic position statistics, so that the regional thermodynamic diagrams of the target geofence are processed in real time.
In the block chain-based regional thermodynamic diagram processing method, after a terminal enters a target geographic fence, the terminal is used as a node to join a corresponding block chain network, the terminal is used as a reporting node of a leaf node, and when an online state is maintained through heartbeat packets issued by common identification nodes in the block chain network step by step periodically, step by step reporting node information is triggered until the common identification nodes are reported, so that the common identification nodes obtain the regional thermodynamic diagram according to the geographical position statistics of the reporting nodes reported by each step in the obtained node information. In the regional thermodynamic diagram processing process, a terminal in a target geographic fence is used as a node to join a block chain network, heartbeat packets are issued step by step through a consensus node to maintain an online state, a reporting node used as a leaf node triggers step by step reporting of geographic positions until the consensus node, the consensus node is instructed to count to obtain the regional thermodynamic diagram, the geographic positions are reported step by step through the reporting node of the block chain network corresponding to the constructed target geographic fence, the consensus node carries out regional thermodynamic diagram processing, the delay of acquiring geographic position data can be reduced, and the real-time performance of the regional thermodynamic diagram is improved.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: under the condition that the terminal is a consensus node in a block chain network and reporting nodes in the block chain network are in an online state, acquiring the geographical position of each level of reported reporting nodes in the node information reported by the reporting nodes in the block chain network step by step; and triggering the geographical position of the reporting node reported according to each level, and counting to obtain the regional thermodynamic diagram.
The terminal is added to a block chain network corresponding to the target geo-fence as a node, the node identity of the terminal can be a reporting node or a consensus node, and the node identity of the terminal can be updated according to a consensus node updating mechanism of the block chain network. When the terminal is used as a reporting node in the blockchain network, the terminal needs to report the node information step by step until the node information is reported to the consensus node, so that the consensus node performs regional thermodynamic diagram processing according to the obtained node information. When the terminal is used as a consensus node in a blockchain network, the terminal is required to maintain the online state of each reporting node by periodically issuing heartbeat packets step by step, and a corresponding regional thermodynamic diagram is obtained by carrying out statistics on the geographical position in the node information reported step by step according to the received reporting node.
Specifically, when the terminal is a consensus node in the blockchain network and the reporting nodes in the blockchain network are in an online state, it is indicated that each reporting node in the blockchain network can normally report node information, and the terminal needs to receive the reported node information to perform area thermodynamic diagram processing. The terminal obtains the geographical position of the reporting node reported by each level in the node information reported by the reporting nodes in the block chain network step by step, and specifically, the geographical position of the reporting node reported by each level can be extracted from the node information reported by step by the terminal. And the terminal carries out statistical processing according to the geographical position of the reporting node reported by each stage to obtain the regional thermodynamic diagram corresponding to the target geo-fence.
In specific implementation, the reported node information received by the terminal only includes the geographical position of each reported node using the terminal as an ancestor node, and the terminal needs to obtain the geographical positions in the node information of other consensus nodes in the block chain network based on a consensus mechanism, so as to obtain the geographical positions of all nodes in the target geo-fence, and obtain the regional thermodynamic diagram according to the geographical position statistics of all nodes in the target geo-fence. In addition, when each reporting node triggers the gradual reporting of the node information, each reporting node can encrypt the geographical position to obtain the node information, and report the node information obtained after the geographical position is encrypted step by step, and after the consensus node receives the node information, the node information is decrypted to obtain the geographical position corresponding to each reporting node so as to perform regional thermodynamic diagram processing.
In a specific application, as shown in fig. 5, the terminal S is used as a consensus node in a blockchain network corresponding to the target geofence, and the reporting node in the blockchain network is in an online state, the terminal S receives the reporting nodes in the blockchain network, and includes the geographical positions of the reporting nodes reported at each level in the node information reported by the reporting nodes a1-a7 step by step, and obtains the regional thermodynamic diagram of the target geofence according to the geographical position statistics of the reporting nodes reported at each level.
In this embodiment, when the terminal is used as a consensus node in the block chain network and each reporting node is in an online state, the terminal obtains a regional thermodynamic diagram according to the geographical position statistics of the reporting node reported at each stage in the node information reported step by step, the geographical position is reported step by the reporting node of the block chain network corresponding to the constructed target geofence, distributed processing of the thermodynamic diagrams is realized by the consensus node in the target geofence, the delay of geographical position acquisition of each node is low, and the real-time performance of the regional thermodynamic diagrams is improved.
In an embodiment, as shown in fig. 6, the processing of obtaining the geographical location, that is, obtaining the geographical location of the reporting node reported at each level in the node information reported by the reporting nodes in the blockchain network step by step, includes:
step 602, triggering the slave terminal as the consensus node to extract and obtain the first geographical position of the first reporting node from the node information reported step by the first reporting node corresponding to the first reporting node.
The first reporting node refers to a reporting node which takes a terminal as an ancestor node in the block chain network. The block chain network may include a plurality of consensus nodes, and each consensus node broadcasts a diffusion heartbeat packet in a target geo-fence, so as to construct a node chain corresponding to each consensus node, for example, a DAG topology corresponding to each consensus node may be constructed. In graph theory, a directed graph is an acyclic directed graph if it starts from any vertex and cannot go through several edges back to the point. A directed graph does not necessarily form a ring from one point to another point through two routes, and therefore a directed acyclic graph does not necessarily translate into a tree, but any directed tree is a directed acyclic graph. Different consensus nodes may form different DAG topologies. The first reporting nodes are reporting nodes in a DAG topological structure constructed by taking the terminal as a consensus node, and the first reporting nodes all take the terminal as an ancestor node. The first geographical position is a geographical position corresponding to the first reporting node.
Specifically, when the terminal is a consensus node in the block chain network, the terminal may receive node information reported step by each reporting node using the terminal as an ancestor node, that is, obtain node information reported step by the first reporting node, and extract, from the node information reported step by the first reporting node, the first geographical position corresponding to the first reporting node. In a specific implementation, if the node information reported by the first reporting node is ciphertext data of the first geographical location which is subjected to encryption processing, the node information can be decrypted, so that the first geographical location of the first reporting node is obtained from the node information.
Step 604, based on the consensus mechanism, obtaining a second geographic location of a second reporting node corresponding to the consensus node except the terminal in the block chain network.
The consensus mechanism is an essential element and a core part of the blockchain, and is a key for ensuring the continuous operation of the blockchain system. There is no centralized mechanism in the block chain network, and when information and value are transferred, the consistency and correctness of each transaction on all accounting nodes can be solved and guaranteed based on the consensus mechanism. The second reporting node is a reporting node in a node chain corresponding to the common node except the terminal in the block chain network, that is, the ancestor node of the second reporting node is not the terminal but the common node except the terminal in the block chain network. The second geographic position is a geographic position corresponding to the second reporting node, and the second geographic position can be extracted from the received node information by the corresponding consensus node serving as the ancestor node of the second reporting node.
Specifically, except for the terminal, other common nodes in the block chain network respectively receive the node information reported by the corresponding second reporting node step by step, and extract the second geographical position corresponding to the second reporting node from the received node information. Based on a consensus mechanism, each consensus node in the block chain network performs consensus on the obtained position data, so that each consensus node obtains all geographic positions. For the terminal, the first geographical position of the first reporting node is identified to other common nodes based on a common identification mechanism, and meanwhile, the second geographical position of the second reporting node corresponding to other common nodes is obtained.
And 606, combining the first geographical position and the second geographical position to obtain the geographical position of the reporting node in the block chain network.
Specifically, after obtaining the first geographical position and the second geographical position, the terminal obtains the geographical position of the reporting node in the blockchain network based on the first geographical position and the second geographical position. During specific implementation, the terminal can directly fuse the first geographic position and the second geographic position to obtain the geographic position of the reporting node in the block chain network. In addition, the terminal can also perform deduplication processing, anomaly analysis and the like on the merged geographical position after merging the first geographical position and the second geographical position, so that invalid position data is removed from the merged geographical position, and the geographical position of the reporting node in the block chain network is obtained. The geographical position of the reporting node in the blockchain network comprises the geographical position of the reporting node reported at each stage in the blockchain network, and the regional thermodynamic diagram of the target geo-fence can be obtained through statistics based on the geographical position of the reporting node in the blockchain network.
In the embodiment, based on the consensus mechanism, the geographical positions of the consensus nodes in the block chain network, which are obtained through the step-by-step reported node information, are subjected to consensus and then fused to obtain the geographical positions of the reported nodes in the block chain network, so that distributed processing of the thermodynamic diagrams can be realized through the consensus nodes in the target geographic fence, the delay of geographical position acquisition of the nodes is low, and the real-time performance of the regional thermodynamic diagrams is improved.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: based on a consensus mechanism, obtaining a verification area thermodynamic diagram obtained by statistics of consensus nodes except for a terminal in a block chain network; when the area thermodynamic diagrams pass the verification of the verification area thermodynamic diagrams, obtaining the area thermodynamic diagrams corresponding to the target geofence based on the area thermodynamic diagrams and the verification area thermodynamic diagrams.
The verification area thermodynamic diagram is an area thermodynamic diagram obtained by other common identification nodes except the terminal in the block chain network based on the geographic position statistics of the reporting nodes reported at each level, and can be used for verifying the area thermodynamic diagram obtained by the terminal statistics, so that the credibility of the area thermodynamic diagram is verified.
Specifically, after triggering the geographical position of the reporting node reported according to each level and counting to obtain the regional thermodynamic diagram, the terminal may obtain the verification regional thermodynamic diagram counted by other consensus nodes in the block chain network based on the consensus mechanism. Based on a consensus mechanism, the regional thermodynamic diagrams respectively counted by the consensus nodes in the block chain network can be subjected to consensus, and the regional thermodynamic diagrams respectively counted by the consensus nodes are respectively verified to verify the credibility of the regional thermodynamic diagrams. When the terminal determines that the area thermodynamic diagrams pass the verification of the verification area thermodynamic diagrams, the statistical area thermodynamic diagrams are high in credibility, and the terminal obtains the area thermodynamic diagrams corresponding to the target geofence based on the area thermodynamic diagrams and the verification area thermodynamic diagrams. For example, the terminal may perform weighted fusion on the area thermodynamic diagrams and the verification area thermodynamic diagrams to obtain the area thermodynamic diagrams corresponding to the target geofence.
In specific implementation, the terminal obtains a verification area thermodynamic diagram based on statistics of the common identification nodes except the terminal in the common identification mechanism block chain network, and meanwhile, the area thermodynamic diagram obtained by the statistics of the terminal is also commonly identified to other common identification nodes. The common identification nodes in the block chain network can be respectively checked based on the obtained regional thermodynamic diagrams, for example, the similarity between the regional thermodynamic diagrams and the checking regional thermodynamic diagrams can be calculated, and checking results of the regional thermodynamic diagrams and the checking regional thermodynamic diagrams can be obtained according to the comparison result of the similarity and the similarity threshold, and if the similarity is greater than the similarity threshold, if the similarity is greater than 98%, the similarity between the regional thermodynamic diagrams and the checking regional thermodynamic diagrams can be considered to be high, and the checking result is that checking is passed.
In addition, when the area thermodynamic diagram and the verification area thermodynamic diagram are not verified, the fact that the similarity degree between the area thermodynamic diagram and the verification area thermodynamic diagram is low is shown, the difference between the area thermodynamic diagram and the verification area thermodynamic diagram is large, the credibility of the current statistical area thermodynamic diagram is low, the common identification node can be triggered to be updated, the common identification node is reselected from the block chain network to conduct area thermodynamic diagram processing until the area thermodynamic diagram with the high credibility is obtained.
In this embodiment, the accuracy of the regional thermodynamic diagrams corresponding to the target geofence can be effectively ensured by verifying the regional thermodynamic diagrams obtained by respectively counting the consensus nodes in the block chain network.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: when the terminal is a consensus node in a block chain network and meets the execution condition of an intelligent contract, triggering to regularly broadcast a heartbeat packet corresponding to the intelligent contract; and periodically broadcasting the heartbeat packet corresponding to the intelligent contract, and indicating a target terminal receiving the heartbeat packet in the target geographic fence to join the block chain network as a reporting node, and triggering the target terminal to gradually issue the heartbeat packet to maintain an online state.
The intelligent contract execution condition is a condition for triggering execution of the intelligent contract, and the intelligent contract execution condition can be set according to actual needs, for example, the intelligent contract execution condition can be considered to be satisfied when a trigger execution instruction is received. A smart contract is a computer protocol intended to propagate, verify or execute contracts in an informational manner, allowing trusted transactions to be conducted without third parties, which transactions are traceable and irreversible. The smart contract contains all information about the transaction and only after the requirements are met will the resulting operation be performed. When a preset intelligent contract execution condition is met, triggering and executing an intelligent contract, specifically broadcasting a heartbeat packet periodically, adding a terminal receiving the heartbeat packet into a block chain network as a node through the heartbeat packet, constructing a node chain by taking a consensus node as an ancestor node, and maintaining the online state of each node through the heartbeat packet so that each node reports corresponding node information to perform regional thermodynamic diagram processing.
Specifically, when the terminal is a consensus node in the block chain network, if the intelligent contract execution condition is met, if the terminal receives an intelligent contract parameter issued by the server, a range parameter of a target geo-fence may be issued for the server specifically, and when the terminal receives the intelligent contract parameter, the terminal considers that the intelligent contract execution condition is met, triggers execution of the intelligent contract, and the terminal generates a heartbeat packet corresponding to the intelligent contract and broadcasts the heartbeat packet regularly in the target geo-fence. The heartbeat packet corresponding to the intelligent contract indicates that a target terminal receiving the heartbeat packet in the target geo-fence is added to the block chain network as a reporting node, and triggers the target terminal to gradually send the heartbeat packet to maintain the online state, namely the target terminal receiving the heartbeat packet in the target geo-fence adds the reporting node serving as the terminal to the block chain network, and gradually sends the heartbeat packet to maintain the online state.
In specific implementation, the server may select the computer device from the target geo-fence as a common node in the block chain network, and if the server selects the terminal as the common node, the terminal is the common node in the block chain network, and the server sends the intelligent contract parameter to the terminal to trigger the common node to periodically broadcast the heartbeat packet corresponding to the intelligent contract. In addition, the consensus node in the blockchain network can also perform update processing when triggering update of the consensus node, if the terminal is originally a reporting node in the blockchain network and becomes the consensus node in the blockchain network after the update of the consensus node, the node identity is considered to meet the execution condition of the intelligent contract when being transferred from the reporting node to the consensus node, and a heartbeat package corresponding to the intelligent contract is triggered to be broadcasted regularly to perform regional thermodynamic diagram processing.
In this embodiment, when the terminal is used as a consensus node in a block chain network and triggers an intelligent contract to execute, the terminal periodically broadcasts a heartbeat packet corresponding to the intelligent contract, so that a node chain including at least one level of reporting nodes is constructed by issuing the heartbeat packet, and the online state of each reporting node is maintained by the heartbeat packet, thereby ensuring that each reporting node can timely report node information carrying a geographical position step by step, reducing the delay of geographical position data acquisition, and improving the real-time performance of regional thermodynamic diagram processing.
In one embodiment, when a terminal enters a target geo-fence, the terminal joins, as a node, a blockchain network corresponding to the target geo-fence, including: when the terminal enters the target geo-fence and receives a heartbeat packet sent by a node in the block chain network corresponding to the target geo-fence, the terminal is added into the block chain network as a child node of the node corresponding to the received heartbeat packet.
The common node in the block chain network corresponding to the target geo-fence periodically and gradually issues heartbeat packets to each reporting node to maintain an online state, the reporting nodes in the block chain network broadcast the acquired heartbeat packets at the same time, and the broadcasted heartbeat packets can indicate a terminal receiving the heartbeat packets to be added into the block chain network as a node, so that the dynamic expansion of the block chain network is realized.
Specifically, after the terminal enters the target geo-fence, if the terminal receives a heartbeat packet sent by a node in the block chain network corresponding to the target geo-fence, the terminal is added to the block chain network as a child node of the node corresponding to the received heartbeat packet. For example, after entering the target geo-fence, if receiving a heartbeat packet broadcast by the reporting node b4 in the blockchain network, the terminal is added to the blockchain network as a child node of the reporting node b 4; for another example, after the terminal enters the target geo-fence, if the terminal receives the heartbeat packet broadcast by the consensus node D in the blockchain network, the terminal is added to the blockchain network as a child node of the consensus node D.
In this embodiment, the terminal is added to the blockchain network as a child node of a node corresponding to the received heartbeat packet, so that the on-line state of each node in the blockchain network is maintained through the heartbeat packet which is periodically issued, and the blockchain network is also expanded, so that node information can be reported to the blockchain network to realize regional thermodynamic diagram processing, the delay of geographical location data acquisition can be reduced, and the real-time performance of regional thermodynamic diagram processing is improved.
In one embodiment, more than one node corresponds to the heartbeat packet received by the terminal; the adding of the terminal as a child node of a node corresponding to the received heartbeat packet into the block chain network comprises the following steps: the terminal carries out node registration with the nodes corresponding to the received heartbeat packets in sequence according to the receiving sequence of the received heartbeat packets; and when the terminal is successfully registered, triggering the child node of the target node corresponding to the successful node registration to be added into the block chain network.
If the terminal receives the heartbeat packet broadcast by the reporting node c2 and the heartbeat packet broadcast by the reporting node d3, it indicates that the terminal is in the communication range of the reporting node c2 and the reporting node d 3. At this time, the terminal registers with the corresponding node according to the sequence of receiving the heartbeat packet, and the terminal is used as a child node of the corresponding target node to be added into the block chain network when the registration is successful.
Specifically, when more than one node corresponding to the heartbeat packet received by the terminal is provided, the terminal performs node registration with the nodes corresponding to the received heartbeat packets in sequence according to the receiving sequence of the received heartbeat packets. In a specific implementation, the terminal may record a receiving sequence of the received heartbeat packets, for example, the time of the received heartbeat packets may be recorded by a heartbeat packet list, and the terminal performs node registration on nodes corresponding to the heartbeat packets in sequence according to the receiving sequence from first to last. The node registration is an identification process, and bidirectional identification between the terminal and the node is required to be realized in the node registration process. And when the registration is successful, the terminal is used as a child node of the target node corresponding to the successful node registration and added into the blockchain network, so that the terminal is used as the child node of the target node which is successfully registered and added into the blockchain network.
In this embodiment, the registration is sequentially performed according to the receiving sequence of each heartbeat packet received by the terminal, and until the registration is successful, the terminal triggers a child node serving as a target node of the successful registration to be added to the blockchain network, so that the terminal can be prevented from becoming a child node of multiple nodes at the same time, the node structure of the blockchain network can be simplified, the data volume of the heartbeat packets and the node information in the blockchain network can be reduced, and the processing efficiency of the regional thermodynamic diagram can be improved.
In one embodiment, the node information reported to the consensus node includes a geographic position ciphertext obtained by performing symmetric encryption processing on the geographic position of the reporting node reported at each stage, and a key ciphertext obtained by performing asymmetric encryption processing on a key corresponding to the geographic position ciphertext.
The symmetric Encryption processing may be implemented based on a symmetric Encryption Algorithm, such as various symmetric Encryption algorithms based on a DES (Data Encryption Standard), an AES (Advanced Encryption Standard), and a 3DES (Triple Data Encryption Algorithm). Symmetric encryption, also called private key encryption, refers to encryption algorithms that use the same key for encryption and decryption. The symmetric encryption is also called a traditional cryptographic algorithm, the encryption key can be deduced from the decryption key, and meanwhile, the decryption key can also be deduced from the encryption key. In most symmetric algorithms, the encryption key and the decryption key are the same, so this encryption algorithm is also called a secret key algorithm or a single key algorithm. The symmetric encryption algorithm requires a sending party and a receiving party to agree on a key before secure communication, the security of the symmetric algorithm depends on the key, and the leaked key means that anyone can decrypt sent or received messages, so the confidentiality of the key is crucial to the security of communication. The geographic position ciphertext is ciphertext data obtained by encrypting the geographic position of the reporting node reported at each stage based on a symmetric encryption algorithm. The key corresponding to the geographic position ciphertext is an encryption key adopted in symmetric encryption of the geographic position, the geographic position ciphertext can be decrypted through the key, and the geographic position of the reporting node reported at each stage is restored.
The asymmetric encryption processing may be implemented based on an asymmetric encryption Algorithm, for example, based on various asymmetric encryption algorithms such as rsa (rsa Algorithm), DSA (Digital Signature Algorithm), ECDSA (Elliptic Curve Signature Algorithm), and the like. An asymmetric encryption algorithm requires two keys for encryption and decryption, which are a public key and a private key. The public key and the private key are a pair, and if the public key is used for encrypting data, only the corresponding private key can be used for decrypting the data; if the data is encrypted with a private key, it can only be decrypted with the corresponding public key. The key ciphertext is ciphertext data obtained by asymmetrically encrypting a key corresponding to the geographic position ciphertext through an asymmetric encryption algorithm, and the key corresponding to the geographic position ciphertext can be obtained by decrypting the key ciphertext through a private key, so that the geographic position ciphertext is further decrypted through the key, and the geographic position of the reporting node reported at each stage is restored.
Specifically, each reported node performs symmetric encryption processing on the geographic position to obtain a geographic position ciphertext, performs asymmetric encryption processing on a key corresponding to the geographic position ciphertext to obtain a key ciphertext, and obtains node information according to the obtained geographic position ciphertext and the key ciphertext to perform reporting processing.
And further, reporting the node information of the consensus node, and instructing the consensus node to decrypt the key ciphertext and the geographic position ciphertext in sequence, and then obtaining the regional thermodynamic diagram according to the geographic position statistics of the reported node obtained by decryption at each level.
Specifically, after receiving the node information reported step by step, the consensus node decrypts the key ciphertext and the geographic position ciphertext in sequence, so that the geographic position of the reporting node reported at each step, which is obtained by decryption, is obtained from the node information, and the regional thermodynamic diagram is obtained based on the geographic position statistics of the reporting node reported at each step. In specific implementation, after the consensus node receives the node information reported step by step, the secret key ciphertext is decrypted through the private key corresponding to asymmetric encryption processing to obtain the secret key corresponding to the geographic position ciphertext, and the geographic position ciphertext is further decrypted through the secret key corresponding to the geographic position ciphertext to obtain the geographic position of the reporting node reported at each stage.
In this embodiment, the node information that is gradually reported to the consensus node by each reporting node in the block chain network includes a ciphertext that combines symmetric encryption processing and asymmetric encryption processing, thereby ensuring data security of a geographic location carried by the node information that is gradually reported.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: under the condition that the terminal is located in the target geographic fence and the consensus node is triggered to update, the consensus node application is triggered based on the consensus algorithm; and when the consensus node application is successful, the terminal is updated to be the consensus node in the block chain network.
The common knowledge node updating may be to trigger updating of the common knowledge node in the blockchain network when a common knowledge node updating condition is met, so as to dynamically adjust the common knowledge node in the blockchain network, so as to adjust a node relationship of each node in the blockchain network, and ensure accuracy of the regional thermodynamic diagram.
Specifically, when the terminal is in the target geo-fence and the update of the consensus node is triggered, the update of the consensus node in the block chain network is triggered. Specifically, the terminal applies for the consensus node based on the consensus algorithm, for example, the terminal applies for the consensus node based on the Raft consensus algorithm, the application terminal is used as a new consensus node, and when the terminal applies for the consensus node successfully, the terminal is updated to be the consensus node in the block chain network, so that the identity of the terminal node is switched. In specific application, when the consensus node update is triggered, each node in the block chain network can trigger consensus node application based on a consensus algorithm, and a node which succeeds in the consensus node application is switched to a consensus node in the block chain network to perform regional thermodynamic diagram processing.
In this embodiment, when the consensus node is triggered to update, the consensus node in the blockchain network is updated based on the consensus algorithm, so that the consensus node in the blockchain network can be dynamically adjusted, the node relationship of each node in the blockchain network can be dynamically adjusted, and the accuracy of the regional thermodynamic diagram is ensured.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: when the condition of the consensus node update is met, triggering the consensus node update; the common node updating condition comprises at least one of a common node updating period, common node offline and regional thermodynamic diagram check failure.
Specifically, the terminal may monitor whether a consensus node update condition is met, where the consensus node update condition may be set according to actual needs, such as but not limited to at least one of a consensus node update period, a consensus node offline, and a regional thermodynamic diagram check failure. The common node update period can realize the regular update of the common node in the block chain network, for example, the common node in the block chain network can be updated by triggering every 5 hours; the consensus node is offline, namely the consensus node in the block chain network is in an offline state, for example, the consensus node in the block chain network leaves a target geographic fence or cannot communicate when the network is interrupted; and if the verification result of the regional thermodynamic diagrams which are respectively counted by the common-knowledge nodes in the regional thermodynamic diagram and are not passed is that the verification is failed, the credibility of the regional thermodynamic diagrams counted by the current common-knowledge nodes is limited, the common-knowledge nodes are triggered to be updated, so that the common-knowledge nodes in the regional chain network are updated.
In this embodiment, the terminal monitors the update condition of the consensus node, so that the consensus node of the blockchain network can be updated and adjusted in time, and the accuracy of the regional thermodynamic diagram can be ensured.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: and under the condition that the child node of the terminal is positioned outside the target geographic fence and the child node of the terminal is in an off-line state, triggering and stopping issuing the heartbeat packet which is periodically and step by step issued by the consensus node to the child node.
And if the child node of the terminal is outside the target geo-fence and is in an off-line state, the child node of the terminal leaves the target geo-fence, the terminal abandons the child node and stops sending the heartbeat packet issued step by the consensus node to the child node. Specifically, when the terminal is located in the target geo-fence, it indicates that the terminal is still located in the target geo-fence range and needs to participate in regional thermodynamic diagram processing, and if a child node of the terminal is located outside the target geo-fence and is in an offline state, the terminal terminates issuing the heartbeat packets periodically and step by step to the child node. When the child node of the terminal is outside the target geographic fence and is in an offline state, the child node is determined to be a waste node, the terminal discards the child node in time, the node structure in the block chain network can be updated in time, and the accuracy of the regional thermodynamic diagram is ensured.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: and under the condition that the father node of the terminal is positioned outside the target geographical fence and the father node of the terminal is in an off-line state, triggering a heartbeat packet which is periodically and gradually issued according to the received common node, and updating the node relation of the terminal as the node in the block chain network.
If the terminal can determine again that the father node acquires the heartbeat packets issued by the common identification nodes step by step regularly. Specifically, when the terminal is located in the target geo-fence, it indicates that the terminal is still located in the target geo-fence range and needs to participate in regional thermodynamic diagram processing, and if a parent node of the terminal is located outside the target geo-fence and is in an offline state, the terminal updates the node relationship of the terminal as a node in the block chain network according to heartbeat packets issued periodically and step by the received common node, specifically, the terminal can select a corresponding node from the received heartbeat packets to register, and the target node corresponding to successful registration is used as the parent node, so that the node relationship of the terminal as the node in the block chain network is updated.
In this embodiment, when the parent node of the terminal is outside the target geo-fence and is in an offline state, the terminal updates the node relationship in the blockchain network according to the received heartbeat packet, so that the node structure in the blockchain network can be updated in time, and the accuracy of the regional thermodynamic diagram is ensured.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: under the condition that the terminal enters a target geographic fence and the terminal fails to join a block chain network as a node, triggering to send the geographic position of the terminal to a server; and the terminal geographic position is used for indicating the server to update the regional thermodynamic diagrams obtained by the statistics of the consensus node based on the terminal geographic position so as to obtain the updated regional thermodynamic diagrams.
Specifically, after the terminal enters the target geo-fence, the terminal is located within the range of the target geo-fence and needs to participate in statistical processing of the regional thermodynamic diagram, and the terminal fails to join the block chain network as a node, that is, the terminal does not join the block chain network corresponding to the target geo-fence as a node, and the terminal cannot report the geographical location information in a manner of reporting the node information step by step, and then the terminal directly sends the geographical location of the terminal to the server. And the geographical position of the terminal is the position data of the terminal, and the geographical position indication server of the terminal updates the regional thermodynamic diagram obtained by statistics of the consensus node based on the geographical position of the terminal to obtain the updated regional thermodynamic diagram. In specific implementation, after the consensus node in the block chain network corresponding to the target geo-fence performs statistics to obtain the area thermodynamic diagram, the consensus node may send the area thermodynamic diagram to the server, and the server may update the area thermodynamic diagram based on the geographic position of the isolated node that is not added to the block chain network in the target geo-fence, so as to further improve the accuracy of the area thermodynamic diagram.
In this embodiment, a terminal that is not added to the block chain network as a node is used as an isolated node, and the geographic position of the terminal is triggered to be directly sent to the server, so that the server updates the regional thermodynamic diagram obtained by the statistics of the consensus node according to the geographic position of the terminal of the isolated node, thereby further improving the accuracy of the regional thermodynamic diagram.
In one embodiment, the node information includes a geographic position ciphertext obtained by symmetrically encrypting the geographic position of the first reporting node reported at each stage, and a key ciphertext obtained by asymmetrically encrypting a key corresponding to the geographic position ciphertext; triggering the slave terminal to serve as the node information reported step by the first reporting node corresponding to the consensus node, and extracting to obtain the first geographical position of the first reporting node, wherein the method comprises the following steps: decrypting the key ciphertext based on a private key corresponding to the key ciphertext to obtain a key corresponding to the geographic position ciphertext; and decrypting the geographic position ciphertext through the key to obtain the first geographic position of the first reporting node.
The first reporting node refers to a reporting node which takes a terminal as an ancestor node in the block chain network. The block chain network can be provided with a plurality of consensus nodes, each consensus node broadcasts a diffusion heartbeat packet in a target geographic fence, so that a node chain corresponding to each consensus node is constructed, and different consensus nodes can form different DAG topological structures. The first reporting nodes are reporting nodes in a DAG topological structure constructed by taking the terminal as a consensus node, and the first reporting nodes all take the terminal as an ancestor node. The first geographical position is a geographical position corresponding to the first reporting node.
The geographic position ciphertext is ciphertext data obtained by encrypting the first geographic position of the first reporting node reported at each stage based on a symmetric encryption algorithm. The key corresponding to the geographic position ciphertext is an encryption key adopted in symmetric encryption of the first geographic position, the geographic position ciphertext can be decrypted through the key, and the first geographic position of the first reporting node reported at each stage is restored. The key ciphertext is ciphertext data obtained by asymmetrically encrypting a key corresponding to the geographic position ciphertext through an asymmetric encryption algorithm, and the key corresponding to the geographic position ciphertext can be obtained by decrypting the key ciphertext through a private key, so that the first geographic position ciphertext is further decrypted through the key, and the first geographic position of the first reporting node reported at each stage is restored.
Specifically, after the terminal obtains the node information reported by the reporting node step by step, the terminal decrypts the key ciphertext based on the private key corresponding to the key ciphertext in the node information to obtain the key corresponding to the geographic position ciphertext in the node information. After the key corresponding to the geographic position ciphertext is obtained, the terminal decrypts the geographic position ciphertext through the key to obtain the first geographic position of the first reporting node which takes the terminal as an ancestor node, and therefore the first geographic position of the first reporting node is extracted and obtained from the node information reported by the first reporting node step by step.
In this embodiment, the terminal decrypts the key ciphertext by using the private key, and further decrypts the geographic location ciphertext by using the key obtained by decryption, so that the first geographic location of the first reporting node is restored from the node information, and data security of the geographic location can be ensured.
In one embodiment, the block chain-based regional thermodynamic diagram processing method further includes: under the condition that the terminal is a consensus node in a block chain network, triggering to send the area thermodynamic diagram obtained through statistics to a server; the regional thermodynamic diagrams are used for instructing the server to send the regional thermodynamic diagrams to the display end for displaying.
Specifically, when the terminal is a consensus node in the blockchain network, after the terminal obtains the regional thermodynamic diagrams according to the node information statistics reported step by the reporting nodes in the blockchain network, the terminal sends the regional thermodynamic diagrams to the server to instruct the server to send the regional thermodynamic diagrams to the display end for displaying, and the display end can be a computer device requesting the thermodynamic diagrams from the server. In a specific application, the terminal sends the area thermodynamic diagrams obtained through statistics to the server, and after the server receives the area thermodynamic diagrams, the area thermodynamic diagrams can be updated based on the geographical position directly reported by an isolated node which is not used as a node in a target geo-fence and is added into a block chain network, so that the updated area thermodynamic diagrams are obtained. When the display end sends the thermodynamic diagram request, the server can respond to the thermodynamic diagram request and send the updated regional thermodynamic diagram to the display end, so that the display end displays the updated regional thermodynamic diagram.
In this embodiment, the consensus node in the blockchain network sends the area thermodynamic diagrams obtained through statistics to the server, so that the server sends the area thermodynamic diagrams to the display end, and the obtained area thermodynamic diagrams can be visually displayed at the display end in response to a display request of the area thermodynamic diagrams.
In one embodiment, as shown in fig. 7, a method for displaying a regional thermodynamic diagram is provided, which is described by taking the method as an example for being applied to the terminal in fig. 1, and includes the following steps:
step 702, displaying a map page of the electronic map.
The electronic map is a system for map making and application, is a map generated by the control of an electronic computer, is a screen map based on a digital cartographic technology, and is a visual real map. The map page is a page for displaying the electronic map in the terminal, and specifically, the map page for displaying the electronic map can be displayed when the electronic map application is started for the terminal.
Step 704, in response to the thermodynamic diagram display triggering operation for the target geo-fence, entering a thermodynamic diagram display mode.
The target geo-fence refers to an area where statistics of a corresponding thermodynamic diagram is needed, and specifically may be various different scene areas such as a scenic spot, a mall, a school, a hospital, an airport, or a station. The target geofence is set according to actual needs, and the corresponding target geofence is determined according to the area where the crowd density is displayed as needed. The thermodynamic diagram display triggering operation can be triggered by a user in a map page displayed by the terminal and used for triggering thermodynamic diagram display. In specific implementation, a thermodynamic diagram mode control can be arranged in the map page, and a user can click the thermodynamic diagram mode control to trigger a thermodynamic diagram display triggering operation and trigger the electronic map to enter a thermodynamic diagram display mode. The thermodynamic diagram display mode is a mode for displaying thermodynamic diagrams, and in the thermodynamic diagram display mode, the thermodynamic densities of various areas at positions can be marked in the electronic map, for example, different thermodynamic densities are represented by different colors.
Step 706, in the thermodynamic diagram display mode, displaying a dynamically updated regional thermodynamic diagram corresponding to the target geofence within the map region marked with the target geofence in the map page; the regional thermodynamic diagram is obtained by counting the geographic position reported by the node in the online state in the block chain network corresponding to the target geographic fence through a consensus mechanism of the block chain network, wherein the node comprises a terminal which enters the target geographic fence and maintains the online state in the block chain network through a heartbeat packet.
After entering the thermodynamic diagram display mode, in the thermodynamic diagram display mode, the terminal displays a dynamically updated regional thermodynamic diagram corresponding to the target geofence in the map region where the target geofence is marked in the map page, so as to display the regional thermodynamic diagram corresponding to the target geofence.
The regional thermodynamic diagram is obtained by counting the geographic position reported by the node in the online state in the block chain network corresponding to the target geographic fence through a consensus mechanism of the block chain network, and the node comprises a terminal which enters the target geographic fence and maintains the online state in the block chain network through a heartbeat packet. In specific implementation, the nodes in the block chain network include at least one level of reporting node and a consensus node serving as an ancestor node of the reporting node, the reporting node can report the geographical position to the previous level of node, namely, to the father node step by step until the reporting node reports the geographical position to the consensus node, and the consensus node can obtain the regional thermodynamic diagram through statistics according to the geographical positions of the reporting nodes at all levels. The reporting node maintains an online state through heartbeat packets issued by the consensus node step by step periodically, so that the reporting node in the block chain network can be ensured to report the geographic position. The node information is reported to the consensus node step by step through the reporting nodes in an online state in the block chain network, so that the consensus obtains the node information carrying the geographic position of the reporting node reported at each step, the consensus node obtains the regional thermodynamic diagram corresponding to the target geographic fence based on the geographic position statistics of each node, distributed processing of the thermodynamic diagrams can be realized through the consensus nodes in the target geographic fence, the delay of the geographic position collection of each node is low, and the real-time performance of the regional thermodynamic diagram displayed by the terminal is improved.
In a specific application, as shown in fig. 8, the target geo-fence is a city park, and after the terminal is triggered to enter the thermodynamic diagram display mode, the displayed dynamically updated regional thermodynamic diagram corresponding to the city park marks the crowd density of each region, specifically, the crowd density of each region is marked by different colors.
According to the regional thermodynamic diagram display method, in response to thermodynamic diagram display triggering operation aiming at the target geographic fence, in a map region where the target geographic fence is marked in a map page in a mode of displaying the electronic map corresponding to the thermodynamic diagram, dynamically updated regional thermodynamic diagrams corresponding to the target geographic fence are displayed, and the regional thermodynamic diagrams are obtained by counting geographic positions reported by nodes which maintain an online state through heartbeat packets in a block chain network corresponding to the target geographic fence on the basis of a consensus mechanism of the block chain network, so that the delay of geographic position data corresponding to the regional thermodynamic diagrams is low, and the real-time performance of the displayed regional thermodynamic diagrams is improved.
In one embodiment, displaying the dynamically updated regional thermodynamic diagram corresponding to the target geofence comprises: the thermodynamic density in the dynamically updated regional thermodynamic diagram corresponding to the target geofence is represented by the different marker colors.
The marking colors can be different colors, and generally, warm-tone marking colors such as red, orange and the like represent high crowd density, and cool-tone marking colors such as blue, purple and the like represent low crowd density. Specifically, when the regional thermodynamic diagrams are displayed, the terminal represents the thermodynamic density in the dynamically updated regional thermodynamic diagrams corresponding to the target geofence through different marking colors. The thermodynamic density reflects the population density for a region, with higher thermodynamic densities corresponding to higher population densities.
Further, the regional thermodynamic diagram display method further comprises the following steps: in response to the zooming operation triggered by the regional thermodynamic diagrams, displaying the regional thermodynamic diagrams subjected to zooming processing on the regional thermodynamic diagrams through the zooming operation; the thermal density in the scaled regional thermodynamic diagram is represented by the updated marker color.
The zooming operation can be triggered by a user aiming at the regional thermodynamic diagram displayed in the terminal, for example, the user can trigger the zooming operation on the regional thermodynamic diagram through a zooming gesture. When a user performs zooming operation triggered by the regional thermodynamic diagram, the terminal displays the regional thermodynamic diagram subjected to zooming processing on the regional thermodynamic diagram through the zooming operation, and represents the thermodynamic density in the zoomed regional thermodynamic diagram through the updated mark color, so that the mark color of the thermodynamic density is correspondingly adjusted according to the zooming of the regional thermodynamic diagram, and the thermodynamic density of each region in the target geo-fence is displayed more intuitively and accurately.
In a specific application, as shown in fig. 9, the thermodynamic density in the dynamically updated regional thermodynamic diagram corresponding to the park is represented by different mark colors, after the user performs the enlargement processing on the upper right corner portion of the regional thermodynamic diagram through the gesture, the terminal displays the regional thermodynamic diagram obtained by enlarging the regional thermodynamic diagram through the enlargement operation, and the thermodynamic density in the enlarged regional thermodynamic diagram is represented by the updated mark colors.
The application also provides an application scenario, and the application scenario applies the regional thermodynamic diagram processing method based on the block chain. Specifically, the block chain-based regional thermodynamic diagram processing method is applied to the application scenario as follows:
currently, more and more map platforms support thermodynamic diagram display, and thermodynamic diagrams are visual types for expressing the strength and distribution trend of data and are mainly applied to population density analysis, activity analysis and the like. Most of data sources of the conventional implementation scheme of the thermodynamic diagrams are based on position data, the thermodynamic diagrams in a large-range geographic area are displayed on a display end, and for the thermodynamic distribution display effect of a small-area geographic fence, due to delay factors influencing the real-time performance of data, such as low data acquisition frequency and high position change frequency, the real-time performance of the thermodynamic diagrams is limited, and the thermodynamic distribution effect of the real-time thermodynamic diagrams cannot be effectively embodied.
Based on this, the regional thermodynamic diagram processing method based on the block chain in the embodiment can be widely applied to position data visualization of a small geographic fence area at a mobile terminal, and accurate and real-time population thermodynamic density analysis in different scenes such as scenic spots, markets, schools, hospitals and the like in the industry is realized while data privacy of individual users is protected. Different from the situation that the thermodynamic diagrams of a large-scale geographic region are displayed on the display end based on the position achievement data, the regional thermodynamic diagram processing method based on the block chain in the embodiment is based on the DAG intelligent contract, distributed trusted computing is performed between the mobile ends on the premise that user data are guaranteed, real-time position change of the mobile ends can be calculated and displayed in real time, and the real-time performance of the thermodynamic diagrams is guaranteed.
Specifically, as shown in fig. 10 and 11, the cloud server determines smart contract parameters of the DAG smart contract, where the smart contract parameters include a range parameter of a target geofence that needs to exhibit a regional thermodynamic diagram. If a directed graph starts from any vertex and cannot go back to the point through a plurality of edges, the directed graph is an directed acyclic graph, namely DAG, and the directed graph does not necessarily form a ring when one point goes to another point through two routes, so the directed acyclic graph cannot be converted into a tree, but any directed tree is the directed acyclic graph. While intelligent contracts provide distributed trusted computing, DAG intelligent contracts are block chain intelligent contracts in a general form, and because of their unique structures, DAGs inherently support high extensibility, and thus are also widely used. Any blockchain system has a linear structure because blocks are added to the chain in sequence, and linear blockchains are inherently very slow to update compared to adding blocks to the chain in parallel. But for the DAG, each tile and transaction requires only a few previous tiles to be validated, and can be added to the tiles and transactions in parallel. Therefore, the DAG is highly scalable in nature.
The cloud server issues the intelligent contract parameters, namely the range parameters of the determined target geo-fence, to a consensus node A and a consensus node B randomly selected from the target geo-fence, after computer equipment corresponding to the consensus node A and the consensus node B receives the intelligent contract parameters, the computer equipment triggers execution of the intelligent contract, the consensus node A and the consensus node B respectively broadcast and send heartbeat packets corresponding to the intelligent contract to the surroundings, and when terminal equipment in the target geo-fence receives the heartbeat packets, a DAG edge is constructed, and the heartbeat packets are continuously sent on the child nodes, so that a DAG directed acyclic graph topological structure is constructed. In the constructed topological structure of the DAG directed acyclic graph, the consensus node issues heartbeat packets step by timing so as to maintain the online state of each reporting node.
Further, for a terminal newly entering a target geo-fence, when the terminal is about to enter a geo-fence range, a heartbeat packet sent by a reporting node near an edge may be received, and since the heartbeat packets sent by a plurality of reporting nodes may be received, in order to avoid occupying too much resources of the terminal, a registration is performed without registering nodes corresponding to all the heartbeat packets. Specifically, the terminal may maintain a list for storing the order of received heartbeat packets, and perform bidirectional registration from the head of the list, that is, corresponding node relationships are established between the reporting node and the terminal. And after the registration is successful, the terminal is used as a child node of the reporting node and added into the topological structure of the DAG directed acyclic graph.
In the maintenance process of each node in the target geographic fence, if the heartbeat packet received by a certain device is overtime, sequentially taking the subsequent heartbeat packets from the received heartbeat packet corresponding list, trying to establish heartbeat connection, if all the heartbeat packets cannot establish connection, judging whether the current device is in the area of the target geographic fence, if so, independently enabling the current device to be an isolated node, directly sending the geographic position of the isolated node to a cloud server, and uniformly allocating the geographic position of the isolated node by the cloud server. If the current device is not in the fence of the current device, if the current device is a parent node, and the heartbeat packet of the child node is overtime, the child node is subjected to heartbeat fusing, namely the child node is used as a waste node and is directly discarded without participating in thermodynamic diagram calculation. If the parent node of the current device is subjected to heartbeat fusing, all child nodes under the parent node need to readjust the DAG structure, a new adjacent node is selected as the parent node on the basis of the original DAG structure, and heartbeat connection is completed, so that the registration and fusing of each node in the target geo-fence are realized, and the effectiveness of the topological structure of the DAG directed acyclic graph is ensured.
Further, based on the DAG topological structure, each reporting node generates a group of encrypted coordinates according to the geographic coordinates of the reporting node based on a symmetric encryption algorithm, secondarily encrypts keys of the encrypted coordinates based on an RSA asymmetric encryption algorithm, combines the encrypted coordinates to obtain an encrypted data packet, and forms reported node information. Specifically, since the necessary data for calculating the thermodynamic diagram is the coordinates of the heat point, and the original data coordinates of the user belong to the private data of the user, it is ensured that the data is not leaked, intercepted or tampered in any loop of data transmission. Therefore, the relevant encryption and decryption operations are required to be performed on the original position coordinates. In the embodiment, the original heat point coordinates are encrypted in a mode of combining asymmetric encryption and symmetric encryption. The asymmetric encryption algorithm has high complexity and is not suitable for frequent encryption and decryption processes of large-scale data, so that the strategy of the symmetric encryption algorithm is adopted for the original coordinate data, and the key of the symmetric encryption algorithm is required to be ensured not to be leaked in the transmission process. Because the key length of the symmetric encryption algorithm is usually short, the asymmetric encryption algorithm is suitable for secondarily encrypting the key. The public key of the asymmetric encryption algorithm is visible to all nodes, and only the private key is stored in the consensus node, so that the security and the non-tamper property of the consensus node need to be ensured. Based on the method, the consistency of the calculation results of the consensus nodes can be ensured through the verification process of the final calculation results of the consensus nodes.
Further, the position encryption data packet is transmitted upwards step by the node with the out degree of 0 in the DAG structure, namely the leaf node without the child node in the DAG structure triggers the step by step reporting of the encryption data packet. All nodes of the DAG share a group of RSA public keys, only the consensus nodes store the private keys, and after the encrypted data packets at all positions are received, each consensus node decrypts the data packets based on the private keys respectively and obtains original data of the DAG structure. And each consensus node performs distribution calculation of the thermodynamic diagrams based on the original data, specifically, the distribution result of the thermodynamic diagrams in the region can be calculated based on a general Gaussian roll calculation method, and the thermodynamic results are verified, for example, the similarity of the thermodynamic distribution can be calculated and verified based on the pixel density of the regional thermodynamic diagrams calculated by each consensus node, if the value of the similarity is higher than a specified similarity threshold, the verification is considered to be passed, and the regional thermodynamic diagrams in the region of the target geo-fence are obtained after the verification is passed. And if the similarity value is lower than the specified similarity threshold value, the verification is failed, the update of the consensus nodes is triggered, and the regional thermodynamic diagram processing is carried out after the DAG topological structure is reconstructed. After the regional thermodynamic diagrams are obtained, the consensus node uploads the regional thermodynamic diagrams to the cloud server for evidence storage, and the display end can send a request to the cloud server to obtain the regional thermodynamic diagrams for display.
In the process that each device in the range of the target geo-fence continuously changes, an election strategy of a Raft consensus algorithm is applied to a DAG directed acyclic graph structure, dynamic registration and fusing of nodes and selection of consensus nodes participating in calculation are achieved between ends through maintaining heartbeat messages, accordingly, a mechanism of dynamic registration of devices newly entering a region, dynamic fusing of devices leaving the region and updating of the consensus nodes is achieved, the consensus nodes in the DAG topological structure are dynamically adjusted through the Raft algorithm, the consensus nodes are continuously updated, and accordingly a more accurate regional thermodynamic diagram is obtained.
Where Raft is a consensus algorithm. Raft provides a common way to implement a distributed state machine in a cluster of computing systems, ensuring that each node in the cluster gets consistent across the same set of state transitions. Raft achieves consensus by choosing a leader. In a Raft cluster, a server may be a leader (leader), a follower (follower), or a candidate for a particular election (e.g., lack of leader). The leader is responsible for sending a copy of the log to the follower. The leader regularly informs the follower of the survival situation of the leader by sending heartbeat messages. Each follower maintains a timeout within which the leader's heartbeat should normally be received. The timeout is reset upon receipt of a heartbeat. If no heartbeat is received, the follower changes its state to a candidate and begins the leader election. In the Raft algorithm protocol, a node is in one of the following three states at any time: leader, follower, candidate. Except for witness nodes, all other nodes are in a follower state when started; if the heartbeat from the leader is not received within a period of time, switching from the follower to the candidate, and initiating election; if receiving the majauthority cause ticket (including one ticket of the node), the node is switched to a leader state; and if the node self updating of other nodes is found, switching to the follower actively. If no leader is found over a period of time, then we pick out a random number of leaders by election-voting. The leader can continuously send a heartbeat message to the follower to indicate the survival state of the leader. If the leader fails, then the follower will switch to candidate to reselect the leader.
When the consensus nodes are updated and adjusted regularly based on the Raft algorithm, if the nodes in the DAG topological structure monitor that the consensus nodes are in an off-line state, the consensus nodes are triggered to be updated, each node applies for switching to the consensus nodes, election is initiated based on the Raft algorithm, a leader is determined according to an election result, the leader is used as the updated consensus nodes in the DAG topological structure, the consensus nodes continue to issue heartbeat packets step by step regularly to maintain the on-line state, and regional thermodynamic diagram processing is performed.
In this embodiment, regional thermodynamic diagrams are calculated in real time based on the DAG intelligent contract, and different from a general cloud, position big data is acquired through timing collection to perform aggregation calculation, and result data is transmitted to a mobile terminal to perform thermodynamic diagram rendering processing. For selection of consensus nodes, an election strategy of a Raft consensus algorithm is applied to a DAG structure, dynamic registration and fusing of nodes and selection of consensus nodes participating in calculation are achieved between ends through maintaining heartbeat messages, the method is suitable for thermal display of the small-range geographic fence area, response of the display effect of the thermodynamic diagram is real-time, the calculation angle is microscopic, the method focuses on the small-range area of the specific geographic fence, and the timeliness is better.
The regional thermodynamic diagram processing method based on the block chain solves the privacy problem of position data transmission between mobile terminals and the real-time and fine-grained problems of regional thermodynamic diagram display, saves most cloud computing resources, and can provide thermodynamic diagram display only by storing final data storage certificates.
Further, the application scenario applies the regional thermodynamic diagram processing method and the regional thermodynamic diagram display method based on the block chain to perform regional thermodynamic diagram display. Specifically, the application of the regional thermodynamic diagram display method in the application scenario is as follows:
after the regional thermodynamic diagrams of the target geographic fence are obtained through the regional thermodynamic diagram processing method based on the block chain, the consensus node sends the regional thermodynamic diagrams to the cloud server. The display terminal can send a thermodynamic diagram request to the cloud server to request to acquire the regional thermodynamic diagrams from the cloud server, and the terminal displays the acquired regional thermodynamic diagrams. As shown in fig. 12, after the terminal enters the thermodynamic diagram display mode through the thermodynamic diagram display triggering operation, in the thermodynamic diagram display mode, within a map region where the target geofence is marked in the map page, dynamically updated regional thermodynamic diagrams corresponding to the target geofence are displayed through different marking colors. The regional thermodynamic diagrams displayed by the display terminal are obtained through a regional thermodynamic diagram processing method based on the block chain, and the real-time performance of the displayed regional thermodynamic diagrams can be improved.
It should be understood that, although the steps in the flowcharts of fig. 2, 6, 7 and 11 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 6, 7 and 11 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 13, there is provided a block chain-based regional thermodynamic diagram processing apparatus 1300, which may be a part of a computer device using a software module or a hardware module, or a combination of the two modules, and specifically includes: a node joining module 1302 and a location reporting module 1304, wherein:
a node adding module 1302, configured to add the terminal as a node to a block chain network corresponding to a target geo-fence after the terminal enters the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain the online state through heartbeat packets issued by the consensus nodes periodically and step by step;
a location reporting module 1304, configured to trigger the gradual reporting of node information until the node information is reported to the consensus node when the terminal is a reporting node serving as a leaf node and is in an online state; the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node.
In an embodiment, the system further includes a thermodynamic diagram statistics module, configured to, when the terminal is a consensus node in the blockchain network and a reporting node in the blockchain network is in an online state, obtain a geographical location of the reporting node reported by each level in node information reported by the reporting node in the blockchain network step by step; and triggering the geographical position of the reporting node reported according to each level, and counting to obtain the regional thermodynamic diagram.
In one embodiment, the thermodynamic diagram statistics module further comprises a first position extraction module, a second position acquisition module and a position fusion module; wherein: the first position extraction module is used for triggering the slave terminal to extract and obtain a first geographical position of a first reporting node from node information reported step by the first reporting node corresponding to the common node; a second location obtaining module, configured to obtain, based on a consensus mechanism, a second geographic location of a second reporting node corresponding to a consensus node except a terminal in a block chain network; and the position fusion module is used for combining the first geographical position and the second geographical position to obtain the geographical position of the reporting node in the block chain network.
In one embodiment, the thermodynamic system further comprises a thermodynamic diagram consensus module and a thermodynamic diagram determination module; wherein: the thermodynamic diagram consensus module is used for obtaining a checking area thermodynamic diagram obtained by statistics of consensus nodes except the terminal in the block chain network based on a consensus mechanism; and the thermodynamic diagram determining module is used for obtaining an area thermodynamic diagram corresponding to the target geofence based on the area thermodynamic diagram and the verification area thermodynamic diagram when the area thermodynamic diagram passes the verification with the verification area thermodynamic diagram.
In one embodiment, the system further comprises an intelligent contract processing module, configured to trigger periodic broadcast of a heartbeat packet corresponding to the intelligent contract when the terminal is a consensus node in the block chain network and meets an intelligent contract execution condition; and periodically broadcasting the heartbeat packet corresponding to the intelligent contract, and indicating a target terminal receiving the heartbeat packet in the target geographic fence to join the block chain network as a reporting node, and triggering the target terminal to gradually issue the heartbeat packet to maintain an online state.
In an embodiment, the node joining module 1302 is further configured to, when the terminal enters the target geo-fence and receives a heartbeat packet sent by a node in the blockchain network corresponding to the target geo-fence, join the terminal in the blockchain network as a child node of the node corresponding to the received heartbeat packet.
In one embodiment, more than one node corresponds to the heartbeat packet received by the terminal; the node adding module 1302 is further configured to perform node registration with the nodes corresponding to the received heartbeat packets in sequence according to the receiving sequence of the received heartbeat packets; and when the terminal is successfully registered, triggering the child node of the target node corresponding to the successful node registration to be added into the block chain network.
In one embodiment, the node information reported to the consensus node includes a geographic position ciphertext obtained by symmetrically encrypting the geographic position of the reporting node reported at each stage, and a key ciphertext obtained by asymmetrically encrypting a key corresponding to the geographic position ciphertext; and reporting the node information of the consensus node, and instructing the consensus node to decrypt the key ciphertext and the geographic position ciphertext in sequence, and then obtaining the regional thermodynamic diagram according to the geographic position statistics of the reported node at each level obtained by decryption.
In one embodiment, the system further comprises a consensus node updating module, configured to trigger a consensus node application based on a consensus algorithm when the terminal is in the target geo-fence and the consensus node is triggered to be updated; and when the consensus node application is successful, the terminal is updated to be the consensus node in the block chain network.
In one embodiment, the system further comprises a consensus node update triggering module, configured to trigger the consensus node update when a consensus node update condition is met; the common node updating condition comprises at least one of a common node updating period, common node offline and regional thermodynamic diagram check failure.
In one embodiment, the system further includes a child node discarding module, configured to trigger termination of issuing, to a child node, a heartbeat packet that is issued periodically and step by a consensus node when the child node of the terminal is outside the target geographic fence and the child node of the terminal is in an offline state.
In an embodiment, the node relationship updating module is further included, configured to trigger a heartbeat packet issued periodically and step by step according to the received consensus node when the parent node of the terminal is outside the target geographic fence and the parent node of the terminal is in an offline state, and update the node relationship of the terminal in the blockchain network as the node.
In one embodiment, the system further comprises an isolated node processing module, configured to trigger sending of a terminal geographic location of the terminal to the server, when the terminal enters the target geo-fence and the terminal fails to join the blockchain network as a node; and the terminal geographic position is used for indicating the server to update the regional thermodynamic diagrams obtained by the statistics of the consensus node based on the terminal geographic position so as to obtain the updated regional thermodynamic diagrams.
In one embodiment, the node information includes a geographic position ciphertext obtained by symmetrically encrypting the geographic position of the first reporting node reported at each stage, and a key ciphertext obtained by asymmetrically encrypting a key corresponding to the geographic position ciphertext; the first position extraction module comprises a key decryption module and a position decryption module; wherein: the key decryption module is used for decrypting the key ciphertext based on a private key corresponding to the key ciphertext to obtain a key corresponding to the geographic position ciphertext; and the position decryption module is used for decrypting the geographic position ciphertext through the secret key to obtain the first geographic position of the first reporting node.
In one embodiment, the system further comprises a thermal map-verification module, configured to trigger sending of the statistical regional thermal map to the server when the terminal is a consensus node in the blockchain network; the regional thermodynamic diagrams are used for instructing the server to send the regional thermodynamic diagrams to the display end for displaying.
In one embodiment, as shown in fig. 14, there is provided an apparatus 1400 for displaying regional thermodynamic diagrams, which may be a part of a computer device using a software module or a hardware module, or a combination of the two modules, and specifically includes: a map page display module 1402, a thermodynamic diagram mode response module 1404, and a thermodynamic diagram display module 1406, wherein:
a map page display module 1402, configured to display a map page of an electronic map;
a thermodynamic diagram mode response module 1404 for entering a thermodynamic diagram display mode in response to a thermodynamic diagram display trigger operation for the target geofence;
the thermodynamic diagram display module 1406 is configured to display a dynamically updated regional thermodynamic diagram corresponding to a target geofence within a map region marked with the target geofence in a map page in a thermodynamic diagram display mode;
the regional thermodynamic diagram is obtained by counting the geographic position reported by the node in the online state in the block chain network corresponding to the target geographic fence through a consensus mechanism of the block chain network, wherein the node comprises a terminal which enters the target geographic fence and maintains the online state in the block chain network through a heartbeat packet.
In one embodiment, the thermodynamic diagram display module 1406 is further configured to represent thermodynamic densities in the dynamically updated regional thermodynamic diagram corresponding to the target geofence by different marker colors; the region thermodynamic diagram display device 1400 further comprises a zooming display module, configured to display the region thermodynamic diagram after the region thermodynamic diagram is zoomed through a zooming operation in response to a zooming operation triggered on the region thermodynamic diagram; the thermal density in the scaled regional thermodynamic diagram is represented by the updated marker color.
For specific definitions of the block chain-based regional thermodynamic diagram processing device and the regional thermodynamic diagram display device, reference may be made to the above definitions of the block chain-based regional thermodynamic diagram processing method and the regional thermodynamic diagram display method, and details are not described here again. The respective modules in the block chain-based regional thermodynamic diagram processing device and the regional thermodynamic diagram showing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 15. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a block chain-based regional thermodynamic diagram processing method or a regional thermodynamic diagram presentation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 15 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (36)

1. A regional thermodynamic diagram processing method based on block chains is characterized by comprising the following steps:
when a terminal enters a target geo-fence, the terminal is used as a node to be added into a block chain network corresponding to the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain an online state through heartbeat packets issued by the consensus nodes step by step at regular intervals;
under the condition that the terminal is a reporting node serving as a leaf node and is in an online state, triggering step-by-step reporting of node information until the node information is reported to the consensus node; and the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node.
2. The method of claim 1, further comprising:
acquiring the geographical position of a reporting node reported by each level in the node information reported by the reporting nodes in the blockchain network step by step under the condition that the terminal is a consensus node in the blockchain network and the reporting nodes in the blockchain network are in an online state;
and triggering the geographical position of the reporting node reported according to each level, and counting to obtain the regional thermodynamic diagram.
3. The method of claim 2, wherein the obtaining the geographical location of the reporting node reported at each level in the node information reported by the reporting nodes in the blockchain network step by step comprises:
triggering node information reported step by step from a first reporting node corresponding to the terminal serving as a consensus node, and extracting to obtain a first geographical position of the first reporting node;
acquiring a second geographical position of a second reporting node corresponding to a common node except the terminal in the block chain network based on a common mechanism;
and combining the first geographical position and the second geographical position to obtain the geographical position of the reporting node in the block chain network.
4. The method of claim 2, further comprising:
obtaining a checking area thermodynamic diagram obtained by statistics of common identification nodes except the terminal in the block chain network based on a common identification mechanism;
when the area thermodynamic diagram passes the verification of the verification area thermodynamic diagram, obtaining an area thermodynamic diagram corresponding to the target geofence based on the area thermodynamic diagram and the verification area thermodynamic diagram.
5. The method of claim 2, further comprising:
when the terminal is a consensus node in the block chain network and meets the execution condition of the intelligent contract, triggering to regularly broadcast a heartbeat packet corresponding to the intelligent contract;
and the heartbeat packet corresponding to the intelligent contract is broadcasted regularly and is used for indicating a target terminal receiving the heartbeat packet in the target geo-fence to be added into the block chain network as a reporting node and triggering the target terminal to issue the heartbeat packet step by step to maintain an online state.
6. The method of claim 1, wherein after the terminal enters the target geo-fence, the terminal joins as a node in a blockchain network corresponding to the target geo-fence, and the method comprises:
when a terminal enters a target geo-fence and receives a heartbeat packet sent by a node in a block chain network corresponding to the target geo-fence, the terminal is used as a child node of the node corresponding to the received heartbeat packet and added into the block chain network.
7. The method according to claim 6, wherein the terminal receives more than one heartbeat packet corresponding to more than one node; the adding of the terminal into the block chain network as a child node of a node corresponding to the received heartbeat packet comprises the following steps:
the terminal carries out node registration with the nodes corresponding to the received heartbeat packets in sequence according to the receiving sequence of the received heartbeat packets;
and when the terminal is successfully registered, triggering a child node of a target node corresponding to the successful node registration to be added into the block chain network.
8. The method of claim 1,
the node information reported to the consensus node comprises a geographical position ciphertext obtained by symmetrically encrypting the geographical position of the reported node at each stage and a key ciphertext obtained by asymmetrically encrypting a key corresponding to the geographical position ciphertext;
and the node information reported to the consensus node is also used for indicating the consensus node to decrypt the key ciphertext and the geographic position ciphertext in sequence, and then obtaining a regional thermodynamic diagram according to geographic position statistics of the reported node at each level obtained by decryption.
9. The method according to any one of claims 1 to 8, further comprising:
under the condition that the terminal is located in the target geographic fence and the update of the consensus node is triggered, a consensus algorithm-based consensus node application is triggered;
and when the consensus node application is successful, the terminal is updated to be the consensus node in the block chain network.
10. The method of claim 9, further comprising:
when the condition of the consensus node update is met, triggering the consensus node update; the common node updating condition comprises at least one of a common node updating period, common node offline and regional thermodynamic diagram check failure.
11. The method of claim 1, further comprising:
and under the condition that the child node of the terminal is positioned outside the target geographic fence and the child node of the terminal is in an off-line state, triggering and stopping issuing the heartbeat packet which is periodically and gradually issued by the consensus node to the child node.
12. The method of claim 1, further comprising:
and under the condition that the father node of the terminal is positioned outside the target geographical fence and the father node of the terminal is in an off-line state, triggering a heartbeat packet which is periodically and gradually issued according to the received consensus node, and updating the node relation of the terminal as a node in the block chain network.
13. The method of claim 1, further comprising:
under the condition that a terminal enters the target geographic fence and the terminal fails to join the block chain network as a node, triggering to send the geographic position of the terminal to a server;
and the terminal geographic position is used for indicating the server to update the regional thermodynamic diagrams obtained by the statistics of the consensus node based on the terminal geographic position so as to obtain the updated regional thermodynamic diagrams.
14. The method according to claim 3, wherein the node information includes a geographical location ciphertext obtained by symmetrically encrypting the geographical location of the first reporting node reported at each stage, and a key ciphertext obtained by asymmetrically encrypting a key corresponding to the geographical location ciphertext;
the triggering step of extracting the first geographical position of the first reporting node from the node information reported step by the first reporting node corresponding to the terminal serving as the consensus node includes:
decrypting the key ciphertext based on a private key corresponding to the key ciphertext to obtain a key corresponding to the geographic position ciphertext;
and decrypting the geographic position ciphertext through the key to obtain the first geographic position of the first reporting node.
15. The method of claim 1, further comprising:
under the condition that the terminal is a consensus node in the block chain network, triggering to send the area thermodynamic diagram obtained through statistics to a server; the area thermodynamic diagram is used for instructing the server to send the area thermodynamic diagram to a display end for displaying.
16. A regional thermodynamic diagram display method, comprising:
displaying a map page of an electronic map;
entering a thermodynamic diagram display mode in response to a thermodynamic diagram display trigger operation for the target geofence;
in the thermodynamic diagram display mode, displaying a dynamically updated regional thermodynamic diagram corresponding to a target geofence within a map region marked by the target geofence in the map page;
the regional thermodynamic diagram is obtained by counting the geographical positions of the common nodes in the block chain network corresponding to the target geo-fence according to the reported node information of the common nodes, wherein the reported node information of the common nodes carries the geographical positions of the reported nodes at each level; after a terminal entering the target geo-fence is used as a node and added into the block chain network, under the condition that the terminal is used as a reporting node of a leaf node and is in an online state, the step-by-step reporting of the node information is triggered until the node information is reported to the consensus node; the nodes in the block chain network comprise at least one level of reporting node and the consensus node serving as an ancestor node of the reporting node, and the reporting node maintains an online state through heartbeat packets issued by the consensus node step by step periodically.
17. The method of claim 16, wherein displaying the dynamically updated regional thermodynamic diagram corresponding to the target geofence comprises:
representing thermodynamic densities in the dynamically updated regional thermodynamic diagram corresponding to the target geofence by different marker colors;
the method further comprises the following steps:
in response to a zooming operation triggered on the regional thermodynamic diagram, displaying the regional thermodynamic diagram subjected to zooming processing on the regional thermodynamic diagram through the zooming operation;
and representing the thermal density in the scaled regional thermodynamic diagram by the updated mark color.
18. A block chain-based regional thermodynamic diagram processing apparatus, the apparatus comprising:
the node adding module is used for adding the terminal serving as a node into a block chain network corresponding to a target geo-fence after the terminal enters the target geo-fence; the nodes in the block chain network comprise at least one level of reporting nodes and consensus nodes serving as ancestor nodes of the reporting nodes, and the reporting nodes maintain an online state through heartbeat packets issued by the consensus nodes step by step at regular intervals;
a position reporting module, configured to trigger progressive node information reporting until the consensus node is reported when the terminal is a reporting node serving as a leaf node and is in an online state; and the node information reported to the consensus node carries the geographical position of the reported node at each level, and is used for indicating the consensus node to obtain the regional thermodynamic diagram according to the geographical position statistics in the node information reported to the consensus node.
19. The apparatus of claim 18, further comprising:
the thermodynamic diagram counting module is used for acquiring the geographical position of the reporting node reported by each level in the node information reported by the reporting nodes in the block chain network step by step under the condition that the terminal is a consensus node in the block chain network and the reporting nodes in the block chain network are in an online state; and triggering the geographical position of the reporting node reported according to each level, and counting to obtain the regional thermodynamic diagram.
20. The apparatus of claim 19, wherein the thermodynamic diagram statistics module comprises:
the first position extraction module is used for triggering the first geographical position of a first reporting node which is taken as a common node by the terminal and is reported by the first reporting node step by step;
a second location obtaining module, configured to obtain, based on a consensus mechanism, a second geographic location of a second reporting node corresponding to a consensus node in the block chain network, except for the terminal;
and the position fusion module is used for combining the first geographical position and the second geographical position to obtain the geographical position of the reporting node in the block chain network.
21. The apparatus of claim 19, further comprising:
the thermodynamic diagram consensus module is used for obtaining a checking area thermodynamic diagram obtained by statistics of consensus nodes except the terminal in the block chain network based on a consensus mechanism;
an thermodynamic diagram determining module, configured to, when the area thermodynamic diagram passes the verification with the verification area thermodynamic diagram, obtain an area thermodynamic diagram corresponding to the target geofence based on the area thermodynamic diagram and the verification area thermodynamic diagram.
22. The apparatus of claim 19, further comprising:
the intelligent contract processing module is used for triggering the periodic broadcast of the heartbeat packet corresponding to the intelligent contract when the terminal is a consensus node in the block chain network and meets the execution condition of the intelligent contract; and the heartbeat packet corresponding to the intelligent contract is broadcasted regularly and is used for indicating a target terminal receiving the heartbeat packet in the target geo-fence to be added into the block chain network as a reporting node and triggering the target terminal to issue the heartbeat packet step by step to maintain an online state.
23. The apparatus of claim 18,
the node adding module is further configured to, when the terminal enters the target geo-fence and receives the heartbeat packet sent by the node in the block chain network corresponding to the target geo-fence, add the terminal to the block chain network as a child node of the node corresponding to the received heartbeat packet.
24. The apparatus according to claim 23, wherein the terminal receives more than one heartbeat packet corresponding to more than one node;
the node adding module is also used for the terminal to perform node registration with the nodes corresponding to the received heartbeat packets in sequence according to the receiving sequence of the received heartbeat packets; and when the terminal is successfully registered, triggering a child node of a target node corresponding to the successful node registration to be added into the block chain network.
25. The apparatus according to claim 18, wherein the node information reported to the consensus node includes a geographic position ciphertext obtained by performing symmetric encryption processing on the geographic position of the reporting node reported at each stage, and a key ciphertext obtained by performing asymmetric encryption processing on a key corresponding to the geographic position ciphertext;
and the node information reported to the consensus node is also used for indicating the consensus node to decrypt the key ciphertext and the geographic position ciphertext in sequence, and then obtaining a regional thermodynamic diagram according to geographic position statistics of the reported node at each level obtained by decryption.
26. The apparatus of any one of claims 18 to 25, further comprising:
the consensus node updating module is used for triggering consensus node application based on a consensus algorithm under the condition that the terminal is located in the target geographic fence and the consensus node is triggered to be updated; and when the consensus node application is successful, the terminal is updated to be the consensus node in the block chain network.
27. The apparatus of claim 26, further comprising:
the consensus node updating triggering module is used for triggering the consensus node to update when the consensus node updating condition is met; the common node updating condition comprises at least one of a common node updating period, common node offline and regional thermodynamic diagram check failure.
28. The apparatus of claim 18, further comprising:
and the child node abandoning module is used for triggering and stopping issuing the heartbeat packet which is issued step by the consensus node to the child node under the condition that the child node of the terminal is positioned outside the target geographic fence and the child node of the terminal is in an off-line state.
29. The apparatus of claim 18, further comprising:
and the node relationship updating module is used for triggering heartbeat packets issued periodically and step by step according to the received consensus node under the condition that the father node of the terminal is positioned outside the target geographical fence and the father node of the terminal is in an off-line state, and updating the node relationship of the terminal as the node in the block chain network.
30. The apparatus of claim 18, further comprising:
the isolated node processing module is used for triggering and sending the terminal geographic position of the terminal to a server under the condition that the terminal enters the target geographic fence and the terminal fails to be added to the block chain network as a node;
and the terminal geographic position is used for indicating the server to update the regional thermodynamic diagrams obtained by the statistics of the consensus node based on the terminal geographic position so as to obtain the updated regional thermodynamic diagrams.
31. The apparatus according to claim 20, wherein the node information includes a geographic position ciphertext obtained by performing symmetric encryption processing on the geographic position of the first reporting node reported at each stage, and a key ciphertext obtained by performing asymmetric encryption processing on a key corresponding to the geographic position ciphertext;
the first position extraction module includes:
the key decryption module is used for decrypting the key ciphertext based on a private key corresponding to the key ciphertext to obtain a key corresponding to the geographic position ciphertext;
and the position decryption module is used for decrypting the geographic position ciphertext through the secret key to obtain the first geographic position of the first reporting node.
32. The apparatus of claim 18, further comprising:
the thermal map-memory module is used for triggering and sending the counted regional thermal map to a server under the condition that the terminal is a consensus node in the block chain network; the area thermodynamic diagram is used for instructing the server to send the area thermodynamic diagram to a display end for displaying.
33. An area thermodynamic diagram display apparatus, comprising:
the map page display module is used for displaying a map page of the electronic map;
a thermodynamic diagram mode response module for entering a thermodynamic diagram display mode in response to a thermodynamic diagram display trigger operation for the target geofence;
the thermodynamic diagram display module is used for displaying a dynamically updated regional thermodynamic diagram corresponding to a target geographic fence in a map region marked with the target geographic fence in the map page in the thermodynamic diagram display mode;
the regional thermodynamic diagram is obtained by counting the geographical positions of the common nodes in the block chain network corresponding to the target geo-fence according to the reported node information of the common nodes, wherein the reported node information of the common nodes carries the geographical positions of the reported nodes at each level; after a terminal entering the target geo-fence is used as a node and added into the block chain network, under the condition that the terminal is used as a reporting node of a leaf node and is in an online state, the step-by-step reporting of the node information is triggered until the node information is reported to the consensus node; the nodes in the block chain network comprise at least one level of reporting node and the consensus node serving as an ancestor node of the reporting node, and the reporting node maintains an online state through heartbeat packets issued by the consensus node step by step periodically.
34. The apparatus of claim 33,
the thermodynamic diagram display module is further used for representing the thermodynamic density in the dynamically updated regional thermodynamic diagram corresponding to the target geofence through different marking colors;
the device further comprises:
the zooming display module is used for responding to zooming operation triggered by the regional thermodynamic diagrams, and displaying the regional thermodynamic diagrams subjected to zooming processing by the zooming operation; and representing the thermal density in the scaled regional thermodynamic diagram by the updated mark color.
35. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 17.
36. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 17.
CN202110490286.6A 2021-05-06 2021-05-06 Regional thermodynamic diagram processing method and device based on block chain and computer equipment Active CN112988878B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110490286.6A CN112988878B (en) 2021-05-06 2021-05-06 Regional thermodynamic diagram processing method and device based on block chain and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110490286.6A CN112988878B (en) 2021-05-06 2021-05-06 Regional thermodynamic diagram processing method and device based on block chain and computer equipment

Publications (2)

Publication Number Publication Date
CN112988878A CN112988878A (en) 2021-06-18
CN112988878B true CN112988878B (en) 2021-08-13

Family

ID=76336980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110490286.6A Active CN112988878B (en) 2021-05-06 2021-05-06 Regional thermodynamic diagram processing method and device based on block chain and computer equipment

Country Status (1)

Country Link
CN (1) CN112988878B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338668B (en) * 2021-12-07 2023-10-31 中国联合网络通信集团有限公司 Data verification method, system, storage medium and equipment based on consensus mechanism

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191197A (en) * 2018-08-24 2019-01-11 陕西优米数据技术有限公司 Video passenger flow statistical analysis based on block chain technology
CN110765220A (en) * 2019-10-16 2020-02-07 浙江每日互动网络科技股份有限公司 Thermodynamic diagram-based geographic position determining method and electronic equipment
CN111586561A (en) * 2020-04-28 2020-08-25 中国联合网络通信集团有限公司 Tourist information statistics and analysis method and device based on block chain network, and gateway
CN111988734A (en) * 2020-08-28 2020-11-24 北京思特奇信息技术股份有限公司 Regional marketing method and system based on thermodynamic diagram

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9485620B2 (en) * 2014-02-20 2016-11-01 Denice M. HENSON Dynamic event notification system for mobile devices
US10347365B2 (en) * 2017-02-08 2019-07-09 10X Genomics, Inc. Systems and methods for visualizing a pattern in a dataset
CN110727731B (en) * 2019-09-05 2021-12-21 创新先进技术有限公司 Method for adding node in block chain network and block chain system
CN111709659A (en) * 2020-06-23 2020-09-25 中国平安财产保险股份有限公司 Intelligent scheduling method, device, equipment and storage medium for outworker
CN112733049A (en) * 2020-12-25 2021-04-30 深圳前海微众银行股份有限公司 Vehicle information display method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191197A (en) * 2018-08-24 2019-01-11 陕西优米数据技术有限公司 Video passenger flow statistical analysis based on block chain technology
CN110765220A (en) * 2019-10-16 2020-02-07 浙江每日互动网络科技股份有限公司 Thermodynamic diagram-based geographic position determining method and electronic equipment
CN111586561A (en) * 2020-04-28 2020-08-25 中国联合网络通信集团有限公司 Tourist information statistics and analysis method and device based on block chain network, and gateway
CN111988734A (en) * 2020-08-28 2020-11-24 北京思特奇信息技术股份有限公司 Regional marketing method and system based on thermodynamic diagram

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"区块链数据的可视化分析";朱晓菊 等;《艺术与设计(理论)》;20200415;第32-34页 *

Also Published As

Publication number Publication date
CN112988878A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
Yang et al. Security and privacy in mobile crowdsourcing networks: challenges and opportunities
CN109922162B (en) Flat building equipment Internet of things monitoring system and method based on block chain
Yu et al. CrowdR-FBC: A distributed fog-blockchains for mobile crowdsourcing reputation management
Puthal et al. SEEN: A selective encryption method to ensure confidentiality for big sensing data streams
CN111930851A (en) Control data processing method, device, medium and electronic equipment of block chain network
Ni et al. Secure and deduplicated spatial crowdsourcing: A fog-based approach
CN111556120A (en) Data processing method and device based on block chain, storage medium and equipment
EP3920503A1 (en) Resource request method, device and storage medium
Mershad et al. Proof of accumulated trust: A new consensus protocol for the security of the IoV
CN109858272A (en) Blacklist data processing system based on block chain
Sicari et al. Insights into security and privacy towards fog computing evolution
CN109634615A (en) Dissemination method, verification method and the device of application installation package
CN112988878B (en) Regional thermodynamic diagram processing method and device based on block chain and computer equipment
Khan et al. SPICE-IT: Smart COVID-19 pandemic controlled eradication over NDN-IoT
CN107637012A (en) The systems, devices and methods of security coordination are carried out to the meeting point of distributed apparatus using entropy multiplexing
TW202240445A (en) De-centralized data authorization control system capable of transferring read token from block chain subsystem to data requester device
CN113988318A (en) Federal learning method, apparatus, electronic device, and medium
Kumar et al. Enhancing the connectivity and resiliency of random key pre-distribution schemes for wireless sensor network
Mengjun et al. Privacy-preserving distributed location proof generating system
CN113938883B (en) Data encryption sending method and device based on intermediate node
CN109033776A (en) A kind of personnel management methods, system, equipment and computer readable storage medium
CN115953244A (en) Transaction supervision method and device based on block chain, electronic equipment and storage medium
CN110532786A (en) Using the block chain blacklist sharing method of Hash desensitization process
TW202240442A (en) De-centralized data authorization control system capable of forwarding token request through third-party service subsystem
TW202240443A (en) De-centralized data authorization control system capable of flexibly adjusting data authorization policy

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40046428

Country of ref document: HK