Block chain data processing method and device based on simulated Chord ring

By adopting a blockchain data processing method based on a Chord ring analogy, combined with RSA encryption and timestamp mechanisms, the problems of data processing efficiency and security in the Internet of Vehicles are solved, and efficient and secure data management and transmission are achieved.

CN118939886APending Publication Date: 2024-11-12HUAQIAO UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410921854.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing technologies struggle to maintain operational efficiency and the lightweight nature of blockchain when processing large amounts of data in the Internet of Vehicles (IoV). They also fail to fully consider the scalability of blockchain and make it difficult to guarantee data privacy and security.

Method used

It adopts a blockchain data processing method based on a Chord ring analogy. By creating a blockchain and a request table, it uses RSA encryption to store user information and combines timestamp and block pointer mechanisms to quickly collect and manage data requests. It also confirms data transmission before the user makes a decision, ensuring data security and transparency.

Benefits of technology

It achieves efficient operation and lightweight blockchain when processing large amounts of data, while improving the scalability and data security of the blockchain, ensuring that user data is not leaked, and enhancing the transparency and consistency of data operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939886A_ABST
    Figure CN118939886A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain data processing method and device based on an imitated Chord ring, and relates to the technical field of block chains, and the method comprises the steps: S1, creating a block chain and a request table, and adding a block pointer; s2, receiving a user registration request, and storing registration data into a database; s3, receiving a request of a requester, and adding the request into the request table; s4, receiving a request table request by the block chain; s5, the block chain allocates a block pointer according to the request attribute; s6, the block pointer requests the data acquisition hardware equipment network to search the matched data; s7, putting the matched data into a to-be-output area; and S8, consulting the user holding the data to agree and processing the data of the to-be-output area. According to the method, the distributed hash table structure of the Chord ring is combined with the block chain, so that rapid positioning and efficient retrieval of the Internet of Vehicles data are realized, and the data management and retrieval efficiency in an Internet of Vehicles system is improved; when a large amount of data is processed, the operation efficiency and the lightweight of the block chain are maintained, and the expansibility of the block chain can be fully considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain data processing method and device based on a Chord ring simulation. Background Art

[0002] The so-called Chord ring is an important algorithm in peer-to-peer (P2P) networks, which is used to build distributed hash tables in distributed systems. The Chord ring is designed to achieve efficient data search and positioning, while being able to dynamically adapt to the joining and leaving of nodes. In a peer-to-peer network, nodes are usually distributed all over the world, and each node can be a client and a server with the same status. The Chord ring achieves efficient distributed data storage and retrieval by distributing nodes and data in a logical ring space and using consistent hashing and jump pointer mechanisms.

[0003] In today's digital age, the rapid development of Internet of Vehicles technology has become a major trend in the automotive industry. By connecting vehicles to the Internet, Internet of Vehicles enables information exchange between vehicles and data interaction with the external environment, providing drivers with a smarter, more convenient and safer travel experience. In this context, there will inevitably be a huge amount of data being interacted and stored in the Internet of Vehicles. In addition, stakeholders involved in the Internet of Vehicles background, such as Internet of Vehicles service providers, insurance companies and traffic management departments, all need a way to obtain data. Summary of the invention

[0004] In view of the above problems, the present invention proposes a blockchain data processing method and device based on a Chord ring-like structure, which can maintain operational efficiency and lightweight blockchain when processing large amounts of data, while fully considering the scalability of blockchain; by using blockchain to receive requests, using the transparency and tamper-proof performance of blockchain to record the user who initiates the request and the data attributes of the request, and then combining the Chord ring-like data reading and calling method, the data type and quantity requested by the data requester can be quickly collected. In the final stage, the user decides whether to allow the behavior to occur, so that both parties can reflect the degree of knowledge of the event to the greatest extent in the case of data calling, and can also ensure that user data will not be leaked to the greatest extent.

[0005] On the one hand, a blockchain data processing method based on a Chord ring simulation, the specific steps are as follows:

[0006] S1, create a blockchain and request table, add a block pointer to each block of the blockchain, and point the output of the request table to the blockchain;

[0007] S2, receiving the user registration request, encrypting the registered information with RSA and storing it in the database;

[0008] S3, receiving a query request from the requesting party, adding a timestamp to the query request that meets the predetermined format and specification, and adding the query request to the request table in the order of the timestamp;

[0009] S4, sending a query request of the request table to the blockchain in the order of timestamps. The blockchain adds the query request to the blockchain in the order of timestamps and allocates a block pointer to each attribute of the query request.

[0010] S5, the blockchain compares the number of attributes currently requested with the number of block pointers. If the number of attributes currently requested is less than the number of block pointers, the blockchain sends a free pointer signal to the request table and receives the content of the next request from the request table based on the number of free pointers.

[0011] S6, all block pointers of the blockchain run the request work, and the block pointer initiates a request to the data acquisition hardware device network that constitutes the simulated Chord ring, and searches for data matching the request in the database of the data acquisition hardware device network;

[0012] S7, match the found data with the request in the block pointer item by item, return a null value if there is no match, and complete the search and matching work if there is a match; temporarily store the matching result in the waiting output area, and delete the corresponding query request in the request table;

