Parking space sharing method and device, electronic equipment and readable storage medium
Through blockchain technology and smart contracts, the automated management of parking space rental is solved, and the high cost of idle parking space sharing management and information security problems are solved, and the utilization rate and information security of parking spaces are improved.
Patent Information
- Application Number
- CN202410982126.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
AI Technical Summary
The existing idle parking space sharing method is costly and difficult to ensure information security.
Smart parking space rental contracts are adopted, blockchain technology is used to automatically manage the rental and leasing transactions of idle parking spaces, and automated management and transactions of parking spaces are achieved through smart contracts to ensure information security.
It improves the utilization rate of idle parking spaces, reduces management costs, and protects the private information of both parties to the transaction during the interaction process, improving information security.
Smart Images

Figure CN118942274A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a parking space sharing method, device, electronic device and readable storage medium. Background Art
[0002] With the rapid increase in the number of vehicles, the problem of parking difficulties has become increasingly prominent. In addition to increasing the number of parking spaces, improving the utilization rate of existing parking spaces is an important way to further solve the problem of parking difficulties.
[0003] At present, a large number of private parking spaces are idle most of the time, but these parking space resources are not utilized, while public parking spaces are often in short supply. Sharing these idle parking spaces is one of the effective ways to improve the utilization rate of idle parking spaces and alleviate the parking problem.
[0004] However, existing idle (vacant) parking space sharing methods generally have high management costs and difficulty in ensuring information security during the interaction process. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a parking space sharing method, device, electronic device and readable storage medium to solve the problems in the prior art of idle parking space sharing methods, such as high management costs and difficulty in ensuring the information security of the client during the interaction process.
[0006] According to a first aspect of an embodiment of the present application, a parking space sharing method is provided, comprising:
[0007] In response to the rental parking space registration request sent by the first client, the rental parking space registration request includes the rentable parking space, the parking space owner information corresponding to the rentable parking space, and the parking space address information;
[0008] If the parking space owner information is verified, a parking space rental event is created and published based on the preset parking space rental smart contract; the parking space rental event includes the parking space rental index value and the parking space rental data; the parking space rental data includes the rentable parking spaces and their corresponding rentable time periods, parking space rental fees, and parking space rental status tags;
[0009] Establishing a first associated logical relationship between a rentable parking space and the parking space address information and a parking space rental event, writing the first associated logical relationship into the parking space rental smart contract, and broadcasting the first associated logical relationship;
[0010] Responding to a parking space rental request initiated by the second client, wherein the parking space rental request includes a target parking space rental index value and vehicle information to be verified corresponding to the vehicle to be parked;
[0011] If the vehicle information to be verified is verified, the target rentable parking space, target parking space address information and target parking space rental event corresponding to the target parking space rental index value are determined by querying the parking space rental smart contract;
[0012] The second account address information of the second client is obtained, a second associated logical relationship is established between the second account address information and the target rentable parking space, the target parking space address information and the target parking space rental event, the second associated logical relationship is written into the parking space rental smart contract, and the second associated logical relationship is broadcasted.
[0013] According to a second aspect of an embodiment of the present application, a parking space sharing device is provided, comprising:
[0014] A first response module is configured to respond to a parking space rental registration request sent by the first client, wherein the parking space rental registration request includes a rentable parking space, parking space owner information corresponding to the rentable parking space, and parking space address information;
[0015] The event publishing module is configured to create and publish a parking space rental event based on a preset parking space rental smart contract if the parking space owner information is verified; wherein the parking space rental event includes a parking space rental index value and parking space rental data; the parking space rental data includes available parking spaces and their corresponding available rental time periods, parking space rental fees, and parking space rental status tags;
[0016] A first establishing module is configured to establish a first associated logical relationship between a rentable parking space and the parking space address information and a parking space rental event, write the first associated logical relationship into a parking space rental smart contract, and broadcast the first associated logical relationship;
[0017] A second response module is configured to respond to a parking space rental request initiated by a second client, wherein the parking space rental request includes a target parking space rental index value and vehicle information to be verified corresponding to the vehicle to be parked;
[0018] The determination module is configured to determine the target rentable parking space, the target parking space address information and the target parking space rental event corresponding to the target parking space rental index value by querying the parking space rental smart contract if the information of the vehicle to be verified is verified;
[0019] The second establishment module is configured to obtain the second account address information of the second client, establish a second association logical relationship between the second account address information and the target rentable parking space, the target parking space address information and the target parking space rental event, write the second association logical relationship into the parking space rental smart contract, and broadcast the second association logical relationship.
[0020] According to a third aspect of an embodiment of the present application, an electronic device is provided, 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 above method when executing the computer program.
[0021] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0022] Compared with the prior art, the embodiments of the present application have at least the following beneficial effects: by using the parking space leasing smart contract to realize the automated management and leasing / rental transactions of idle (vacant) parking spaces, the utilization rate of idle parking spaces can be improved, the parking difficulty problem can be effectively alleviated, and the management cost can be greatly reduced. In addition, during the entire interactive process of parking space leasing / rental, the sensitive / privacy information of both parties to the transaction (such as license plate number, user identity information, etc.) will not be disclosed, which can effectively improve the information security during the interactive process. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;
[0025] Figure 2 It is a flowchart of a parking space sharing method provided in an embodiment of the present application;
[0026] Figure 3 is a flow chart of another parking space sharing method provided in an embodiment of the present application;
[0027] Figure 4 It is a schematic diagram of the identity authentication process of the parking space lessor in the parking space sharing method provided in the embodiment of the present application;
[0028] Figure 5 is a structural schematic diagram of a parking space sharing device provided in an embodiment of the present application;
[0029] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0031] A parking space sharing method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0032] Figure 1 It is a scenario diagram of an application scenario of an embodiment of the present application. The application scenario may include a parking space sharing management platform 101, a first client 102 and a second client 103. Among them, the parking space sharing management platform 101 can be a server that provides various services. For example, the parking space sharing management platform 101 can be a server, or a server cluster composed of several servers, or it can also be a cloud computing service center. The embodiment of the present application does not limit this. The first client 102 can be a mobile phone terminal, a car terminal, an APP (application program), etc. used by a user who has an idle (or vacant) parking space and wants to rent it out. The second client 103 can be a mobile phone terminal, a car terminal, an APP (application program), etc. used by a user who wants to rent a parking space.
[0033] The parking space sharing management platform 101 can establish a communication connection with the first client 102 and the second client 103 through a wired network or a wireless network to receive or send information.
[0034] The parking space sharing management platform 101, the first client 102 and the second client 103 can all be nodes deployed on the blockchain. The parking space sharing management platform 101 is responsible for developing a parking space rental smart contract, and the first client 102 and the second client 103 can call the parking space rental smart contract.
[0035] The parking space sharing management platform 101 can use the open source framework web3.js to create a management account. When creating a management account, an asymmetric key pair can be created by calling the static method of Keys, and the asymmetric key pair includes a private key and a public key. The private key is generally a 256-bit random number. The public key corresponding to the private key can be calculated by the elliptic curve encryption algorithm. The last 20 bytes of the public key can be used as the management account address of the management account. The management account address is public. After the management account is created, the parking space sharing management platform 101 can log in to the management account through its private key and management account address, and then deploy the developed parking space rental smart contract to the blockchain.
[0036] The parking space rental smart contract of the embodiment of the present application is a self-executing contract that can be run on the blockchain platform. The terms and conditions of the parking space rental smart contract are written in the form of code, and once deployed on the blockchain, their execution and structure are automatic and cannot be tampered with.
[0037] As an example, you can use solidity (a contract-oriented high-level programming language created to implement smart contracts) as the programming language and use the open source framework Hardhat (a development environment for compiling, deploying, testing and debugging Ethereum applications) to develop a parking space rental smart contract.
[0038] Similarly, the first client 102 can use the open source framework web3.js to create a rental account. After creating the rental account, the first client 102 can use its private key and rental account address to log in to the rental account, and call the parking space rental smart contract deployed on the blockchain to perform the parking space rental operation.
[0039] The second client 103 can use the open source framework web3.js to create a rental account. After creating the rental account, the second client 103 can use its private key and rental account address to log in to the rental account, and call the parking space rental smart contract deployed on the blockchain to perform parking space rental operations.
[0040] A user who has an idle (or vacant) parking space and wants to rent it out can send a rental space registration request to the parking space sharing management platform 101 through the first client 102. The rental space registration request includes the rentable parking space, the parking space owner information corresponding to the rentable parking space, and the parking space address information; the parking space sharing management platform 101 responds to the rental space registration request sent by the first client 102 and verifies the parking space owner information; if the parking space owner information is verified, a parking space rental event is created and published based on the preset parking space rental smart contract; wherein, the parking space rental event includes a parking space rental index value and parking space rental data; the parking space rental data includes the rentable parking space and its corresponding rentable time period, the parking space rental fee, and the parking space rental status tag; then, a first associated logical relationship is established between the rentable parking space and the parking space address information and the parking space rental event, and the first associated logical relationship is written into the parking space rental smart contract. In the contract, the first associated logical relationship is broadcasted; a user who wants to rent a parking space can initiate a parking space rental request to the parking space sharing management platform 101 through the second client 103, and the parking space rental request includes the target parking space rental index value and the vehicle information to be verified corresponding to the vehicle to be parked; the parking space sharing management platform 101 responds to the parking space rental request initiated by the second client 103, and verifies the vehicle information to be verified; if the vehicle information to be verified is verified, the parking space rental smart contract is queried to determine the target rentable parking space corresponding to the target parking space rental index value, the target parking space address information and the target parking space rental event; the second account address information of the second client is obtained, and a second associated logical relationship is established between the second account address information and the target rentable parking space, the target parking space address information and the target parking space rental event, and the second associated logical relationship is written into the parking space rental smart contract, and the second associated logical relationship is broadcasted.
[0041] Through the above method, the parking space leasing smart contract is used to realize the automated management and leasing / rental transactions of idle (vacant) parking spaces, which can improve the utilization rate of idle parking spaces, effectively alleviate the parking difficulty problem, and greatly reduce management costs. In addition, during the entire interactive process of parking space leasing / rental, the privacy information of both parties to the transaction (such as license plate number, user identity information, etc.) will not be disclosed, which can effectively improve the information security during the interactive process.
[0042] It should be noted that the specific types, quantities and combinations of the parking space sharing management platform 101, the first client 102 and the second client 103 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.
[0043] Figure 2 It is a flow chart of a parking space sharing method provided in an embodiment of the present application. Figure 2 The parking space sharing method can be Figure 1 The parking space sharing management platform 101 is used to execute. Figure 2 As shown, the parking space sharing method may specifically include the following steps:
[0044] Step S201, responding to a parking space rental registration request sent by a first client, the parking space rental registration request including rentable parking spaces, parking space owner information corresponding to the rentable parking spaces, and parking space address information.
[0045] Rentable parking spaces can be private community parking spaces (exclusive community parking spaces to which users have the right to use or ownership), private roadside parking spaces (exclusive roadside parking spaces to which users have the right to use or ownership), private indoor parking spaces (exclusive indoor parking spaces to which users have the right to use or ownership), etc.
[0046] Parking space owner information, including parking space property information of rentable parking spaces that a user (or owner) has the right to use or ownership of (relevant information that can prove that the user legally has the right to use or ownership of the rentable parking space), and the user's identity information (for example, ID number, contact number, etc.).
[0047] Generally, an owner can own one or more rentable parking spaces at the same time, and one rentable parking space corresponds to one owner. For example, owner A owns 2 rentable parking spaces.
[0048] As an example, if a user wants to rent out his idle or vacant parking space, he can send a rental space registration request through a first client (such as a mobile phone, a car terminal or an APP used by the user) to the parking space sharing management platform 101. The rental space registration request includes a rentable parking space, and the parking space owner information and parking space address information corresponding to the rentable parking space.
[0049] Step S202: If the parking space owner information is verified, a parking space rental event is created and published based on the preset parking space rental smart contract; wherein the parking space rental event includes a parking space rental index value and parking space rental data; the parking space rental data includes rentable parking spaces and their corresponding rentable time periods, parking space rental fees, and parking space rental status labels.
[0050] In practical applications, the division granularity of the time period can be determined according to actual needs, and then one day (24 hours) can be divided according to the division granularity to obtain multiple time periods. For example, assuming that the division granularity of the time period is 1 hour, one day (24 hours) can be divided into 24 time periods, namely time period 01 (0:00-1:00), time period 02 (1:00-2:00), time period 03 (2:00-3:00) ... time period 24 (23:00-24:00).
[0051] The rentable time period refers to the idle / unused time period of the parking space after excluding the parking space usage time period according to the user (owner, i.e. the lessor of the parking space)'s own parking space usage. For example, user A owns the rentable parking space 01, and the parking space usage time period of the rentable parking space 01 is time period 01-07, 18-24, then the idle / unused time period of the parking space is time period 07-18. Based on this, the user can set the rentable time period to time period 07-18.
[0052] The parking space rental fee can be set by the owner based on the market research results of similar rental businesses, or it can be set by the owner based on his or her own expected rental fees.
[0053] Regarding the setting method of parking space rental fees, it can be set to use a unified rental fee regardless of time period, or it can be set to use segmented rental fees according to time periods. For example, the setting method of user A for the rental fee of the rentable parking space 01 owned by him in the rentable time period 07-18 includes: ① The parking space rental fee of the rentable parking space 01 in the rentable time period 07-18 is p1; ② The parking space rental fee of the rentable parking space 01 in the rentable time period 07-12 is p2; the parking space rental fee in the rentable time period 12-18 is p3.
[0054] Parking space rental status tags include available for rent tags and unavailable for rent tags. Unavailable for rent usually means that the rentable parking space has been reserved for rent, occupied, or the owner has cancelled the rental operation of the rentable parking space.
[0055] Step S203: establish a first associated logical relationship between the rentable parking space and the parking space address information and the parking space rental event, write the first associated logical relationship into the parking space rental smart contract, and broadcast the first associated logical relationship.
[0056] A first associated logical relationship is established between the rentable parking space, the parking space address information, and the parking space rental event, that is, the rentable parking space is bound to the parking space address information and the parking space rental event.
[0057] As an example, the first associated logical relationship between the rentable parking space and the parking space address information and the parking space rental event is shown in Table 1 below.
[0058] Table 1
[0059] Parking spaces available for rent Parking space address information Parking space rental event Parking space available for rent 01 Parking space address 01 Rental Event 01 Parking spaces available for rent 02 Parking space address 02 Rental event 02 ... ... ... Parking spaces available for rent Parking space address Rental Events
[0060] Step S204: responding to the parking space rental request initiated by the second client, wherein the parking space rental request includes a target parking space rental index value and vehicle information to be verified.
[0061] As an example, a user who has a parking space rental demand (i.e., a parking space lessor) can initiate a parking space rental request to the parking space sharing management platform 101 through a second client (such as a mobile phone, car terminal, or APP used by the parking space lessor).
[0062] Step S205, if the vehicle information to be verified is verified, the parking space rental smart contract is queried to determine the target rentable parking space corresponding to the target parking space rental index value, the target parking space address information and the target parking space rental event.
[0063] As an example, when the parking space lessor uses the second client to register a rental account and enters the vehicle information of the vehicle to be parked, the parking space sharing management platform 101 will not save the vehicle information (such as the license plate number) entered by the second client, but will save the hash value corresponding to the vehicle information.
[0064] Afterwards, when the parking space sharing management platform 101 receives the parking space rental request initiated by the second client, the vehicle information to be verified is input as a parameter into the verification function to obtain the hash value corresponding to the vehicle information to be verified; then the obtained hash value corresponding to the vehicle information to be verified is compared with the pre-saved hash value; if the two are consistent, it is confirmed that the vehicle information to be verified has been verified. If they are inconsistent, it is confirmed that the vehicle information to be verified has not been verified.
[0065] In this way, when the parking space lessor rents a parking space through the parking space sharing management platform 101, he can prove that he is the lessee of the rentable parking space through zero-knowledge, so as to better protect his information security during the interaction process.
[0066] Step S206, obtain the second account address information of the second client, establish a second associated logical relationship between the second account address information and the target rentable parking space, the target parking space address information and the target parking space rental event, write the second associated logical relationship into the parking space rental smart contract, and broadcast the second associated logical relationship.
[0067] The second account address information refers to the rental account address when the user who has parking space rental demand creates a rental account through the second client 103 (for example, the mobile phone terminal used by the user, the vehicle terminal of the parked vehicle or the APP, etc.).
[0068] As an example, the second associated logical relationship (mapping relationship) between the second account address information and the target rentable parking space, the target parking space address information, and the target parking space rental event is as shown in Table 2 below.
[0069] Table 2
[0070]
[0071] The technical solution provided in the embodiment of the present application realizes the automated management and rental / leasing transactions of idle (vacant) parking spaces through a parking space leasing smart contract, which can improve the utilization rate of idle parking spaces, effectively alleviate the problem of parking difficulties, and greatly reduce management costs; in addition, during the entire interactive process of parking space leasing / leasing, the privacy information of the two parties to the transaction (such as license plate numbers, user identity information, etc.) will not be disclosed, which can effectively improve information security during the interactive process.
[0072] In some embodiments, if the parking space owner information is verified, a parking space rental event is created and published based on a preset parking space rental smart contract, including:
[0073] Retrieving owner data corresponding to the first client from the blockchain database;
[0074] If the owner data matches the parking space owner information, the parking space owner information verification is confirmed to be successful;
[0075] Obtaining parking space rental data and first account address information sent by the first client;
[0076] Calculate a parking space rental index value based on the first account address information, the rentable time period corresponding to the rentable parking space, and the parking space rental fee;
[0077] Create and publish parking space rental events based on the preset parking space rental smart contract, parking space rental index value and parking space rental data.
[0078] Specifically, users who have idle / vacant parking spaces that need to be rented out can send owner data to the parking space sharing management platform 101 through the first client 102 (such as the mobile phone, car terminal or APP used by the user). Business data includes parking space property information of idle / vacant parking spaces (rentable parking spaces) and the identity information of the user (owner) (such as ID number, contact number, etc.). The parking space sharing management platform 101 receives the owner data and stores the owner data in the blockchain database. The owner data is not broadcast to the blockchain, which is conducive to protecting the privacy information security of the parking space lessor.
[0079] When the parking space sharing management platform 101 receives the parking space owner information sent by the first client 102, it can retrieve the previously stored owner data from the blockchain database and compare the parking space owner information with the owner data. If the parking space owner information is consistent with the owner data, it is confirmed that the owner data matches the parking space owner information, and the parking space owner information is confirmed to be verified. At this time, the parking space sharing management platform 101 can return the verification result to the first client 102. After the first client 102 confirms that the verification result is verified, it can broadcast the idle / vacant parking space it wants to rent and its parking space address information on the blockchain.
[0080] Afterwards, the first client 102 may send its first account address information and the parking space rental data of the idle / vacant parking space (rentable parking space) it wants to rent to the parking space sharing management platform 101. After receiving the first account address information and the parking space rental data, the parking space sharing management platform 101 may use a preset encryption algorithm (such as the elliptic curve digital signature algorithm "ECDSA-secp256k1", etc.) to calculate the parking space rental index value (or parking space rental hash value) corresponding to the rentable parking space based on the first account address information, the rentable time period (the time period from the rental start time to the rental end time) corresponding to the rentable parking space, and the parking space rental fee.
[0081] Next, based on the preset parking space rental smart contract, parking space rental index value and parking space rental data, create and publish parking space rental events. Specifically, a structure can be constructed based on the rental time period, parking space rental fee and parking space rental status tag; a parking space rental event is created with the parking space rental index value and structure as rental event parameters, and the parking space rental event is published.
[0082] As an example, a Mapping attribute can be defined, with the parking space rental index value corresponding to the rentable parking space as the key (for the rental event parameter), and the structure constructed based on the rentable time period, parking space rental fee and parking space rental status label as the value (for the rental event parameter), to create a parking space rental event and publish the parking space rental event on the blockchain.
[0083] A structure is a data set consisting of a series of data of the same or different types. A structure can be declared as a variable, pointer, or array to implement a more complex data structure. A structure is also a collection of elements, which are called members of the structure. These members can be of different types and are generally accessed by name.
[0084] In some embodiments, before the parking space rental request initiated by the second client, the method further includes:
[0085] Second client:
[0086] Generate a key pair, the key pair including a first key and a second key;
[0087] Acquire vehicle information of the vehicle to be parked, and encrypt the vehicle information using a first key to obtain encrypted vehicle information; wherein the vehicle information at least includes license plate information of the vehicle to be parked;
[0088] The second key and encrypted vehicle information are broadcast.
[0089] As an example, the second client 103 can generate an RSA key pair through an RSA encryption algorithm, and the RSA key pair includes a first key (private key) and a second key (public key). Then, the first key is used to encrypt the vehicle information (such as the license plate number, etc.) of the parked vehicle and the second key (such as signing) to obtain the encrypted vehicle information; then, the second key (public key) and the encrypted vehicle information are broadcast on the blockchain.
[0090] In this way, users who need to rent parking spaces (parking space lessors) do not need to broadcast the vehicle information of their parked vehicles on the blockchain, which can prevent the leakage of personal sensitive / privacy information and help ensure information security during the interaction process.
[0091] In some embodiments, the parking space rental request initiated by the second client includes:
[0092] Second client:
[0093] Determine the target parking space rental index value;
[0094] A parking space rental request is initiated based on the target parking space rental index value and the encrypted vehicle information of the vehicle to be parked.
[0095] In some embodiments, determining the target parking space rental index value may include:
[0096] Collecting current location information of the vehicle to be parked;
[0097] Determine at least one candidate parking space rental event; wherein the candidate parking space rental event includes a candidate rentable parking space and its corresponding candidate parking space rental status tag, and candidate parking space address information, and the candidate parking space rental status tag is a rentable tag;
[0098] Calculating the position distance between the current position of the vehicle to be parked and the candidate parking space address of each candidate rentable parking space based on the current position information and the candidate parking space address information of each candidate rentable parking space;
[0099] A candidate rentable parking space with the smallest position distance is determined as a target rentable parking space, and a parking space rental index value corresponding to the target rentable parking space is determined as the target parking space rental index value.
[0100] As an example, query the parking space rental status tags of all parking space rental events published on the blockchain, and determine the parking space rental events with the parking space rental status tag as the rentable tag as candidate parking space rental events. Assuming that there are k candidate parking space rental events queried (k is an integer ≥ 1), the second client 103 can collect its current position information through the vehicle sensor set on the vehicle to be parked, and then calculate the position distance between the current position of the vehicle to be parked and the candidate parking space address information of the candidate rentable parking spaces in the k candidate parking space rental events. Then, compare the sizes of the various position distances, determine the candidate rentable parking space with the smallest position distance as the target rentable parking space, and determine the parking space rental index value corresponding to the target rentable parking space as the target parking space rental index value.
[0101] Through the above method, the target rentable parking space with the shortest distance from the current position of the vehicle to be parked can be queried, which is helpful to save the time for the vehicle to be parked to travel from the current position to the target rentable parking space (the rentable parking space corresponding to the target parking space rental index value) and reduce the pollution caused to the environment by fuel consumption and exhaust emissions.
[0102] In some embodiments, after responding to the parking space rental request initiated by the second client, the method further includes:
[0103] Querying a broadcast public key set and a broadcast encrypted vehicle information set corresponding to the parking space rental index value, wherein the broadcast public key set includes at least one broadcast public key, the broadcast encrypted vehicle information set includes at least one broadcast encrypted vehicle information, and one broadcast public key corresponds to one broadcast encrypted vehicle information;
[0104] Verify whether the broadcast public key set contains the second key, and verify whether the broadcast encrypted vehicle information set contains the encrypted vehicle information corresponding to the vehicle information to be verified.
[0105] In actual applications, a rentable parking space may have at least one parking space lessor who wants to rent it. The parking space lessor can query the parking space rental events published on the blockchain through the second client used by it, and select the rentable parking space that it wants to rent and whose parking space rental status tag is the rentable tag; then directly write the public key and encrypted vehicle information broadcasted on the blockchain into the structure of the parking space rental event corresponding to the rentable parking space. The parking space sharing management platform 101 can create a correspondence table between rentable parking spaces-parking space rental events-parking space lessors' public keys and encrypted vehicle information as shown in Table 3, so as to uniformly manage and maintain each rentable parking space and its corresponding parking space rental events, the public keys of the parking space lessors and the encrypted vehicle information.
[0106] Table 3
[0107]
[0108] For example, assuming that a user (such as parking space lessor 1) initiates a parking space rental request for the rentable parking space 02 to the parking space sharing management platform 101 through its second client 103, then after receiving the parking space rental request initiated by the second client 103, the parking space sharing management platform 101 can query the broadcast public key set corresponding to the parking space rental index value of the rentable parking space 02 stored on the blockchain (the public keys of each parking space lessor corresponding to the rentable parking space 02 in Table 3 above) and the broadcast encrypted vehicle information set (the encrypted vehicle information of the parking space lessors of each parking space lessor corresponding to the rentable parking space 02 in Table 3 above).
[0109] Next, the parking space sharing management platform 101 can query whether the broadcast public key set corresponding to the parking space rental index value of the rentable parking space 02 contains the second key of the parking space lessor 1, and whether the broadcast encrypted vehicle information set corresponding to the parking space rental index value of the rentable parking space 02 contains the encrypted vehicle information of the parking space lessor 1.
[0110] If the broadcast public key set corresponding to the parking space rental index value of the rentable parking space 02 contains the second key of the parking space lessor 1, and the broadcast encrypted vehicle information set corresponding to the parking space rental index value of the rentable parking space 02 contains the encrypted vehicle information of the parking space lessor 1, then it can be confirmed that the parking space lessor 1 is the legal lessee of the rentable parking space 02, that is, the vehicle information to be verified of the vehicle to be parked by the parking space lessor 1 has been verified.
[0111] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0112] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0113] Figure 3 It is a flow chart of another parking space sharing method provided in an embodiment of the present application. Figure 4 It is a schematic diagram of the identity authentication process of the parking space lessor in the parking space sharing method provided in the embodiment of the present application.
[0114] See also Figure 3 and Figure 4 The parking space lessor can first create a rental account through the open source framework web3.js, and then log in to the rental account through the first client 102 to access the parking space sharing management platform (also known as the parking space sharing management center) 101 (such as DAPP); the parking space sharing management platform 101 can create a parking space rental event based on the pre-created parking space rental smart contract, according to the available parking spaces provided by the parking space lessor and their corresponding available rental time periods, parking space rental fees and parking space rental status tags, and publish it to the blockchain; the parking space lessor can create a rental account through the open source framework web3.js, and then The rental account is then logged in through the second client 103, and the vehicle information to be verified of the vehicle to be parked is provided to the parking space sharing management platform 101; the parking space sharing management platform 101 performs zero-knowledge verification on the vehicle information to be verified of the vehicle to be parked and the target parking space rental index value provided by the parking space lessor to prove the identity of the lessee; if the verification is successful, the lease is successful, and based on the parking space rental request initiated by the parking space lessor, a second association logical relationship is established between the second account address information of the rental account and the target rentable parking space, the target parking space address information and the target parking space rental event, and the relationship is broadcast to the blockchain.
[0115] Zero-knowledge verification, also known as zero-knowledge proof (ZKP), is a cryptographic technique that allows one party (the prover) to prove to another party (the verifier) that a statement is true without revealing any specific information.
[0116] DAPP can be developed through js and Html using the web3.js open source framework to provide pages for parking space lessors, parking space renters and parking space rental smart contracts to interact.
[0117] When creating a rental account, the parking space lessor can recharge the wallet corresponding to the rental account through Alipay or WeChat (i.e. transfer assets) to facilitate subsequent fee settlement during the transaction.
[0118] Similarly, when creating a rental account, the parking space lessor can recharge the wallet corresponding to the rental account through Alipay or WeChat (i.e. transfer assets) to facilitate subsequent fee settlement during the transaction.
[0119] The technical solution provided by the embodiment of the present application utilizes the characteristics of blockchain and smart contracts. All transaction operations are transparent and need to be verified, which not only reduces trust issues but also improves transaction security. Smart contracts can automatically execute predetermined plans, reduce the need for manual intervention, and greatly reduce management costs. In addition, the parking space lessor can fully control the time period and rental fee for renting their idle / vacant parking spaces, which greatly improves the flexibility of parking space rental.
[0120] Through smart contracts, rental fees can be settled before or immediately after the transaction is completed, reducing the waiting time for fee settlement. It can also avoid fee disputes caused by opaque rental fees, which is conducive to maintaining a good parking space rental order and reducing management costs.
[0121] Through the above method, the utilization rate of idle / vacant parking spaces by parking space lessors can be optimized, while the time cost of parking space lessors in searching for parking spaces can be reduced. At the same time, the fuel consumed by parking space lessors in the process of driving vehicles to be parked in search of parking spaces can be reduced, which is conducive to reducing carbon emissions and reducing the pollution caused by exhaust emissions to the environment.
[0122] At the same time, the technical solution provided by the embodiment of the present application will not disclose the sensitive / privacy information (such as user identity information, license plate information, etc.) of the parking space lessor and the parking space lessor during the entire transaction process of parking space rental / leasing, thereby ensuring information security during the interaction process.
[0123] Figure 5 Schematic diagram of a parking space sharing device provided in an embodiment of the present application. Figure 5 As shown, the parking space sharing device includes:
[0124] The first response module 501 is configured to respond to the rental parking space registration request sent by the first client, where the rental parking space registration request includes the rentable parking space, the parking space owner information corresponding to the rentable parking space, and the parking space address information;
[0125] The event publishing module 502 is configured to create and publish a parking space rental event based on a preset parking space rental smart contract if the parking space owner information is verified; wherein the parking space rental event includes a parking space rental index value and parking space rental data; the parking space rental data includes available parking spaces and their corresponding available rental time periods, parking space rental fees, and parking space rental status tags;
[0126] The first establishing module 503 is configured to establish a first associated logical relationship between the rentable parking space and the parking space address information and the parking space rental event, write the first associated logical relationship into the parking space rental smart contract, and broadcast the first associated logical relationship;
[0127] The second response module 504 is configured to respond to the parking space rental request initiated by the second client, wherein the parking space rental request includes the target parking space rental index value and the to-be-verified vehicle information corresponding to the to-be-parked vehicle;
[0128] The determination module 505 is configured to determine the target rentable parking space, the target parking space address information and the target parking space rental event corresponding to the target parking space rental index value by querying the parking space rental smart contract if the information of the vehicle to be verified is verified;
[0129] The second establishment module 506 is configured to obtain the second account address information of the second client, establish a second association logical relationship between the second account address information and the target rentable parking space, the target parking space address information and the target parking space rental event, write the second association logical relationship into the parking space rental smart contract, and broadcast the second association logical relationship.
[0130] In some embodiments, the event publishing module 502 may include:
[0131] A retrieving unit, configured to retrieve owner data corresponding to the first client from the blockchain database;
[0132] a verification unit configured to confirm that the parking space owner information verification is successful if the owner data matches the parking space owner information;
[0133] An acquisition unit, configured to acquire the parking space rental data and the first account address information sent by the first client;
[0134] A calculation unit configured to calculate a parking space rental index value based on the first account address information, a rentable time period corresponding to the rentable parking space, and a parking space rental fee;
[0135] The publishing unit is configured to create and publish a parking space rental event based on a preset parking space rental smart contract, a parking space rental index value and parking space rental data.
[0136] In some embodiments, the above-mentioned publishing unit may be specifically configured as follows:
[0137] Construct a structure based on the available rental time period, parking space rental fee and parking space rental status label;
[0138] Create a parking space rental event with the parking space rental index value and structure as rental event parameters, and publish the parking space rental event.
[0139] In some embodiments, the second client includes:
[0140] A generating module, configured to generate a key pair, the key pair comprising a first key and a second key;
[0141] The information acquisition module is configured to acquire the vehicle information to be verified of the vehicle to be parked, and encrypt the vehicle information to be verified using a first key to obtain encrypted vehicle information corresponding to the vehicle information to be verified; wherein the vehicle information at least includes the license plate information of the vehicle to be parked;
[0142] The broadcast module is configured to broadcast the second key and the encrypted vehicle information.
[0143] In some embodiments, the second client may further include:
[0144] An index determination module, configured to determine a target parking space rental index value;
[0145] The initiating module is configured to initiate a parking space rental request based on the target parking space rental index value and the encrypted vehicle information of the vehicle to be parked.
[0146] In some embodiments, the above-mentioned index determination module may include:
[0147] An information collection unit is configured to collect current position information of the vehicle to be parked;
[0148] An event determination unit, wherein the matched value is used to determine at least one candidate parking space rental event; wherein the candidate parking space rental event includes a candidate rentable parking space and its corresponding candidate parking space rental status tag, and candidate parking space address information, and the candidate parking space rental status tag is a rentable tag;
[0149] a distance calculation unit configured to calculate a position distance between a current position of the vehicle to be parked and a candidate parking space address of each candidate rentable parking space based on the current position information and the candidate parking space address information of each candidate rentable parking space;
[0150] The parking space determination unit is configured to determine a candidate rentable parking space with the smallest position distance as a target rentable parking space, and determine a parking space rental index value corresponding to the target rentable parking space as the target parking space rental index value.
[0151] In some embodiments, the above-mentioned parking space sharing device may further include:
[0152] A query module is configured to query a broadcast public key set and a broadcast encrypted vehicle information set corresponding to a parking space rental index value, wherein the broadcast public key set includes at least one broadcast public key, the broadcast encrypted vehicle information set includes at least one broadcast encrypted vehicle information, and one broadcast public key corresponds to one broadcast encrypted vehicle information;
[0153] The verification module is configured to verify whether the broadcast public key set includes the second key, and to verify whether the broadcast encrypted vehicle information set includes the encrypted vehicle information corresponding to the vehicle information to be verified.
[0154] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0155] Figure 6 Schematic diagram of an electronic device 6 provided in an embodiment of the present application. Figure 6 As shown, the electronic device 6 of this embodiment includes: a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 601 executes the computer program 603, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0156] The electronic device 6 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 6 may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that Figure 6 The electronic device 6 is merely an example and does not limit the electronic device 6 . The electronic device 6 may include more or less components than those shown in the figure, or different components.
[0157] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0158] The memory 602 may be an internal storage unit of the electronic device 6, for example, a hard disk or memory of the electronic device 6. The memory 602 may also be an external storage device of the electronic device 6, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. The memory 602 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 602 is used to store computer programs and other programs and data required by the electronic device.
[0159] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0160] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0161] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A parking space sharing method, characterized in that: include: In response to a parking space rental registration request sent by the first client, the parking space rental registration request includes a rentable parking space, parking space owner information corresponding to the rentable parking space, and parking space address information; If the parking space owner information is verified, a parking space rental event is created and published based on the preset parking space rental smart contract; wherein the parking space rental event includes a parking space rental index value and parking space rental data; the parking space rental data includes the rentable parking space and its corresponding rentable time period, parking space rental fee and parking space rental status tag; Establishing a first associated logical relationship between the rentable parking space and the parking space address information and the parking space rental event, writing the first associated logical relationship into the parking space rental smart contract, and broadcasting the first associated logical relationship; Responding to a parking space rental request initiated by the second client, wherein the parking space rental request includes a target parking space rental index value and vehicle information to be verified corresponding to the vehicle to be parked; If the verification of the vehicle information to be verified is passed, the target rentable parking space, the target parking space address information and the target parking space rental event corresponding to the target parking space rental index value are determined by querying the parking space rental smart contract; Obtain the second account address information of the second client, establish a second association logical relationship between the second account address information and the target rentable parking space, the target parking space address information and the target parking space rental event, write the second association logical relationship into the parking space rental smart contract, and broadcast the second association logical relationship.
2. The method according to claim 1, characterized in that If the parking space owner information is verified, a parking space rental event is created and published based on the preset parking space rental smart contract, including: Retrieving owner data corresponding to the first client from the blockchain database; If the owner data matches the parking space owner information, confirming that the parking space owner information verification has passed; Acquire the parking space rental data and the first account address information sent by the first client; Calculate a parking space rental index value based on the first account address information, the rentable time period corresponding to the rentable parking space, and the parking space rental fee; Based on the preset parking space rental smart contract, the parking space rental index value and the parking space rental data, a parking space rental event is created and published.
3. The method according to claim 2, characterized in that Based on the preset parking space rental smart contract, the parking space rental index value and the parking space rental data, a parking space rental event is created and published, including: Constructing a structure based on the rentable time period, the parking space rental fee and the parking space rental status tag; A parking space rental event is created with the parking space rental index value and the structure as rental event parameters, and the parking space rental event is published.
4. The method according to claim 1, characterized in that: Before the parking space rental request initiated by the second client, the method further includes: The second client: generating a key pair, the key pair comprising a first key and a second key; Acquire the vehicle information to be verified of the vehicle to be parked, and use the first key to encrypt the vehicle information to be verified to obtain encrypted vehicle information corresponding to the vehicle information to be verified; wherein the vehicle information at least includes the license plate information of the vehicle to be parked; The second key and the encrypted vehicle information are broadcasted.
5. The method according to claim 4, characterized in that The parking space rental request initiated by the second client includes: The second client: Determine the target parking space rental index value; A parking space rental request is initiated based on the target parking space rental index value and the encrypted vehicle information of the vehicle to be parked.
6. The method according to claim 5, characterized in that Determine the target parking space rental index value, including: Collecting the current position information of the vehicle to be parked; Determine at least one candidate parking space rental event; wherein the candidate parking space rental event includes a candidate rentable parking space and its corresponding candidate parking space rental status tag, and candidate parking space address information, and the candidate parking space rental status tag is a rentable tag; Calculating the position distance between the current position of the vehicle to be parked and the candidate parking space address of each candidate rentable parking space based on the current position information and the candidate parking space address information of each candidate rentable parking space; A candidate rentable parking space with the smallest position distance is determined as a target rentable parking space, and a parking space rental index value corresponding to the target rentable parking space is determined as a target parking space rental index value.
7. The method according to claim 4, characterized in that After responding to the parking space rental request initiated by the second client, the method further includes: Querying a broadcast public key set and a broadcast encrypted vehicle information set corresponding to the parking space rental index value, wherein the broadcast public key set includes at least one broadcast public key, the broadcast encrypted vehicle information set includes at least one broadcast encrypted vehicle information, and one broadcast public key corresponds to one broadcast encrypted vehicle information; Verify whether the broadcast public key set includes the second key, and verify whether the broadcast encrypted vehicle information set includes the encrypted vehicle information corresponding to the vehicle information to be verified.
8. A parking space sharing device, characterized in that: include: A first response module is configured to respond to a rental parking space registration request sent by a first client, wherein the rental parking space registration request includes a rentable parking space, parking space owner information corresponding to the rentable parking space, and parking space address information; The event publishing module is configured to create and publish a parking space rental event based on a preset parking space rental smart contract if the parking space owner information is verified; wherein the parking space rental event includes a parking space rental index value and parking space rental data; the parking space rental data includes the rentable parking space and its corresponding rentable time period, parking space rental fee and parking space rental status tag; A first establishing module is configured to establish a first associated logical relationship between the rentable parking space and the parking space address information and the parking space rental event, write the first associated logical relationship into the parking space rental smart contract, and broadcast the first associated logical relationship; A second response module is configured to respond to a parking space rental request initiated by a second client, wherein the parking space rental request includes a target parking space rental index value and vehicle information to be verified corresponding to the vehicle to be parked; A determination module is configured to determine the target rentable parking space, the target parking space address information and the target parking space rental event corresponding to the target parking space rental index value by querying the parking space rental smart contract if the to-be-verified vehicle information is verified; The second establishment module is configured to obtain the second account address information of the second client, establish a second association logical relationship between the second account address information and the target rentable parking space, the target parking space address information and the target parking space rental event, write the second association logical relationship into the parking space rental smart contract, and broadcast the second association logical relationship.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
