A charging pile search method and system based on alliance chain and multi-way search tree
By introducing alliance chains and multiple search trees into the charging pile system, the problems of uneven distribution and centralized management in the existing charging pile search solutions are solved, and the function of users to quickly and conveniently find available charging piles is realized, improving the stability and user experience of the system.
Patent Information
- Application Number
- CN202410796466.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-06-19
AI Technical Summary
The existing charging pile search solutions have single point failure problems caused by uneven distribution and centralized management, and the degree of personalization is low, so the remaining waiting time of the charging pile cannot be displayed in real time, resulting in low usage.
The method based on alliance chain and multi-channel search tree is adopted to realize decentralized query through multiple rounds of communication interaction between blockchain nodes, and the query time is reduced by using multiple-channel search tree, and the usage status of charging piles is judged through a consensus mechanism.
It realizes users to quickly and conveniently find available charging piles, reduces query time, saves equipment costs, improves user experience, and improves the utilization rate of charging piles.
Smart Images

Figure CN118861119B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain and data retrieval, and in particular to a charging pile search method and system based on alliance chain and multi-way search tree. Background Art
[0002] With the increasing number of new energy vehicles, the demand for efficient, convenient and reliable charging equipment is growing rapidly. In this context, providing new energy vehicle owners with a solution to quickly find nearby charging piles has become an important trend in market and technological development. However, in reality, the existing charging pile business locations are unevenly distributed and small in number, and rely on centralized management, which has a single point of failure problem. In addition, the current charging pile search application is not highly personalized, and only realizes the map display of the location of the charging pile and the availability of the charging pile, but does not display the remaining waiting time of the charging pile, which is extremely unfriendly during the peak charging period, resulting in a low utilization rate of the charging pile.
[0003] Existing charging pile search solutions have the following shortcomings: First, existing solutions usually rely on installing sensors on charging piles and using IoT technology to determine the availability of charging piles, which itself involves certain expenses. Given that most charging piles are outdoors, it is necessary to consider the damage caused to sensors by severe weather conditions, and over time, the maintenance of sensors also requires additional manpower costs. Secondly, existing charging pile search solutions are usually centralized and may face problems such as single point failures, privacy leaks, and unreliable data. Related applications are usually based on simple database queries, which fail to solve the need to quickly locate idle charging piles in a vast and dynamically changing geographical area. They are not user-friendly and lack personalized display settings. Summary of the invention
[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a charging pile search method and system based on an alliance chain and a multi-way search tree, so that users can quickly and conveniently find available charging piles, thereby reducing query time, saving equipment costs, and improving user experience.
[0005] According to one aspect of the present invention, the present invention provides a charging pile search method based on an alliance chain and a multi-way search tree, the method comprising the following steps:
[0006] S1: Initialize the system and generate public parameters. The system at least includes a charger, a charging pile owner and a blockchain node;
[0007] S2: The charging pile owner submits a transaction and the location information of the charging pile to the blockchain node, and the blockchain node uploads the transaction to the blockchain and updates the multi-way search tree; the transaction indicates that the charging pile owner requests to submit a new charging pile to provide charging services;
[0008] S3: The charger submits a query request to the blockchain node. After receiving the request, the blockchain node traverses the multi-way search tree and returns a set of available charging piles that meet the charging requirements to the charger. The charger selects a node from the set and notifies the blockchain node. After receiving the message, the blockchain node uploads the search transaction to the chain and then modifies the multi-way search tree.
[0009] S4: After charging is completed, the charger submits a request to process the transaction to the blockchain node, and the blockchain node modifies the availability attribute value of a specific node in the multi-way search tree.
[0010] Preferably, the system further comprises a key generation center, and the step S1 comprises:
[0011] The key generation center randomly selects a random number as the system master key, calculates the system's public key, defines secure hash functions and encryption and decryption algorithms, discloses system parameters, and records them on the blockchain;
[0012] The key generation center sends the calculated public and private key pairs, blockchain public key addresses and registration certificates of the participants to the users through a secure channel based on the identity strings provided by the participants.
[0013] The blockchain node initializes the multi-way search tree, determines the maximum number of child nodes of the multi-way search tree according to the number of charging piles in the current area, and initializes it.
[0014] Preferably, S2 includes:
[0015] The charging pile owner sends the transaction and the system time when the transaction is submitted to the blockchain node through a message;
[0016] The blockchain node determines whether the transaction is valid based on the system time when the transaction is submitted and the system time when the transaction is received, and determines whether the message data is complete;
[0017] After confirming the data integrity of the message, the blockchain node inserts the new node into the multi-way search tree;
[0018] Blockchain nodes broadcast transactions, consensus nodes verify them, and after verification, transactions are recorded in the blockchain.
[0019] Preferably, S3 includes:
[0020] The charger submits a transaction request to the blockchain node to request charging and the time required to occupy the charging pile. After the blockchain node confirms that the transaction is valid, it traverses the multi-way search tree to determine the set of available charging piles.
[0021] The blockchain node returns the set of available charging piles to the charger, and the charger selects a node in the set as the charging pile to be used, and submits the node, the current system time, and a transaction indicating a request for charging fee settlement to the blockchain node;
[0022] Blockchain nodes broadcast transactions for consensus. After consensus is passed, transactions are uploaded to the chain, and blockchain nodes modify the structure of the multi-way search tree.
[0023] Preferably, the S4 includes:
[0024] The charger submits a transaction to the blockchain node indicating the end of charging and the currently selected charging pile node;
[0025] The blockchain node broadcasts the transaction for consensus, traverses and searches the multi-way search tree according to the time information in the charging pile node, deletes this node and inserts a new node, and sets the properties of the new node to be available;
[0026] When a blockchain node inserts a node into a multi-way search tree, if the number of node children reaches the maximum number of children, a split adjustment is performed;
[0027] When a blockchain node deletes a node in a multi-way search tree, if the number of node children is less than the preset value, a merge adjustment is performed.
[0028] Preferably, the system further comprises a regulatory agency, and the method further comprises step S5:
[0029] The charger reports suspected malicious occupation of the charging pile to the blockchain node; the blockchain node verifies the charger's report, checks the real-time status of the charging pile, and after confirming the existence of malicious behavior, updates the status of the corresponding charging pile in the multi-way search tree;
[0030] Blockchain nodes restrict malicious users’ access to charging stations within the chain and mark their bad behavior on the blockchain;
[0031] Blockchain nodes notify regulators of malicious behavior records and actions taken.
[0032] According to another aspect of the present invention, the present invention also provides a charging pile search system based on alliance chain and multi-way search tree, wherein the system at least includes a charger, a charging pile owner and a blockchain node; wherein,
[0033] The charging pile owner submits a transaction and the location information of the charging pile to the blockchain node, and the blockchain node uploads the transaction to the blockchain and updates the multi-way search tree; the transaction indicates that the charging pile owner requests to submit a new charging pile to provide charging services;
[0034] The charger submits a query request to the blockchain node. After receiving the request, the blockchain node traverses the multi-way search tree and returns a set of available charging piles that meet the charging requirements to the charger. The charger selects a node from the set and notifies the blockchain node. After receiving the message, the blockchain node uploads the search transaction to the chain and then modifies the multi-way search tree.
[0035] After charging is completed, the charger submits a request to process the transaction to the blockchain node, and the blockchain node modifies the availability attribute value of a specific node in the multi-way search tree.
[0036] Preferably, the system further comprises a key generation center:
[0037] The key generation center randomly selects a random number as the system master key, calculates the system's public key, defines secure hash functions and encryption and decryption algorithms, discloses system parameters, and records them on the blockchain;
[0038] The key generation center sends the calculated public and private key pairs, blockchain public key addresses and registration certificates of the participants to the users through a secure channel based on the identity strings provided by the participants.
[0039] The blockchain node initializes the multi-way search tree, determines the maximum number of child nodes of the multi-way search tree according to the number of charging piles in the current area, and initializes it.
[0040] Preferably,
[0041] The charging pile owner sends the transaction and the system time when the transaction is submitted to the blockchain node through a message;
[0042] The blockchain node determines whether the transaction is valid based on the system time when the transaction is submitted and the system time when the transaction is received, and determines whether the message data is complete;
[0043] After confirming the data integrity of the message, the blockchain node inserts the new node into the multi-way search tree;
[0044] Blockchain nodes broadcast transactions, consensus nodes verify them, and after verification, transactions are recorded in the blockchain.
[0045] Preferably,
[0046] The charger submits a transaction request to the blockchain node to request charging and the time required to occupy the charging pile. After the blockchain node confirms that the transaction is valid, it traverses the multi-way search tree to determine the set of available charging piles.
[0047] The blockchain node returns the set of available charging piles to the charger, and the charger selects a node in the set as the charging pile to be used, and submits the node, the current system time, and a transaction indicating a request for charging fee settlement to the blockchain node;
[0048] Blockchain nodes broadcast transactions for consensus. After consensus is passed, transactions are uploaded to the chain, and blockchain nodes modify the structure of the multi-way search tree.
[0049] Beneficial effects: The present invention does not rely on the traditional centralized database management system for querying available charging piles, but realizes decentralized query through multiple rounds of communication interaction between charging users and blockchain nodes, and introduces a multi-way search tree to reduce query time. When judging whether the charging pile is idle, the use status of the charging pile is determined through a consensus mechanism, which effectively saves equipment costs, helps users quickly and conveniently find available charging piles, and improves user experience.
[0050] The features and advantages of the present invention will become clear through reference to the following drawings and detailed description of specific embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flow chart of a charging pile search method based on a consortium chain and a multi-way search tree;
[0052] Figure 2 It is a schematic diagram of a multi-way search tree structure;
[0053] Figure 3 This is a schematic diagram of the insertion adjustment case of a multi-way search tree;
[0054] Figure 4 This is a schematic diagram of a deletion adjustment case of a multi-way search tree;
[0055] Figure 5 This is a schematic diagram of a charging pile search system based on consortium chain and multi-way search tree. DETAILED DESCRIPTION
[0056] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] Example 1
[0058] Figure 1 This is a flow chart of the charging pile search method based on the alliance chain and multi-way search tree. Figure 1As shown, this embodiment provides a charging pile search method based on alliance chain and multi-way search tree, and the method includes the following steps:
[0059] S1: Initialize the system and generate public parameters. The system at least includes a charger, a charging pile owner and a blockchain node;
[0060] S2: The charging pile owner submits a transaction and the location information of the charging pile to the blockchain node, and the blockchain node uploads the transaction to the blockchain and updates the multi-way search tree; the transaction indicates that the charging pile owner requests to submit a new charging pile to provide charging services;
[0061] S3: The charger submits a query request to the blockchain node. After receiving the request, the blockchain node traverses the multi-way search tree and returns a set of available charging piles that meet the charging requirements to the charger. The charger selects a node from the set and notifies the blockchain node. After receiving the message, the blockchain node uploads the search transaction to the chain and then modifies the multi-way search tree.
[0062] S4: After charging is completed, the charger submits a request to process the transaction to the blockchain node, and the blockchain node modifies the availability attribute value of a specific node in the multi-way search tree.
[0063] In this embodiment, the following concepts are involved:
[0064] Hash function: The process of mapping a binary string of any length into a binary string of a specified length is called a hash algorithm. The binary string obtained after the original data is mapped is the hash value. For blockchain technology, a secure hash function should have collision resistance and concealment.
[0065] Consensus mechanism and consensus nodes: The consensus mechanism completes the verification and confirmation of transactions in a very short time through the voting of special nodes; for a transaction, if several nodes (consensus nodes) with irrelevant interests can reach a consensus, it can be considered that the entire system has reached a consensus on it. Consensus nodes refer to nodes in the blockchain other than client nodes (nodes that publish transactions). A transaction is considered valid only when the majority of consensus nodes agree on it, otherwise the transaction will not be executed and uploaded to the chain.
[0066] Multi-way search tree (MT for short) is a data structure. It is a multi-branch tree. Each node can have multiple child nodes. It is usually used to organize large amounts of data and support efficient search operations. Each node contains a set of ordered key-value pairs for quickly locating target values. Through the hierarchical structure and ordered nature of the tree, the multi-way search tree can achieve fast search operations in average cases. For example, B-tree and B+ tree are common variants of multi-way search trees. The multi-way search tree structure in the present invention is as follows: Figure 2 shown.
[0067] Charger: After real-name registration, the charger is allowed to communicate with the blockchain node and query available charging piles. Detailed information of the charging process (such as location, time, etc.) is recorded on the chain after consensus. After the charging transaction is uploaded to the chain, the charging pile starts to supply power.
[0068] Charging pile owner: After real-name registration, submit transactions related to the new charging pile information to the blockchain. After consensus, the blockchain node modifies the multi-way search tree and adds a new node to the tree.
[0069] Blockchain nodes: Qualified users become blockchain nodes after real-name authentication, and are responsible for participating in consensus, conducting multiple rounds of communication with chargers, maintaining multi-way search trees, and forming a consortium chain with chargers and charging pile owners. Under the practical Byzantine fault-tolerant consensus, malicious nodes accounting for 33% of the total number of nodes are allowed.
[0070] Key Generation Center (KGC): A third-party trusted organization responsible for initializing public parameters and generating keys and registration certificates for each entity in the scheme.
[0071] Regulatory agencies: The regulatory agencies are composed of community workers and government staff. They are responsible for supervising user behavior and recording malicious behavior (such as chargers occupying charging piles for a long time, charging pile owners falsely uploading new charging pile information, etc.), but do not participate in consensus.
[0072] Transaction: Also known as transaction, there are different types of transactions in this article, namely TX_CREATE, TX_CHARGE, TX_PAY, TX_SETTLEMENT and TX_REPORT. TX_CREATE type of transaction means that the user wants to submit a new charging pile, TX_CHARGE type of transaction means that the user wants to search for available charging piles, TX_PAY type of transaction means that the user wants to settle the charging fee, TX_SETTLEMENT means that the user has finished charging and notified the blockchain node, and TX_REPORT type of transaction means that the user reports malicious behavior. Blockchain nodes process corresponding transactions according to the different types of transactions received to speed up the processing speed.
[0073] This method enables users to quickly and conveniently find available charging piles, reduces query time, saves equipment costs, and improves user experience.
[0074] Preferably, the system further comprises a key generation center, and the step S1 comprises:
[0075] The key generation center randomly selects a random number as the system master key, calculates the system's public key, defines secure hash functions and encryption and decryption algorithms, discloses system parameters, and records them on the blockchain;
[0076] The key generation center sends the calculated public and private key pairs, blockchain public key addresses and registration certificates of the participants to the users through a secure channel based on the identity strings provided by the participants.
[0077] The blockchain node initializes the multi-way search tree, determines the maximum number of child nodes of the multi-way search tree according to the number of charging piles in the current area, and initializes it.
[0078] Specifically, this step includes:
[0079] Step 1: Initialize the system and generate public parameters. Participants include chargers, charging pile owners, key generation centers, blockchain nodes, and regulators.
[0080] Step 1 The specific implementation steps are as follows:
[0081] Step 1.1 Each participant generates an identity string ID∈{0, 1} associated with his or her role * , the associated binary strings generated by the charger, charging pile owner, key generation center KGC, and regulatory agency are respectively represented as
[0082] {ID r , ID o , ID c , ID m}
[0083] Step 1.2 Input system parameter λ and select additive cyclic group G 1 and the multiplicative cyclic group G 2 , and |G 1 |=|G 2 |=q, q is a large prime number of λ bits, P is the group G 1 The generator of and set the bilinear map e: G 1 ×G 1 →G 2 .
[0084] Step 1.3 Key generation center randomly selected As the system master key, Represents the integer multiplication group modulo q, and calculates its public key as K pu = rP. Define three secure hash functions and encryption and decryption algorithms Enc(·), Dec(·). The secure hash functions are:
[0085]
[0086] Public system parameters {G 1 , G 2, P, K pu ,Enc(·),Dec(·),H 1 , H 2 , H 3} and recorded on the blockchain, where n and k are positive integers. The larger the value, the higher the randomness of the generated string.
[0087] Step 1.4 KGC calculates the identity string ID∈{0, 1} provided by each participant. * , calculate Q ID =H 1 (ID||rand),sk ID =rQ ID , pk ID =sk ID P,Addr ID =Hash(pk ID ), and Cert ID =Sig r (H 2 (ID||pk ID ), exp), where rand is a random number generated by the system, (sk ID , pk ID ) is the public and private key pair of the participant, Addr ID is the participant’s blockchain public key address, Cert ID is the participant's registration certificate, which is generated by the private key signature of KGC, exp is the registration number, and Hash() is the universal hash function. <sk ID , pk ID ,Addr ID , Cert ID >Send to user.
[0088] Step 1.5 The blockchain node (which can be either the charger or the charging pile owner) initializes the multi-way search tree MT, determines the m value of the multi-way search tree MT according to the number of charging piles in the current area, and initializes m = Log 10 N , where N is the number of charging piles in the current area, and the m value represents the maximum number of child nodes in the multi-way search tree MT.
[0089] Preferably, S2 includes:
[0090] The charging pile owner sends the transaction and the system time when the transaction is submitted to the blockchain node through a message;
[0091] The blockchain node determines whether the transaction is valid based on the system time when the transaction is submitted and the system time when the transaction is received, and determines whether the message data is complete;
[0092] After confirming the data integrity of the message, the blockchain node inserts the new node into the multi-way search tree;
[0093] Blockchain nodes broadcast transactions, consensus nodes verify them, and after verification, transactions are recorded in the blockchain.
[0094] Specifically, see Figure 3 , the specific implementation steps of Step 2 are as follows:
[0095] Step 2.1 Charging station owner ID o calculate Where T 1 Indicates the system time when the transaction is submitted, Msg indicates the specific location information of the charging pile, Indicates the private key of the charging pile owner. Indicates the blockchain public key address of the charging pile owner, submits transaction tx_n and sends a message To the blockchain node.
[0096] Step 2.2 After the blockchain node receives the transaction tx_n and the message β, it calculates |T 2 -T 1 |, if |T 2 -T 1 |≤ΔT, indicating that the transaction is valid, otherwise the transaction execution is directly terminated, where ΔT is a value adjusted according to the current system throughput, T 2 Indicates the system time when the transaction was received. Calculation To determine the data integrity of the message. Among them, || means connecting two numbers together, e(α, P) represents a bilinear mapping function, under the bilinear mapping e, a and p are mapped to obtain a value.
[0097] Step 2.3 After confirming the data integrity of the message, the blockchain node inserts a new node ND into the multi-way search tree MT.<t,msg,u> , where t represents the system time when the new node is inserted, u represents the charging pile availability and the initial value is set to true for available (false for unavailable).
[0098] Step 2.4 The blockchain node broadcasts the transaction tx_n, and the consensus node verifies it. After verification, the transaction is recorded in the blockchain.
[0099] Preferably, S3 includes:
[0100] The charger submits a transaction request to the blockchain node to request charging and the time required to occupy the charging pile. After the blockchain node confirms that the transaction is valid, it traverses the multi-way search tree to determine the set of available charging piles.
[0101] The blockchain node returns the set of available charging piles to the charger, and the charger selects a node in the set as the charging pile to be used, and submits the node, the current system time, and a transaction indicating a request for charging fee settlement to the blockchain node;
[0102] Blockchain nodes broadcast transactions for consensus. After consensus is passed, transactions are uploaded to the chain, and blockchain nodes modify the structure of the multi-way search tree.
[0103] Specifically, the implementation steps of Step 3 are as follows:
[0104] Step 3.1 Charger ID r Submit transaction tx_c with transaction type TX_CHARGE and the time T (usage time) required to occupy the charging pile to the blockchain node. After receiving transaction tx_c, the blockchain node first checks |T 2 -T 1 |≤ΔT, after confirming that the transaction tx_c is valid, the multi-way search tree MT is traversed and retrieved and a set S is returned to the charger. Each element in the set is a node ND in the MT tree.<t,msg,u> , and for any ND∈S, |T 3 -T 1 |≤ΔR, where T 3 Indicates the time point at which the charging pile becomes available. The value of ΔR is determined by the transaction throughput of the system in the current time period. High throughput means that there is a large demand for charging in the current area, and the corresponding value of ΔR needs to be increased to find more charging piles for users. Low throughput means that there is a small demand for charging in the current area, and the corresponding value of ΔR needs to be reduced to find charging piles that can be used immediately for users as much as possible.
[0105] Step 3.2 The blockchain node returns the set S to the charger ID r , the charger selects one of the nodes ND as the charging pile to be used, and submits the transaction tx_p with transaction type TX_PAY, node ND and current system time C to the blockchain node.
[0106] Step 3.3 Blockchain node detects charger ID r Whether the selection time is overtime to improve the operating efficiency of the system, calculate |T 2 -T 1 |≤ΔT, after verification, the transaction tx_p is broadcast for consensus. After consensus is passed, the transaction is put on the chain, and the blockchain node modifies the structure of the MT tree.
[0107] After the consensus in Step 3.4 is passed, the blockchain smart contract is automatically executed and the charging pile starts to supply power. The power supply time is the same as the usage time T submitted by the charger.
[0108] Preferably, the S4 includes:
[0109] The charger submits a transaction to the blockchain node indicating the end of charging and the currently selected charging pile node;
[0110] The blockchain node broadcasts the transaction for consensus, traverses and searches the multi-way search tree according to the time information in the charging pile node, deletes this node and inserts a new node, and sets the properties of the new node to be available;
[0111] When a blockchain node inserts a node into a multi-way search tree, if the number of node children reaches the maximum number of children, a split adjustment is performed;
[0112] When a blockchain node deletes a node in a multi-way search tree, if the number of node children is less than the preset value, a merge adjustment is performed.
[0113] Specifically, see Figure 4 , the specific implementation steps of Step 4 are as follows:
[0114] Step 4.1 Charger ID r Submit transaction tx_s with transaction type TX_SETTLEMEN and the currently selected charging pile node ND to the blockchain node.
[0115] Step 4.2 The blockchain node broadcasts transaction tx_s. After consensus, it traverses and searches the multi-way search tree MT according to the time information in the charging pile node ND, deletes this node and inserts a new node, and changes the availability of the new node to "true".
[0116] Step 4.3 When the blockchain node inserts a node in the MT tree, the number of node children is full (the number of nodes = m-1, where m represents the maximum number of children for a node in the multi-way search tree MT), and a split adjustment is required. The multi-way search tree is a balanced multi-branch tree. When a node cannot accommodate more child nodes, the shape of the tree must be adjusted because there is no suitable position for the new node at this time. The specific principle can refer to the balanced binary tree.
[0117] Step 4.4 When the blockchain node deletes a node in the MT tree, the number of node children is too small ( [.] indicates rounding up), and merging and adjustment are required at this time.
[0118] Preferably, the system further comprises a regulatory agency, and the method further comprises step S5:
[0119] The charger reports suspected malicious occupation of the charging pile to the blockchain node; the blockchain node verifies the charger's report, checks the real-time status of the charging pile, and after confirming the existence of malicious behavior, updates the status of the corresponding charging pile in the multi-way search tree;
[0120] Blockchain nodes restrict malicious users’ access to charging stations within the chain and mark their bad behavior on the blockchain;
[0121] Blockchain nodes notify regulators of malicious behavior records and actions taken.
[0122] Specifically, the implementation steps of Step 5 are as follows:
[0123] Step 5.1 Charger ID r Report suspected malicious occupation of charging piles to the blockchain node by submitting a transaction tx_r with a transaction type of TX_REPORT, including specific violation types such as "abnormal charging time" or "charging pile status shows available but the vehicle remains in place".
[0124] Step 5.2 Blockchain node verifies charger ID r The report checks the real-time status of the charging pile, and after confirming the existence of malicious behavior, updates the status of the corresponding charging pile in the multi-way search tree MT.
[0125] Step 5.3 The blockchain node implements punishment measures against malicious users, restricting their access to charging piles within the chain and marking their bad behavior on the blockchain.
[0126] Step 5.4 The blockchain node notifies the regulator. The blockchain node notifies the regulator of the malicious behavior records and measures taken for further review and possible legal or community action.
[0127] Step 5.5 After the problem is solved, the blockchain node updates the multi-way search tree MT, changes the status of the charging pile to "available", and broadcasts the status update to all users to ensure transparent and timely information.
[0128] The present invention does not rely on the traditional centralized database management system for querying available charging piles, but realizes decentralized query through multiple rounds of communication interaction between charging users and blockchain nodes, and introduces a multi-way search tree to reduce query time. When judging whether the charging pile is idle, the usage status of the charging pile is determined through a consensus mechanism, which effectively saves equipment costs, helps users quickly and conveniently find available charging piles, and improves user experience.
[0129] The scheme of this embodiment combines blockchain technology with a multi-way search tree, and uses the decentralized characteristics of blockchain and the efficient retrieval capabilities of multi-way search trees to provide users with a fast, secure and transparent charging pile search platform. This embodiment encourages users to share personal charging piles, which helps to improve the utilization rate of charging piles and reduce resource waste. Moreover, through the access characteristics of the alliance chain, the distribution locations of charging piles can be restricted, making it easier for users to find nearby available charging piles. The decentralized query mechanism of this embodiment makes the system independent of a single central node, improves the stability and anti-attack capability of the system, and the entire system can continue to operate stably even if some nodes have problems. The introduction of regulatory agencies in this embodiment increases the transparency and credibility of the system. The participation of community workers and government staff ensures the fairness and order of charging pile sharing services. The scheme of this embodiment helps to promote the popularization of new energy vehicles by providing convenient charging services, which is in line with the concepts of green travel and sustainable development.
[0130] Example 2
[0131] Figure 5 This is a schematic diagram of a charging pile search system based on a consortium chain and a multi-way search tree. Figure 5 As shown, this embodiment provides a charging pile search system based on alliance chain and multi-way search tree, and the system at least includes a charger, a charging pile owner and a blockchain node; wherein,
[0132] The charging pile owner submits a transaction and the location information of the charging pile to the blockchain node, and the blockchain node uploads the transaction to the blockchain and updates the multi-way search tree; the transaction indicates that the charging pile owner requests to submit a new charging pile to provide charging services;
[0133] The charger submits a query request to the blockchain node. After receiving the request, the blockchain node traverses the multi-way search tree and returns a set of available charging piles that meet the charging requirements to the charger. The charger selects a node from the set and notifies the blockchain node. After receiving the message, the blockchain node uploads the search transaction to the chain and then modifies the multi-way search tree.
[0134] After charging is completed, the charger submits a request to process the transaction to the blockchain node, and the blockchain node modifies the availability attribute value of a specific node in the multi-way search tree.
[0135] Preferably, the system further comprises a key generation center:
[0136] The key generation center randomly selects a random number as the system master key, calculates the system's public key, defines secure hash functions and encryption and decryption algorithms, discloses system parameters, and records them on the blockchain;
[0137] The key generation center sends the calculated public and private key pairs, blockchain public key addresses and registration certificates of the participants to the users through a secure channel based on the identity strings provided by the participants.
[0138] The blockchain node initializes the multi-way search tree, determines the maximum number of child nodes of the multi-way search tree according to the number of charging piles in the current area, and initializes it.
[0139] Preferably,
[0140] The charging pile owner sends the transaction and the system time when the transaction is submitted to the blockchain node through a message;
[0141] The blockchain node determines whether the transaction is valid based on the system time when the transaction is submitted and the system time when the transaction is received, and determines whether the message data is complete;
[0142] After confirming the data integrity of the message, the blockchain node inserts the new node into the multi-way search tree;
[0143] Blockchain nodes broadcast transactions, consensus nodes verify them, and after verification, transactions are recorded in the blockchain.
[0144] Preferably,
[0145] The charger submits a transaction request to the blockchain node to request charging and the time required to occupy the charging pile. After the blockchain node confirms that the transaction is valid, it traverses the multi-way search tree to determine the set of available charging piles.
[0146] The blockchain node returns the set of available charging piles to the charger, and the charger selects a node in the set as the charging pile to be used, and submits the node, the current system time, and a transaction indicating a request for charging fee settlement to the blockchain node;
[0147] Blockchain nodes broadcast transactions for consensus. After consensus is passed, transactions are uploaded to the chain, and blockchain nodes modify the structure of the multi-way search tree.
[0148] The specific implementation process of the functions realized by the charger, charging pile owner, key generation center, and blockchain node in this embodiment 2 is the same as the implementation process in embodiment 1, and will not be repeated here.
[0149] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A charging pile search method based on alliance chain and multi-way search tree, characterized in that: The method comprises the following steps: S1: Initialize the system and generate public parameters. The system at least includes a charger, a charging pile owner and a blockchain node; S2: The owner of the charging pile submits a transaction and the location information of the charging pile to the blockchain node, and the blockchain node uploads the transaction to the blockchain and updates the multi-way search tree; the transaction indicates that the owner of the charging pile requests to submit a new charging pile to provide charging services; S3: The charger submits a query request to the blockchain node. After receiving the request, the blockchain node traverses the multi-way search tree and returns a set of available charging piles that meet the charging requirements to the charger. The charger selects a node from the set and notifies the blockchain node. After receiving the message, the blockchain node uploads the search transaction to the chain and then modifies the multi-way search tree. S4: After charging is completed, the charger submits a request to process the transaction to the blockchain node, and the blockchain node modifies the availability attribute value of a specific node of the multi-way search tree; The system also includes a key generation center, and the step S1 includes: The key generation center randomly selects a random number as the system master key, calculates the system's public key, defines secure hash functions and encryption and decryption algorithms, discloses system parameters, and records them on the blockchain; The key generation center sends the calculated public and private key pairs, blockchain public key addresses and registration certificates of the participants to the users through a secure channel based on the identity strings provided by the participants. The blockchain node initializes the multi-way search tree, determines the maximum number of child nodes of the multi-way search tree according to the number of charging piles in the current area, and initializes it; The S4 includes: The charger submits a transaction to the blockchain node indicating the end of charging and the currently selected charging pile node; The blockchain node broadcasts the transaction for consensus, traverses and searches the multi-way search tree according to the time information in the charging pile node, deletes this node and inserts a new node, and sets the properties of the new node to be available; When a blockchain node inserts a node into a multi-way search tree, if the number of node children reaches the maximum number of children, a split adjustment is performed; When a blockchain node deletes a node in a multi-way search tree, if the number of node children is less than the preset value, a merge adjustment is performed.
2. The method according to claim 1, characterized in that The S2 includes: The charging pile owner sends the transaction and the system time when the transaction is submitted to the blockchain node through a message; The blockchain node determines whether the transaction is valid based on the system time when the transaction is submitted and the system time when the transaction is received, and determines whether the message data is complete; After confirming the data integrity of the message, the blockchain node inserts the new node into the multi-way search tree; Blockchain nodes broadcast transactions, consensus nodes verify them, and after verification, transactions are recorded in the blockchain.
3. The method according to claim 1, characterized in that The S3 includes: The charger submits a transaction request to the blockchain node to request charging and the time required to occupy the charging pile. After the blockchain node confirms that the transaction is valid, it traverses the multi-way search tree to determine the set of available charging piles. The blockchain node returns the set of available charging piles to the charger, and the charger selects a node in the set as the charging pile to be used, and submits the node, the current system time, and a transaction indicating a request for charging fee settlement to the blockchain node; Blockchain nodes broadcast transactions for consensus. After consensus is passed, transactions are uploaded to the chain, and blockchain nodes modify the structure of the multi-way search tree.
4. The method according to claim 1, characterized in that: The system further includes a regulatory agency, and the method further includes step S5: The charger reports suspected malicious occupation of the charging pile to the blockchain node; the blockchain node verifies the charger's report, checks the real-time status of the charging pile, and after confirming the existence of malicious behavior, updates the status of the corresponding charging pile in the multi-way search tree; Blockchain nodes restrict malicious users’ access to charging stations within the chain and mark their bad behavior on the blockchain; Blockchain nodes notify regulators of malicious behavior records and actions taken.
5. A charging pile search system based on alliance chain and multi-way search tree, characterized in that: The system at least includes a charger, a charging pile owner and a blockchain node; wherein, The charging pile owner submits a transaction and the location information of the charging pile to the blockchain node, and the blockchain node uploads the transaction to the blockchain and updates the multi-way search tree; the transaction indicates that the charging pile owner requests to submit a new charging pile to provide charging services; The charger submits a query request to the blockchain node. After receiving the request, the blockchain node traverses the multi-way search tree and returns a set of available charging piles that meet the charging requirements to the charger. The charger selects a node from the set and notifies the blockchain node. After receiving the message, the blockchain node uploads the search transaction to the chain and then modifies the multi-way search tree. After charging is completed, the charger submits a request to process the transaction to the blockchain node, and the blockchain node modifies the availability attribute value of a specific node in the multi-way search tree; The system further comprises a key generation center: The key generation center randomly selects a random number as the system master key, calculates the system's public key, defines secure hash functions and encryption and decryption algorithms, discloses system parameters, and records them on the blockchain; The key generation center sends the calculated public and private key pairs, blockchain public key addresses and registration certificates of the participants to the users through a secure channel based on the identity strings provided by the participants. The blockchain node initializes the multi-way search tree, determines the maximum number of child nodes of the multi-way search tree according to the number of charging piles in the current area, and initializes it; The charger submits a transaction to the blockchain node indicating the end of charging and the currently selected charging pile node; The blockchain node broadcasts the transaction for consensus, traverses and searches the multi-way search tree according to the time information in the charging pile node, deletes the node, inserts a new node, and sets the attribute of the new node to be available; when the blockchain node inserts a node in the multi-way search tree, if the number of node children reaches the maximum number of children, it will be split and adjusted; When a blockchain node deletes a node in a multi-way search tree, if the number of node children is less than the preset value, a merge adjustment is performed.
6. The system according to claim 5, characterized in that The charging pile owner sends the transaction and the system time when the transaction is submitted to the blockchain node through a message; The blockchain node determines whether the transaction is valid based on the system time when the transaction is submitted and the system time when the transaction is received, and determines whether the message data is complete; After confirming the data integrity of the message, the blockchain node inserts the new node into the multi-way search tree; Blockchain nodes broadcast transactions, consensus nodes verify them, and after verification, transactions are recorded in the blockchain.
7. The system according to claim 6, characterized in that The charger submits a transaction request to the blockchain node to request charging and the time required to occupy the charging pile. After the blockchain node confirms that the transaction is valid, it traverses the multi-way search tree to determine the set of available charging piles. The blockchain node returns the set of available charging piles to the charger. The charger selects a node in the set as the charging pile to be used, and submits the node, the current system time, and a transaction requesting charging fee settlement to the blockchain node. The blockchain node broadcasts the transaction for consensus. After the consensus is passed, the transaction is uploaded to the chain, and the blockchain node modifies the structure of the multi-way search tree.
Citation Information
Patent Citations
Charging pile sharing method and device based on block chain, equipment and storage medium
CN111341024A
Block chain consensus method and system based on node identity hierarchical management
CN114385996A