[0013] S8, initiate a request for consent from the user holding the data. If the user holding the data agrees, the matching data stored in the waiting area will be sent to the requesting party. If the user holding the data disagrees, delete the data stored in the waiting area and notify the requesting party.

[0014] Preferably, in S2, the receiving of the user registration request and the storage of the registered information in the database after RSA encryption are performed, and the specific steps are as follows:

[0015] S21, receiving a user registration request and assigning unique identification information to each registered user;

[0016] S22, encrypting the user information using the RSA encryption algorithm;

[0017] S23, storing the encrypted user information in a database, the storage rules are as follows;

[0018] S231, assigning a unique number to each piece of data in the database;

[0019] S232, assigning a serial number to the sub-content of the data stored in the database.

[0020] Preferably, in S3, the query request includes data retrieval, modification and addition operations;

[0021] The preliminary verification and analysis of the query request includes: checking the format, source, authentication information and parameter information carried by the query request, determining the type and content of the query request, and checking whether the query request conforms to the predetermined format and specification; if the query request does not conform to the requirements or has an abnormality, refusing to accept the current query request and sending a corresponding error response to the requester;

[0022] The method for obtaining the timestamp includes: obtaining the current time and converting the current time into a timestamp format; using a specific time standard or protocol to specify the format and precision of the timestamp;

[0023] Preferably, in S4, allocating a block pointer to each attribute of the query request specifically includes:

[0024] After receiving the query request, the blockchain analyzes each attribute in the query request and assigns a block pointer to each attribute, and establishes a mapping between each attribute and its corresponding block pointer; among which, the attributes of the query request include the type of data to be obtained, the time range of the required data, and the geographic location information.

[0025] Preferably, in S6, the data acquisition hardware device network is divided into two layers;

[0026] The second layer is the hardware devices that are arranged on the streets of each area to interact with vehicle radars or sensors, forming a sub-node ring of the data collection hardware device network;

[0027] The equipment is divided by region. The hardware equipment in each region interacts with the vehicle through the regional network. There is a corresponding regional network behind the hardware equipment in each region. The server of each regional network is the total network node of the regional network. The total network nodes of all regions constitute the first layer of the data acquisition hardware equipment network, that is, the total network ring of the data acquisition hardware equipment network.

[0028] The first layer of the data acquisition hardware device network is then connected to other modules through the network, allowing other modules to enter the data acquisition hardware device network and interact with data reading;

[0029] A pointer table is generated in the sub-node ring of the total network node according to the hash algorithm. When the pointer table receives a request from the block pointer of the blockchain network, the target data is searched in all nodes of the sub-node ring according to the pointer table.

[0030] Preferably, in S6, all block pointers of the blockchain run the request work, and the block pointer initiates a request to the data acquisition hardware device network constituting the simulated Chord ring, and searches for data matching the request in the database of the data acquisition hardware device network. The specific steps are as follows:

[0031] S61, the block pointer sends a data collection request to the main network ring of the data acquisition hardware device network, the main network ring broadcasts its own child node ring, and asks the child node ring to check whether the requested resource is in its own node;

[0032] S62, the nodes in the child node ring point to the node that has the data according to their own pointer table, and the node that has the target data starts to output the required data until the attribute of the next request is not in the node, and then points to the next node that has the data;

[0033] S63, if the request finds that the required data does not exist or has not been registered in the sub-node ring in the data acquisition hardware device network, an empty result is returned to the block pointer.

[0034] On the other hand, a blockchain data processing device based on a Chord-like ring includes the following:

[0035] The blockchain and request table creation module is used to create the blockchain and request table, add a block pointer to each block of the blockchain, and point the output of the request table to the blockchain;

[0036] The user registration request receiving module is used to receive the user registration request and store the registered information in the database after RSA encryption;

[0037] A query request receiving module, used to receive a query request from a requester, add a timestamp to a query request that meets a predetermined format and specification, and add the query request to a request table in the order of the timestamp;

[0038] The blockchain receiving request module is used to initiate a query request of the request table to the blockchain in the order of timestamps. The blockchain adds the query request to the blockchain in the order of timestamps and allocates a block pointer to each attribute of the query request.

[0039] The block pointer resource optimization module is used to let the blockchain compare the number of attributes currently requested with the number of block pointers. If the number of attributes currently requested is less than the number of block pointers, the blockchain sends a free pointer signal to the request table and receives the content of the next request from the request table based on the number of free pointers.

[0040] The matching data search module is used to make all block pointers of the blockchain run the request work. The block pointer initiates a request to the data acquisition hardware device network that constitutes the simulated Chord ring, and searches for data matching the request in the database of the data acquisition hardware device network;

[0041] The data comparison and output module is used to match the found data with the request in the block pointer item by item. If there is no match, a null value is returned. If there is a match, the search and matching work is completed; the matching results are temporarily stored in the output area, and the corresponding query request in the request table is deleted;

[0042] The user interaction and data sending module is used to initiate a request for consent from the user holding the data. If the user holding the data agrees, the matching data stored in the waiting area will be sent to the requesting party. If the user holding the data disagrees, the data stored in the waiting area will be deleted and the requesting party will be notified.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] (1) The present invention can maintain operational efficiency and lightweight blockchain when processing large amounts of data, while also fully considering the scalability of blockchain;

[0045] (2) The present invention adopts a Chord-like data reading and calling method, which can quickly collect the data type and quantity requested by the data requester;

