Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is to be understood that the terminology used in the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be noted that the blockchain server in the embodiment of the present invention may be a conventional server capable of bearing services and guaranteeing service capabilities, or may be a terminal device capable of bearing services and guaranteeing service capabilities, which is registered in the blockchain and has a processor, a hard disk, a memory, and a system bus structure. The embodiments of the present invention are not particularly limited.
It is understood that from the data perspective, the blockchain is a distributed database, which can realize distributed recording (recorded by a plurality of storage nodes in the system collectively rather than by a centralized organization separately) and distributed storage (stored in all storage nodes participating in recording data rather than centrally stored in the centralized organization node), and from the time perspective, the blockchain comprises a plurality of blocks, each block stores information generated in a period of time and is marked with storage time, the header of each block contains the information of the previous block, and all blocks are connected end to end, so as to form the blockchain. Therefore, the blockchain is a database which records time sequence, is not falsifiable and is trusted.
Referring to fig. 1, fig. 1 is a schematic flow chart of a vehicle condition data management method according to an embodiment of the present invention, and as shown in fig. 1, the vehicle condition data management method includes:
101. and receiving the vehicle condition data submitted by the data provider.
In the embodiment of the present invention, after receiving the vehicle condition data provided by the data provider, the blockchain server registers the vehicle condition data in the blockchain.
Alternatively, the data provider may be a vehicle manufacturer, a vehicle design company, a 4S store, an insurance company, a vehicle maintenance factory, a vehicle owner, or the like, or may be other organizations and individuals, and embodiments of the present invention are not limited in particular.
Optionally, the vehicle condition data includes, but is not limited to, a model of the vehicle, a production place of the vehicle, a size of the vehicle, a price of the vehicle, or a maintenance time of the vehicle, and the embodiment of the present invention is not particularly limited.
For example, the block chain server receives information about a production place, an engine, and the like of an X-type vehicle that the vehicle manufacturer may provide, information about an average selling price, an average selling quantity per month, and the like of the X-type vehicle that the 4S point provides, and information about an average maintenance interval, a common fault, and the like of the X-type vehicle that the vehicle maintenance factory may provide. It is to be understood that the above examples are illustrative only and are not to be construed as limiting.
102. And generating an intelligent contract according to the vehicle condition data transaction condition set by the data provider.
In the embodiment of the present invention, the data provider provides the vehicle condition data to a data consumer, so that the data consumer can know various real vehicle condition information of various vehicle types to help the data consumer make a correct judgment, and the data provider can set a vehicle condition data transaction condition under which the data consumer uses the vehicle condition data.
The data provider can send the vehicle condition data transaction condition to the block chain, the block chain server generates an intelligent contract according to the vehicle condition data transaction condition set by the data provider, the intelligent contract comprises the transaction condition using the vehicle condition data, and the block chain server can send the vehicle condition data to the data user only when the data user meets the intelligent contract. The transaction condition is a payment mode and a payment amount when the data using party pays the data provider. Including but not limited to bank transfers, digital monetary payments, virtual monetary payments, and the like. For example, the transaction condition may be a transfer of two elements to the data provider through an electronic bank, or a payment of five elements to the data provider through a third party payment platform, and it should be understood that the above examples are merely illustrative and are not limited to specific examples.
103. And processing the vehicle condition data and the intelligent contract according to a preset rule to obtain first data.
In the embodiment of the present invention, after receiving the vehicle condition data, the block chain server extracts a vehicle condition data index corresponding to the vehicle condition data, where the vehicle condition data index is used to guide to search for the vehicle condition data; then, calculating the vehicle condition data by using a one-way irreversible function to obtain a characteristic value corresponding to the vehicle condition data; and finally, encrypting the vehicle condition data index, the characteristic value and the intelligent contract to obtain the first data.
In the embodiment of the present invention, the vehicle condition data index includes, but is not limited to, a corresponding vehicle type in the vehicle condition data, a keyword of the vehicle condition data of the vehicle type, a storage address of the vehicle condition data, and the like. The data user can find the vehicle type to be checked and the corresponding vehicle condition data according to the vehicle condition data index, and further send a data use request to the block chain server, and the block chain server extracts the vehicle condition data from the block chain according to the index information.
In the embodiment of the present invention, the block chain server calculates the vehicle condition data by using a one-way irreversible function to obtain a feature value corresponding to the vehicle condition data, where the one-way irreversible function can convert any one plaintext into a feature value with a fixed length, but the plaintext cannot be calculated by the feature value. The one-way irreversible function includes, but is not limited to, Message Digest Algorithm 5 (MD 5), Secure Hash Algorithm (SHA), Message Authentication Code (MAC) function, etc., and the embodiment of the present invention is not limited in particular.
In the embodiment of the present invention, the block chain server obtains the vehicle condition data index, and after the characteristic value corresponding to the vehicle condition data, the vehicle condition data index, the characteristic value, and the intelligent contract are calculated by using an encryption algorithm to obtain the first data, where the encryption algorithm is performed by processing a plaintext file or data according to a certain algorithm to form a section of ciphertext, and the ciphertext can be restored to the plaintext only by using a corresponding key. The Encryption Algorithm includes, but is not limited to, a Data Encryption Standard (DES), a Digital Signature Algorithm (DSA), an Advanced Encryption Algorithm (AES), an International Data Encryption Algorithm (IDES), and the like, and the embodiments of the present invention are not limited to specific limitations.
104. Registering the first data in a blockchain.
In an embodiment of the present invention, the blockchain server calculates the vehicle condition index, the feature value, and the intelligent contract using an encryption algorithm to obtain the first data, and registers the first data in the blockchain. And meanwhile, the block chain server broadcasts the vehicle condition data index in a block chain in a whole network, so that the vehicle condition data corresponding to the vehicle condition data index can be searched subsequently.
105. Receiving a data use request of the data user.
In the embodiment of the present invention, when the data user wants to check the vehicle condition data, the vehicle condition data may be searched according to the vehicle condition data index, where the vehicle condition data index may be that when the data user searches the vehicle condition data index, the blockchain server sends the vehicle condition data index to the data user, or the blockchain server detects that the data user searches the vehicle condition data, and the blockchain server actively sends the vehicle condition data index to the data user. The embodiments of the present invention are not particularly limited.
In the embodiment of the present invention, after the block chain server initiates the vehicle condition data index to the data user, the data user searches the index of the vehicle type information in the vehicle condition data index according to the vehicle type information that the data user wants to view. When the data user determines the required vehicle condition data in the vehicle condition data index, submitting the data use request of the vehicle condition data to the blockchain server, and receiving the data use request of the data user by the blockchain server.
Alternatively, the data user may be a vehicle manufacturer, a vehicle design company, a 4S store, an insurance company, a vehicle maintenance factory, an individual who wants to purchase a vehicle, or the like, or may be other organizations and individuals, and the embodiment of the present invention is not particularly limited.
106. And judging whether the data use request meets an intelligent contract or not.
In an embodiment of the present invention, the smart contract specifies a data use condition under which the data user uses the vehicle condition data. And after receiving the data use request of the data user, the block chain server judges whether the data use request meets the intelligent contract.
And judging whether the data use request meets the intelligent contract, specifically judging whether a transaction commitment in the data use request meets a transaction condition specified in the intelligent contract and whether a first vehicle type requested to be checked in the data use request is matched with vehicle type information in the intelligent contract. The transaction commitment is the amount which the data user is willing to pay and the payment mode, and if the amount which the data user is willing to pay is larger than or equal to the amount specified in the intelligent contract, the payment mode conforms to the payment mode specified in the intelligent contract, and the first vehicle type requested to be viewed in the data use request is matched with the vehicle type information in the intelligent contract, the block chain server determines that the data use request meets the intelligent contract. It is to be understood that the above-described use conditions are merely illustrative and are not particularly limited.
107. And if so, sending the vehicle condition data corresponding to the data use request to a data user.
If the blockchain server determines that the data use request of the data user meets the intelligent contract, the blockchain server sends vehicle condition data corresponding to the data use request requested to be checked by the data user to the data user, and if the data user does not meet the preset condition, the blockchain server sends first prompt information to the data user to prompt the data user that the data user does not have permission to check the vehicle condition data. ". It should be understood that the above examples are by way of illustration only and are not to be construed as limiting in any way.
For example, if a user a registers as a user of the blockchain, the user a has a vehicle of type H, after the spark plug of the H-type vehicle of the user A is damaged and replaced in the using process, the user A can log in the block chain server and upload maintenance information to the block chain server, the information can be' H type vehicle, which has been used for six months in two years, has the mileage of ten thousand kilometers, it takes x dollars to replace spark plugs at a repair shop, said a customer, when uploading said repair information to said blockchain server, the trade criteria for other users viewing the information may be agreed with the blockchain server, for example, the transaction condition may be that other users must pay a dollar amount to the account of the a user before the blockchain server can send the repair information to the other users. The block chain server extracts a vehicle condition data index of the vehicle condition data after receiving the vehicle condition data and the transaction condition, converts the vehicle condition data into a characteristic value according to a one-way irreversible algorithm, generates the intelligent contract according to the transaction condition, registers the vehicle condition data, the vehicle condition data index, the characteristic value and the intelligent contract into a block chain, and broadcasts the vehicle condition data index in the block chain in a whole network. When a user B searches the vehicle condition data index, the block chain server sends the vehicle condition data index to the user B, when the user B finds the vehicle condition data provided by the user A according to the vehicle condition data index and wants to check the vehicle condition data, a data use request is sent to the block chain server, the block chain server determines that the vehicle type requested to be checked in the data use request of the user B meets the intelligent contract, and after a dollar is paid to the user A in a specified preset payment mode, the block chain server sends the vehicle condition data to the user B for the user B to refer to. It should be understood that the above examples are by way of illustration only and are not to be construed as limiting in any way.
By implementing the embodiment of the invention, the blockchain server receives vehicle condition data provided by a data provider, generates an intelligent contract according to vehicle condition data transaction conditions set by the data provider, registers the vehicle condition data and the intelligent contract in a blockchain, judges whether the data use request meets the intelligent contract when the blockchain server receives the data use request of a data user, and transmits the vehicle condition data corresponding to the data use request to the data user if the data use request meets the intelligent contract. By registering the encrypted vehicle condition data in the block chain and utilizing the non-tamper property of the data in the block chain, a consumer can see the real and reliable vehicle condition data when looking over the vehicle condition data, which brings convenience to the consumer for purchasing vehicles and also brings certain benefits to the data provider.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another vehicle condition data management method according to an embodiment of the present invention. As shown in fig. 2, the vehicle condition data management method includes:
201. receiving a registration request of a data provider, generating a corresponding key and an account according to the registration request, and sending the key and the account to the data provider.
In the embodiment of the present invention, the data provider needs to register in the blockchain server, and after receiving a registration request provided by the data provider, the blockchain server generates a corresponding key and an account according to the registration request, and sends the key and the account to the data consumer. The account is used for completing transactions with a data user to obtain benefits brought by providing vehicle condition data, and the secret key is a certificate for verifying the identity validity of the data provider by the blockchain server.
Alternatively, the data user may be a vehicle manufacturer, a vehicle design company, a 4S store, an insurance company, or the like, or may be other organizations and individuals, and the present invention is not particularly limited.
202. And receiving the vehicle condition data submitted by the data provider.
In the embodiment of the present invention, after the data provider acquires the account and the key, the blockchain server may submit the vehicle condition data, and after the blockchain server receives the vehicle condition data provided by the data provider, the blockchain server registers the vehicle condition data in a blockchain.
Alternatively, the data provider may be a vehicle manufacturer, a vehicle design company, a 4S store, an insurance company, or the like, or may be other organizations and individuals, and the present invention is not particularly limited.
Optionally, the vehicle condition data includes, but is not limited to, a model of the vehicle, a production place of the vehicle, a size of the vehicle, a price of the vehicle, or a maintenance time of the vehicle, and the embodiment of the present invention is not particularly limited.
For example, the block chain server receives information about a production place, an engine, and the like of an X-type vehicle that the vehicle manufacturer may provide, information about an average selling price, an average selling quantity per month, and the like of the X-type vehicle that the 4S point provides, and information about an average maintenance interval, a common fault, and the like of the X-type vehicle that the vehicle maintenance factory may provide. It is to be understood that the above examples are illustrative only and are not to be construed as limiting.
203. And generating an intelligent contract according to the vehicle condition data transaction condition set by the data provider.
In the embodiment of the present invention, the data provider provides the vehicle condition data to a data consumer, so that the data consumer can know various real vehicle condition information of various vehicle types to help the data consumer make a correct judgment, and the data provider can set a vehicle condition data transaction condition under which the data consumer uses the vehicle condition data.
The data provider can send the use condition of the vehicle condition data to the blockchain server, the blockchain server generates an intelligent contract according to the transaction condition of the vehicle condition data set by the data provider, the intelligent contract comprises the transaction condition of the vehicle condition data, and the blockchain server can send the vehicle condition data to the data user only when the data user meets the intelligent contract. The transaction condition is a payment mode and a payment amount when the data using party pays the data provider. Including but not limited to bank transfers, digital monetary payments, virtual monetary payments, and the like. For example, the transaction condition may be a transfer of two elements to the data provider through an electronic bank, or a payment of five elements to the data provider through a third party payment platform, and it should be understood that the above examples are merely illustrative and are not limited to specific examples.
204. And processing the vehicle condition data and the intelligent contract according to a preset rule to obtain the first data.
In the embodiment of the present invention, after receiving the vehicle condition data, the block chain server extracts a vehicle condition data index corresponding to the vehicle condition data, where the vehicle condition data index is used to guide to search for the vehicle condition data; then, calculating the vehicle condition data by using a one-way irreversible function to obtain a characteristic value corresponding to the vehicle condition data; and finally, encrypting the vehicle condition data index, the characteristic value and the intelligent contract to obtain the first data.
In the embodiment of the present invention, the vehicle condition data index includes, but is not limited to, a corresponding vehicle type in the vehicle condition data, a keyword of the vehicle condition data of the vehicle type, a storage address of the vehicle condition data, and the like. The data user can find the vehicle type to be checked and the corresponding vehicle condition data according to the vehicle condition data index, and further send a data use request to the block chain server, and the block chain server extracts the vehicle condition data from the block chain according to the index information.
In the embodiment of the present invention, the block chain server calculates the vehicle condition data by using a one-way irreversible function to obtain a feature value corresponding to the vehicle condition data, where the one-way irreversible function can convert any one plaintext into a feature value with a fixed length, but the plaintext cannot be calculated by the feature value. The one-way irreversible function includes, but is not limited to, MD5, SHA, MAC function, etc., and the embodiment of the present invention is not particularly limited.
In the embodiment of the present invention, the block chain server obtains the vehicle condition data index, and after the characteristic value corresponding to the vehicle condition data, the vehicle condition data index, the characteristic value, and the intelligent contract are calculated by using an encryption algorithm to obtain the first data, where the encryption algorithm is performed by processing a plaintext file or data according to a certain algorithm to form a section of ciphertext, and the ciphertext can be restored to the plaintext only by using a corresponding key. The encryption algorithm includes, but is not limited to, DES, DSA, AES, IDES, and the like, and the embodiment of the present invention is not particularly limited.
205. Registering the first data in a blockchain.
In an embodiment of the present invention, the blockchain server calculates the vehicle condition index, the feature value, and the intelligent contract using an encryption algorithm to obtain first data, and registers the first data in the blockchain. And meanwhile, the block chain server broadcasts the vehicle condition data index in a block chain in a whole network, so that the vehicle condition data corresponding to the vehicle condition data index can be searched subsequently.
206. Receiving a data use request of the data user.
In the embodiment of the present invention, when the data user wants to check the vehicle condition data, the vehicle condition data may be searched according to the vehicle condition data index, where the vehicle condition data index may be that when the data user searches the vehicle condition data index, the blockchain server sends the vehicle condition data index to the data user, or the blockchain server detects that the data user searches the vehicle condition data, and the blockchain server actively sends the vehicle condition data index to the data user. The embodiments of the present invention are not particularly limited.
In the embodiment of the present invention, after the block chain server initiates the vehicle condition data index to the data user, the data user searches the index of the vehicle type information in the vehicle condition data index according to the vehicle type information that the data user wants to view. When the data user determines the required vehicle condition data in the vehicle condition data index, submitting the data use request of the vehicle condition data to the blockchain server, and receiving the data use request of the data user by the blockchain server.
Alternatively, the data user may be a vehicle manufacturer, a vehicle design company, a 4S store, an insurance company, or the like, or may be other organizations and individuals, and the embodiment of the present invention is not particularly limited.
207. And judging whether the data use request meets an intelligent contract or not.
In an embodiment of the present invention, the smart contract specifies a data use condition under which the data user uses the vehicle condition data. And after receiving the data use request of the data user, the block chain server judges whether the data use request meets the intelligent contract.
And judging whether the data use request meets the intelligent contract, specifically judging whether a transaction commitment in the data use request meets a transaction condition specified in the intelligent contract and whether a first vehicle type requested to be checked in the data use request is matched with vehicle type information in the intelligent contract. The transaction commitment is the amount which the data user is willing to pay and the payment mode, and if the amount which the data user is willing to pay is larger than or equal to the amount specified in the intelligent contract, the payment mode conforms to the payment mode specified in the intelligent contract, and the first vehicle type requested to be viewed in the data use request is matched with the vehicle type information in the intelligent contract, the block chain server determines that the data use request meets the intelligent contract. It is to be understood that the above-described use conditions are merely illustrative and are not particularly limited.
208. And if so, sending the vehicle condition data corresponding to the data use request to a data user.
And if the blockchain server determines that the data use request of the data user meets the intelligent contract, the blockchain server sends vehicle condition data corresponding to the data use request which is requested to be checked by the data user to the data user.
For example, if a user a wishes to become a data provider of vehicle condition data to obtain revenue, the user a wants the blockchain server to submit a registration request, and after receiving the registration request, the blockchain server generates a corresponding account and a corresponding key and sends the account and the corresponding key to the user a. The user a owns one vehicle of H type, after the spark plug of the vehicle of H type of the user a is damaged and replaced in the use process, the user a can log in the blockchain server by using the account and the secret key, upload a piece of maintenance information to the blockchain server, where the piece of maintenance information may be "an H type vehicle, used for six months for two years, travels tens of thousands of kilometers, and it costs x yuan to replace the spark plug in a repair shop," and when uploading the maintenance information to the blockchain server, the user a can agree with the blockchain server on transaction conditions of the information for other users to view, for example, the transaction conditions may be that other users must pay a yuan to the account of the user a, and the blockchain server can send the maintenance information to other users. The block chain server extracts a vehicle condition data index of the vehicle condition data after receiving the vehicle condition data and the transaction condition, converts the vehicle condition data into a characteristic value according to a one-way irreversible algorithm, generates the intelligent contract according to the transaction condition, registers the vehicle condition data, the vehicle condition data index, the characteristic value and the intelligent contract into a block chain, and broadcasts the vehicle condition data index in the block chain in a whole network. When a user B searches the vehicle condition data index, the block chain server sends the vehicle condition data index to the user B, when the user B finds the vehicle condition data provided by the user A according to the vehicle condition data index and wants to check the vehicle condition data, a data use request is sent to the block chain server, the block chain server determines that the vehicle type requested to be checked in the data use request of the user B meets the intelligent contract, and after a dollar is paid to the user A in a specified preset payment mode, the block chain server sends the vehicle condition data to the user B for the user B to refer to.
By implementing the embodiment of the invention shown in fig. 2, the blockchain server receives vehicle condition data provided by a data provider, generates an intelligent contract according to the vehicle condition data transaction condition set by the data provider, registers the vehicle condition data and the intelligent contract in a blockchain, when the blockchain server receives a data use request of a data user, judges whether the data use request meets the intelligent contract, and if so, transmits the vehicle condition data corresponding to the data use request to the data user. By registering the encrypted vehicle condition data in the block chain and utilizing the non-tamper property of the data in the block chain, a consumer can see the real and reliable vehicle condition data when looking over the vehicle condition data, which brings convenience to the consumer for purchasing vehicles and also brings certain benefits to the data provider.
An embodiment of the present invention further provides a vehicle condition data management device, please refer to fig. 3, where fig. 3 is a block diagram of a vehicle condition data management device according to an embodiment of the present invention, the device includes: a receiving unit 301, a generating unit 302, a processing unit 303, a registering unit 304, a judging unit 305, and a transmitting unit 306.
The receiving unit 301 is configured to receive vehicle condition data submitted by a data provider and a data use request of a data user.
In the embodiment of the present invention, after receiving the vehicle condition data provided by the data provider, the blockchain server registers the vehicle condition data in the blockchain.
Alternatively, the data provider may be a vehicle manufacturer, a vehicle design company, a 4S store, an insurance company, a vehicle maintenance factory, a vehicle owner, or the like, or may be other organizations and individuals, and embodiments of the present invention are not limited in particular.
Optionally, the vehicle condition data includes, but is not limited to, a model of the vehicle, a production place of the vehicle, a size of the vehicle, a price of the vehicle, or a maintenance time of the vehicle, and the embodiment of the present invention is not particularly limited.
For example, the block chain server receives information about a production place, an engine, and the like of an X-type vehicle that the vehicle manufacturer may provide, information about an average selling price, an average selling quantity per month, and the like of the X-type vehicle that the 4S point provides, and information about an average maintenance interval, a common fault, and the like of the X-type vehicle that the vehicle maintenance factory may provide. It is to be understood that the above examples are illustrative only and are not to be construed as limiting.
The generating unit 302 is configured to generate an intelligent contract according to the vehicle condition data transaction condition set by the data provider.
In the embodiment of the present invention, the data provider provides the vehicle condition data to a data consumer, so that the data consumer can know various real vehicle condition information of various vehicle types to help the data consumer make a correct judgment, and the data provider can set a vehicle condition data transaction condition under which the data consumer uses the vehicle condition data.
The data provider can send the vehicle condition data transaction condition to the block chain, the block chain server generates an intelligent contract according to the vehicle condition data transaction condition set by the data provider, the intelligent contract comprises the transaction condition using the vehicle condition data, and the block chain server can send the vehicle condition data to the data user only when the data user meets the intelligent contract. The transaction condition is a payment mode and a payment amount when the data using party pays the data provider. Including but not limited to bank transfers, digital monetary payments, virtual monetary payments, and the like. For example, the transaction condition may be a transfer of two elements to the data provider through an electronic bank, or a payment of five elements to the data provider through a third party payment platform, and it should be understood that the above examples are merely illustrative and are not limited to specific examples.
The processing unit 303 is configured to process the vehicle condition data and the intelligent contract according to a preset rule to obtain first data.
In the embodiment of the present invention, after receiving the vehicle condition data, the block chain server extracts a vehicle condition data index corresponding to the vehicle condition data, where the vehicle condition data index is used to guide to search for the vehicle condition data; then, calculating the vehicle condition data by using a one-way irreversible function to obtain a characteristic value corresponding to the vehicle condition data; and finally, encrypting the vehicle condition data index, the characteristic value and the intelligent contract to obtain the first data.
In the embodiment of the present invention, the vehicle condition data index includes, but is not limited to, a corresponding vehicle type in the vehicle condition data, a keyword of the vehicle condition data of the vehicle type, a storage address of the vehicle condition data, and the like. The data user can find the vehicle type to be checked and the corresponding vehicle condition data according to the vehicle condition data index, and further send a data use request to the block chain server, and the block chain server extracts the vehicle condition data from the block chain according to the index information.
In the embodiment of the present invention, the block chain server calculates the vehicle condition data by using a one-way irreversible function to obtain a feature value corresponding to the vehicle condition data, where the one-way irreversible function can convert any one plaintext into a feature value with a fixed length, but the plaintext cannot be calculated by the feature value. The one-way irreversible function includes, but is not limited to, MD5, SHA, MAC function, etc., and the embodiment of the present invention is not particularly limited.
In the embodiment of the present invention, the block chain server obtains the vehicle condition data index, and after the characteristic value corresponding to the vehicle condition data, the vehicle condition data index, the characteristic value, and the intelligent contract are calculated by using an encryption algorithm to obtain the first data, where the encryption algorithm is performed by processing a plaintext file or data according to a certain algorithm to form a section of ciphertext, and the ciphertext can be restored to the plaintext only by using a corresponding key. The encryption algorithm includes, but is not limited to, DES, DSA, AES, IDES, and the like, and the embodiment of the present invention is not particularly limited.
The registering unit 304 is configured to register the vehicle condition data and the intelligent contract in a blockchain.
In an embodiment of the present invention, the blockchain server calculates the vehicle condition index, the feature value, and the intelligent contract using an encryption algorithm to obtain the first data, and registers the first data in the blockchain. And meanwhile, the block chain server broadcasts the vehicle condition data index in a block chain in a whole network, so that the vehicle condition data corresponding to the vehicle condition data index can be searched subsequently.
The receiving unit 301 is further configured to receive a data usage request of the data consumer.
In the embodiment of the present invention, when the data user wants to check the vehicle condition data, the vehicle condition data may be searched according to the vehicle condition data index, where the vehicle condition data index may be that when the data user searches the vehicle condition data index, the blockchain server sends the vehicle condition data index to the data user, or the blockchain server detects that the data user searches the vehicle condition data, and the blockchain server actively sends the vehicle condition data index to the data user. The embodiments of the present invention are not particularly limited.
In the embodiment of the present invention, after the block chain server initiates the vehicle condition data index to the data user, the data user searches the index of the vehicle type information in the vehicle condition data index according to the vehicle type information that the data user wants to view. When the data user determines the required vehicle condition data in the vehicle condition data index, submitting the data use request of the vehicle condition data to the blockchain server, and receiving the data use request of the data user by the blockchain server.
Alternatively, the data user may be a vehicle manufacturer, a vehicle design company, a 4S store, an insurance company, a vehicle maintenance factory, an individual who wants to purchase a vehicle, or the like, or may be other organizations and individuals, and the embodiment of the present invention is not particularly limited.
The judging unit 305 is configured to judge whether the data usage request satisfies an intelligent contract.
In an embodiment of the present invention, the smart contract specifies a data use condition under which the data user uses the vehicle condition data. And after receiving the data use request of the data user, the block chain server judges whether the data use request meets the intelligent contract.
And judging whether the data use request meets the intelligent contract, specifically judging whether a transaction commitment in the data use request meets a transaction condition specified in the intelligent contract and whether a first vehicle type requested to be checked in the data use request is matched with vehicle type information in the intelligent contract. The transaction commitment is the amount which the data user is willing to pay and the payment mode, and if the amount which the data user is willing to pay is larger than or equal to the amount specified in the intelligent contract, the payment mode conforms to the payment mode specified in the intelligent contract, and the first vehicle type requested to be viewed in the data use request is matched with the vehicle type information in the intelligent contract, the block chain server determines that the data use request meets the intelligent contract. It is to be understood that the above-described use conditions are merely illustrative and are not particularly limited.
The sending unit 306 is configured to send the vehicle condition data corresponding to the data usage request to a data user under the condition that the data usage request satisfies the intelligent contract.
If the blockchain server determines that the data use request of the data user meets the intelligent contract, the blockchain server sends vehicle condition data corresponding to the data use request requested to be checked by the data user to the data user, and if the data user does not meet the preset condition, the blockchain server sends first prompt information to the data user to prompt the data user that the data user does not have permission to check the vehicle condition data. ". It should be understood that the above examples are by way of illustration only and are not to be construed as limiting in any way.
Optionally, the receiving unit 301 is further configured to receive a registration request of the data provider; the generating unit 302 is further configured to generate a corresponding key and an account according to the registration request; the sending unit 306 is further configured to send the key and the account to the data provider.
In the embodiment of the present invention, the data provider needs to register in the blockchain server, and after receiving a registration request provided by the data provider, the blockchain server generates a corresponding key and an account according to the registration request, and sends the key and the account to the data consumer. The account is used for completing transactions with a data user to obtain benefits brought by providing vehicle condition data, and the secret key is a certificate for verifying the identity validity of the data provider by the blockchain server.
Referring to fig. 4, fig. 4 is a schematic block diagram of a server according to another embodiment of the present invention. The server in this embodiment as shown in the figure may include: one or more processors 401; one or more input devices 402, one or more output devices 403, and memory 404. The processor 401, the input device 402, the output device 403, and the memory 404 are connected by a bus 405. The memory 402 is used to store computer programs comprising program instructions and the processor 401 is used to execute the program instructions stored by the memory 402. Wherein the processor 401 is configured to call the program instruction to perform:
receiving vehicle condition data submitted by a data provider;
generating an intelligent contract according to the vehicle condition data transaction condition set by the data provider;
processing the vehicle condition data and the intelligent contract according to a preset rule to obtain first data;
registering the first data in a blockchain;
receiving a data use request of a data user;
judging whether the data use request meets an intelligent contract or not;
and if so, sending the vehicle condition data corresponding to the data use request to a data user.
Optionally, the processing the vehicle condition data and the intelligent contract according to a preset rule to obtain the first data specifically includes: extracting a vehicle condition data index corresponding to the vehicle condition data, wherein the vehicle condition data index is used for guiding to search the vehicle condition data; calculating the vehicle condition data by utilizing a one-way irreversible function to obtain a characteristic value corresponding to the vehicle condition data; and encrypting the vehicle condition data index, the characteristic value and the intelligent contract to obtain the first data.
Optionally, after registering the first data in the block chain, the method further includes: and indexing the vehicle condition data in a block chain for full-network broadcasting.
Optionally, it is determined whether the transaction commitment in the data usage request meets the transaction condition of the intelligent contract, and it is determined whether the first vehicle type requested to be checked in the data usage request matches the vehicle type information in the intelligent contract.
Optionally, before the receiving the vehicle condition data submitted by the data provider, the method further comprises: receiving a registration request of the data provider; generating a corresponding key and an account according to the registration request; sending the key and the account to the data provider.
It should be understood that, in the embodiments of the present invention, the Processor 401 may be a Central Processing Unit (CPU), and the 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, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 402 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 403 may include a display (LCD, etc.), a speaker, etc.
The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 404 may also include non-volatile random access memory. For example, the memory 404 may also store device type information.
In a specific implementation, the processor 401, the input device 402, and the output device 403 described in this embodiment of the present invention may execute the implementation manners described in the first embodiment and the second embodiment of the vehicle condition data management method provided in this embodiment of the present invention, and may also execute the implementation manner of the server described in this embodiment of the present invention, which is not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.