Mileage statistics method and device, electronic equipment and storage medium
By establishing smart contracts between vehicles and using blockchain technology for distributed mileage statistics, the problem of inaccurate mileage statistics in existing technologies has been solved, achieving higher statistical reliability and accuracy.
Patent Information
- Application Number
- CN202210102305.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-01-27
AI Technical Summary
Existing technologies for vehicle mileage statistics have low reliability, especially on highways where there are problems with inaccurate statistics.
By using a smart contract between the target vehicle and nearby vehicles, distributed mileage statistics are performed using blockchain technology. The system combines the vehicle's public key and signature certificate for identity verification and accurately calculates the mileage at the mileage statistics node.
This improved the reliability and accuracy of mileage statistics, prevented underreporting or overreporting of mileage, and ensured the reasonable collection of highway tolls.
Smart Images

Figure CN114511352B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent transportation, and in particular to a mileage statistical method and device, electronic equipment and a storage medium. BACKGROUND
[0002] With the development of intelligent transportation technology, the convenience of various traffic types for statistical data has been greatly improved, for example, the mileage of vehicles on the highway. By counting the mileage of vehicles, the mileage of vehicles can be well obtained, which facilitates the mileage as a basis for relevant statistics, for example, the mileage as a basis for highway tolls.
[0003] In the prior art, the mileage of vehicles is generally counted by relying on the combined calculation of the mileage of the entrance toll station and the exit toll station, which has the problem of low reliability of mileage statistics. SUMMARY
[0004] The present application provides a mileage statistical method, device, electronic equipment and storage medium to solve the defect of low reliability of mileage statistics in the prior art, and to achieve the purpose of improving the reliability of mileage statistics.
[0005] The present application provides a mileage statistical method applied to a target vehicle, comprising: obtaining a first mileage; the first mileage is the mileage of the target vehicle; sending the first mileage to a close vehicle, so that the close vehicle sends the first mileage to a mileage statistical node based on a smart contract between the target vehicle and the close vehicle, so that the mileage statistical node obtains a target mileage based on the first mileage.
[0006] According to the mileage statistical method provided by the present application, the method further comprises: generating a signature certificate of a local vehicle through a local private key; storing the public key of the target vehicle and the signature certificate to a block chain, so that the mileage statistical node on the block chain verifies the identity of the target vehicle using the public key and the signature certificate.
[0007] According to the mileage statistical method provided by the present application, the close vehicle at least includes a first close vehicle and a second close vehicle; the first mileage is sent to the close vehicle, which includes: the first mileage is sent to the first close vehicle and the second close vehicle respectively; so that the first close vehicle and the second close vehicle respectively send the first mileage to the mileage statistical node in a distributed manner according to the smart contract between the target vehicle and the close vehicle.
[0008] The application further provides a mileage counting method applied to a mileage counting node, comprising: receiving a first mileage; the first mileage is a mileage of a target vehicle; obtaining a target mileage based on the first mileage.
[0009] According to the mileage counting method provided by the application, the mileage counting node comprises at least a first mileage counting node and a second mileage counting node, and the method further comprises: storing the first mileage in a block chain in units of license plate numbers, so that the first mileage is shared between the first mileage counting node and the second mileage counting node.
[0010] The application further provides a mileage counting device applied to a target vehicle, comprising: a first processing module configured to obtain a first mileage; the first mileage is a mileage of the target vehicle; and a second processing module configured to send the first mileage to a nearby vehicle, so that the nearby vehicle sends the first mileage to a mileage counting node based on a smart contract between the target vehicle and the nearby vehicle, so that the mileage counting node obtains a target mileage based on the first mileage.
[0011] The application further provides a mileage counting device applied to a mileage counting node, comprising: a third processing module configured to receive a first mileage; the first mileage is a mileage of a target vehicle; and a fourth processing module configured to obtain a target mileage based on the first mileage.
[0012] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the mileage counting method according to any one of the above when executing the program.
[0013] The application further provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the steps of the mileage counting method according to any one of the above.
[0014] The application further provides a computer program product comprising a computer program, wherein the computer program is executable by a processor to implement the steps of the mileage counting method according to any one of the above.
[0015] The application provides a mileage statistics method, device, electronic equipment and storage medium, the mileage statistics method comprises the following steps: obtaining a first mileage; the first mileage is the mileage of a target vehicle; sending the first mileage to a nearby vehicle, so that the nearby vehicle sends the first mileage to a mileage statistics node based on a smart contract between the target vehicle and the nearby vehicle, so that the mileage statistics node obtains a target mileage based on the first mileage. By using the nearby vehicle of the target vehicle to send the first mileage of the target vehicle to the mileage statistics node, the mileage statistics node accurately calculates the mileage of the target vehicle by combining the first mileage uploaded by the nearby vehicle, thereby improving the reliability of mileage statistics. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0017] Figure 1 is one of the flowcharts of the mileage statistics method provided by the present application;
[0018] Figure 2 is the second flowchart of the mileage statistics method provided by the present application;
[0019] Figure 3 is the third flowchart of the mileage statistics method provided by the present application;
[0020] Figure 4 is the fourth flowchart of the mileage statistics method provided by the present application;
[0021] Figure 5 is one of the structural diagrams of the mileage statistics device provided by the present application;
[0022] Figure 6 is the second structural diagram of the mileage statistics device provided by the present application;
[0023] Figure 7 is the structural diagram of the electronic equipment provided by the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the present application more clear, the technical solutions in the present application will be described clearly and completely in the following with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0025] The present application is described below Figures 1-4 The mileage statistics method of the present application is described below.
[0026] In one embodiment, as shown in Figure 1 A mileage statistics method is provided, which is described below taking the case of the target vehicle as an example, comprising the following steps:
[0027] Step 102, obtaining a first mileage; the first mileage is the mileage of the target vehicle.
[0028] Wherein, the mileage refers to the distance traveled by the vehicle, for example, the mileage of a certain vehicle is 68 kilometers.
[0029] Specifically, the target vehicle obtains the first mileage by using the mileage statistics module or device in the on-board OBU (On Board Unit, vehicle-mounted unit) of the target vehicle.
[0030] Step 104, sending the first mileage to the nearby vehicle, so that the nearby vehicle sends the first mileage to the mileage statistics node based on the smart contract between the target vehicle and the nearby vehicle, so that the mileage statistics node obtains the target mileage based on the first mileage.
[0031] Wherein, the smart contract refers to the cooperation agreement reached between the target vehicle and the nearby vehicle on the same blockchain, when the contract conditions are met, the contract is triggered, and the content of the contract is automatically executed. For example, when the target vehicle and the nearby vehicle reach the close distance, the target vehicle transmits the mileage of the local end to the nearby vehicle, and shares the synchronized mileage with the nearby vehicle, etc. The mileage statistics node refers to the node on the blockchain, which can realize the function of mileage statistics. The node can be the charging subject for the target vehicle or the nearby vehicle for mileage statistics, for example, a certain highway toll station or a certain highway toll company, etc.
[0032] Specifically, after the target vehicle obtains the first mileage, the first mileage is sent to the nearby vehicle by using the smart contract between the target vehicle and the nearby vehicle, so that the nearby vehicle sends the first mileage and the second mileage to the mileage statistics node based on the second mileage, so that the mileage statistics node obtains the target mileage according to the first mileage and the second mileage, and the second mileage is the mileage of the nearby vehicle.
[0033] In the aforementioned mileage calculation method, a first mileage is obtained; this first mileage is the mileage of the target vehicle; the first mileage is sent to nearby vehicles, so that the nearby vehicles, based on a smart contract with the target vehicle, send the first mileage to a mileage calculation node, allowing the mileage calculation node to obtain the target mileage based on the first mileage. By utilizing nearby vehicles to send the target vehicle's first mileage to the mileage calculation node, the mileage calculation node, in conjunction with the first mileage uploaded by the nearby vehicles, can accurately calculate the target vehicle's mileage, thereby improving the reliability of mileage calculation.
[0034] In one embodiment, such as Figure 2 As shown, mileage counting methods also include:
[0035] Step 202: Generate a signature certificate for the target vehicle using the local private key.
[0036] Specifically, in order for the mileage statistics node to confirm the identity of the target vehicle, the target vehicle generates a vehicle signature certificate using its local private key.
[0037] Step 204: Store the target vehicle's public key and signature certificate in the blockchain so that the mileage statistics node can use the public key and signature certificate to verify the identity of the target vehicle.
[0038] Specifically, after the target vehicle obtains the signature certificate, the signature certificate and the local public key are stored in the blockchain so that the mileage statistics nodes on the blockchain can use the public key and the signature certificate to verify the identity of the target vehicle.
[0039] In one embodiment, the target vehicle can encrypt the signature certificate using the public key of the mileage tracking node and store the encrypted signature certificate on the blockchain. The mileage tracking node can retrieve the signature certificate encrypted with its own public key from the blockchain and decrypt it using its own public key to verify the identity of the target vehicle. For example, if the signature certificate decrypted by the mileage tracking node matches the reference signature certificate stored on its own end, the target vehicle is considered to be a vehicle performing mileage tracking; if the signature certificate decrypted by the mileage tracking node does not match the reference signature certificate stored on its own end, the target vehicle is considered not to be a vehicle performing mileage tracking.
[0040] In this embodiment, a signature certificate for the target vehicle is generated using the local private key, and the public key and signature certificate of the target vehicle are stored in the blockchain. This allows the mileage statistics node to use the public key and signature certificate to verify the identity of the target vehicle, thereby achieving the goal of accurately determining the identity of the target vehicle for which mileage statistics are required.
[0041] In one embodiment, the approaching vehicle includes at least a first approaching vehicle and a second approaching vehicle; sending the first mileage to the approaching vehicle includes: sending the first mileage to the first approaching vehicle and the second approaching vehicle respectively; so that the first approaching vehicle and the second approaching vehicle respectively send the first mileage to the mileage statistics node in a distributed manner according to the smart contract with the target vehicle.
[0042] Specifically, while the target vehicle is traveling on the highway, the approaching vehicles include at least a first approaching vehicle and a second approaching vehicle. Both the first and second approaching vehicles have smart contracts with the target vehicle. When the first and second approaching vehicles approach the target vehicle, they utilize short-range communication between their respective on-board units (OBUs) to send a first mileage value obtained locally to both the first and second approaching vehicles. Upon the first approaching vehicle reaching the mileage statistics node, it sends the first mileage value and a third mileage value from its own device to the mileage statistics node. Simultaneously, upon the second approaching vehicle reaching the mileage statistics node, it sends the first mileage value and a fourth mileage value from its own device to the mileage statistics node.
[0043] In one embodiment, the first and second approaching vehicles that obtain the first mileage of the target vehicle arrive at the mileage statistics node at different times. The data is uploaded to the blockchain at different times, thereby achieving distributed transmission to the mileage statistics node.
[0044] In this embodiment, by sending the first mileage to the first approaching vehicle and the second approaching vehicle respectively, the first approaching vehicle and the second approaching vehicle, according to the smart contract between them and the target vehicle, send the first mileage and the third mileage, as well as the first mileage and the fourth mileage, to the mileage statistics node in a distributed manner. This enables the mileage statistics node to accurately count the mileage of the target vehicle through different approaching vehicles.
[0045] In one embodiment, such as Figure 3 As shown, a mileage statistics method is provided. Taking the application of this method to mileage statistics nodes as an example, the method includes the following steps:
[0046] Step 302: Receive the first mileage; the first mileage is the mileage of the target vehicle.
[0047] Specifically, after the target vehicle sends the first mileage to the nearby vehicle, the nearby vehicle will send the first mileage and the second mileage from its own end to the mileage statistics node. Correspondingly, the mileage statistics node will receive the aforementioned first mileage and second mileage.
[0048] Step 304: Based on the first mileage, obtain the target mileage.
[0049] Specifically, after the mileage statistics node receives the first mileage, it can use a segmented statistics method to count the first mileage of all nearby vehicles related to the target vehicle. The target mileage is then obtained by summing the mileage. For example, if nearby vehicle A uploads a first mileage of 50 kilometers to the mileage statistics node, and nearby vehicle B uploads a first mileage of 40 kilometers to the mileage statistics node, then the target mileage of the target vehicle is the sum of the two first mileages, i.e., the target mileage is 90 kilometers.
[0050] In this embodiment, by receiving the first mileage and obtaining the target mileage based on the first mileage, the goal of accurately obtaining the target mileage of the target vehicle at the mileage statistics node can be achieved.
[0051] In one embodiment, the mileage statistics nodes include at least a first mileage statistics node and a second mileage statistics node. The mileage statistics method further includes: storing the first mileage on the blockchain in units of license plate numbers, so that the first mileage can be shared between the first mileage statistics node and the second mileage statistics node.
[0052] Specifically, highways typically include at least one mileage tracking node. At each node, the initial mileage is stored on the blockchain, unit by license plate number, so that the initial mileage can be shared between the first and second tracking nodes. Alternatively, the initial mileage can also be stored on the blockchain using other uniquely identifying ID (Identity Document) numbers. For example, the initial mileage could be stored on the blockchain using the vehicle's engine number.
[0053] In this embodiment, by storing the first mileage on the blockchain using the license plate number as the unit, the first mileage can be shared between the first mileage statistics node and the second mileage statistics node. This achieves the goal of sharing the first mileage between different mileage statistics nodes, thereby accurately determining the first mileage of the target vehicle and preventing errors such as underreporting or overreporting of the target vehicle's mileage caused by inconsistencies or incoordination between mileage statistics nodes.
[0054] In one embodiment, such as Figure 4As shown, taking the mileage statistics of car A traveling on a highway as an example, all vehicles traveling on the highway are equipped with a blockchain shared smart contract module on their onboard units (OBUs). Utilizing the communication function of the OBUs, when car A approaches cars B, C, and D in close proximity, the shared smart contract's data synchronization function allows car A's recorded mileage to be shared with cars B, C, and D and stored in a shared blockchain smart contract ledger. When cars B, C, and D reach the tollbooth exit, they upload the travel path of car A recorded during their journey to the backend server. By sharing the travel path ledger among multiple vehicles, car A's travel path is asynchronously reconstructed. It is understandable that the mileage statistics of any one vehicle can be obtained by segmented statistics from other vehicles that are close to it and have a smart contract with it. Segmented statistics refer to obtaining the target vehicle's mileage by combining one segment of mileage statistics from one vehicle with another segment of mileage statistics from another vehicle. This implementation can improve the reliability of mileage statistics for vehicle A and solve the problem of vehicles evading highway tolls. It can also improve the traceability of mileage statistics.
[0055] In one embodiment, the aforementioned mileage statistics node deploys vehicle authentication tools on the OBU device of each vehicle. Through technologies such as the Internet of Things (IoT) or 5G (5th Generation Mobile Communication Technology), the OBU device is connected in real-time to the server corresponding to the mileage statistics node, enabling real-time on-chain storage of path statistics data. The OBU device includes an onboard OBU data transmission module and an onboard OBU mileage statistics module. The onboard OBU data transmission module retrieves data from the blockchain ledger and transmits it to the mileage statistics node's server via IoT technologies such as 5G, completing a closed-loop data statistics process. The onboard OBU mileage statistics module, after calculating the vehicle's mileage, first transmits it to its local blockchain module for subsequent data sharing.
[0056] In one embodiment, in areas with poor communication signals, such as tunnels or caves, vehicles can share mileage without uploading it to the blockchain, thus achieving the same goal of mileage tracking for the target vehicle. Understandably, mileage tracking nodes can use monthly or yearly subscriptions to track mileage for a vehicle based on its customized needs.
[0057] The mileage counting device provided by the present invention is described below. The mileage counting device described below and the mileage counting method described above can be referred to in correspondence.
[0058] In one embodiment, such as Figure 5 As shown, a mileage counting device 500 is provided, including: a first processing module 502 and a second processing module 504, wherein: the first processing module 502 is used to obtain a first mileage; the first mileage is the mileage of a target vehicle; the second processing module 504 is used to send the first mileage to a nearby vehicle, so that the nearby vehicle sends the first mileage to a mileage counting node based on a smart contract with the target vehicle, so that the mileage counting node obtains the target mileage based on the first mileage.
[0059] In one embodiment, the mileage counting device is used to generate a signature certificate for the local vehicle using its local private key; and to store the public key and signature certificate of the target vehicle in the blockchain so that the blockchain can use the public key and signature certificate to verify the identity of the target vehicle.
[0060] In one embodiment, the second processing module 504 is configured to send the first mileage to the first approaching vehicle and the second approaching vehicle respectively, so that the first approaching vehicle and the second approaching vehicle respectively send the first mileage to the mileage statistics node in a distributed manner according to the smart contract with the target vehicle.
[0061] In one embodiment, such as Figure 6 As shown, a mileage counting device 600 is provided, including: a third processing module 602 and a fourth processing module 604, wherein the third processing module 602 is used to receive a first mileage; the first mileage is the mileage of the target vehicle; and the fourth processing module 604 is used to obtain the target mileage based on the first mileage.
[0062] In one embodiment, the mileage counting device is used to store a first mileage on a blockchain, using license plate numbers as the unit, so that the first mileage can be shared between a first mileage counting node and a second mileage counting node.
[0063] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7As shown, the electronic device may include a processor 710, a communications interface 720, a memory 730, and a communication bus 740, wherein the processor 710, communications interface 720, and memory 730 communicate with each other via the communication bus 740. The processor 710 can invoke logical instructions in the memory 730 to execute a mileage calculation method, which includes: obtaining a first mileage; the first mileage being the mileage of a target vehicle; sending the first mileage to a nearby vehicle, causing the nearby vehicle to send the first mileage to a mileage calculation node based on a smart contract with the target vehicle, so that the mileage calculation node obtains the target mileage based on the first mileage; and receiving the first mileage; the first mileage being the mileage of the target vehicle, and obtaining the target mileage based on the first mileage.
[0064] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0065] On the other hand, the present invention also provides a computer program product, comprising a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the mileage statistics method provided by the methods described above. This method includes: obtaining a first mileage; the first mileage being the mileage of a target vehicle; sending the first mileage to a nearby vehicle, causing the nearby vehicle to send the first mileage to a mileage statistics node based on a smart contract with the target vehicle, so that the mileage statistics node obtains the target mileage based on the first mileage; and receiving the first mileage; the first mileage being the mileage of the target vehicle, and obtaining the target mileage based on the first mileage.
[0066] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the mileage statistics method provided by the methods described above. The method includes: obtaining a first mileage; the first mileage being the mileage of a target vehicle; sending the first mileage to a nearby vehicle, causing the nearby vehicle to send the first mileage to a mileage statistics node based on a smart contract with the target vehicle, so that the mileage statistics node obtains a target mileage based on the first mileage; and receiving the first mileage; the first mileage being the mileage of the target vehicle, and obtaining a target mileage based on the first mileage.
[0067] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of mileage statistics applied to a target vehicle, characterized by, The method comprises: acquiring a first mileage; the first mileage is the mileage of the target vehicle; when a close distance is reached with a close-by vehicle, sending the first mileage to the close-by vehicle by using a smart contract between the target vehicle and the close-by vehicle, so that the close-by vehicle sends the first mileage and a second mileage to a mileage statistics node based on the second mileage, so that the mileage statistics node obtains a target mileage of the target vehicle according to the first mileage and the second mileage; wherein the smart contract refers to a cooperation agreement reached between the target vehicle and the close-by vehicle on the same blockchain; The method further comprises: generating a signature certificate of the local vehicle by using a local private key; storing the public key of the target vehicle and the signature certificate to the blockchain, so that the mileage statistics node on the blockchain verifies the identity of the target vehicle by using the public key and the signature certificate; the close-by vehicle at least includes a first close-by vehicle and a second close-by vehicle, and the sending of the first mileage to the close-by vehicle comprises: sending the first mileage to the first close-by vehicle and the second close-by vehicle respectively, so that the first close-by vehicle and the second close-by vehicle respectively send the first mileage to the mileage statistics node in a distributed manner according to the smart contract between the target vehicle and the close-by vehicle.
2. A distance measuring device applied to a target vehicle, characterized by comprising: The mileage statistics device using the mileage statistics method of claim 1 comprises: a first processing module configured to acquire a first mileage; the first mileage is the mileage of the target vehicle; a second processing module configured to, when a close distance is reached with a close-by vehicle, send the first mileage to the close-by vehicle by using a smart contract between the target vehicle and the close-by vehicle, so that the close-by vehicle sends the first mileage and a second mileage to a mileage statistics node based on the second mileage, so that the mileage statistics node obtains a target mileage of the target vehicle according to the first mileage and the second mileage; wherein the smart contract refers to a cooperation agreement reached between the target vehicle and the close-by vehicle on the same blockchain.
3. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the steps of the mileage statistics method of claim 1.
4. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the mileage statistics method of claim 1.
5. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the mileage statistics method of claim 1.
Citation Information
Patent Citations
Data processing method and device and electronic device
CN113313845A