[0046] (3) Since the blocks in the blockchain of the present invention store pointers to data rather than actual data, they can remain lightweight to a large extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is a flowchart of a blockchain data processing method based on a Chord ring simulation according to an embodiment of the present invention;

[0048] Figure 2 This is a workflow diagram of a blockchain data processing method based on a Chord ring simulation according to an embodiment of the present invention;

[0049] Figure 3 A schematic diagram of the overall network ring of a data acquisition hardware device network of a blockchain data processing method based on a Chord ring imitation according to an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of the relationship between a sub-network ring and a total network ring of a data acquisition hardware device network of a blockchain data processing method based on a Chord ring imitation according to an embodiment of the present invention;

[0051] Figure 5This is a conceptual diagram of a blockchain data processing method based on a Chord ring simulation according to an embodiment of the present invention;

[0052] Figure 6 This is a module diagram of a blockchain data processing device based on a Chord ring simulation according to an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The present invention is further described in detail below in conjunction with the accompanying drawings and examples. It is particularly pointed out that the following embodiments are only used to illustrate the present invention, but do not limit the scope of the present invention. Similarly, the following embodiments are only partial embodiments of the present invention rather than all examples. Based on the examples in the present invention, all other examples obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0054] This embodiment provides a blockchain data processing method and device based on an imitation Chord ring, which is applied in the field of blockchain. The so-called Chord ring is an important algorithm in a peer-to-peer (P2P) network, which is used to construct a distributed hash table in a distributed system. The Chord ring is designed to achieve efficient data search and positioning, while being able to dynamically adapt to the joining and leaving of nodes. In a peer-to-peer network, nodes are usually distributed all over the world, and each node can be a client and a server with the same status. The Chord ring achieves efficient distributed data storage and retrieval by distributing nodes and data in a logical ring space and using consistent hashing and jump pointer mechanisms.

[0055] like Figure 1 , Figure 2 and Figure 5 As shown, a blockchain data processing method based on a Chord ring imitation in this embodiment has the following specific steps:

[0056] S1, create a blockchain and request table, add a block pointer to each block of the blockchain, and point the output of the request table to the blockchain.

[0057] A request table is created at the same time as the blockchain is created, and the blocks in the chain are bound to the pointers. By creating a request table at the same time as the blockchain is created in the initial stage, the requirements for requesting information can be collected quickly and easily, so that subsequent requests for information can be better managed.

[0058] In this embodiment, S1 specifically includes:

[0059] Step S11, initialize the blockchain and create a genesis block; Initializing the blockchain means establishing a blank blockchain in the network, which is a key step to ensure that all subsequent transactions and data start from a certain initial state. Secondly, creating a genesis block is the process of generating the first block in the blockchain, also known as the initial block, which contains the network's initial parameters, rules, and initial distributed ledger state;

[0060] Step S12: Create a request table.

[0061] Step S13, direct the output of the request table to the blockchain; this design ensures that all data requests collected from the request table can be seamlessly and instantly forwarded to the blockchain module for processing. This direct data flow connection not only reduces processing time and improves response speed, but also effectively utilizes computing resources and avoids delays and data loss that may occur when transmitting data between multiple modules. In addition, directly connecting the request table to the blockchain module can fully utilize the core characteristics of the blockchain, such as data immutability and high security. Once each request is recorded in the blockchain, it is protected according to the encryption and immutability rules of the blockchain. This not only enhances the transparency and traceability of data operations, but also greatly improves the security and consistency of data, ensuring strong resistance to external attacks and internal errors.

[0062] S2, receiving the user registration request, encrypting the registered information with RSA and storing it in the database.

[0063] When a user registers, the registered information will be encrypted and stored in the database; by encrypting and storing the user's registered information, data security and user privacy can be greatly improved, and the user's control over the data can be retained to the greatest extent.

[0064] In this embodiment, receiving a user registration request specifically includes:

[0065] Step S21, collect user registration information; the purpose of this step is to establish a user base and assign unique identification information to each user. By collecting user registration information, the user's identity and authority can be better managed to ensure that only authorized users can perform data processing operations. In addition, the collection of registration information also helps to authenticate and track users so that relevant audits and supervision can be carried out when necessary. Therefore, the collection of user registration information in step S21 is an important step to ensure security and stability, and is also a key link in building user trust and legitimacy.

[0066] Step S22, encrypt user information using RSA encryption algorithm; The purpose of this step is to encrypt user information using RSA encryption algorithm to protect user privacy and data security. By encrypting user information, unauthorized visitors or malicious attackers can be prevented from obtaining user personal information. RSA encryption algorithm is a public key encryption algorithm, which uses a pair of keys (public key and private key) to encrypt and decrypt data. In this step, the user's sensitive information is encrypted using RSA algorithm, and then the encrypted data is stored in the database. Only the system or authorized user holding the correct private key can decrypt this data, ensuring that the user's information is protected and only legitimate users can access and use this information. Therefore, the RSA encryption operation in step S22 is an important measure to ensure user data security and privacy protection.

[0067] Step S23, storing the encrypted user information in the database; storing the encrypted user information in the database is to ensure the security and reliability of the user registration information. When the user registers, the information provided will be encrypted using the RSA encryption algorithm to protect the user's privacy and sensitive data from being obtained by unauthorized visitors, and to improve the efficiency of operation and ensure scalability after the system is improved in the future.

