Vehicle data sharing method and device based on block chain
By acquiring and analyzing vehicle data on the blockchain and performing identity verification, the problem of vehicle data sharing is solved, and the interaction of vehicle data and the interactiveness of intelligent transportation networks is improved.
Patent Information
- Application Number
- CN202411208667.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, vehicles cannot realize data sharing with other vehicles, resulting in insufficient communication capabilities of vehicles in the process of intelligence and inability to realize data interaction and sharing.
By obtaining vehicle data and uploading it to the blockchain, analysis and identity verification are performed. If the verification is passed, the analysis results will be sent to authorized users to realize the sharing of vehicle data.
It realizes the sharing of vehicle data, improves vehicle communication capabilities, can perform performance evaluation and road conditions optimization selection based on vehicle data, and enhances the interactivity of the intelligent transportation network.
Smart Images

Figure CN119210679A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a vehicle data sharing method and device based on blockchain. Background Art
[0002] In recent years, with the rapid development of urbanization, the traffic network has also shown an increasingly complex trend. In the process of intelligence, in addition to upgrading the driving experience, the vehicle's communication capabilities also need to have strong interactive capabilities. In the existing technology, vehicles can generally only obtain their own vehicle data and judge the driving situation based on their own vehicle data, and cannot share data with other vehicles.
[0003] In summary, how to realize the sharing of vehicle data is an issue that technical personnel in this field need to solve urgently. Summary of the invention
[0004] In view of this, the present application provides a vehicle data sharing method and device based on blockchain, aiming to realize the sharing of vehicle data.
[0005] In a first aspect, the present application provides a vehicle data sharing method based on blockchain, comprising:
[0006] Get vehicle data;
[0007] Uploading the vehicle data to the blockchain;
[0008] Analyzing the vehicle data to obtain analysis results;
[0009] In response to a request for obtaining the analysis result, authenticating the user who sent the request;
[0010] If the verification is successful, the analysis result is sent to the user.
[0011] Optionally, the acquiring vehicle data includes:
[0012] Obtain vehicle travel time, vehicle travel distance, vehicle direction angle, vehicle longitude data, and vehicle latitude data.
[0013] Optionally, the analyzing the vehicle data to obtain an analysis result includes:
[0014] Generate the speed of the vehicle per unit time according to the vehicle travel distance and vehicle travel time;
[0015] Analyzing the speed of the vehicle traveling per unit time to obtain an evaluation result of the vehicle performance;
[0016] According to the angle degree of the vehicle direction, the angle degree generated when the vehicle turns is generated;
[0017] Analyze the angle generated when the vehicle turns to obtain health assessment results of the vehicle head and tires;
[0018] Generate vehicle position information according to the speed of the vehicle in a unit time, the angle generated when the vehicle turns, the vehicle longitude data and the vehicle latitude data;
[0019] Analyze the vehicle location information to obtain the optimal route for the road conditions corresponding to the vehicle.
[0020] Optionally, after acquiring the vehicle data, the method further includes:
[0021] The vehicle data is encrypted using asymmetric encryption technology.
[0022] Optionally, sending the analysis result to the user includes:
[0023] Determining a transaction for the analysis result according to a smart contract;
[0024] In response to the user completing the transaction, the analysis result is sent to the user.
[0025] Optionally, in response to the request for obtaining the analysis result, authenticating the user who sent the acquisition request, includes:
[0026] In response to a request for obtaining the analysis result, obtaining user information of a user who sends the request;
[0027] Determine whether the user corresponding to the user information is an authorized user through a smart contract.
[0028] In a second aspect, the present application provides a vehicle data sharing device based on blockchain, comprising:
[0029] A data acquisition module, used to acquire vehicle data;
[0030] A data uploading module, used to upload the vehicle data to the blockchain;
[0031] A data analysis module, used to analyze the vehicle data and obtain analysis results;
[0032] An identity authentication module, configured to, in response to a request for obtaining the analysis result, authenticate the user who sent the request;
[0033] The data sharing module is used to send the analysis result to the user if the verification is passed.
[0034] Optionally, the data acquisition module is specifically used for:
[0035] Obtain vehicle travel time, vehicle travel distance, vehicle direction angle, vehicle longitude data, and vehicle latitude data.
[0036] Optionally, the data analysis module is specifically used for:
[0037] Generate the speed of the vehicle per unit time according to the vehicle travel distance and vehicle travel time;
[0038] Analyzing the speed of the vehicle traveling per unit time to obtain an evaluation result of the vehicle performance;
[0039] According to the angle degree of the vehicle direction, the angle degree generated when the vehicle turns is generated;
[0040] Analyze the angle generated when the vehicle turns to obtain health assessment results of the vehicle head and tires;
[0041] Generate vehicle position information according to the speed of the vehicle in a unit time, the angle generated when the vehicle turns, the vehicle longitude data and the vehicle latitude data;
[0042] The vehicle position information is analyzed to obtain the optimal route for the road conditions corresponding to the vehicle.
[0043] Optionally, the device further comprises:
[0044] The encryption module is used to encrypt the vehicle data using an asymmetric encryption technology.
[0045] Optionally, the data sharing module is specifically used for:
[0046] Determining a transaction for the analysis result according to a smart contract;
[0047] In response to the user completing the transaction, the analysis result is sent to the user.
[0048] Optionally, the identity authentication module is specifically used for:
[0049] In response to a request for obtaining the analysis result, obtaining user information of a user who sends the request;
[0050] Determine whether the user corresponding to the user information is an authorized user through a smart contract.
[0051] The present application provides a vehicle data sharing method based on blockchain. When executing the method, vehicle data is first obtained, then the vehicle data is uploaded to the blockchain, then the vehicle data is analyzed to obtain the analysis result, and in response to the acquisition request for the analysis result, the identity of the user who sent the acquisition request is authenticated, and if the verification is passed, the analysis result is sent to the user. In this way, by analyzing the vehicle data, obtaining the analysis result, and then sharing the analysis result with other users in response to the acquisition request, the sharing of vehicle data can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A flowchart of a vehicle data sharing method based on blockchain provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of the structure of a vehicle data sharing device based on blockchain provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. The present application provides a vehicle data sharing method and device based on blockchain, which is used in the field of data processing technology. The above is only an example and does not limit the application field of the method and device name provided by the present application.
[0056] In recent years, with the rapid development of urbanization, the traffic network has also shown an increasingly complex trend. In the process of intelligence, in addition to upgrading the driving experience, the vehicle's communication capabilities also need to have strong interactive capabilities. In the existing technology, vehicles can generally only obtain their own vehicle data and judge the driving situation based on their own vehicle data, and cannot share data with other vehicles.
[0057] After research, the inventor proposed the technical solution of this application, which first obtains vehicle data, then uploads the vehicle data to the blockchain, then analyzes the vehicle data to obtain the analysis result, responds to the request to obtain the analysis result, authenticates the user who sent the acquisition request, and if the verification is successful, sends the analysis result to the user. In this way, by analyzing the vehicle data to obtain the analysis result, and then sharing the analysis result with other users in response to the acquisition request, the sharing of vehicle data can be achieved.
[0058] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. It should be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0059] See also Figure 1 , Figure 1 A flowchart of a vehicle data sharing method based on blockchain provided in an embodiment of the present application includes:
[0060] S101: Acquire vehicle data.
[0061] The vehicle data includes, but is not limited to: vehicle driving time, vehicle driving distance, vehicle direction angle, vehicle longitude data, and vehicle latitude data.
[0062] S102: Upload vehicle data to the blockchain.
[0063] Before uploading vehicle data to the blockchain, asymmetric encryption technology can be used to encrypt the vehicle data to ensure the security and privacy of the vehicle data and prevent the vehicle data from being intercepted and maliciously tampered with. The asymmetric encryption algorithm code is as follows:
[0064]
[0065] Uploading vehicle data to the blockchain and storing the vehicle data in the blockchain can ensure the security, immutability and traceability of the vehicle data.
[0066] S103: Analyze the vehicle data to obtain analysis results.
[0067] According to the vehicle travel distance Jl and the vehicle travel time Sj, the vehicle travel speed Clsd per unit time is calculated. The specific calculation method is as follows:
[0068] Clsd = AragetSd (Jl, Sj);
[0069] Among them, Clsd represents the speed of the vehicle in a unit time, and AragetSd is the function for calculating the driving speed in the smart contract. The smart contract is not described here, and will be described in detail later. The vehicle driving distance Jl and the vehicle driving time Sj are passed as parameters to this function for calculation. The speed Clsd of the vehicle in a unit time can be analyzed to obtain the evaluation result of the vehicle performance.
[0070] According to the angle between the vehicle directions, the angle Clzj generated when the vehicle turns is calculated. The specific calculation method is as follows:
[0071] Clzj = Turn (New, Old);
[0072] Among them, Clzj represents the angle generated when the vehicle turns, Turn is the function for calculating the steering angle in the smart contract, and the new direction angle New and the old direction angle are passed as parameters to this function for calculation to calculate the angle of the car when turning. The smart contract is not described here, and will be described in detail later. The calculated angle Clzj generated when the vehicle turns can be analyzed to obtain the health assessment results of the front and tires, that is, to determine whether the front and tires have performance abnormalities.
[0073] The vehicle position information Wzxx is calculated based on the vehicle's speed Clsd per unit time, the angle Clzj generated when the vehicle turns, the vehicle's longitude data Longitude, and the vehicle's latitude data Latitude. The specific calculation method is as follows:
[0074] Wzxx=GPScount(Longitude,Latitude,Clsd,Clzj);
[0075] Among them, Wzxx represents the vehicle location information, GPScount represents the positioning function in the smart contract, and the vehicle's speed per unit time Clsd, the angle Clzj generated when the vehicle turns, the vehicle's longitude data Longitude, and the vehicle's latitude data Latitude are passed as parameters to this function for calculation. The smart contract is not described here, and will be described in detail later. Analyze the vehicle's location information Wzxx to obtain the optimal route for the vehicle's corresponding road conditions.
[0076] S104: In response to the request for obtaining the analysis result, the user who sends the request for obtaining the analysis result is authenticated.
[0077] In this embodiment, a smart contract is a piece of code running on the blockchain, which is used to automatically execute pre-set rules. The core code is as follows:
[0078]
[0079] In this smart contract, a contract called CarDataSharing is defined, which includes the following important parts:
[0080] owner: The owner address of the contract. Only the owner of the contract can add or remove authorized users.
[0081] approvedUsers: A map used to store the addresses of authorized users.
[0082] carData: A nested map used to store data about each user's vehicle. The contract contains the following functions:
[0083] addApprovedUser: A function for adding authorized users. Only the owner of the contract can call it.
[0084] removeApprovedUser: Function to remove authorized users. Only the owner of the contract can call it.
[0085] shareCarData: function for sharing vehicle data, which can only be called by authorized users.
[0086] getCarData: A function for obtaining vehicle data, used to query data for a specified user and vehicle.
[0087] In response to the request for obtaining the analysis results, the user who sent the request is authenticated, that is, the user information of the user who sent the request is obtained, and the smart contract is used to determine whether the user corresponding to the user information is an authorized user. The specific authentication method is as follows:
[0088]
[0089] In the above code, two contracts are defined: IdentityRegistry and PermissionManager:
[0090] IdentityRegistry contract: used to register and manage identities. Users can call the registeredIdentity function to register their own identities, and use the isRegisteredIdentity function to check whether the identity has been registered.
[0091] PermissionManager contract: used to manage permissions. The address of the identityRegistry contract is passed into the constructor to ensure the association between permission management and identity registration. Users can call the grantPermission function to grant specific permissions to a specified identity, call the revokePermission function to revoke permissions, and call the hasPermission function to query whether a specified identity has a specific permission.
[0092] S105: If the verification is successful, the analysis result is sent to the user.
[0093] If the identity authentication of the user who requested the acquisition is passed, the analysis result is shared with the user. Collectively, a transaction for the analysis result is determined according to the smart contract, and in response to the user completing the transaction, the analysis result is sent to the user. The specific method of determining the transaction for the analysis result is shown in the following code:
[0094]
[0095]
[0096] In this way, it can be ensured that users can obtain corresponding compensation and rewards as agreed.
[0097] In the embodiment of the present application, the vehicle data is first obtained, and then the vehicle data is uploaded to the blockchain. Then, the vehicle data is analyzed to obtain the analysis result. In response to the acquisition request for the analysis result, the identity of the user who sent the acquisition request is authenticated. If the authentication is successful, the analysis result is sent to the user. In this way, by analyzing the vehicle data, obtaining the analysis result, and then sharing the analysis result with other users in response to the acquisition request, the sharing of vehicle data can be achieved.
[0098] The above are some specific implementations of the vehicle data sharing method based on blockchain provided by the embodiments of the present application. Based on this, the present application also provides a corresponding device. The device provided by the embodiments of the present application will be introduced from the perspective of functional modularization.
[0099] See also Figure 2 , Figure 2 A schematic diagram of a vehicle data sharing device based on blockchain provided in an embodiment of the present application, the vehicle data sharing device based on blockchain 200, comprising:
[0100] A data acquisition module 210, used to acquire vehicle data;
[0101] A data uploading module 220, used to upload the vehicle data to the blockchain;
[0102] The data analysis module 230 is used to analyze the vehicle data and obtain analysis results;
[0103] The identity authentication module 240 is used to, in response to the request for obtaining the analysis result, authenticate the user who sent the request;
[0104] The data sharing module 250 is used to send the analysis result to the user if the verification is passed.
[0105] Optionally, the data acquisition module 210 is specifically used for:
[0106] Obtain vehicle travel time, vehicle travel distance, vehicle direction angle, vehicle longitude data, and vehicle latitude data.
[0107] Optionally, the data analysis module 230 is specifically used for:
[0108] Generate the speed of the vehicle in a unit time according to the vehicle travel distance and the vehicle travel time; analyze the speed of the vehicle in a unit time to obtain the evaluation result of the vehicle performance;
[0109] According to the angle degree of the vehicle direction, the angle degree generated when the vehicle turns is generated;
[0110] Analyze the angle generated when the vehicle turns to obtain health assessment results of the vehicle head and tires;
[0111] Generate vehicle position information according to the speed of the vehicle in a unit time, the angle generated when the vehicle turns, the vehicle longitude data and the vehicle latitude data;
[0112] Analyze the vehicle location information to obtain the optimal route for the road conditions corresponding to the vehicle.
[0113] Optionally, the device 200 further includes:
[0114] The encryption module is used to encrypt the vehicle data using an asymmetric encryption technology.
[0115] Optionally, the data sharing module 250 is specifically used for:
[0116] Determining a transaction for the analysis result according to a smart contract;
[0117] In response to the user completing the transaction, the analysis result is sent to the user.
[0118] Optionally, the identity authentication module 240 is specifically used for:
[0119] In response to a request for obtaining the analysis result, obtaining user information of a user who sends the request;
[0120] Determine through smart contracts whether the user corresponding to the user information is an authorized user
[0121] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.
[0122] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the method described in any embodiment of the present application.
[0123] The computer storage medium stores codes, and when the codes are executed, a device executing the codes implements the method described in any embodiment of the present application.
[0124] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0125] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0126] It should also be noted that the various embodiments in this specification are described in a progressive manner, and the same and similar parts between the various embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the equipment and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The device embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components prompted as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0127] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A vehicle data sharing method based on blockchain, characterized in that: include: Get vehicle data; Uploading the vehicle data to the blockchain; Analyzing the vehicle data to obtain analysis results; In response to a request for obtaining the analysis result, authenticating the user who sent the request; If the verification is successful, the analysis result is sent to the user.
2. The method according to claim 1, characterized in that The obtaining of vehicle data comprises: Obtain vehicle travel time, vehicle travel distance, vehicle direction angle, vehicle longitude data, and vehicle latitude data.
3. The method according to claim 2, characterized in that The analyzing the vehicle data to obtain an analysis result includes: Generate the speed of the vehicle per unit time according to the vehicle travel distance and vehicle travel time; Analyzing the speed of the vehicle traveling per unit time to obtain an evaluation result of the vehicle performance; According to the angle degree of the vehicle direction, the angle degree generated when the vehicle turns is generated; Analyze the angle generated when the vehicle turns to obtain health assessment results of the vehicle head and tires; Generate vehicle position information according to the speed of the vehicle in a unit time, the angle generated when the vehicle turns, the vehicle longitude data and the vehicle latitude data; Analyze the vehicle location information to obtain the optimal route for the road conditions corresponding to the vehicle.
4. The method according to claim 1, characterized in that: After obtaining the vehicle data, the method further includes: The vehicle data is encrypted using asymmetric encryption technology.
5. The method according to claim 1, characterized in that The sending the analysis result to the user comprises: Determining a transaction for the analysis result according to a smart contract; In response to the user completing the transaction, the analysis result is sent to the user.
6. The method according to claim 1, characterized in that The step of authenticating the user who sends the acquisition request in response to the acquisition request for the analysis result includes: In response to a request for obtaining the analysis result, obtaining user information of a user who sends the request; Determine whether the user corresponding to the user information is an authorized user through a smart contract.
7. A vehicle data sharing device based on blockchain, characterized in that: include: A data acquisition module, used for acquiring vehicle data; A data uploading module, used to upload the vehicle data to the blockchain; A data analysis module, used to analyze the vehicle data and obtain analysis results; An identity authentication module, configured to, in response to a request for obtaining the analysis result, authenticate the user who sent the request; The data sharing module is used to send the analysis result to the user if the verification is passed.
8. The device according to claim 7, characterized in that The data acquisition module is specifically used for: Obtain vehicle travel time, vehicle travel distance, vehicle direction angle, vehicle longitude data, and vehicle latitude data.
9. The device according to claim 8, characterized in that The data analysis module is specifically used for: Generate the speed of the vehicle per unit time according to the vehicle travel distance and vehicle travel time; Analyzing the speed of the vehicle traveling per unit time to obtain an evaluation result of the vehicle performance; According to the angle degree of the vehicle direction, the angle degree generated when the vehicle turns is generated; Analyze the angle generated when the vehicle turns to obtain health assessment results of the vehicle head and tires; Generate vehicle position information according to the speed of the vehicle in a unit time, the angle generated when the vehicle turns, the vehicle longitude data and the vehicle latitude data; Analyze the vehicle location information to obtain the optimal route for the road conditions corresponding to the vehicle.
10. The device according to claim 7, characterized in that The device also includes: The encryption module is used to encrypt the vehicle data using an asymmetric encryption technology.
