Methods, devices, equipment, and storage media for vehicle management
Through blockchain network storage and verification of official vehicle information, the problems of cumbersome management of official vehicles and private use are solved, and fast, safe and reliable vehicle allocation and supervision are achieved.
Patent Information
- Application Number
- CN202111425898.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2041-11-26
AI Technical Summary
The existing management methods for official vehicles are cumbersome, which can easily lead to private use of public vehicles and damage the interests of enterprises.
The blockchain network stores vehicle management information, receives vehicle use requests and generates vehicle allocation results, and uses asymmetric encryption verification and consensus mechanism to ensure data authenticity, generate blocks and join the blockchain network to prevent data tampering.
It improves the speed and accuracy of scheduling of official vehicles, prevents public vehicles from being used privately, strengthens supervision, and ensures the security and authenticity of data transmission.
Smart Images

Figure CN116192393B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technologies, and in particular, to a method, apparatus, device, and storage medium for vehicle management. Background Art
[0002] Official vehicles refer to vehicles provided by organizations such as governments and enterprises for internal employees to use when performing official duties. The purpose is to ensure that employees can better complete their own work, thereby improving work efficiency. Usually, if an employee wants to use an official vehicle to perform official duties, they need to submit an application first, and then relevant personnel will conduct an approval. After the approval is passed, the official vehicle can be used. This management method for official vehicles has cumbersome procedures and is time-consuming and laborious. In addition, if the supervision work is not in place, it is very easy to have the problem of private use of official vehicles, which damages the interests of the enterprise. Summary of the Invention
[0003] The embodiments of this application provide a method, apparatus, device, and storage medium for vehicle management, which can prevent the tampering of official vehicle usage data, and thus can prevent the private use of official vehicles.
[0004] In a first aspect, the embodiments of this application provide a method for vehicle management, which is applied to a target node device. The target node device is connected to a blockchain network, and the blockchain network stores vehicle management information, including the following steps:
[0005] Receive a vehicle usage request and first signature information sent by a first electronic device;
[0006] Verify the vehicle usage request based on the first signature information;
[0007] In response to the verification passing, generate a vehicle allocation result based on the vehicle usage request. The vehicle allocation result includes the license plate number of the vehicle to be used and the location information of the vehicle to be used;
[0008] Generate a first block based on the vehicle usage request and the vehicle allocation result, and add the first block to the blockchain network;
[0009] Send the vehicle allocation result to the first electronic device.
[0010] It can be seen that a vehicle allocation result is generated based on the vehicle usage request of the first electronic device, and then the vehicle allocation result is sent to the first electronic device. In this way, the intervention of manual scheduling can be reduced, and the scheduling speed and accuracy of official vehicle usage can be improved. In addition, adding the vehicle usage request and the vehicle allocation result to the blockchain network can prevent the tampering of official vehicle usage data, ensure the authenticity and credibility of the vehicle usage data in the blockchain network, can effectively prevent the private use of official vehicles, and further strengthen the supervision of official vehicle usage.
[0011] In a possible implementation, after sending the vehicle allocation result to the first electronic device, the following steps are further included:
[0012] Receive a query request and second signature information sent by a second electronic device, where the query request includes querying the identity information of a specified user;
[0013] Verify the query request based on the second signature information;
[0014] In response to successful verification, obtain a query result from the blockchain network based on the query request;
[0015] Send the query result to the second electronic device.
[0016] It can be seen that the entire process of using official vehicles is stored in the blockchain network, and the data in the blockchain network is publicly transparent. Therefore, the second electronic device can query the vehicle usage records of any user at any time, thereby preventing the use of official vehicles for private purposes.
[0017] In a possible implementation, the blockchain network includes multiple node devices, the target node device is the node device closest to the first electronic device among the multiple node devices, and the vehicle storage area to which the vehicle to be used belongs is the storage area closest to the first electronic device.
[0018] It can be seen that by sending a vehicle usage request to the nearest blockchain node device, the first electronic device can improve the efficiency of data transmission, thereby improving the processing efficiency. The vehicle storage area to which the vehicle to be used belongs is the storage area closest to the first electronic device, which is convenient for the vehicle user to use the vehicle nearby, saves time, and can improve the user experience.
[0019] In a possible implementation, the verification of the vehicle usage request according to the first signature information includes the following steps:
[0020] Obtain an encryption result and a public key from the first signature information, where the encryption result is obtained by the first electronic device encrypting the vehicle usage request according to a private key, and the public key and the private key are created by the first electronic device;
[0021] Decrypt the encryption result based on the public key to obtain a decryption result;
[0022] In response to the vehicle usage request being consistent with the decryption result, the verification is passed.
[0023] It can be seen that using asymmetric encryption to verify the vehicle usage request has high security, can prevent data leakage, and can improve the security and confidentiality of data transmission.
[0024] In a possible implementation manner, the vehicle use request includes the identity information of the vehicle user. Responding to successful verification and generating a vehicle allocation result based on the vehicle use request includes the following steps:
[0025] Obtain a list of vehicles that are idle during the current time period from the blockchain network;
[0026] Determine the priority level of the vehicle user based on the identity information of the vehicle user;
[0027] Generate a vehicle allocation result based on the priority level of the vehicle user and the vehicle list.
[0028] It can be seen that generating a vehicle allocation result based on the priority level of the vehicle user and the list of idle vehicles can improve the allocation efficiency of official vehicles, which is conducive to improving the dispatching speed and accuracy of official vehicles.
[0029] In a possible implementation manner, responding to successful verification and generating a vehicle allocation result based on the vehicle use request includes the following steps:
[0030] Obtain the identity information of the vehicle user and the estimated vehicle use time from the vehicle use request;
[0031] Obtain the historical vehicle allocation result based on the identity information of the vehicle user;
[0032] Generate a vehicle allocation result based on the estimated vehicle use time and the historical vehicle allocation result.
[0033] It can be seen that based on the estimated vehicle use time and the historical vehicle allocation result, a vehicle allocation result can be quickly generated, which helps to improve the allocation efficiency of official vehicles.
[0034] In a possible implementation manner, generating a first block based on the vehicle use request and the vehicle allocation result and adding the first block to the blockchain network includes the following steps:
[0035] Send a verification request to the consensus node device of the blockchain network;
[0036] Receive the verification request result feedback by the consensus node device;
[0037] Responding to the verification pass ratio in the verification request result being greater than or equal to a preset threshold, determine that the consensus node device reaches a consensus on the first block;
[0038] Responding to reaching a consensus, add the first block to the blockchain network.
[0039] It can be seen that if the blockchain consensus node device reaches a consensus on the first block, the first block can be added to the blockchain network. In this way, it is convenient for other devices to query the data of the first block. At the same time, it can also prevent the data of the first block from being tampered with, so as to improve the authenticity of the data.
[0040] In a possible implementation manner, after sending the vehicle allocation result to the first electronic device, the following steps are further included:
[0041] Receiving a vehicle usage record and third signature information, where the vehicle usage record includes the identity information of the actual vehicle user, the actual vehicle usage time, the actual destination reached, and the vehicle license plate number;
[0042] Verifying the vehicle usage record based on the third signature information;
[0043] In response to passing the verification, generating a second block for the vehicle usage record;
[0044] Adding the second block to the blockchain network.
[0045] It can be seen that generating a second block for the vehicle usage record and adding it to the blockchain network can facilitate other devices to query the vehicle usage records of official vehicles. At the same time, it can also prevent the vehicle usage records of official vehicles from being tampered with, so as to improve the authenticity of the data. Further, the supervision system of official vehicles can be improved.
[0046] In a possible implementation manner, the vehicle usage request includes a predicted destination, and the method further includes the following steps:
[0047] In response to the actual destination reached being inconsistent with the predicted destination, obtaining the historical vehicle usage requests and historical vehicle usage records of the identity information of the actual vehicle user, where the historical vehicle usage requests include historical predicted destinations, and the historical vehicle usage records include historical actual destinations reached;
[0048] In response to the number of times the historical actual destination reached is inconsistent with the historical predicted destination reaching a preset number of times, marking the identity information of the actual vehicle user as abnormal information.
[0049] It can be seen that marking the identity information of the actual vehicle user whose historical actual destination reached is inconsistent with the historical predicted destination reaching a preset number of times as abnormal information. In this way, it is convenient for other personnel to confirm whether the actual vehicle user has misused official vehicles, so as to improve the query efficiency.
[0050] In a second aspect, an embodiment of the present application provides a vehicle management device, including the following parts:
[0051] A receiving unit, configured to receive a vehicle usage request and a first signature information sent by a first electronic device;
[0052] A processing unit, configured to verify the vehicle usage request based on the first signature information; in response to successful verification, generate a vehicle allocation result based on the vehicle usage request, where the vehicle allocation result includes the license plate number of the vehicle to be used and the location information of the vehicle to be used; generate a first block based on the vehicle usage request and the vehicle allocation result and add the first block to the blockchain network;
[0053] A sending unit, configured to send the vehicle allocation result to the first electronic device.
[0054] In a third aspect, an embodiment of the present application provides a computer device, including a processor, a memory, and a communication interface, where the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program includes instructions for performing some or all of the steps described in the first aspect of the embodiment of the present application.
[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program causes a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application.
[0056] Implementing the embodiments of the present application will have the following beneficial effects:
[0057] By using the above vehicle management method, device, equipment, and storage medium, after the target node device receives the vehicle usage request and the first signature information sent by the first electronic device, it verifies the vehicle usage request based on the first signature information. After successful verification, it generates a vehicle allocation result based on the vehicle usage request. Then, it generates a first block with the vehicle usage request and the vehicle allocation result and adds the first block to the blockchain network. Finally, it sends the vehicle result to the first electronic device. In this way, the intervention of manual scheduling can be reduced, and the scheduling speed and accuracy of official vehicle use can be improved. Adding the vehicle usage request and the vehicle allocation result to the blockchain network can prevent the tampering of official vehicle use data, ensure the authenticity and credibility of the vehicle use data in the blockchain network, effectively prevent the use of official vehicles for private purposes, and further strengthen the supervision of official vehicle use. Description of the Drawings
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. Among them:
[0059] Figure 1 A schematic diagram of a system architecture provided by an embodiment of the present application;
[0060] Figure 2 A flowchart of a method for vehicle management provided by an embodiment of the present application;
[0061] Figure 3 A schematic diagram of the structure of a device for vehicle management provided by an embodiment of the present application;
[0062] Figure 4 A schematic diagram of the structure of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0063] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are 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 those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0064] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0065] Referring to "embodiment" herein means that a specific feature, result or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0066] To better understand the technical solutions of the embodiments of the present application, the concept of blockchain involved in the embodiments of the present application will be explained first.
[0067] Blockchain, in essence, is a decentralized database, a series of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. Anyone can add their electronic device to the blockchain and become one of its nodes. The blockchain is not under the supervision of an individual but is jointly managed. Each node is equal, and any information written will eventually be synchronized to ensure the consistency of the blockchain.
[0068] Generally speaking, blockchain technology refers to the technology of collectively maintaining a reliable database in a decentralized and trustless way. In fact, blockchain technology is the result of the integration of multiple technologies (such as encryption algorithms, P2P file transfer, etc.). These technologies are cleverly combined with the database to form a new way of data recording, transmission, storage, and presentation. Blockchain technology is a technology in which everyone participates in recording and storing information. Blockchain technology allows everyone in the system to participate in data recording and storage. Through a complex verification mechanism, the blockchain database can maintain integrity, continuity, and consistency. Even if some participants falsify, they cannot change the integrity of the blockchain, let alone tamper with the data in the blockchain.
[0069] To sum up, the following major characteristics of the blockchain can be summarized:
[0070] (1) Decentralization
[0071] Since the blockchain is a distributed database that uses distributed accounting and storage, there is no centralized hardware or management institution. That is to say, the rights and obligations of any node are equal, and the data blocks in the system are jointly maintained by the nodes with maintenance functions in the whole system.
[0072] (2) Openness
[0073] In the blockchain, except that the private information of the trading parties is encrypted, the data of the blockchain is public to everyone. Anyone can query the blockchain data and develop related applications through the public interface. Therefore, the information of the whole system is highly transparent.
[0074] (3) Autonomy
[0075] The blockchain adopts norms and protocols based on consensus (such as a set of publicly transparent algorithms), enabling all nodes in the whole system to freely and securely exchange data in a trustless environment, changing the trust in "people" to trust in machines, and any human intervention has no effect.
[0076] (4) Information immutability
[0077] Once the information is verified and added to the blockchain, it will be stored permanently. Modifications to the database on a single node are invalid unless more than 51% of the nodes in the system can be controlled simultaneously. Therefore, the data stability and reliability of the blockchain are extremely high.
[0078] The following introduces the system architecture that the embodiments of the present application may involve. Please refer to Figure 1 , a schematic diagram of a system architecture provided by the embodiments of the present application. The system architecture may include: a first electronic device 101 and a target node device 102. Among them, the first electronic device can communicate with the target node device through a network. The network communication can be based on any wired and wireless networks, including but not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), and wireless communication network, etc.
[0079] In the embodiments of the present application, the first electronic device can send a vehicle usage request and signature information to the target node device, and can also be used to send vehicle usage records, etc. to the target node device. The first electronic device can be a personal computer (PC), laptop, or smartphone, and can also be an all-in-one machine, handheld computer, tablet computer (pad), smart TV playback terminal, vehicle-mounted terminal, or portable device, etc. For electronic devices on the PC side, such as all-in-one machines, etc., their operating systems can include but not limited to Linux system, Unix system, Windows series systems (such as Windows xp, Windows 7, etc.), Mac OS X system (the operating system of Apple computers), etc. For electronic devices on the mobile side, such as smartphones, etc., their operating systems can include but not limited to Android system, IOS (the operating system of Apple mobile phones), Window system, etc.
[0080] In the embodiments of the present application, the target node device accesses the blockchain network, and the management information of official vehicles is stored in the blockchain network, including information such as the current status of official vehicles and the historical usage of official vehicles. Among them, the blockchain network includes multiple node devices, each node device has a connection relationship with other node devices, and the target node device is one of the node devices. The node device can be any form of computer device, such as a server or an electronic device, etc., which is not limited here. The electronic device can refer to the description of the first electronic device and will not be elaborated here. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms. In the embodiments of the present application, each node device can receive information such as vehicle usage requests, query requests, and vehicle usage records during normal operation, and can maintain the shared data of the blockchain network based on the received information. To ensure information intercommunication in the blockchain network, there can be information connections between each node device in the blockchain network, and information can be transmitted between node devices through the above information connections. It should be understood that the entire blockchain network is jointly maintained by each node device. The consensus node device can be a node pre-determined from the multiple node devices included in the blockchain network based on the consensus mechanism of the blockchain network. For example, the consensus node can be the target node device as shown in Figure 1 or other node devices, which is not limited here.
[0081] Normally, if an employee wants to use an official vehicle to perform official duties, they need to submit an application first, and then it will be approved by relevant personnel. Only after the approval can the official vehicle be used. This management method for official vehicles is cumbersome and time-consuming. In addition, if the supervision work is not in place, it is very easy to have the problem of private use of official vehicles, which damages the interests of the enterprise.
[0082] To solve the above problems, the embodiments of the present application provide a method for vehicle management. By implementing this method, it is possible to prevent the tampering of official vehicle usage data, and thus prevent the private use of official vehicles. Please refer to Figure 2 , Figure 2 is a schematic flowchart of a method for vehicle management provided by the embodiments of the present application. Taking the application of this method in the target node device as an example, it can include the following steps S201 - S205, where:
[0083] Step S201: Receive a vehicle usage request and first signature information sent by the first electronic device.
[0084] In an embodiment of the present application, when an employee wants to use an official vehicle to perform official duties, the employee can use a first electronic device to send a corresponding vehicle usage request to a target node device. In a possible implementation, the target node device is the node device closest to the first electronic device among multiple node devices in the blockchain network. Herein, the closest distance may refer to the shortest physical distance. In this way, by sending the vehicle usage request nearby, the first electronic device can improve the data transmission efficiency, thereby enhancing the processing efficiency.
[0085] Specifically, the vehicle usage request may include the identity information of the vehicle user, purpose, estimated vehicle usage time, estimated destination, etc. The vehicle user refers to the employee using the vehicle this time, which may be the employee sending the vehicle usage request or other employees, and is not limited herein.
[0086] Among them, the identity information of the vehicle user may include name, employee number, position, mobile phone number, ID card number, etc. The purpose refers to the purpose of using the official vehicle this time, which may be visiting customers, picking up and dropping off customers, running business, or hauling goods, etc. The estimated vehicle usage time may be the estimated departure time and the estimated usage duration. The estimated destination refers to where the vehicle is estimated to go. Optionally, the vehicle usage request may further include the estimated vehicle type to be used, the location information of the vehicle user at present, etc. By way of example, the vehicle usage request may be "Employee A, Business Department Manager, go to Airport A to pick up customers at 10 am", or the vehicle usage request may be "Employee B, employee number 123456, Employee C, employee number 456789, go to Warehouse B to haul goods at 3 pm, need to use a large truck, currently in Park C", or it may be other forms of vehicle usage requests, which are not limited herein.
[0087] The first signature information is the information obtained by the first electronic device signing the vehicle usage request. Among them, the specific content included in the first signature information is determined according to the specific signing method. The present application embodiment does not limit the specific implementation manner of signing, which may be asymmetric encryption, symmetric encryption, or signing through a hash function, etc.
[0088] Step S202: Verify the vehicle usage request based on the first signature information.
[0089] Specifically, the target node device verifies the vehicle usage request according to the first signature information. Among them, the specific verification method is determined according to the method of generating the first signature information. Hereinafter, taking the method of generating the first signature information by using asymmetric encryption as an example, step S202 may specifically include the following steps:
[0090] Obtain the encryption result and the public key from the first signature information, where the encryption result is obtained by the first electronic device encrypting the vehicle usage request according to the private key, and the public key and the private key are created by the first electronic device; decrypt the encryption result based on the public key to obtain the decryption result; in response to the vehicle usage request being consistent with the decryption result, the verification passes.
[0091] In the embodiment of the present application, the first electronic device creates a public key and a private key, and then encrypts the vehicle usage request according to the private key to obtain the first signature information. The encryption here is the process of signing. Among them, the first signature information includes the encryption result and the public key. Further, after receiving the first signature information, the target node device obtains the encryption result and the public key from the first signature information, and then decrypts the encryption result according to the public key to obtain the decryption result. If the data is correct and authentic, the decryption result should be consistent with the vehicle usage request before encryption. Further, the target node device verifies whether the decryption result is consistent with the vehicle usage request, thereby completing the verification of the vehicle usage request.
[0092] It can be seen that using asymmetric encryption to verify the vehicle usage request has high security, can prevent data leakage, and can improve the security and confidentiality of data transmission.
[0093] The above is only an exemplary introduction to the verification in combination with the signature method of asymmetric encryption, and it is not the only implementation method. In a possible implementation manner, the vehicle usage request can also be signed according to the hash function to obtain the first signature result, and then the target node device obtains the cracked first signature information according to the first signature result and the reverse process of the hash function. The target node device verifies the cracked first signature information and compares it with the vehicle usage request to determine whether the verification passes. Its implementation method is similar to the verification process of asymmetric encryption and will not be elaborated here.
[0094] Step S203: In response to the verification passing, generate a vehicle allocation result based on the vehicle usage request, where the vehicle allocation result includes the license plate number of the vehicle to be used and the location information of the vehicle to be used.
[0095] Specifically, the target node device has verified the vehicle usage request. If there are multiple idle official vehicles currently, official vehicles can be allocated to employees according to the vehicle usage request and a vehicle allocation result is generated. Among them, the vehicle allocation result can include the license plate number of the vehicle to be used and the location information of the vehicle to be used, which is convenient for indicating the vehicle user to quickly find the vehicle to be used.
[0096] Optionally, the vehicle allocation result may further include vehicle information such as the vehicle type of the vehicle to be used, the model of the vehicle to be used, the color of the vehicle to be used, etc., which further facilitates the vehicle user to quickly find the vehicle. The vehicle allocation result may also include the identity information of the vehicle user, the allocation time, etc., which are not limited herein. By way of example, the vehicle allocation result may be "Employee A, allocated a white business vehicle, license plate number is a certain X12345, located at Parking Space No. 12, Floor B2, Building C2", or it may be "Employee B, allocated a truck, license plate number is a certain X54321, located at Parking Space No. 23, Floor B1, Building C5", or it may be in other forms, which are not limited herein.
[0097] In a possible implementation manner, step S203 may specifically include the following steps:
[0098] Obtain a list of vehicles that are idle during the current time period from the blockchain network; determine the priority level of the vehicle user based on the identity information of the vehicle user; generate a vehicle allocation result based on the priority level of the vehicle user and the vehicle list.
[0099] In the embodiment of the present application, the management information of official vehicles is stored in the blockchain network, including the current status of official vehicles, such as idle, in use, under repair, etc., and information such as the historical usage of official vehicles. Therefore, after receiving the vehicle usage request from the first electronic device, the target node device can obtain a list of vehicles that are idle during the current time period in the blockchain network.
[0100] In the embodiment of the present application, the identity information of the vehicle user can be obtained from the vehicle usage request, and then the priority level of the vehicle user can be determined based on the identity information of the vehicle user. Finally, a vehicle allocation result is generated based on the priority level of the vehicle user and the vehicle list. The identity information of the vehicle user can refer to the previous description and will not be elaborated herein. The priority level of the vehicle user can be the priority order of vehicle allocation, which can be determined according to the identity information of the vehicle user such as the position. By way of example, if the target node device receives vehicle usage request A and vehicle usage request B at the same time, and obtains from vehicle usage request A that the position of Employee A is the general manager, and obtains from vehicle usage request B that the position of Employee B is a salesman, then it can be determined that the priority level of Employee A is higher than that of Employee B. That is to say, when idle vehicles are in short supply, official vehicles will be preferentially allocated to Employee A. Optionally, Employee A can also be preferentially allocated an official vehicle that is closer or of a higher grade.
[0101] It can be seen that generating a vehicle allocation result based on the priority level of the vehicle user and the list of idle vehicles can improve the allocation efficiency of official vehicles and is beneficial to improving the scheduling speed and accuracy of official vehicles.
[0102] In a possible implementation manner, step S203 may also specifically include the following steps:
[0103] Obtain the identity information of the vehicle user and the estimated vehicle usage time from the vehicle usage request; obtain the historical vehicle allocation result based on the identity information of the vehicle user; generate a vehicle allocation result based on the estimated vehicle usage time and the historical vehicle allocation result.
[0104] In the embodiment of the present application, the historical usage information of official vehicles is stored in the blockchain network. After the target node device receives the vehicle usage request from the first electronic device, it can obtain the identity information of the vehicle user and the estimated vehicle usage time from the vehicle usage request. Then, based on the identity information of the vehicle user, the historical vehicle allocation result of the vehicle user can be obtained in the blockchain network. Among them, the historical vehicle allocation result may include vehicle information such as the license plate number, location information, vehicle type, model of the vehicle to be used, and color of the vehicle to be used. Since official vehicles are used to perform official duties, the purpose of vehicle use by vehicle users, the type of vehicle, etc. are relatively fixed. Therefore, this vehicle information can reflect the vehicle usage habits of vehicle users and can provide effective reference for vehicle allocation.
[0105] Further, after obtaining the historical vehicle allocation result of the vehicle user, determine the vehicle identity information such as the license plate number of the vehicle user's historical vehicle use, and query whether the vehicle is idle during the estimated vehicle usage time according to the vehicle identity information. For example, it is queried that the license plate numbers in the historical vehicle allocation result are "XX12345, XX12453, and XX54321" respectively, the estimated vehicle usage time is 14:00 this afternoon, and the vehicles with license plate numbers "XX12453 and XX54321" are idle at this time point. The vehicle information such as the purpose, the current location information of the vehicle user, and the estimated destination in the current vehicle usage request can be combined to determine that the vehicle with license plate number XX12453 is the most suitable official vehicle. Or, the official vehicles in the idle state can also be pushed to the first electronic device for the vehicle user to select the most suitable official vehicle by himself. After the target node device receives the selection of the official vehicle of the vehicle user fed back by the first electronic device, the final vehicle allocation result is generated accordingly. Or, it may also be other possible implementation manners, which are not limited herein.
[0106] It can be seen that based on the estimated vehicle usage time and the historical vehicle allocation result, the vehicle allocation result can be quickly generated, which helps to improve the efficiency of official vehicle allocation.
[0107] In a possible implementation, official vehicles can also be allocated according to the current location information of the vehicle user, and a public vehicle closer to the current location information of the vehicle user can be selected for allocation. Among them, the current location information of the vehicle user can be obtained from the vehicle use request. If the employee who sends the vehicle use request is the same person as the vehicle user, the current location information of the vehicle user can also be obtained by acquiring the location information of the first electronic device. The embodiments of the present application do not limit the method for acquiring the location information of the first electronic device. In a possible implementation, the location information of the first electronic device can be obtained through the global positioning system (GPS). In a possible implementation, the vehicle storage area to which the vehicle to be used belongs is the storage area closest to the first electronic device. In this way, it is convenient for the vehicle user to use the vehicle nearby, saving time and improving the user experience.
[0108] In a possible implementation, official vehicles can also be allocated according to the purpose. For example, if the purpose is to carry goods, an official vehicle capable of carrying goods can be allocated for it. If the purpose is to meet a customer, a corresponding business vehicle can be allocated for it. Or the official vehicle can also be allocated according to the estimated destination. For example, if the estimated destination is far away, an official vehicle with a stronger remaining fuel amount or endurance can be allocated for it. Of course, the official vehicle can also be allocated according to other parameters, which will not be elaborated here.
[0109] Step S204: Generate a first block based on the vehicle use request and the vehicle allocation result and add the first block to the blockchain network.
[0110] In a possible implementation, step S204 may include the following steps:
[0111] Send a verification request to the consensus node device of the blockchain network; receive the verification request result feedback by the consensus node device; in response to the verification pass ratio in the verification request result being greater than or equal to a preset threshold, determine that the consensus node device reaches a consensus on the first block; in response to reaching a consensus, add the first block to the blockchain network.
[0112] Specifically, after the target node device packages the vehicle usage request and the vehicle allocation result to generate the first block, it can send a verification request to the consensus node device in the blockchain network, and determine whether the consensus node device reaches a consensus on the first block according to the verification result. The consensus node device in the embodiment of the present application can be any preset node device, or can also be a node device pre-determined from multiple blockchain node devices based on the consensus mechanism of the blockchain network. Among them, the consensus mechanism includes but is not limited to the proof of work (POW) consensus mechanism, the proof of stake (POS) consensus mechanism, the delegated proof of stake (DPOS) consensus mechanism, the practical byzantine fault tolerance (PBFT), the proof of importance (POI) consensus mechanism, the proof of participation (POP) consensus mechanism, etc., which are not limited herein.
[0113] In the embodiment of the present application, if the passing ratio of the verification request result returned by the consensus node device received by the target node device is greater than or equal to the preset threshold, it can be determined that the consensus node device in the blockchain network reaches a consensus on the first block. Therefore, the first block can be added to the blockchain network. On the contrary, if the passing ratio of the verification request result returned by the received consensus node device is less than the preset threshold, it is determined that the consensus node device in the blockchain network does not reach a consensus on the first block, and therefore the first block cannot be added to the blockchain network. Among them, the preset threshold is a parameter set in advance, which can be specifically set according to historical experience or can also be specifically analyzed and set according to the actual situation. By way of example, the preset threshold can be set to 51%, 55%, 60%, etc., which are not limited herein.
[0114] It can be seen that if the blockchain consensus node device reaches a consensus on the first block, the first block can be added to the blockchain network. In this way, it is convenient for other devices to query the data of the first block. At the same time, it can also prevent the data of the first block from being tampered with to improve the authenticity of the data.
[0115] Step S205: Send the vehicle allocation result to the first electronic device.
[0116] Specifically, after the target node device adds the vehicle usage request and the vehicle allocation result to the blockchain network, it sends the vehicle allocation result to the first electronic device so that the vehicle user can find the corresponding official vehicle according to the vehicle allocation result to perform official duties.
[0117] In a possible implementation manner, after performing step S205, the following steps may further be included: receiving a vehicle usage record and third signature information, where the vehicle usage record includes the identity information of the actual vehicle user, the actual vehicle usage time, the actual destination reached, and the vehicle license plate number; verifying the vehicle usage record based on the third signature information; in response to successful verification, generating a second block from the vehicle usage record; and adding the second block to the blockchain network.
[0118] In the embodiments of the present application, the vehicle usage record may include information such as the identity information of the actual vehicle user, the actual vehicle usage time, the actual destination reached, and the vehicle license plate number. Specifically, after receiving the vehicle allocation result, the vehicle user goes to the vehicle storage area where the vehicle to be used is located to pick up the vehicle. In a possible implementation manner, the identity of the vehicle user may be verified, and the vehicle usage permission can only be enabled after successful verification. The specific implementation manner for verifying the identity of the vehicle user in the embodiments of the present application is not limited. The identity information of the vehicle user can be verified by face recognition, voiceprint recognition, or fingerprint recognition of the vehicle user, or by swiping an employee card to verify the identity information of the vehicle user, or by entering a random verification code at a corresponding location to verify the identity information of the vehicle user, and so on. After successful verification, the identity information of the actual vehicle user is obtained. The time at this moment can also be recorded as the start time of vehicle usage. The end time of vehicle usage can be determined according to the time when the official vehicle is driven back to the vehicle storage area by the vehicle user. Then, the actual vehicle usage time is determined based on the start time and end time of vehicle usage. The actual destination reached can be determined according to GPS.
[0119] In the embodiments of the present application, the in-vehicle terminal of the official vehicle can establish communication with the target node device and the first electronic device. The in-vehicle terminal of the official vehicle can upload the vehicle usage record to the target node device, or can first send the vehicle usage record to the first electronic device, and then the first electronic device uploads it to the target node device. Therefore, the target node device can obtain the vehicle usage record from the in-vehicle terminal of the official vehicle or from the first electronic device. If the vehicle usage record received by the target node device from the in-vehicle terminal of the official vehicle is inconsistent with the vehicle usage record obtained from the first electronic device, the vehicle usage record can be marked as abnormal. In this way, it is convenient for other people to confirm whether the vehicle user uses the official vehicle for private purposes.
[0120] Among them, the definition of the third signature information can refer to the description of the first signature information, which will not be elaborated here. The specific implementation manner for verifying the vehicle usage record based on the third signature information can refer to the specific implementation process of verifying the vehicle usage request based on the first signature information in the foregoing text, which will not be elaborated here. Similarly, the specific implementation manner for generating a second block from the vehicle usage record and adding it to the blockchain network can also refer to the specific implementation process of generating a first block from the vehicle usage request and the vehicle allocation result and adding the first block to the blockchain network in the foregoing text, which will not be elaborated here.
[0121] It can be seen that generating the second block from the vehicle usage record and adding it to the blockchain network can facilitate other devices to query the vehicle usage record of official vehicles. At the same time, it can also prevent the tampering of the vehicle usage record of official vehicles to improve the authenticity of the data. Further, the supervision system of official vehicles can be improved.
[0122] In a possible implementation manner, the following steps may further be included:
[0123] In response to the actual arrival destination being inconsistent with the expected arrival destination, obtain the historical vehicle usage request and historical vehicle usage record of the actual vehicle user, where the historical vehicle usage request includes the historical expected arrival destination, and the historical vehicle usage record includes the historical actual arrival destination; in response to the number of times the historical actual arrival destination is inconsistent with the historical expected arrival destination reaching a preset number of times, mark the identity information of the actual vehicle user as abnormal information.
[0124] Specifically, the target node device obtains the actual arrival destination and the expected arrival destination from the vehicle usage record and the vehicle usage request respectively. If the two are inconsistent, the historical vehicle usage record and historical vehicle usage request of the actual vehicle user can be called from the blockchain network according to the identity information of the actual vehicle user. Obtain the historical actual arrival destination and the historical expected arrival destination from the historical vehicle usage record and the historical vehicle usage request respectively. If the number of times the two are inconsistent reaches the preset number of times, the identity information of the actual vehicle user can be marked as abnormal information. In this way, it can be convenient for other personnel to confirm whether the actual vehicle user uses the official vehicle for private purposes. Among them, the preset number of times is a parameter set in advance, which can be specifically set according to historical experience or can be specifically analyzed and set according to the actual situation. By way of example, the preset number of times can be set to 5 times. If the number of times the actual arrival destination is inconsistent with the historical expected arrival destination is 6 times, exceeding the preset number of times, the identity information of the actual vehicle user can be marked as abnormal information.
[0125] It can be seen that the identity information of the actual vehicle user whose historical actual arrival destination is inconsistent with the historical expected arrival destination reaching the preset number of times is marked as abnormal information. In this way, it can be convenient for other personnel to confirm whether the vehicle user uses the official vehicle for private purposes to improve the query efficiency.
[0126] In a possible implementation manner, after executing step S205, the following steps may further be included:
[0127] Receive a query request and second signature information sent by a second electronic device, where the query request includes querying the identity information of a specified user; verify the query request based on the second signature information; in response to successful verification, obtain a query result from the blockchain network based on the query request; send the query result to the second electronic device.
[0128] Among them, the definition of the second electronic device can refer to the description of the first electronic device and will not be elaborated here. The query request may include querying the identity information of a specified user to obtain the vehicle usage record of the specified user. The query request may also include querying the vehicle usage record of a specified official vehicle, the vehicle usage record on a specified date, or the vehicle usage record for a specified destination, etc. For example, the query request may be "obtain the vehicle usage record of employee number 123456 in the past 7 days", or it may be "obtain the vehicle usage record of license plate number XX12345 going to location D", etc. The specific implementation manner of verifying the query request based on the second signature information can refer to the specific implementation process of verifying the vehicle usage request based on the first signature information in the previous text and will not be elaborated here. The query result can be determined according to the query request. The query result may include information such as the identity information of the vehicle user, license plate number, vehicle usage time, destination reached, purpose, etc. For example, the query result may be "Employee number 123456 has a total of 1 vehicle usage record in the past 7 days as follows: Vehicle usage time: 10 - 11 am on November 25, 2021, Destination reached: A Airport, Vehicle type: Business vehicle, License plate number: XX12345, Purpose: Pick up customers".
[0129] It can be seen that the entire process of official vehicle use is stored in the blockchain network, and the data in the blockchain network is publicly transparent. Therefore, the second electronic device can query the vehicle usage record of any user at any time, which can prevent the use of official vehicles for private purposes.
[0130] In Figure 2 In the method shown, after the target node device receives the vehicle usage request and the first signature information sent by the first electronic device, it verifies the vehicle usage request based on the first signature information. After successful verification, it generates a vehicle allocation result based on the vehicle usage request. Then it generates a first block with the vehicle usage request and the vehicle allocation result and adds the first block to the blockchain network. Finally, it sends the vehicle result to the first electronic device. In this way, the intervention of manual scheduling can be reduced, and the scheduling speed and accuracy of official vehicle use can be improved. Adding the vehicle usage request and the vehicle allocation result to the blockchain network can prevent the tampering of official vehicle usage data, ensure the authenticity and credibility of the vehicle usage data in the blockchain network, effectively prevent the use of official vehicles for private purposes, and further strengthen the supervision of official vehicle use.
[0131] The method of the embodiment of the present application is elaborated in detail above, and the device of the embodiment of the present application is provided below.
[0132] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of a vehicle management device provided by an embodiment of the present application. This device is applied to a target node device. As Figure 3 shown, the vehicle management device 300 includes a receiving unit 301, a processing unit 302, and a sending unit 303. The detailed descriptions of each unit are as follows:
[0133] The receiving unit 301 is configured to receive a vehicle usage request and first signature information sent by a first electronic device;
[0134] The processing unit 302 is configured to verify the vehicle usage request based on the first signature information; in response to successful verification, generate a vehicle allocation result based on the vehicle usage request, where the vehicle allocation result includes the license plate number of the vehicle to be used and the location information of the vehicle to be used; generate a first block based on the vehicle usage request and the vehicle allocation result and add the first block to the blockchain network;
[0135] The sending unit 303 is configured to send the vehicle allocation result to the first electronic device.
[0136] In a possible implementation manner, the receiving unit 301 is further configured to receive a query request and second signature information sent by a second electronic device, where the query request includes querying the identity information of a specified user; the processing unit 302 is further configured to verify the query request based on the second signature information; in response to successful verification, obtain a query result from the blockchain network based on the query request; the sending unit 303 is further configured to send the query result to the second electronic device.
[0137] In a possible implementation manner, the blockchain network includes multiple node devices, the target node device is the node device closest to the first electronic device among the multiple node devices, and the vehicle storage area to which the vehicle to be used belongs is the storage area closest to the first electronic device.
[0138] In a possible implementation manner, the processing unit 302 is specifically configured to obtain an encryption result and a public key from the first signature information, where the encryption result is obtained by the first electronic device encrypting the vehicle usage request according to a private key, and the public key and the private key are created by the first electronic device; decrypt the encryption result based on the public key to obtain a decryption result; in response to the vehicle usage request being consistent with the decryption result, the verification is successful.
[0139] In a possible implementation, the vehicle use request includes the identity information of the vehicle user. The processing unit 302 is specifically configured to obtain a list of vehicles that are idle during the current time period from the blockchain network; determine the priority level of the vehicle user based on the identity information of the vehicle user; and generate a vehicle allocation result based on the priority level of the vehicle user and the list of vehicles.
[0140] In a possible implementation, the processing unit 302 is specifically configured to obtain the identity information of the vehicle user and the estimated vehicle use time from the vehicle use request; obtain the historical vehicle allocation result based on the identity information of the vehicle user; and generate a vehicle allocation result based on the estimated vehicle use time and the historical vehicle allocation result.
[0141] In a possible implementation, the processing unit 302 is specifically configured to send a verification request to the consensus node device of the blockchain network; receive the verification request result feedback by the consensus node device; in response to the verification pass ratio in the verification request result being greater than or equal to a preset threshold, determine that the consensus node device reaches a consensus on the first block; and in response to reaching a consensus, add the first block to the blockchain network.
[0142] In a possible implementation, the receiving unit 301 is further configured to receive a vehicle use record and third signature information. The vehicle use record includes the identity information of the actual vehicle user, the actual vehicle use time, the actual destination reached, and the vehicle license plate number. The processing unit 302 is further configured to verify the vehicle use record based on the third signature information; in response to passing the verification, generate a second block for the vehicle use record; and add the second block to the blockchain network.
[0143] In a possible implementation, the vehicle use request includes the estimated destination. The processing unit 302 is further configured to, in response to the actual destination reached being inconsistent with the estimated destination, obtain the historical vehicle use requests and historical vehicle use records of the identity information of the actual vehicle user. The historical vehicle use requests include historical estimated destinations, and the historical vehicle use records include historical actual destinations reached. In response to the number of times the historical actual destination reached is inconsistent with the historical estimated destination reaching a preset number of times, mark the identity information of the actual vehicle user as abnormal information.
[0144] It should be noted that the implementation of each unit can also correspond to the corresponding description in the Figure 2 method embodiment shown.
[0145] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 4As shown, the computer device 400 includes a processor 401, a memory 402, and a communication interface 403. Among them, the processor 401, the memory 402, and the communication interface 403 can be connected through a bus 405. A computer program 404 is stored in the memory 402. The computer program 404 is configured to be executed by the above-mentioned processor 401. The computer program 404 is used to execute the instructions of the following steps:
[0146] Receive a vehicle usage request and a first signature information sent by a first electronic device;
[0147] Verify the vehicle usage request based on the first signature information;
[0148] In response to passing the verification, generate a vehicle allocation result based on the vehicle usage request. The vehicle allocation result includes the license plate number of the vehicle to be used and the location information of the vehicle to be used;
[0149] Generate a first block based on the vehicle usage request and the vehicle allocation result and add the first block to the blockchain network;
[0150] Send the vehicle allocation result to the first electronic device.
[0151] In a possible implementation manner, after sending the vehicle allocation result to the first electronic device, the computer program 404 is further used to execute the instructions of the following steps:
[0152] Receive a query request and a second signature information sent by a second electronic device. The query request includes querying the identity information of a specified user;
[0153] Verify the query request based on the second signature information;
[0154] In response to passing the verification, obtain a query result from the blockchain network based on the query request;
[0155] Send the query result to the second electronic device.
[0156] In a possible implementation manner, the blockchain network includes multiple node devices. The target node device is the node device closest to the first electronic device among the multiple node devices. The vehicle storage area to which the vehicle to be used belongs is the storage area closest to the first electronic device.
[0157] In a possible implementation manner, in terms of verifying the vehicle usage request according to the first signature information, the computer program 404 is specifically used to execute the instructions of the following steps:
[0158] Obtain the encryption result and the public key from the first signature information, where the encryption result is obtained by the first electronic device encrypting the vehicle usage request according to the private key, and the public key and the private key are created by the first electronic device;
[0159] Decrypt the encryption result based on the public key to obtain the decryption result;
[0160] In response to the vehicle usage request being consistent with the decryption result, the verification passes.
[0161] In a possible implementation manner, the vehicle usage request includes the identity information of the vehicle user. In terms of generating a vehicle allocation result based on the vehicle usage request in response to the verification passing, the computer program 404 is specifically configured to execute instructions for the following steps:
[0162] Obtain the list of vehicles that are idle during the current time period from the blockchain network;
[0163] Determine the priority level of the vehicle user based on the identity information of the vehicle user;
[0164] Generate a vehicle allocation result based on the priority level of the vehicle user and the vehicle list.
[0165] In a possible implementation manner, in terms of generating a vehicle allocation result based on the vehicle usage request in response to the verification passing, the computer program 404 is specifically configured to execute instructions for the following steps:
[0166] Obtain the identity information of the vehicle user and the estimated vehicle usage time from the vehicle usage request;
[0167] Obtain the historical vehicle allocation result based on the identity information of the vehicle user;
[0168] Generate a vehicle allocation result based on the estimated vehicle usage time and the historical vehicle allocation result.
[0169] In a possible implementation manner, in terms of generating a first block based on the vehicle usage request and the vehicle allocation result and adding the first block to the blockchain network, the computer program 404 is specifically configured to execute instructions for the following steps:
[0170] Send a verification request to the consensus node device of the blockchain network;
[0171] Receive the verification request result feedback by the consensus node device;
[0172] In response to the verification passing ratio in the verification request result being greater than or equal to the preset threshold, determine that the consensus node device reaches a consensus on the first block;
[0173] In response to reaching a consensus, add the first block to the blockchain network.
[0174] In a possible implementation manner, after sending the vehicle allocation result to the first electronic device, the computer program 404 is further configured to execute instructions for the following steps:
[0175] Receive a vehicle usage record and third signature information, where the vehicle usage record includes the identity information of the actual vehicle user, the actual vehicle usage time, the actual destination reached, and the vehicle license plate number;
[0176] Verify the vehicle usage record based on the third signature information;
[0177] In response to successful verification, generate a second block from the vehicle usage record;
[0178] Add the second block to the blockchain network.
[0179] In a possible implementation manner, the computer program 404 is further configured to execute instructions for the following steps:
[0180] In response to the actual destination reached being inconsistent with the expected destination reached, obtain the historical vehicle usage requests and historical vehicle usage records of the identity information of the actual vehicle user, where the historical vehicle usage requests include the historical expected destination reached, and the historical vehicle usage records include the historical actual destination reached;
[0181] In response to the number of times the historical actual destination reached is inconsistent with the historical expected destination reached reaching a preset number of times, mark the identity information of the actual vehicle user as abnormal information.
[0182] Those skilled in the art can understand that, for ease of description, Figure 4 only one memory and one processor are shown in [the figure]. In an actual terminal or server, there may be multiple processors and memories. The memory 402 may also be referred to as a storage medium or a storage device, etc., and the embodiments of the present application do not make any limitations in this regard.
[0183] It should be understood that in the embodiments of the present application, the processor 401 may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0184] It should also be understood that the memory 402 mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronized link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0185] It should be noted that when the processor 401 is a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, the memory (storage module) is integrated in the processor.
[0186] It should be noted that the memory 402 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0187] In addition to the data bus, the bus 405 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, all kinds of buses are labeled as buses in the figure.
[0188] In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0189] In various embodiments of the present application, the size of the serial numbers of the above processes does not mean the sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0190] Those of ordinary skill in the art can realize that the various illustrative logical blocks (ILBs) and steps described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by the combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0191] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in an electrical, mechanical, or other form.
[0192] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0193] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
[0194] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.
[0195] The embodiments of the present application also provide a computer storage medium. The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement part or all of the steps of any one of the vehicle management methods described in the above method embodiments.
[0196] The embodiments of the present application also provide a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the vehicle management methods described in the above method embodiments.
[0197] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for vehicle management, characterized in that, Applied to a target node device, the target node device accesses a blockchain network, and the blockchain network stores vehicle management information, including the following steps: Receive a vehicle usage request and first signature information sent by a first electronic device, the vehicle usage request including an expected arrival destination; Verify the vehicle usage request based on the first signature information; In response to successful verification, generate a vehicle allocation result based on the vehicle usage request, the vehicle allocation result including the license plate number of the vehicle to be used and the location information of the vehicle to be used; Generate a first block based on the vehicle usage request and the vehicle allocation result and add the first block to the blockchain network; Send the vehicle allocation result to the first electronic device; Receive a vehicle usage record and third signature information, the vehicle usage record including the identity information of the actual vehicle user, the actual vehicle usage time, the actual arrival destination, and the vehicle license plate number; Verify the vehicle usage record based on the third signature information; In response to successful verification, generate a second block from the vehicle usage record; Add the second block to the blockchain network; In response to the actual arrival destination being inconsistent with the expected arrival destination, obtain the historical vehicle usage requests and historical vehicle usage records of the identity information of the actual vehicle user, the historical vehicle usage requests including historical expected arrival destinations, and the historical vehicle usage records including historical actual arrival destinations; In response to the number of times the historical actual arrival destination is inconsistent with the historical expected arrival destination reaching a preset number of times, mark the identity information of the actual vehicle user as abnormal information, the abnormal information being used to indicate that the actual vehicle user has used the vehicle for personal purposes.
2. The method according to claim 1, characterized in that, After sending the vehicle allocation result to the first electronic device, the following steps are further included: Receive a query request and second signature information sent by a second electronic device, the query request including querying the identity information of a specified user; Verify the query request based on the second signature information; In response to successful verification, obtain a query result from the blockchain network based on the query request; Send the query result to the second electronic device.
3. The method according to claim 1, characterized in that The blockchain network includes multiple node devices, the target node device being the node device closest to the first electronic device among the multiple node devices, and the vehicle storage area to which the vehicle to be used belongs being the storage area closest to the first electronic device.
4. The method according to claim 1, characterized in that, The verifying the vehicle usage request according to the first signature information includes the following steps: Obtain an encryption result and a public key from the first signature information, the encryption result being obtained by the first electronic device encrypting the vehicle usage request according to a private key, and the public key and the private key being created by the first electronic device; Decrypt the encryption result based on the public key to obtain a decryption result; In response to the vehicle usage request being consistent with the decryption result, the verification is successful.
5. The method according to claim 1, wherein The vehicle usage request includes the identity information of the vehicle user, and in response to successful verification, generating a vehicle allocation result based on the vehicle usage request includes the following steps: Obtain a list of vehicles that are idle during the current time period from the blockchain network; Determine the priority level of the vehicle user based on the identity information of the vehicle user; Generate a vehicle allocation result based on the priority level of the vehicle user and the vehicle list.
6. The method according to claim 1, wherein In response to successful verification, generating a vehicle allocation result based on the vehicle use request includes the following steps: Obtain the identity information of the vehicle user and the estimated vehicle use time from the vehicle use request; Obtain the historical vehicle allocation result based on the identity information of the vehicle user; Generate a vehicle allocation result based on the estimated vehicle use time and the historical vehicle allocation result.
7. The method according to claim 1, wherein The generating a first block based on the vehicle use request and the vehicle allocation result and adding the first block to the blockchain network includes the following steps: Send a verification request to the consensus node device of the blockchain network; Receive the verification request result feedback by the consensus node device; In response to the verification pass ratio in the verification request result being greater than or equal to a preset threshold, determine that the consensus node device reaches a consensus on the first block; In response to reaching a consensus, add the first block to the blockchain network.
8. A device for vehicle management, characterized in that, Includes the following parts: A receiving unit, configured to receive a vehicle use request and a first signature information sent by a first electronic device, where the vehicle use request includes an estimated arrival destination; A processing unit, configured to verify the vehicle use request based on the first signature information; In response to successful verification, generate a vehicle allocation result based on the vehicle use request, where the vehicle allocation result includes the license plate number of the vehicle to be used and the location information of the vehicle to be used; Generate a first block based on the vehicle use request and the vehicle allocation result and add the first block to the blockchain network; A sending unit, configured to send the vehicle allocation result to the first electronic device; Receive a vehicle use record and a third signature information, where the vehicle use record includes the identity information of the actual vehicle user, the actual vehicle use time, the actual arrival destination, and the vehicle license plate number; verify the vehicle use record based on the third signature information; In response to successful verification, generate a second block for the vehicle use record; add the second block to the blockchain network; in response to the actual arrival destination being inconsistent with the estimated arrival destination, obtain the historical vehicle use request and the historical vehicle use record of the identity information of the actual vehicle user, where the historical vehicle use request includes the historical estimated arrival destination, and the historical vehicle use record includes the historical actual arrival destination; in response to the number of times the historical actual arrival destination is inconsistent with the historical estimated arrival destination reaching a preset number of times, mark the identity information of the actual vehicle user as abnormal information, where the abnormal information is used to indicate that the actual vehicle user has used the vehicle for private purposes.
9. A computer device, characterized in that, Includes a processor, a memory, and a communication interface, where the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program includes instructions for executing the steps in any one of the methods of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program enables a computer to execute to implement the method described in any one of claims 1- to 7.
Citation Information
Patent Citations
Vehicle management method and device based on block chain, terminal and storage medium
CN110889520A