[0068] Among them, the data stored in the database will be added with numbers and sub-content serial numbers; when the user's data is stored in the database, a unique number will be assigned to each piece of data, and its sub-content will be marked with a serial number. The purpose of this is to more effectively manage and retrieve user data. Numbers can be used to uniquely identify each piece of data, and can be used to accurately locate and identify specific data entries. The sub-content serial number can help to block or classify data, making it easier to organize and manage data. By adding numbers and sub-content serial numbers, accurate management and efficient retrieval of data can be achieved, improving overall usability and performance.

[0069] The database storage rules specifically include:

[0070] Step S231, assign a unique number to each piece of data in the database; the purpose of this step is to manage and retrieve data more efficiently. By assigning a unique number to each piece of data, each piece of data can be accurately identified and located, thereby facilitating subsequent data operations and retrieval. At the same time, assigning a serial number to the sub-content of the data also helps to classify and organize the data, thereby improving the efficiency of data management. This numbering and serial number adding operation helps to process large amounts of data more efficiently, and can ensure the integrity and traceability of the data, thereby improving overall performance and reliability.

[0071] Step S232: Assign serial numbers to the sub-contents of the data for easy retrieval and management. In this step, serial numbers are assigned to the sub-contents in each data entry. The serial numbers are usually assigned in the order of the sub-contents in the data entry, thereby ensuring that each sub-item has a unique identifier. These serial numbers can be a combination of numbers, letters, or other symbols to mark and distinguish different sub-items.

[0072] By assigning serial numbers to sub-contents of data, it is easier to index and retrieve data. When users need to query a specific sub-item, they can quickly locate the corresponding data location based on the serial number, thereby improving the efficiency and accuracy of data retrieval. In addition, the use of serial numbers can also achieve more fine-grained management and control of data, making data operations more flexible and convenient.

[0073] S3, receiving the query request from the requester, adding a timestamp to the query request that meets the predetermined format and specification, and adding the query request to the request table in the order of the timestamp.

[0074] When a query request is received, a timestamp will be added to the request and then added to the request table; if a user or an individual or organization other than a user sends a request for data query, a timestamp will be added to each initiated request, and the request table will be sorted in order according to the timestamp and entered into the blockchain in sequence;

[0075] In this embodiment, step S3 specifically includes:

[0076] Step S31, receiving query requests; when in operation, query requests from users or other systems are continuously received. These query requests may involve data retrieval, modification, and addition operations, which require timely response and corresponding processing. Therefore, in this step, the first operation to be performed is to receive query requests. This includes receiving incoming request data packets from the network, which may be encapsulated and transmitted by network protocols, such as the TCP / IP protocol stack. The process of receiving query requests needs to ensure the integrity and legitimacy of the requests, and prevent malicious requests or abnormal situations by checking the format, source, and parameter information carried by the requests.

[0077] After receiving the query request, the request is initially verified and parsed to determine the type and content of the request. This step is the first step in processing the request and is the key to ensuring that the subsequent processing flow can proceed smoothly. Check whether the request conforms to the predetermined format and specifications, and whether the request carries the necessary authentication information or other required parameters. If the request does not meet the requirements or has an abnormality, the request may be rejected and a corresponding error response will be sent to the requester.

[0078] Step S32, adding a timestamp to each query request; in order to effectively manage the query requests and ensure the timing of the data, a timestamp will be added to each query request after it is received.

[0079] Timestamping refers to the process of marking and recording the time when a request was initiated, usually in a specific time format or timestamp unit. The purpose of adding a timestamp is to record the exact time when the query request was initiated so that the order and time sequence of the requests can be accurately understood when processing the requests; the specific operation includes obtaining the current time and converting it into a timestamp. A specific time standard or protocol may be used to standardize the format and precision of the timestamp to ensure the accuracy and uniformity of the timestamp.

[0080] The process of adding timestamps is performed immediately after receiving the query request, ensuring that each request can be marked with time in a timely manner. The benefit of this is that the requests can be sorted and queued in chronological order internally, thereby better managing the request queue and optimizing processing performance.

[0081] Step S33, add the query request with the timestamp to the request table; this step is used to effectively manage and track the relevant information of each query request. When a query request is received, the request is first associated with the timestamp and added to the request table. Through this step, the initiation time of each query request can be accurately recorded, and important information about the content and status of the request can be retained. The query request added to the request table can be further used to process, allocate resources, and monitor the request status in chronological order. Therefore, the operation of S33 ensures that each query request can be efficiently managed and tracked, thereby improving overall performance and user experience.

[0082] S4, initiates a query request of the request table to the blockchain in timestamp order. The blockchain adds the query request to the blockchain in timestamp order and assigns a block pointer to each attribute of the query request.

[0083] The requests in the request table are sorted in order by timestamp and sent to the blockchain: This step is designed to effectively manage and process the query requests from the request table. The execution of this step involves sending the requests in the request table to the blockchain network in the order of timestamps. This means that the order in which they are processed in the blockchain is determined based on the timestamp of each query request, thereby achieving orderly processing of the requests. Once the requests are sent to the blockchain network, they will be accepted one by one by the nodes in the chain and resources will be allocated for processing according to the pointer mechanism.

[0084] In this embodiment, step S4 specifically includes:

