Data processing method, device and storage medium
By storing traffic data in a blockchain storage system, the decentralized and distributed storage characteristics of blockchain are utilized to solve the problem of insufficient reliability of road condition data in intelligent transportation systems, achieve data security and traceability, and enhance the credibility of the system.
Patent Information
- Application Number
- CN201911168590.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-25
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2039-11-25
AI Technical Summary
The road condition data processing stage in existing intelligent transportation systems is subject to many human interference factors, resulting in insufficient data reliability and an inability to provide highly reliable data support.
Traffic data, including road condition data and associated device descriptions, is stored in a blockchain storage system. By leveraging the decentralized and distributed storage characteristics of blockchain, the security and immutability of the data are ensured, and the traceability and authenticity of the data are enhanced through hash calculations and digital signatures.
This improved the reliability and authenticity of traffic data, enhanced the data support capabilities of the intelligent transportation system, and increased the system's credibility.
Smart Images

Figure CN112835973B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent transportation technology, and in particular to a data processing method, device and storage medium. Background Art
[0002] Nowadays, the development of intelligent transportation technology is in full swing. It can effectively utilize existing transportation facilities, reduce traffic load and environmental pollution, and improve traffic safety and transportation efficiency. Among them, highly reliable road condition data is an important data foundation for intelligent transportation systems.
[0003] However, in the prior art, each data processing link of the road condition data is subject to many human interference factors, and cannot provide highly reliable data support for the intelligent transportation system. Therefore, a new solution is needed. Summary of the invention
[0004] Multiple aspects of the present application provide a data processing method, device and storage medium to improve the reliability of road condition data, which is conducive to improving the credibility of intelligent transportation systems.
[0005] The embodiment of the present application also provides a data processing method, including: obtaining traffic data, the traffic data including road condition data and description information of a first device associated with the road condition data; sending the traffic data to a first blockchain in a first blockchain storage system for storage; reading the traffic data to be processed from a target data block in the first blockchain according to a traffic data processing request; performing a specified data processing operation on the traffic data to be processed to obtain a processing result; and uploading the processing result to a second blockchain in a second blockchain storage system for storage.
[0006] An embodiment of the present application also provides a data processing method, including: obtaining traffic data, the traffic data including road condition data and description information of a first device associated with the road condition data; sending the traffic data to a first blockchain in a blockchain storage system for storage; reading the traffic data to be processed from a target data block in the first blockchain according to a traffic data processing request; performing a specified data processing operation on the traffic data to be processed to obtain a processing result; and adding the processing result to a reserved field in the target data block to upload the processing result to the first blockchain for storage.
[0007] An embodiment of the present application provides a data processing method, including: obtaining traffic data, the traffic data including road condition data and description information of a first device associated with the road condition data; sending the traffic data to a first blockchain storage system for storage; wherein the first device includes: a device for collecting, transmitting and / or processing the road condition data.
[0008] An embodiment of the present application also provides a data processing method, including: obtaining traffic data, the traffic data including road condition data and description information of a first device associated with the road condition data; sending the traffic data to a first blockchain storage system for storage; reading the traffic data to be processed from a target data block in the first blockchain storage system according to a traffic data processing request; performing a specified data processing operation on the traffic data to be processed to obtain a processing result; and uploading the processing result to a second blockchain storage system for storage.
[0009] An embodiment of the present application also provides a data processing device, comprising: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to: execute the steps in the data processing method provided in the embodiment of the present application.
[0010] The embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps in the data processing method provided in the embodiment of the present application.
[0011] In the data processing method provided in the embodiment of the present application, the traffic data includes road condition data and description information of the first device associated with the road condition data. The traffic data is stored in the blockchain storage system, so that multiple recording nodes in the blockchain storage system can jointly store the traffic data. In this embodiment, on the one hand, the traceability of the traffic data can be improved based on the description information of the first device, and on the other hand, the authenticity of the traffic data can be effectively improved based on the distributed storage method of the blockchain storage system. Based on this, traffic data with high traceability and authenticity can provide good data support for the intelligent transportation system, which is conducive to improving the credibility of the intelligent transportation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0013] Figure 1 A flowchart of a data processing method provided for an exemplary embodiment of the present application;
[0014] Figure 2a A flowchart of a data processing method provided for another exemplary embodiment of the present application;
[0015] Figure 2b A schematic diagram of the process of uploading traffic data to a chain provided by an exemplary embodiment of the present application;
[0016] Figure 2c A schematic diagram of a verification process of traffic data provided for an exemplary embodiment of the present application;
[0017] Figure 3a A flowchart of a data processing method provided for another exemplary embodiment of the present application;
[0018] Figure 3b A schematic diagram of a process flow of traffic data provided for an exemplary embodiment of the present application;
[0019] Figure 4 A flowchart of a data processing method provided for another exemplary embodiment of the present application;
[0020] Figure 5 A flowchart of a data processing method provided for another exemplary embodiment of the present application;
[0021] Figure 6 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of the present application;
[0022] Figure 7 A schematic diagram of the structure of an electronic device provided for another exemplary embodiment of the present application;
[0023] Figure 8 A schematic structural diagram of an electronic device provided for another exemplary embodiment of the present application;
[0024] Fig. 9 A schematic structural diagram of an electronic device provided as yet another exemplary embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0026] In view of the technical problem that in the prior art, each data processing link of the road condition data in the intelligent transportation system is subject to many human interference factors and cannot provide high-reliability data support for the intelligent transportation system, which in turn hinders the development of the intelligent transportation system, a solution is provided in some embodiments of the present application. The following is a detailed description of the technical solutions provided by the embodiments of the present application in conjunction with the accompanying drawings.
[0027] Figure 1 is a flow chart of a data processing method provided by an exemplary embodiment of the present application, such as Figure 1 As shown, the method includes:
[0028] Step 101: Acquire traffic data, where the traffic data includes road condition data and description information of a first device associated with the road condition data; wherein the first device includes: a device for collecting, transmitting and / or processing road condition data.
[0029] Step 102: Send the traffic data to the blockchain storage system for storage.
[0030] In this embodiment, traffic data includes road condition data and description information of the first device associated with the road condition data. Among them, the road condition data may include data associated with each static object and dynamic object participating in the traffic process. For example, the data of static objects may include: roadbed, road surface, ancillary facilities (such as traffic lights), lane division and other data. For example, the data of dynamic objects may include the collected data generated by vehicles, pedestrians, spilled objects and other dynamic objects participating in traffic on the road. Among them, the collected vehicle data includes but is not limited to at least one of the following data: driving data such as driving distance, speed, angular velocity, etc. when the vehicle is driving on the road, identification data such as the vehicle license plate, model, size, and signal data such as various signals emitted by the vehicle when driving on the road, which are not limited in this example.
[0031] In some cases, the road condition data may be the collected raw data, such as image data, point cloud, millimeter wave reflection signal, etc.; in other cases, the road condition data may also be data obtained after pre-processing of the raw data, such as a grayscale histogram obtained from an image, a speed value or distance value calculated based on a millimeter wave reflection signal, etc., which is not limited here.
[0032] The first device associated with the road condition data includes at least one device that is associated with the road condition data in various links before the road condition data is uploaded to the chain for storage. In an embodiment of the present application, the first device may include: a device for collecting, transmitting and / or processing road condition data. For example, when the road condition data is collected by a sensor device, the first device may include various types of sensors. For example, when the road condition data is transmitted from device A to device B, the first device may include device A and device B. For another example, when the road condition data is preliminarily processed by device C (for example, sorting, screening, and structuring), the first device may include device C.
[0033] The description information of the first device is used to describe the first device. For example, it can be used to describe the state of the first device, the identification mark of the first device, or the attributes of the first device, etc., which are not limited in this embodiment. Based on the description information of the first device, on the one hand, it is conducive to performing relevant calculations in the field of intelligent transportation based on the collection, transmission and / or processing environment of road condition data. On the other hand, under specific application requirements, the collection, transmission and processing process of traffic data can be traced to facilitate data analysis and responsibility tracking.
[0034] After obtaining the traffic data, the traffic data can be sent to the blockchain storage system for storage. The blockchain storage system is a decentralized distributed storage system. The data stored in the blockchain system has high security and cannot be modified at will, avoiding data changes caused by subjective human operations, thereby reducing the risk of traffic data being tampered with and improving the reliability of traffic data.
[0035] In this embodiment, the traffic data includes road condition data and description information of the first device associated with the road condition data. The traffic data is stored in the blockchain storage system, so that multiple recording nodes in the blockchain storage system can jointly store the traffic data. In this implementation, on the one hand, the traceability of the traffic data can be improved based on the description information of the first device, and on the other hand, the authenticity of the traffic data can be effectively improved based on the distributed storage method of the blockchain storage system. Based on this, traffic data with high traceability and authenticity can provide good data support for the intelligent transportation system, which is conducive to improving the credibility of the intelligent transportation system.
[0036] The blockchain storage system is composed of blockchain, which is composed of connected blocks. Each block consists of two parts: the block header and the block body. The block body is used to record the actual data to be stored; the block header is used to record the meta information of the current block. The meta information of the current block may include the generation time of the current block, the hash value of the block body, and the hash value of the previous block.
[0037] In the above and below embodiments of the present application, when the traffic data is sent to the blockchain storage system for storage, the first blockchain in the blockchain storage system can be determined as the blockchain for storing the traffic data. The first blockchain can be a public chain or a private chain, which is not limited in this embodiment.
[0038] Next, a first block body can be generated according to the traffic data, and a first block header can be generated according to the hash value of the first block body and the hash value of the last block in the first blockchain. Next, a first data block can be obtained according to the first block body and the first block header, and the first data block can be added to the last block in the first blockchain. At this point, the process of uploading the traffic data to the blockchain is completed.
[0039] Among them, the term "first" is used to limit the blockchain, block body, block header and data block, which is only used to facilitate description and distinction and does not restrict their order or level.
[0040] The following will further illustrate the optional embodiments of the data processing method provided in the embodiments of the present application in conjunction with the accompanying drawings.
[0041] Figure 2a is a flow chart of a data processing method provided by another exemplary embodiment of the present application, such as Figure 2a As shown, the method includes:
[0042] Step 201: Acquire traffic data, where the traffic data includes road condition data and description information of a first device associated with the road condition data.
[0043] Step 202 , determine whether the data volume of the traffic data is greater than a set data volume threshold. If yes, execute steps 203 and 204 ; if no, execute step 205 .
[0044] Step 203: Store the traffic data in the first storage space, and calculate a hash value of the traffic data.
[0045] Step 204 , obtain the on-chain traffic data according to the address of the first storage space and the hash value of the traffic data, and execute step 206 .
[0046] Step 205: Obtain the uplink traffic data according to the traffic data, and execute step 206.
[0047] Step 206: Calculate the hash value of the uplink traffic data, and generate a first block body according to the uplink traffic data and the hash value of the uplink traffic data.
[0048] Step 207: Generate a first block header according to the hash value of the first block body and the hash value of the last block in the first blockchain of the blockchain storage system.
[0049] Step 208: Obtain a first data block according to the first block body and the first block header.
[0050] Step 209: Add the first data block to the end after the last block in the first blockchain.
[0051] In step 201, the road condition data may optionally include data of various static objects and dynamic objects involved in the traffic process. For details, please refer to the records in the above embodiments, which will not be repeated here. After the road condition data is collected, it may also go through a transmission process or a processing process. Figure 2b The collection and processing of the road condition data are illustrated, but the transmission operation of the road condition data is not illustrated. However, this does not mean that the present embodiment does not include the transmission operation of the road condition data.
[0052] Optionally, in this embodiment, the first device includes a device for collecting, transmitting and / or processing road condition data. Figure 2b As shown, it can be implemented as at least one sensor for collecting road condition data, including but not limited to: cameras, laser radars, millimeter wave radars, ultrasonic radars, thermal imagers and other sensors. The device for transmitting road condition data can be the same as the device for collecting road conditions, or it can be other possible devices, such as computers, server devices, etc.
[0053] The equipment for processing road condition data can be the same as the equipment for collecting road conditions or transmitting road condition data, or it can be equipment dedicated to data processing, such as AI equipment that performs AI (Artificial Intelligence) processing on data, data processing platform, database equipment, etc.
[0054] Optionally, the description information of the first device includes but is not limited to at least one of the following: identification description information of the first device, state description information of the first device, and attribute description information of the first device.
[0055] Among them, the identification description information of the first device is used to describe the identification identification of the first device, so that other devices or applications can uniquely identify the first device. Optionally, the identification description information includes but is not limited to: the International Mobile Equipment Identity (IMEI) of the first device, the Media Access Control (MAC) address of the first device and / or the identity document (ID) of the first device.
[0056] Among them, the status description information of the first device can be used to describe the installation location of the first device, installation height, relative position with other devices, operation time, whether a fault state occurs, whether an alarm state occurs, etc.
[0057] The attribute description information of the first device is used to describe the device parameters, specific configuration, field of view, effective coverage distance, etc. of the first device.
[0058] Among them, the state description information and attribute description information of the first device can be used to facilitate the subsequent use of road condition data to calculate relevant indicators in traffic scenarios. For example, in some scenarios, when the road condition data includes vehicle images captured by a camera, the size of the vehicle can be calculated based on the camera's field of view and the camera's deployment height. For another example, in some scenarios, when the road condition data includes the position of the vehicle-mounted device detected by the ultrasonic radar, the vehicle's driving position can be calculated based on the deployment position of the ultrasonic radar.
[0059] In some exemplary embodiments, processing the traffic data may include mining the data, for example, performing AI processing operations such as classification, regression analysis, clustering, and feature analysis on the traffic data.
[0060] In other exemplary embodiments, processing the road condition data may include: classifying the road condition data, adding feature tags to the classified data, and the like.
[0061] In some other exemplary embodiments, the road condition data may be processed, which may include: performing structured processing on the road condition data. For example, through data perception and recognition or data AI processing operations, the traffic data is generated into structured data in the JSON (JavaScript Object Notation, JS object notation) field format, or structured data in the form of a structure. For another example, the road condition data may be perceived and recognized in combination with the type of sensor that collects the road condition data, so as to distinguish the data into different types of structured data such as distance measurement, speed measurement, type, size, etc.
[0062] It should be noted that, in addition to the processing operations listed above, this embodiment can further sort the traffic data according to the set sorting rules to generate a traffic data queue. The sorting rules can be set according to actual needs and will not be described in detail.
[0063] Of course, the data processing methods listed above are only for illustrative purposes, and the data initial processing methods provided in the embodiments of the present application include but are not limited to the methods listed above.
[0064] In step 202, the data volume threshold can be set according to the data storage capacity of each storage node in the blockchain storage system, and this embodiment does not impose any restrictions on this.
[0065] Optionally, this step may be performed by the first device or other devices, and this embodiment does not limit this.
[0066] In step 203, if the amount of traffic data is greater than the set data amount threshold, then when the traffic data is uploaded to the chain for storage, it will occupy more storage space on the storage node, and when data is synchronized between different nodes after being uploaded to the chain, the synchronization efficiency is low. Therefore, it can be considered that traffic data with a large amount of data is not suitable for being uploaded to the chain.
[0067] Based on this, in this embodiment, the traffic data can be stored in the first storage space. The first storage space can be a storage space outside the blockchain storage system, such as a local storage space of a road condition collection, transmission or processing device, a storage space on a server, or a storage space on a cloud device, which is not limited in this example.
[0068] Next, the traffic data can be hashed to obtain the hash value of the traffic data. By performing hashing on the traffic data, the traffic data can be compressed into a summary, making the data volume smaller. The hash value is usually represented by a short string of random letters and numbers, and different data has different hash values.
[0069] In step 204, the on-chain traffic data may be obtained according to the address of the first storage space and the hash value of the traffic data. In this embodiment, the hash value of the traffic data has a small amount of data, so the obtained on-chain traffic data generates less storage pressure and data synchronization pressure on the blockchain storage system.
[0070] Based on this, when there is a need to access traffic data or verify traffic data, the address of the first storage space can be obtained from the acquired on-chain traffic data, and the first storage space can be accessed according to the address to obtain traffic data. In addition, after obtaining the traffic data stored in the first space, the hash value of the traffic data obtained from the first storage space can be calculated as the hash value to be verified, and the hash value to be verified can be compared with the hash value contained in the on-chain traffic data. If there is inconsistency, it can be considered that the traffic data stored in the first space has been modified. If there is a consistency, it can be considered that the traffic data stored in the first space has not been modified. It should be noted that when calculating the hash value of the traffic data obtained from the first storage space, the traffic data obtained from the first storage space can be sorted in advance according to the sorting rules used when performing processing operations on the on-chain traffic data before uploading, which will not be repeated.
[0071] In step 205, optionally, if the amount of traffic data is less than or equal to the set data amount threshold, it can be considered that the storage space occupied by the traffic data is small, and the traffic data can be directly used as on-chain traffic data and stored on a storage node in the blockchain storage system.
[0072] In step 206-step 209, based on the uplink traffic data obtained in the above steps, the hash value of the uplink traffic data can be calculated. Then, the first block body is generated according to the uplink traffic data and the hash value of the uplink traffic data. The hash value of the uplink traffic data can be used to verify the reliability of the uplink traffic data when verifying the uplink traffic data and using the uplink traffic data, so as to determine whether the uplink traffic data has been modified.
[0073] After obtaining the first block body, a first block header may be generated according to the hash value of the first block body and the hash value of the last block in the first blockchain. After obtaining the first block header and the first block body, a first data block may be generated. The last block in the first blockchain refers to the last block of the longest chain in the first blockchain, so that when there is a fork in the first blockchain, the newly generated data block is added to the longest chain.
[0074] In this embodiment, the traffic data includes road condition data and description information of the first device associated with the road condition data. The traffic data is stored in the blockchain storage system, so that multiple recording nodes in the blockchain storage system can jointly store the traffic data. In this implementation, on the one hand, the traceability of the traffic data can be improved based on the description information of the first device, and on the other hand, the authenticity of the traffic data can be effectively improved based on the distributed storage method of the blockchain storage system. Based on this, traffic data with high traceability and authenticity can provide good data support for the intelligent transportation system, which is conducive to improving the credibility of the intelligent transportation system.
[0075] In the above and below embodiments of the present application, Figure 2b As shown, the uplink traffic data may also include a timestamp, which can be used to monitor the time nodes of the traffic data in each link. Optionally, the timestamp may include a timestamp when the road condition data is collected, a timestamp when the road condition data is transmitted, a timestamp when the road condition data is processed, a timestamp when the uplink traffic data is generated, etc., which is not limited in this embodiment.
[0076] In the above and below embodiments of the present application, Figure 2b As shown, when obtaining the uplink traffic data, the uplink traffic data can be further signed with the private key of the first device, and the signature and the public key of the first device are added to the uplink traffic data. This signature operation can increase the reliability of the traffic data on the one hand, and improve the traceability of the traffic data on the other hand.
[0077] For example, when the first device is implemented as a sensor for collecting road condition data, the private key of the certificate assigned by the sensor manufacturer can be used to sign the uplink traffic data, and the public key of the certificate can be attached to the uplink traffic data. For another example, when the first device is implemented as a computer device for processing road condition data, the private key of the certificate assigned by the manufacturer of the computer device can be used to sign the uplink traffic data, and the public key of the computing device can be attached to the uplink traffic data.
[0078] Based on the above, before generating the first block body according to the on-chain traffic data, the on-chain traffic data may be further verified. Optionally, the verification device that performs the verification operation may be the first device described in the aforementioned embodiment, or may be a verification node in the blockchain storage system, which is not limited in this embodiment. However, for the convenience of description, the device that performs the verification operation may be described as a traffic data verification node.
[0079] In some exemplary embodiments, the traffic data verification node may obtain target data of the first block body to be generated. Figure 2c As shown, the hash value contained in the target data is removed, and the hash value of the remaining on-chain traffic data after removing the hash value is calculated; then, the calculated hash value is used as the hash value to be verified and compared with the hash value contained in the target data; if the two are consistent, it is determined that the on-chain traffic data contained in the target data has not been tampered with, and the authenticity and reliability of the traffic data are high; if the two are inconsistent, it can be considered that the on-chain traffic data contained in the target data has been tampered with.
[0080] In other exemplary embodiments, Figure 2c As shown, after the verification device obtains the uplink traffic data contained in the target data, the digital signature and public key in the uplink traffic data can be obtained. Then, the public key in the uplink traffic data contained in the target data is used to verify the digital signature in the uplink traffic data contained in the target data. If the verification is successful, the legitimacy of the public key in the uplink traffic data contained in the target data can be further verified. Optionally, the server that issues the certificate corresponding to the public key can verify whether the certificate corresponding to the public key is a legal integer. If yes, the uplink traffic data can be considered to be trusted uplink traffic data.
[0081] After the on-chain traffic data passes the above verification, the first block body can be generated according to the on-chain traffic data, which will not be repeated here.
[0082] Figure 3a is a flow chart of a data processing method provided by another exemplary embodiment of the present application, such as Figure 3a As shown, the method includes:
[0083] Step 301: Acquire traffic data, where the traffic data includes road condition data and description information of a first device associated with the road condition data.
[0084] Step 302: Send the traffic data to the first blockchain storage system for storage.
[0085] Step 303: Read the traffic data to be processed from the target data block in the first blockchain storage system according to the traffic data processing request.
[0086] Step 304: Perform a specified data processing operation on the traffic data to be processed to obtain a processing result.
[0087] Step 305: Upload the processing result to the second blockchain storage system for storage.
[0088] Among them, the optional implementation methods of step 301-step 302 can refer to the records of the previous embodiment and will not be repeated here.
[0089] In step 303, the traffic data processing request may be initiated by a traffic data processing node. The traffic data processing node may be any device or application that implements computing requirements in a specific scenario based on traffic data, and this example does not limit its implementation form. Optionally, the traffic data processing node may be implemented as a server, or an application node that encapsulates traffic data, or other devices with traffic data processing capabilities, which will not be described in detail.
[0090] For example, in one scenario, the dispatching equipment in the intelligent transportation system can initiate a traffic data processing request to adjust the traffic light time on the road according to the traffic flow information contained in the traffic data. For example, in another scenario, the traffic penalty platform in the intelligent transportation system can initiate a traffic data processing request to calculate which vehicles have violated the law based on the vehicle driving information and the working status of the traffic lights contained in the traffic data. For example, in another scenario, the electronic map navigation platform can initiate a traffic data processing request to calculate the time period with heavy traffic on the road based on the vehicle driving path and driving time contained in the traffic data, so as to provide users with better path optimization services.
[0091] Of course, the application scenarios listed above are only used to exemplify the scenarios for initiating traffic data processing requests, and do not constitute any limitation to the application scenarios of the technical solutions provided in the embodiments of the present application.
[0092] In this step, the traffic data to be processed is adapted to the data requirements of the traffic data processing request; the target data block refers to the data block storing the traffic data to be processed.
[0093] Optionally, when obtaining the traffic data to be processed from the target data block, the traffic data to be processed may be sorted according to the sorting rules used when the processing operation is performed on the traffic data to be processed before being uploaded to the chain, which will not be described in detail. Afterwards, the traffic data to be processed may be verified. For the convenience of description, the block header of the target data block is marked as the target block header, and the block body of the target data block is marked as the target block body.
[0094] Next, if Figure 3b As shown, the hash value of the target block body can be calculated as the hash value to be verified of the target block body; then, the hash value to be verified of the target block body is compared with the hash value contained in the target block header to verify whether the data of the target block body has been modified. If it has not been modified, the data in the target block body can continue to be verified. Optionally, the uplink traffic data can be taken out from the data contained in the target block body, and the hash value of the uplink traffic data can be calculated as the hash value to be verified of the uplink traffic data, and the hash value to be verified of the uplink traffic data can be compared with the hash value contained in the target block body. If the two are consistent, it is determined that the uplink traffic data contained in the target block body has not been tampered with, and the data is authentic and reliable.
[0095] In addition, optionally, Figure 3b As shown, after obtaining the up-chain traffic data contained in the target block body, the digital signature and public key in the up-chain traffic data can be obtained. Then, the public key in the up-chain traffic data contained in the target data is used to verify the digital signature in the up-chain traffic data contained in the target data. If the verification is successful, the legitimacy of the public key in the up-chain traffic data contained in the target data can be further verified. Optionally, the server that issues the certificate corresponding to the public key can verify whether the certificate corresponding to the public key is a legal integer. If yes, the up-chain traffic data can be considered to be trusted up-chain traffic data.
[0096] In step 304, after obtaining the traffic data to be processed, a specified data processing operation may be performed on the traffic data to be processed to obtain a processing result. The specified data processing operation is performed by the device or application that initiates the traffic data processor request, which will not be described in detail here.
[0097] In step 305, optionally, after obtaining the processing results, specific data processing operations may be performed on the data results, such as data mining operations, data structuring operations, etc., and reference may be made to the records of performing processing operations on traffic data in the aforementioned embodiments, which will not be repeated here.
[0098] Then, the processing result can be uploaded to the second blockchain storage system for storage. The first blockchain storage system and the second blockchain storage system can be the same blockchain storage system or different blockchain storage systems, which is not limited in this embodiment.
[0099] In this embodiment, traffic data and the processing results obtained by processing traffic data can be jointly recorded by multiple recording nodes in the blockchain storage system. Therefore, the authenticity and reliability of traffic data in each processing link can be guaranteed, which is conducive to providing good data support for the intelligent transportation system and further enhancing the credibility of the intelligent transportation system.
[0100] It should be noted that in the above or following embodiments of the present application, a variety of election mechanisms may be used to determine the nodes used to generate data blocks in the blockchain storage system. For example, a POW mechanism (Proof of Work), a POS (Proof of Stake), a DPOS (Delegated Proof of Stake), etc. may be used, and this embodiment does not limit this. Preferably, POS and DPOS mechanisms may be used preferentially to improve the efficiency of node selection, which will not be described in detail.
[0101] Figure 4 is a flowchart of a data processing method provided by another exemplary embodiment of the present application, such as Figure 4 As shown, the method includes:
[0102] Step 401: Acquire traffic data, where the traffic data includes road condition data and description information of a first device associated with the road condition data.
[0103] Step 402: Send the traffic data to the first blockchain in the first blockchain storage system for storage.
[0104] Step 403: Read the traffic data to be processed from the target data block in the first blockchain according to the traffic data processing request.
[0105] Step 404: Perform a specified data processing operation on the traffic data to be processed to obtain a processing result.
[0106] Step 405: Upload the processing result to the second blockchain in the second blockchain storage system for storage.
[0107] Among them, the first blockchain storage system and the second blockchain storage system can be the same blockchain storage system or different blockchain storage systems, which is not limited in this embodiment.
[0108] Among them, the first blockchain refers to the blockchain used to store traffic data, and the second blockchain refers to the blockchain used to store processing results. The terms "first" and "second" are used here for the convenience of description and distinction only.
[0109] The optional implementations of steps 401 to 404 may refer to the description of the aforementioned embodiments.
[0110] In step 403, the second blockchain may optionally store the processing progress of the traffic data. For example, each time a traffic data processing node uploads the processing result to the second blockchain for storage, the processing progress may be recorded in the second blockchain at the same time, so that other processing nodes can continue to process the traffic data according to the processing progress.
[0111] Optionally, the latest processing progress may be recorded according to the address of the latest processed data block in the first blockchain. The following is an exemplary description of the first traffic data processing node that performs the data processing operation first and the second traffic data processing node that performs the data processing operation later. It should be understood that the first traffic data processing node and the second traffic data processing node may be the same node or different nodes.
[0112] For example, in some possible application scenarios, the first traffic data processing node obtains traffic data from data block A1 in the first blockchain and performs specified data processing operations. After obtaining the processing result, data block B1 can be generated according to the processing result, and data block B1 is added after the last block of the longest chain in the second blockchain. At the same time, the first traffic data processing node can save the address of data block A1 in data block B1 to record the latest processing progress. Optionally, the address of data block A1 can be the hash value of data block A1.
[0113] Based on this, when the second traffic data processing node continues to perform data processing operations according to the latest processing progress, the progress record field, that is, the address field of data block A1, can be obtained from the last block of the longest chain in the second blockchain (the last block is data block B1 at this time). Then, traverse the data blocks in the first data chain and find the data block A1 corresponding to the address field. Then, obtain the traffic data to be processed from the next data block of data block A1 to continue the processing progress. Of course, after the second traffic data processing node uploads the processing results to the chain, it can also record the latest processing progress according to the latest processed data block, which will not be repeated here.
[0114] In step 405, the processing result is uploaded to the second blockchain for storage.
[0115] If the first blockchain storage system and the second blockchain storage system are the same blockchain storage system, optionally, the first blockchain and the second blockchain can be the same blockchain, that is, the processing results and the traffic data can be stored in the same blockchain in the same blockchain storage system.
[0116] Optionally, the first blockchain and the second blockchain can be different blockchains in the same blockchain storage system, that is, the processing results and traffic data are stored in different blockchains in the same blockchain storage system.
[0117] If the first blockchain storage system and the second blockchain storage system are different blockchain storage systems, then the first blockchain and the second blockchain are different blockchains, and the processing results and traffic data are stored in different blockchains.
[0118] The following will exemplify the optional implementation methods of storing the processing results and traffic data on different blockchains, or storing them on the same blockchain.
[0119] In some exemplary embodiments, the first blockchain and the second blockchain are different blockchains, and the processing results and traffic data are stored in different blockchains. The second blockchain can be a blockchain in the first blockchain storage system or a blockchain in the second blockchain storage system.
[0120] In step 405, optionally, the uplink result data can be obtained according to the processing result obtained in step 404. Among them, the method for generating the uplink result data can refer to the method for generating the uplink traffic data recorded in the above embodiment. For example, it can be pre-determined whether the data volume of the result to be processed is greater than the set data volume threshold. If it is greater, the processing result can be stored in the second storage space, and the uplink result data can be obtained according to the address of the second storage space and the hash value of the processing result; if it is less than or equal to, the uplink result data can be directly obtained according to the processing result and the hash value of the processing result.
[0121] Next, the hash value of the on-chain result data is calculated, and the second block body is generated according to the on-chain result data and its hash value, and the second block header is generated according to the hash value of the second block body and the hash value of the last block in the second blockchain. After obtaining the second block body and the second block header, the second data block can be obtained, and the second data block is added after the last block in the second blockchain. Among them, the last block in the second blockchain refers to the last block of the longest chain in the second blockchain.
[0122] Among them, "second" is used to limit the block body, block header and data block, which is used to distinguish them from the first block body, first block header and first data block generated in the process of uploading traffic data to the chain as recorded in the above embodiment, and does not limit their order or level.
[0123] Optionally, in some scenarios, the first blockchain can be described as a "data chain" and the second blockchain can be described as a "processing chain". The "dual chain" structure can meet the needs of more efficient and stable data processing.
[0124] In some other exemplary embodiments, the processing results and the traffic data are stored in the same blockchain. The first blockchain storage system and the second blockchain storage system are the same.
[0125] Among them, the method for generating the on-chain result data can refer to the records of the aforementioned steps and will not be repeated here.
[0126] In this implementation, a part of the fields may be reserved in the target data block for storing the processing results. For example, the target data block may reserve fields for storing the processing results, the hash value of the processing results, the signature of the traffic data processing node, the identification mark of the traffic processing node, and the public key of the traffic data processing node. Of course, this embodiment includes but is not limited to this.
[0127] Based on this, after obtaining the on-chain result data, the on-chain result data can be added to the reserved field of the target data block. After adding the on-chain result data, the target data block is updated. To ensure the reliability of the result data, in this step, the hash value of the updated target data block can be further obtained, and the hash value of the updated target data block can be added to the specified field of the next data block of the target data block. Based on this, after the target data block is updated, its corresponding hash value can be recorded by other data blocks, which can be used to verify whether the result data in the target data block has been modified in a specific scenario.
[0128] Optionally, in some embodiments, before generating the second block body according to the on-chain result data, the on-chain result data may also be verified. The verification method may refer to the verification process of the on-chain traffic data in the aforementioned embodiment, which will not be described in detail here.
[0129] Optionally, in some embodiments, the description information of the traffic data processing node can be added to the uplink result data to facilitate the subsequent tracing of the processor or processing environment of the traffic data. The description information of the traffic data processing node includes but is not limited to at least one of the following: the identification of the traffic data processing node, the parameter configuration when executing the specified processing, and the device environment when executing the specified processing, etc.
[0130] Optionally, in other embodiments, the hash value of the target data block and / or the traffic data to be processed may be appended to the processing result to facilitate subsequent tracing of the source of the traffic data to be processed.
[0131] Optionally, in some other embodiments, the private key of the traffic data processing node can be used to sign the on-chain result data containing the processing results and their hash values, and the obtained digital signature and the public key of the traffic data processing node can be attached to the on-chain result data containing the processing results and their hash values, so as to facilitate subsequent reliability verification of the processed results.
[0132] In this embodiment, the blockchain storage system adopts a dual-chain structure, and the traffic data and processing results are stored in the first blockchain and the second blockchain respectively. This dual-chain structure can effectively reduce the throughput and access pressure of the first blockchain, reduce the load of the first blockchain, and improve data processing efficiency.
[0133] Figure 5 is a flowchart of a data processing method provided by another exemplary embodiment of the present application, such as Figure 5 As shown, the method includes:
[0134] Step 501: Acquire traffic data, where the traffic data includes road condition data and description information of a first device associated with the road condition data.
[0135] Step 502: Send the traffic data to the first blockchain in the blockchain storage system for storage.
[0136] Step 503: Read the traffic data to be processed from the target data block in the first blockchain according to the traffic data processing request.
[0137] Step 504: Perform a specified data processing operation on the traffic data to be processed to obtain a processing result.
[0138] Step 505: Add the processing result to the reserved field of the target data block to upload the processing result to the first blockchain for storage.
[0139] In this embodiment, a part of the fields may be reserved in the target data block for storing the processing results. For example, the target data block may reserve fields for storing the processing results, the hash value of the processing results, the signature of the traffic data processing node, the identification mark of the traffic processing node, and the public key of the traffic data processing node.
[0140] Based on this, when the processing results and other data associated with the processing results, such as the signature, identification code, public key and other data of the traffic data processing node that generated the processing results, are obtained, the processing results and other data associated with them can be added to the reserved fields of the target data block accordingly.
[0141] After adding the processing result and other data associated with it, the target data block is updated. To ensure the reliability of the result data, in this embodiment, the hash value of the updated target data block can be further obtained, and the hash value of the updated target data block can be added to the specified field of the next data block of the target data block. Based on this, after the target data block is updated, its corresponding hash value can be recorded by other data blocks, which can be used to verify whether the result data in the target data block has been modified in a specific scenario.
[0142] Based on the above scheme of this embodiment, traffic data and processing results can be stored on a blockchain, which is conducive to centralized management of data on the one hand, and can save more block computing resources on the other hand. At the same time, the newly added processing results and their related data can also be recorded and supervised by other data blocks, which can effectively ensure the reliability of the newly added data.
[0143] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 201 to 204 can be device A; for another example, the execution subject of steps 201 and 202 can be device A, and the execution subject of step 203 can be device B; and so on.
[0144] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 201, 202, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0145] Figure 6 Schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. Figure 6 As shown, the electronic device includes: a memory 601 and a processor 602.
[0146] The memory 601 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0147] The processor 602 is coupled to the memory 601 and is used to execute the computer program in the memory 601, so as to: obtain traffic data, wherein the traffic data includes road condition data and description information of a first device associated with the road condition data; send the traffic data to a first blockchain storage system for storage; wherein the first device includes: a device for collecting, transmitting and / or processing the road condition data.
[0148] Further optionally, when the processor 602 sends the traffic data to the blockchain storage system for storage, it is specifically used to: generate a first block body according to the traffic data, and generate a first block header according to a hash value of the first block body and a hash value of the last block in the first blockchain of the blockchain storage system; obtain the first data block according to the first block body and the first block header; and add the first data block to after the last block in the first blockchain.
[0149] Further optionally, when the processor 602 generates the first block body according to the traffic data, it is specifically used to: if the data volume of the traffic data is greater than a set data volume threshold, store the traffic data in a first storage space and calculate a hash value of the traffic data; obtain uplink traffic data according to the address of the first storage space and the hash value of the traffic data; calculate the hash value of the uplink traffic data, and generate the first block body according to the uplink traffic data and the hash value of the uplink traffic data.
[0150] Further optionally, when the processor 602 generates the first block body according to the traffic data, it is specifically used to: obtain the uplink traffic data according to the traffic data if the data volume of the traffic data is less than or equal to the set data volume threshold; calculate the hash value of the uplink traffic data, and generate the first block body according to the uplink traffic data and the hash value of the uplink traffic data.
[0151] Further optionally, the processor 602 is also used to: attach the public key of the first device to the uplink traffic data to update the uplink traffic data; and digitally sign the updated uplink traffic data using the private key of the first device.
[0152] Further optionally, before generating the first block body according to the traffic data, the processor 602 is also used to: obtain target data for generating the first block body, calculate a hash value of the uplink traffic data contained in the target data as a hash value to be verified, and compare the hash value to be verified with the hash value contained in the target data; and / or, obtain a digital signature and a public key in the uplink traffic data contained in the target data, use the public key in the uplink traffic data contained in the target data to verify the digital signature in the uplink traffic data contained in the target data, and verify the legitimacy of the public key in the uplink traffic data contained in the target data.
[0153] Further optionally, the processor 602 is also used to: read the traffic data to be processed from the target data block in the blockchain storage system according to the traffic data processing request; perform a specified data processing operation on the traffic data to be processed to obtain a processing result; and upload the processing result to the second blockchain storage system for storage.
[0154] Further optionally, when uploading the processing result to the second blockchain storage system for storage, the processor 602 is specifically used to: obtain on-chain result data according to the processing result; generate a second block body according to the on-chain result data, and generate a second block header according to a hash value of the second block body and a hash value of the last block in the second blockchain in the second blockchain storage system; obtain a second data block according to the second block body and the second block header; and add the second data block to after the last block in the second blockchain.
[0155] Further optionally, when the processor 602 uploads the processing result to the second blockchain storage system for storage, it is specifically used to: obtain the on-chain result data according to the processing result; add the on-chain result data to the reserved field of the target data block to update the target data block; obtain the updated hash value of the target data block, and add the updated hash value of the target data block to the designated field of the next data block of the target data block.
[0156] Further optionally, the processor 602 is also used to: obtain the public key and private key of a second device that performs the data processing operation on the traffic data to be processed; use the private key of the second device to sign the uplink result data, and attach the signature of the second device and the public key of the second device to the uplink result data.
[0157] Further optionally, the processor 602 is further configured to: append the hash value of the target data block and / or the traffic data to be processed to the processing result.
[0158] Further, if Figure 6 As shown, the electronic device also includes: a communication component 603, a display 604, a power supply component 605 and other components. Figure 6 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 6 Components shown.
[0159] In this embodiment, the traffic data includes road condition data and description information of the first device associated with the road condition data. The traffic data is stored in the blockchain storage system, so that multiple recording nodes in the blockchain storage system can jointly store the traffic data. In this implementation, on the one hand, the traceability of the traffic data can be improved based on the description information of the first device, and on the other hand, the authenticity of the traffic data can be effectively improved based on the distributed storage method of the blockchain storage system. Based on this, traffic data with high traceability and authenticity can provide good data support for the intelligent transportation system, which is conducive to improving the credibility of the intelligent transportation system.
[0160] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by an electronic device in the above method embodiment.
[0161] Figure 7 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application is shown. Figure 7 As shown, the electronic device includes: a memory 701 and a processor 702.
[0162] The memory 701 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0163] The processor 702 is coupled to the memory 701 and is used to execute the computer program in the memory 701 to: obtain traffic data, the traffic data including road condition data and description information of a first device associated with the road condition data; send the traffic data to a first blockchain storage system for storage; read the traffic data to be processed from a target data block in the first blockchain storage system according to a traffic data processing request; perform a specified data processing operation on the traffic data to be processed to obtain a processing result; and upload the processing result to a second blockchain storage system for storage.
[0164] Further, if Figure 7 As shown, the electronic device also includes: a communication component 703, a display 704, a power supply component 705 and other components. Figure 7 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 7 Components shown.
[0165] In this embodiment, traffic data and the processing results obtained by processing traffic data can be jointly recorded by multiple recording nodes in the blockchain storage system. Therefore, the authenticity and reliability of traffic data in each processing link can be guaranteed, which is conducive to providing good data support for the intelligent transportation system and further enhancing the credibility of the intelligent transportation system.
[0166] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by an electronic device in the above method embodiment.
[0167] Figure 8 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application is shown. Figure 8 As shown, the electronic device includes: a memory 801 , a processor 802 and a communication component 803 .
[0168] The memory 801 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0169] The processor 802 is coupled to the memory 801 and is used to execute the computer program in the memory 801, so as to: obtain traffic data, wherein the traffic data includes road condition data and description information of a first device associated with the road condition data; send the traffic data to a first blockchain in a first blockchain storage system for storage; read the traffic data to be processed from a target data block in the first blockchain according to a traffic data processing request; perform a specified data processing operation on the traffic data to be processed to obtain a processing result; and upload the processing result to a second blockchain in a second blockchain storage system for storage.
[0170] Further, if Figure 8 As shown, the electronic device also includes: a communication component 803, a display 804, a power supply component 805 and other components. Figure 8 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 8 Components shown.
[0171] In this embodiment, the blockchain storage system adopts a dual-chain structure, and the traffic data and processing results are stored in the first blockchain and the second blockchain respectively. This dual-chain structure can effectively reduce the throughput and access pressure of the first blockchain and reduce the load of the first blockchain.
[0172] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by an electronic device in the above method embodiment.
[0173] Fig. 9 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application is shown. Fig. 9 As shown, the electronic device includes: a memory 901 and a processor 902 .
[0174] The memory 901 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0175] The processor 902 is coupled to the memory 901 and is used to execute the computer program in the memory 901, so as to: obtain traffic data, wherein the traffic data includes road condition data and description information of a first device associated with the road condition data; send the traffic data to a first blockchain in a blockchain storage system for storage; read the traffic data to be processed from a target data block in the first blockchain according to a traffic data processing request; perform a specified data processing operation on the traffic data to be processed to obtain a processing result; and add the processing result to a reserved field of the target data block to upload the processing result to the first blockchain for storage.
[0176] Further, if Fig. 9 As shown, the electronic device also includes: and other components such as a communication component 903, a display 904, and a power supply component 905. Fig. 9 Only some components are shown schematically, which does not mean that the electronic device only includes Fig. 9 Components shown.
[0177] In this embodiment, traffic data and processing results can be stored on a blockchain, which is conducive to centralized data management on the one hand, and can save more block computing resources on the other hand. At the same time, the newly added processing results and their related data can also be recorded and supervised by other data blocks, which can effectively ensure the reliability of the newly added data.
[0178] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by an electronic device in the above method embodiment.
[0179] Above Figure 6-Figure 9 The memory in can be implemented by any type of volatile or non-volatile storage device or a combination of them, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0180] Above Figure 6-Figure 9 The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can be implemented based on near field communication (NFC) technology, radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0181] Above Figure 6-Figure 9 The display in the embodiment includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0182] Above Figure 6-Figure 9 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0183] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0184] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0185] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0187] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0188] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0189] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0190] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0191] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A data processing method, characterized in that: include: Acquire traffic data, where the traffic data includes road condition data and description information of a first device associated with the road condition data; The traffic data is sent to a first blockchain storage system for storage; wherein the first device includes: a device for collecting, transmitting and / or processing the road condition data; the description information of the first device is used to describe the first device, including: identification description information of the first device, state description information of the first device and attribute description information of the first device; the state description information of the first device and the attribute description information of the first device are used to support the calculation of relevant indicators in the traffic scenario based on the road condition data; Reading the traffic data to be processed from the target data block in the first blockchain storage system according to the traffic data processing request; Performing a specified data processing operation on the traffic data to be processed to obtain a processing result; Uploading the processing result to the second blockchain storage system for storage; Wherein, uploading the processing result to the second blockchain storage system for storage includes: Obtaining on-chain result data according to the processing result; Adding the uplink result data to the reserved field of the target data block to update the target data block; The updated hash value of the target data block is obtained, and the updated hash value of the target data block is added to a designated field of a data block next to the target data block.
2. The method according to claim 1, characterized in that Sending the traffic data to the first blockchain storage system for storage includes: Generate a first block body according to the traffic data, and generate a first block header according to a hash value of the first block body and a hash value of a last block in the first blockchain of the first blockchain storage system; Obtaining a first data block according to the first block body and the first block header; Add the first data block after the last block in the first blockchain.
3. The method according to claim 2, characterized in that Generating a first block according to the traffic data includes: If the data volume of the traffic data is greater than a set data volume threshold, the traffic data is stored in a first storage space, and a hash value of the traffic data is calculated; Obtaining on-chain traffic data according to the address of the first storage space and the hash value of the traffic data; Calculate the hash value of the uplink traffic data, and generate the first block body according to the uplink traffic data and the hash value of the uplink traffic data.
4. The method according to claim 2, characterized in that: Generating a first block according to the traffic data includes: If the data volume of the traffic data is less than or equal to the set data volume threshold, obtaining uplink traffic data according to the traffic data; Calculate the hash value of the uplink traffic data, and generate the first block body according to the uplink traffic data and the hash value of the uplink traffic data.
5. The method according to claim 3 or 4, characterized in that: Also includes: Adding the public key of the first device to the uplink traffic data to update the uplink traffic data; The updated on-chain traffic data is digitally signed using the private key of the first device.
6. The method according to claim 5, characterized in that Before generating the first block according to the traffic data, the method further includes: Obtaining target data for generating the first block body, calculating a hash value of the on-chain traffic data contained in the target data as a hash value to be verified, and comparing the hash value to be verified with the hash value contained in the target data; and / or, Obtain the digital signature and the public key in the uplink traffic data contained in the target data, use the public key in the uplink traffic data contained in the target data to verify the digital signature in the uplink traffic data contained in the target data, and verify the legitimacy of the public key in the uplink traffic data contained in the target data.
7. The method according to claim 1, characterized in that Uploading the processing result to the second blockchain storage system for storage includes: Obtaining on-chain result data according to the processing result; Generate a second block body according to the on-chain result data, and generate a second block header according to a hash value of the second block body and a hash value of the last block in the second blockchain in the second blockchain storage system; Obtaining a second data block according to the second block body and the second block header; Add the second data block after the last block in the second blockchain.
8. The method according to claim 7, characterized in that Also includes: Acquire a public key and a private key of a second device that performs the data processing operation on the traffic data to be processed; The on-chain result data is signed using the private key of the second device, and the signature of the second device and the public key of the second device are appended to the on-chain result data.
9. The method according to claim 7, characterized in that: Also includes: The hash value of the target data block and / or the traffic data to be processed are appended to the processing result.
10. A data processing device, characterized in that: include: Memory and processor; The memory is used to store one or more computer instructions; The processor is used to execute the one or more computer instructions to: execute the steps in the data processing method according to any one of claims 1-9.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the steps in the data processing method according to any one of claims 1 to 9 can be implemented.