[0085] Step S41: When the blockchain receives the request from the request table, it will allow the request to enter the chain in sequence according to the timestamp;

[0086] Step S42: When the blockchain receives a request from the request table, it will allocate a block pointer to each attribute according to all the contents in the current request; this refers to the process of allocating a block pointer to each attribute according to the content of the request after the blockchain receives a request from the request table. The purpose of this step is to associate each attribute in the request with the corresponding block pointer so that the required resources and data can be accurately located in the subsequent data request processing process.

[0087] Specifically, when the blockchain receives a request, it analyzes each attribute in the request and assigns a block pointer to each attribute. These attributes may involve the type of data that needs to be obtained, the time range of the required data, and the geographic location information. A mapping relationship is established between each attribute and its corresponding block pointer, which ensures that the required resources and data can be quickly located in the data acquisition device network later.

[0088] When all the attributes that need to be requested have been assigned pointers, the pointers will enter the data acquisition hardware device network; it involves the process of block pointers entering the data acquisition hardware device network. Once the blockchain assigns corresponding block pointers to each attribute in the request, these pointers will be sent to the data acquisition device network to obtain the required data resources.

[0089] S5, the blockchain compares the number of attributes currently requested with the number of block pointers. If the number of attributes currently requested is less than the number of block pointers, the blockchain sends a free pointer signal to the request table and receives the content of the next request from the request table based on the number of free pointers.

[0090] If the requested attributes meet the pointer requirements in the blockchain, the blockchain will also send a corresponding request to the request table to ensure full utilization and efficient processing of resources. When the requested attributes are less than or equal to the pointer requirements in the blockchain, the blockchain will send a request to the request table with an idle pointer and initiate a request with the request table. After receiving the request, it will start to partially run the next request. This step mainly refers to the blockchain will match a pointer to all the requested attributes in the current request when running the current request. If there is an idle block pointer when running the current request, the blockchain will ask the request table to send the next request into the chain and partially execute part of the requirements of the next request. Then it will enter the data collection hardware device network with the pointer of the current request to perform the work.

[0091] Specifically, once the blockchain associates the attributes in the request with the block pointers, these pointers are sent to the network of data collection devices. In this network, the devices may include various sensors and data collectors that collect and store various vehicle-related information, such as vehicle location, speed, fuel consumption, and engine status.

[0092] S6, all block pointers of the blockchain run the request work, and the block pointer initiates a request to the data acquisition hardware device network that constitutes the Chord-like ring, and searches for data matching the request in the database of the data acquisition hardware device network.

[0093] The data acquisition hardware device network will initiate a query to the demand based on the pointer table in its own node and return the query result; the total network ring of the data acquisition hardware device network will initiate a broadcast to all nodes in its own network. After receiving the broadcast of the total network ring, the nodes in the total network ring will also start to initiate a search in their own network ring and return the query result. Figure 3 shown.

[0094] See also Figure 4 As shown, after the data acquisition hardware device network receives a request from a block pointer, the child nodes attached to the main network node of the data acquisition hardware device network will start searching from any node according to the request; once these devices receive the request, they will start the query process according to the attributes of the request and the status of the current network node. Specifically, the data acquisition hardware device network will first check the pointer table in the network to determine whether the network node has the data resources required for the request. This process starts with searching at any node of the child node attached to the main network node of the data acquisition hardware device network to ensure that the required data resources are located as soon as possible. Once the node determines that it has the data resources required for the request, it will be ready to respond to the request and start outputting the corresponding data. This includes transmitting data to the blockchain to satisfy the query request and provide the required information. If the current child node does not contain the data resources required for the request, it will forward the request to the node that has the target data according to the instructions in the pointer table (these operations are in Figure 4 Instances of the instance part);

[0095] In this embodiment, step S6 specifically includes:

[0096] Step S61, after the block pointer sends a data collection request to the main network ring of the data acquisition hardware device, the network will broadcast its own child node ring and let the child node ring check whether the requested resource is in its own node;

[0097] Step S62: After the nodes in the child node ring point to the node that has the data according to their own pointer table, the node that has the target data starts to output the required data until the next requested attribute is not in the node, and then points to the next node that has the data;

[0098] Step S63: If the subnode ring in the data acquisition hardware device finds that the required data does not exist or has not been registered, an empty result will be returned to the block pointer; when the data resources required for the request do not exist in the network, or the data resources have not been recorded in the network, the node will not be able to provide data that meets the request. In this case, the data acquisition hardware device network will return an empty result to the block pointer. This means that the node cannot complete the request because it lacks the required data resources. Such a response usually means that the query request cannot be completed in the current network node and may need to be forwarded to other nodes or systems to meet the user's needs; by returning an empty result, the network can promptly notify the blockchain or other related systems to indicate that the current node cannot meet the query request. This helps to ensure that query requests can be processed effectively, thereby improving overall efficiency and performance.

[0099] Among them, the composition of the data acquisition hardware equipment network is as follows:

[0100] A network of data collection hardware devices, usually deployed on the street, interacts with vehicle sensing radars to collect and monitor real-time data, including the vehicle's location, speed, and environmental information such as road conditions and weather conditions.

[0101] The data collection hardware device network can be divided into two layers. First, the second layer refers to the hardware devices that the Internet of Vehicles company deploys on the streets of each area to interact with vehicle radars or sensors. Assuming that the equipment is spread over a wide area, the equipment will be divided by region. Since each hardware device interacts with the vehicle through the network, each area's hardware device will have its own network as the background, and the server of the network is the total network node. Similarly, multiple regions will have multiple regional networks with the same hardware devices, and the server of each region is the total network node of the regional network, and the total network node constitutes the first layer of the data collection hardware device network ( Figure 3 ). The first layer of the data acquisition hardware device network is then linked to other modules through the network, allowing other modules to enter the data acquisition hardware device network and interact with data reading. In addition, due to the division by region, the nodes are distributed more sparsely and far away, so a pointer table will be generated in the total network node according to the hash algorithm. When this table receives a request from a pointer of the blockchain network, it will search for the target data in all nodes of its own network according to the request.

[0102] Please note that Figure 3 The overall network ring diagram of the data acquisition hardware equipment network means that the ring is a collection of all sub-network rings, that is, each node of the overall network has a sub-network ring. The overall network and the sub-network are in a superior-subordinate relationship, which can be specifically seen from Figure 4 To understand.

[0103] in addition, Figure 4 It is still important to note that the nodes in the data acquisition hardware device network diagram are not devices within a small range. Instead, it is a network composed of data acquisition hardware devices that are physically far apart. Each hardware device has its own database responsible for storing the weather and traffic conditions of the day and the information of the vehicles that have interacted with it. In addition, any key information involving the vehicle, such as the model of the vehicle, the speed and acceleration of the vehicle, and the content that has interacted with the device, are stored in the database in the form of encryption and adding serial numbers and numbers.

[0104] exist Figure 4 In the example of the subnetwork ring, there are 5 nodes on the ring, excluding the node itself (taking node 1 as an example), there are 4 nodes, so the pointer table has only 4 columns. In the subnetwork ring, the number of nodes pointed to is obtained by calculation. The calculation formula in the first column of the ith row is (N1+2 i-1 ), used to find the subsequent node pointed to. For example, in the node N1, starting from the first row, calculate (N1+2 i-1 )=N1+1=2, but since node 2 is not open, it points clockwise to the open node N6; starting from the second row, calculate (N1+2 i-1 )=N1+3=4. Since node 4 is not turned on, it points to N6 in a clockwise direction. Starting from the third row, i=3, we can calculate (N1+2 i-1 )=N1+4=5, but since node N5 is not turned on, it will point to N6 clockwise; similarly, starting from the 4th row of N1, (N1+2 i-1 )=N1+8=9. The principle in the pointer table of N9 is the same, calculating (N9+2 i-1 ) can also get similar results. For example, calculate the first row (N9+2 i-1 )=N9+1=10;The second row (N9+2 i-1 )=N9+2=11, but since node 12 is not yet turned on, it points clockwise to N13; the third row (N9+2 i-1 )=N9+4=13;4th row (N9+2 i-1 )=N9+8=17, which means that after 17 nodes in the clockwise direction, it is exactly node 1. This method is also applicable to all nodes, and similar searches are continued.

[0105] In addition, the blockchain, request table, data acquisition hardware device network total network ring, and data acquisition hardware device network sub-network ring mentioned in the article will increase the number of blocks in the blockchain and the request table corresponding to the blockchain in proportion as the number of users increases; and at the physical level, each increase in hardware devices will also increase the number of nodes in the sub-network ring of the corresponding node in the data acquisition hardware device network total network. Among them, each node in the data acquisition hardware device network total network ring will have its own sub-network node, and the total number of nodes in each sub-network node and the number of pointer table rows of each sub-network node are different.

[0106] S7, match the found data with the request in the block pointer item by item, return a null value if there is no match, and complete the search and matching work if there is a match; temporarily store the matching result in the waiting output area, and delete the corresponding query request in the request table.

[0107] When the pointer in the chain completes the request, the completed work will be stored in the output area; this step describes the steps taken when the block pointer initiates a request to the total network ring of the data acquisition hardware device network, and the total network ring of the data acquisition hardware device network initiates a broadcast within its own network after receiving the request and returns the result.

[0108] In this embodiment, step S7 specifically includes:

[0109] Step S71: When the blockchain completes the request, the result is stored in the output area. The purpose of this step is to ensure that the processed data can be effectively managed and further processed. Storing the processing results in the output area ensures that the data is securely stored and can be accessed and used at any time. The design of the output area can effectively manage the processing results and output them to users or other related systems when needed.

[0110] Step S72: Mark the data in the area to be output as processed. The purpose of this step is to ensure that the processing result can correctly match the corresponding request. By matching the processing result and the request item by item, it is verified whether the processing is successful and whether the output data is consistent with the user's request. This helps to ensure the accuracy and reliability of data processing.

[0111] Step S73, determine whether the data in the Chord ring has part or all of the data in the request table;

[0112] Step S74: If all the data are available, the data is packaged and stored in the output area, and the user decides whether to agree to send it;

[0113] Step S75: If part of the data is missing or not available, a null value is returned for the missing or missing data; Steps S73, S74, and S75 above are about the verification and processing of the data processing results in the area to be output. Once the processing is completed and the results are stored in the area to be output, the following steps will be followed for verification and processing: First, check whether the data in the area to be output is consistent with the request in the request table one by one to verify the accuracy and reliability of the data processing. If the processing result matches the request successfully, the collected data will be packaged and stored in the area to be output. Whether to output it depends on whether the user agrees to the request operation; if part of the data is missing or not available, a null value is returned, indicating that there is no such data.

[0114] S8, initiate a request for consent from the user holding the data. If the user holding the data agrees, the matching data stored in the waiting area will be sent to the requesting party. If the user holding the data disagrees, delete the data stored in the waiting area and notify the requesting party.

[0115] The final transmission of data is checked by the user; this step means that before the request is sent, the owner of the data will receive a prompt, and the user will finally decide whether to send the data. If the user refuses, the data stored in the output area will be deleted, and the requester will also receive a prompt to cancel the request.

[0116] In this embodiment, step S8 specifically includes:

[0117] Step S81: If the match is successful, before the results are output, the user of the data owner will be prompted with the data content to be output; this step involves the confirmation process of the data owner before the output results. After the processing is completed and the output results are ready, a prompt is sent to the data owner to prompt the data content to be output. The purpose of this step is to ensure that the data owner can confirm the correctness and completeness of the output content before the data is output. By sending prompts, timely communication can be carried out with the data owner, and his confirmation can be obtained before the data is output, thereby improving the accuracy and reliability of the data output. If the data owner agrees to the output results, the data will be sent out, otherwise the data output process will be cancelled to avoid outputting erroneous or unnecessary data.

[0118] Step S82: If the user of the data owner agrees, the data is sent out;

[0119] Step S83: If the user who owns the data disagrees, the data stored in the area to be output will be deleted, and the requester will also receive a prompt to cancel the request;

[0120] The above steps S82 and S83 involve the data owner's final decision on data output. Once the content of the data to be output is prompted and after the user confirms, if the data owner agrees to the output result, the data sending process will be executed. The purpose of this step is to ensure the safe output of data. The data will only be sent out with the explicit consent of the data owner to prevent unauthorized data transmission. At the same time, if the data owner does not agree to output the data, the data output process will be cancelled, and the results of the completed work will be deleted to protect the rights and interests of the data owner and the security of the data.

[0121] like Figure 6 As shown, the present invention also discloses a Chord ring-like blockchain data processing device, comprising:

[0122] The blockchain and request table creation module 601 is used to create a blockchain and a request table, add a block pointer to each block of the blockchain, and point the output of the request table to the blockchain;

[0123] The user registration request receiving module 602 is used to receive the user registration request and store the registered information in the database after RSA encryption;

[0124] A query request receiving module 603 is used to receive a query request from a requesting party, add a timestamp to a query request that meets a predetermined format and specification, and add the query request to a request table in the order of the timestamp;

[0125] The blockchain receiving request module 604 is used to initiate a request to the blockchain for the query request of the request table in the order of timestamps. The blockchain adds the query request to the blockchain in the order of timestamps and allocates a block pointer to each attribute of the query request.

[0126] The block pointer resource optimization module 605 is used to let the blockchain compare the number of attributes currently requested with the number of block pointers. If the number of attributes currently requested is less than the number of block pointers, the blockchain sends a free pointer signal to the request table and receives the content of the next request from the request table according to the number of free pointers.

[0127] The matching data search module 606 is used to make all block pointers of the blockchain run the request work, and the block pointer initiates a request to the data acquisition hardware device network that constitutes the simulated Chord ring to search for data matching the request in the database of the data acquisition hardware device network;

[0128] The data comparison and waiting-for-output module 607 is used to match the found data with the request in the block pointer item by item. If there is no match, a null value is returned. If there is a match, the search and matching work is completed; the matching result is temporarily stored in the waiting-for-output area, and the corresponding query request in the request table is deleted;

[0129] The user interaction and data sending module 608 is used to initiate a request for consent from the user holding the data. If the user holding the data agrees, the matching data stored in the waiting area will be sent to the requesting party. If the user holding the data disagrees, the data stored in the waiting area will be deleted and the requesting party will be notified.

[0130] A specific implementation of a Chord ring-simulated blockchain data processing device The same Chord ring-simulated blockchain data processing method is not repeated in this embodiment.

[0131] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.

Claims

1. A blockchain data processing method based on a Chord-like ring, characterized in that: The steps include: S1, create a blockchain and request table, add a block pointer to each block of the blockchain, and point the output of the request table to the blockchain; S2, receiving the user registration request, encrypting the registered information with RSA and storing it in the database; S3, receiving a query request from the requesting party, adding a timestamp to the query request that meets the predetermined format and specification, and adding the query request to the request table in the order of the timestamp; S4, sending a query request of the request table to the blockchain in the order of timestamps. The blockchain adds the query request to the blockchain in the order of timestamps and allocates a block pointer to each attribute of the query request. S5, the blockchain compares the number of attributes currently requested with the number of block pointers. If the number of attributes currently requested is less than the number of block pointers, the blockchain sends a free pointer signal to the request table and receives the content of the next request from the request table based on the number of free pointers. S6, all block pointers of the blockchain run the request work, and the block pointer initiates a request to the data acquisition hardware device network that constitutes the simulated Chord ring, and searches for data matching the request in the database of the data acquisition hardware device network; S7, matching the found data with the request in the block pointer item by item, returning a null value if there is no match, and completing the search and matching work if there is a match; temporarily storing the matching result in the waiting output area, and deleting the corresponding query request in the request table; S8, initiate a request for consent from the user holding the data. If the user holding the data agrees, the matching data stored in the waiting area will be sent to the requesting party. If the user holding the data disagrees, delete the data stored in the waiting area and notify the requesting party.

2. The blockchain data processing method based on the simulated Chord ring according to claim 1 is characterized in that: In S2, the user registration request is received, and the registered information is stored in the database after being encrypted by RSA. The specific steps are as follows: S21, receiving a user registration request and assigning unique identification information to each registered user; S22, encrypting the user information using the RSA encryption algorithm; S23, the encrypted user information is stored in the database, and the storage rules are as follows: S231, assigning a unique number to each piece of data in the database; S232, assigning a serial number to the sub-content of the data stored in the database.

3. The blockchain data processing method based on the simulated Chord ring according to claim 1 is characterized in that: In S3, the query request includes data retrieval, modification and addition operations; The preliminary verification and analysis of the query request includes: checking the format, source, authentication information and parameter information carried by the query request, determining the type and content of the query request, and checking whether the query request conforms to the predetermined format and specification; if the query request does not conform to the requirements or has an abnormality, refusing to accept the current query request and sending a corresponding error response to the requester; The method for obtaining the timestamp includes: obtaining the current time and converting the current time into a timestamp format; and using a specific time standard or protocol to standardize the format and precision of the timestamp.

4. The blockchain data processing method based on the simulated Chord ring according to claim 1 is characterized in that: In S4, a block pointer is allocated to each attribute of the query request, specifically including: After receiving the query request, the blockchain analyzes each attribute in the query request and assigns a block pointer to each attribute, and establishes a mapping between each attribute and its corresponding block pointer; among which, the attributes of the query request include the type of data to be obtained, the time range of the required data, and the geographic location information.

5. The blockchain data processing method based on the simulated Chord ring according to claim 1 is characterized in that: In S6, the data acquisition hardware device network is divided into two layers; The second layer is the hardware devices that are arranged on the streets of each area to interact with vehicle radars or sensors, forming a sub-node ring of the data collection hardware device network; The equipment is divided by region. The hardware equipment in each region interacts with the vehicle through the regional network. There is a corresponding regional network behind the hardware equipment in each region. The server of each regional network is the total network node of the regional network. The total network nodes of all regions constitute the first layer of the data acquisition hardware equipment network, that is, the total network ring of the data acquisition hardware equipment network. The first layer of the data acquisition hardware device network is then connected to other modules through the network, allowing other modules to enter the data acquisition hardware device network and interact with data reading; A pointer table is generated in the sub-node ring of the total network node according to the hash algorithm. When the pointer table receives a request from the block pointer of the blockchain network, the target data is searched in all nodes of the sub-node ring according to the pointer table.

6. The blockchain data processing method based on the simulated Chord ring according to claim 5 is characterized in that: In S6, all block pointers of the blockchain run the request work, and the block pointer initiates a request to the data acquisition hardware device network that constitutes the simulated Chord ring, and searches for data matching the request in the database of the data acquisition hardware device network. The specific steps are as follows: S61, the block pointer sends a data collection request to the main network ring of the data acquisition hardware device network, the main network ring broadcasts its own child node ring, and asks the child node ring to check whether the requested resource is in its own node; S62, the nodes in the child node ring point to the node that has the data according to their own pointer table, and the node that has the target data starts to output the required data until the attribute of the next request is not in the node, and then points to the next node that has the data; S63, if the request finds that the required data does not exist or has not been registered in the sub-node ring in the data acquisition hardware device network, an empty result is returned to the block pointer.

7. A blockchain data processing device based on a Chord-like ring, characterized in that: include: The blockchain and request table creation module is used to create the blockchain and request table, add a block pointer to each block of the blockchain, and point the output of the request table to the blockchain; The user registration request receiving module is used to receive the user registration request and store the registered information in the database after RSA encryption; A query request receiving module, used to receive a query request from a requester, add a timestamp to a query request that meets a predetermined format and specification, and add the query request to a request table in the order of the timestamp; The blockchain receiving request module is used to initiate a query request of the request table to the blockchain in the order of timestamps. The blockchain adds the query request to the blockchain in the order of timestamps and allocates a block pointer to each attribute of the query request. The block pointer resource optimization module is used to let the blockchain compare the number of attributes currently requested with the number of block pointers. If the number of attributes currently requested is less than the number of block pointers, the blockchain sends a free pointer signal to the request table and receives the content of the next request from the request table based on the number of free pointers. The matching data search module is used to make all block pointers of the blockchain run the request work. The block pointer initiates a request to the data acquisition hardware device network that constitutes the simulated Chord ring, and searches for data matching the request in the database of the data acquisition hardware device network; The data comparison and output module is used to match the found data with the request in the block pointer item by item. If there is no match, a null value is returned. If there is a match, the search and matching work is completed; the matching results are temporarily stored in the output area, and the corresponding query request in the request table is deleted; The user interaction and data sending module is used to initiate a request for consent from the user holding the data. If the user holding the data agrees, the matching data stored in the waiting area will be sent to the requesting party. If the user holding the data disagrees, the data stored in the waiting area will be deleted and the requesting party will be notified.