Interaction method and device, electronic equipment, storage medium and program product
By using the root and leaf blocks of the target blockchain in the operational data of vehicles and CNC machine tools, combined with the Merkle tree mechanism for data verification, the problems of equipment operation data security and query efficiency are solved, and efficient and secure data management and query are achieved.
Patent Information
- Application Number
- CN202511157519.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-11-21
AI Technical Summary
The security and query efficiency of operational data from vehicles and CNC machine tools are difficult to guarantee, especially with large amounts of data and multiple categories of data, making accurate management and querying challenging.
The target blockchain is generated by using the root block and leaf blocks of the target blockchain to represent the running state data. The proof block is determined based on the matching results of the query data items and the state data items to verify authenticity, avoiding full data query and improving security and efficiency.
It enables secure management of runtime status data, improves query efficiency, avoids information leakage and computational overhead, and meets the verification requirements of query objects.
Smart Images

Figure CN120995508A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to the fields of big data, blockchain, and intelligent search. Background Technology
[0002] Operational data generated by equipment such as vehicles and CNC machine tools can be recorded during operation, allowing relevant personnel to perform maintenance based on the recorded data to ensure normal operation. Furthermore, personnel can accurately assess the health status and remaining value of the equipment by querying its operational data. Summary of the Invention
[0003] This disclosure provides an interaction method, apparatus, electronic device, storage medium, and program product.
[0004] According to one aspect of this disclosure, an interaction method is provided, comprising: in response to receiving a target request from a query object, determining a target blockchain that matches a query data item indicated by the target request, wherein the root block and leaf blocks of the target blockchain represent the operating status data of a target device and a status data item in the operating status data, respectively; determining a proof block corresponding to the query data item from the target blockchain based on the matching result between the query data item and the status data item; verifying the authenticity of the query data item based on the proof block, obtaining a verification result, and pushing the verification result to the query object.
[0005] According to another aspect of this disclosure, an interactive device is provided, comprising: a target blockchain determination module, configured to, in response to receiving a target request from a query object, determine a target blockchain that matches a query data item indicated by the target request, wherein the root block and leaf blocks of the target blockchain represent the operating status data of a target device and a status data item in the operating status data, respectively; a proof block determination module, configured to, based on the matching result between the query data item and the status data item, determine a proof block corresponding to the query data item from the target blockchain; and a verification module, configured to, based on the proof block, verify the authenticity of the query data item, obtain a verification result, and push the verification result to the query object.
[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the methods provided in the embodiments of this disclosure.
[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods provided in embodiments of this disclosure.
[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods provided in embodiments of this disclosure.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0011] Figure 1 This illustration schematically shows an exemplary system architecture to which interactive methods and apparatus can be applied according to embodiments of the present disclosure;
[0012] Figure 2 A flowchart illustrating an interaction method according to an embodiment of the present disclosure is shown schematically;
[0013] Figure 3 A schematic diagram illustrating the structure of a first target blockchain according to an embodiment of this disclosure is shown.
[0014] Figure 4 A schematic diagram illustrating the principle of an interaction method according to an embodiment of the present disclosure is shown.
[0015] Figure 5 The illustration schematically shows a principle diagram for determining a target blockchain according to an embodiment of the present disclosure;
[0016] Figure 6 A block diagram of an interactive device according to an embodiment of the present disclosure is schematically shown; and
[0017] Figure 7 A schematic block diagram of an example electronic device is shown that can be used to implement the interactive methods of embodiments of the present disclosure. Detailed Implementation
[0018] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0019] In the technical solution disclosed herein, the acquisition, storage, and application of user personal information comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and there is no violation of public order and good morals.
[0020] The inventors discovered that the security of operational data from equipment such as vehicles and CNC machine tools is crucial to traffic safety, production efficiency, and enterprise operating costs. For example, vehicle mileage data and fault alarm data have a significant impact on vehicle safety and residual value. However, due to the large volume and diverse categories of operational data from these devices, it is difficult to accurately guarantee both the security of the operational data and the efficiency of querying it.
[0021] Embodiments of this disclosure provide an interaction method, apparatus, electronic device, storage medium, and program product. The interaction method includes: in response to receiving a target request from a query object, determining a target blockchain that matches a query data item indicated by the target request, wherein the root block and leaf blocks of the target blockchain represent the operating status data of a target device and the status data item in the operating status data, respectively; determining a proof block corresponding to the query data item from the target blockchain based on the matching result between the query data item and the status data item; verifying the authenticity of the query data item based on the proof block, obtaining a verification result, and pushing the verification result to the query object.
[0022] According to embodiments of this disclosure, after receiving a target request from a querying object, by determining a target blockchain that matches the query data item indicated by the target request, multiple leaf blocks in the target blockchain can represent the operating status data of the target device, thereby storing the transitional state data based on the target blockchain to prevent the state data item from being tampered with. Simultaneously, based on the matching result between the query data item and the state data item, a proof block is determined to prove that the query data item has not been tampered with, and the authenticity of the query data item is verified based on the proof block. This allows for the verification of the query data item indicated by the target request from the querying object based on a portion of the block data in the target blockchain, avoiding information leakage caused by granting query access to all multiple state data items in the operating status data to the querying object. This improves query efficiency while more accurately managing the security of multiple state data items in the operating status data, thereby enhancing the security of the target device's operating status data and meeting the querying object's verification requirements for state data items.
[0023] Figure 1 The illustration schematically depicts an exemplary system architecture to which interactive methods and apparatus can be applied according to embodiments of the present disclosure.
[0024] It is important to note that Figure 1The examples shown are merely examples of system architectures that can be applied to embodiments of this disclosure, intended to help those skilled in the art understand the technical content of this disclosure. However, they do not imply that embodiments of this disclosure cannot be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture to which interactive methods and devices can be applied may include a terminal device, but the terminal device may implement the interactive methods and devices provided by embodiments of this disclosure without interacting with a server.
[0025] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0026] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (for example only).
[0027] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0028] Server 105 can be a server that provides various services, such as a backend management server that supports the content browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0029] It should be noted that the interaction method provided in the embodiments of this disclosure can generally be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103. Correspondingly, the interaction device provided in the embodiments of this disclosure can also be disposed in the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0030] Alternatively, the interaction method provided in this embodiment can generally be executed by server 105. Correspondingly, the interaction device provided in this embodiment can generally be located in server 105. The interaction method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the interaction device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0031] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0032] Figure 2 A flowchart illustrating an interaction method according to an embodiment of this disclosure is shown schematically.
[0033] like Figure 2 As shown, the interaction method includes operations S210~S230.
[0034] In operation S210, in response to receiving a target request for a query object, the target blockchain that matches the query data item indicated by the target request is determined.
[0035] In operation S220, based on the matching result between the query data item and the state data item, the proof block corresponding to the query data item is determined from the target blockchain.
[0036] In operation S230, the authenticity of the queried data item is verified based on the proof block, the verification result is obtained, and the verification result is pushed to the queried object.
[0037] According to embodiments of this disclosure, the query target can be a user who needs to query specific query data items of the target device's operating status data. For example, the query target can be a vehicle seller, and the query data item indicated by the target request can be the mileage status data of the target vehicle.
[0038] According to embodiments of this disclosure, the target blockchain is used to record the operating status data of the target device. The operating status data may include multiple status item data. For example, the status item data may be a status item field and a data value field (mile, 10000) representing the mileage status data, where mile can be a status item field and 10000 is a data value field representing 10000 miles of mileage.
[0039] It should be noted that the status item data may include associated status item fields and numerical fields, or the status item data may include either a status item field or a numerical field. The embodiments of this disclosure do not limit the specific data type of the status item data.
[0040] According to embodiments of this disclosure, the root block and leaf blocks of the target blockchain represent the operating status data of the target device and the status data items within the operating status data, respectively. For example, the root block is determined by fusing multiple status data items from the operating status data, and the leaf blocks can be encrypted data representing the status data items. By storing multiple status data items from the operating status data in the root block based on the blockchain mechanism, and storing encrypted data representing multiple status data items in multiple leaf blocks respectively, the target blockchain can preserve all the information of the operating status data relatively completely. Furthermore, based on the intermediate blocks between the leaf blocks and the root block in the target blockchain, it is possible to verify relatively accurately whether the status data items have been tampered with, thereby ensuring the data security of the diverse status data items in the operating status data.
[0041] In some embodiments, the leaf block matching the query data item can be determined from the target blockchain by matching the data item attributes between the query data item and the state data item. The leaf block, root block, and intermediate blocks between the leaf block and the root block are used as proof blocks. Thus, based on the blockchain mechanism, processing results can be obtained by processing the proof block, root block, and leaf block matching the query data item, and comparing these results with the query data item to determine the consistency verification result of whether the query data item matches the state data item. This achieves authenticity verification of the query data item based on the proof block. If the consistency verification result indicates that the query data item matches the state data item, it can be determined that the query data item represents the true state generated by the target device during operation. If the consistency verification result indicates that the query data item does not match the state data item, it is determined that the query data item to be verified is modified data and does not match the operating state of the target device. This allows for the verification of the authenticity of status data items within the runtime status data without exposing all multiple status data items to the query object. This improves query efficiency while avoiding the need to call the full runtime status data for verification, thereby enhancing the security of the target device's runtime status data and meeting the query object's verification requirements for status data items.
[0042] In some embodiments, the data item attributes of a status data item include at least one of the following: fault status attribute, device operation behavior attribute, and device motion status attribute.
[0043] According to embodiments of this disclosure, a fault status data item having a fault status attribute can represent the fault status of a target device or any device within the target device.
[0044] For example, the fault status data item can be a field representing fault status attributes such as "abnormal power of equipment motor" or "risk of pipeline leakage".
[0045] According to embodiments of this disclosure, a device operation behavior data item having device operation behavior attributes can represent device operation behavior for a target device.
[0046] For example, equipment operation behavior data items can be fields or data values that characterize operation behavior, such as steering angle, brake pedal depth, and accelerator pedal depth.
[0047] According to embodiments of this disclosure, a device motion state data item having device motion state attributes can represent motion state-related data such as speed, acceleration, and vibration frequency of the target device or a device in the target device.
[0048] For example, equipment motion status data items could include motor vibration frequency values, etc.
[0049] It should be noted that the same data item attribute can include multiple attribute types. For example, the device motion status attribute can include multiple attribute types such as speed type, acceleration type, and vibration frequency type. A status data item can include an attribute type field representing the attribute type, and a data item value corresponding to the attribute type field. For example, a status data item could be: "a1,1", where a1 is the acceleration type field and 1 is the acceleration value as the data item value.
[0050] In some embodiments, multiple status items in the operational status data can be data with multiple data item attributes associated with a time attribute. For example, the operational status data can be fault status data items, equipment operation signal data items, equipment operating temperature data items, and equipment operating power data items related to the target time period "January 1st, 11:10 AM". The target blockchain is generated by storing the fault status data items, equipment operation signal data items, equipment operating temperature data items, and equipment operating power data items in the operational status data into leaf blocks based on a blockchain mechanism, and generating a root block that integrates multiple status data items. The target request of the query object can carry the query data item attribute "fault status attribute" and the time attribute representing the target time period. Based on the "fault status attribute", the leaf blocks related to the fault status data items in the target blockchain can be determined, and authenticity verification is performed based on the leaf blocks, root block, and proof block. The verification result is determined to be a fault status data item representing authenticity. Therefore, by pushing authentic fault status data items as verification results to the query object, the query efficiency of the query object is improved.
[0051] In some embodiments, the leaf blocks of the target blockchain are the hash values of data items obtained by hashing state data items, and the root block is determined by fusing the hash values of data items corresponding to multiple state data items in the running state data based on the Merkle tree mechanism.
[0052] Figure 3 A schematic diagram illustrating the structure of a first target blockchain according to an embodiment of this disclosure is shown.
[0053] like Figure 3 As shown, the first target blockchain 300 may include multiple blocks, where leaf blocks h1, h2, h3, and h4 can be hash values representing four state data items f1 to f4, respectively. The hash values of the data items represented by the leaf blocks h1, h2, h3, and h4 are merged using a Merkle tree mechanism to obtain the root block h0. For example, leaf blocks h1 and h2 are merged using a hash algorithm to obtain the first intermediate block h12, and leaf blocks h3 and h4 are merged using a hash algorithm to obtain the second intermediate block h34. The root block h0 is obtained by merging the first intermediate block h12 and the second intermediate block h34 using a hash algorithm.
[0054] In some embodiments, the interaction method may further include: receiving ciphertext of the running status from the target device; and decrypting the ciphertext of the running status to obtain a target blockchain related to the running status data.
[0055] In some embodiments, the target blockchain is determined by the target device hashing multiple state data items in the received operational state data based on a Merkle tree mechanism.
[0056] Example 1: The target device is the target vehicle. The processor of the target vehicle can generate ciphertext of the running status related to the running status data based on the following operations.
[0057] 1. For each state data item field fi in the running state data D={f1,f2,……,fn}, perform hash processing to obtain the hash value {h1,h2,……,hn} corresponding to each state data item.
[0058] 2. Based on the hash values {h1,h2,……,hn} corresponding to each state data item, the leaf blocks of the blockchain are used. The intermediate blocks are obtained by merging them in pairs using the Merkle tree mechanism. The root block is then constructed based on the intermediate blocks: root=Merkle([h1,……,hn]), where Merkle() represents the Merkle tree algorithm.
[0059] 3. Concatenate the blockchain M containing the root block, the unique identifier VIN of the target vehicle, and the timestamps related to the operational status data to generate the signature content Payload = M || VIN || timestamp. Perform a signing operation on this signature content to obtain the operational status data signature signature = Sign(Payload, Key), where Key_pri represents the key. The operational status data signature signature is sent to the server as the operational status ciphertext. The server decrypts the operational status data signature signature based on the key to obtain the blockchain M, allowing the query target to verify the data items by sending a target request to the server. This improves the data security of the operational status data by allowing verification of the required status data items for the query target even when querying only a portion of the operational status data.
[0060] In another embodiment 2, the target vehicle can be used as the target device, and the target device can send the following encrypted data A to the server so that the server can receive the encrypted running status.
[0061] The encrypted data A includes: a signature for the running status data, the encrypted running status data, the root block, the time attribute information of the running status data, and the vehicle identifier of the target vehicle. The server can generate the target blockchain by decrypting the encrypted running status data and verifying multiple status data items in the running status data against the root block, thereby verifying that the running status data uploaded by the target vehicle is genuine.
[0062] In some embodiments, multiple blocks in the target blockchain have edge relationships, which can represent the computation path of obtaining the root block by merging multiple state data items.
[0063] Based on the matching results between the query data item and the state data item, determining the proof block corresponding to the query data item from the target blockchain may include: determining the query leaf block related to the query data item from the target blockchain based on the matching results; and determining multiple proof blocks with edge relationships to the query leaf block from the target blockchain based on edge relationships.
[0064] According to embodiments of this disclosure, multiple state data items correspond to multiple leaf blocks respectively. Based on the target data item that matches the query data item indicated by the matching result, the leaf block that matches the target data item can be determined as the query leaf block.
[0065] For example, if the query data item is "engine overheating fault alarm", the leaf block representing "engine overheating fault alarm" can be determined from multiple leaf blocks as the query leaf block.
[0066] According to embodiments of this disclosure, multiple proof blocks are used to obtain the root block through data fusion with query leaf blocks. For example, the proof blocks can be determined from leaf blocks and multiple intermediate blocks based on a Merkle tree proof mechanism. The number of multiple proof blocks is less than the number of blocks in the target blockchain. This avoids fusing all blocks of the target blockchain to verify the authenticity of the query data items, thereby improving the computational efficiency of obtaining verification results and reducing the computational overhead of satisfying the target request of the query object. Simultaneously, it avoids verifying the authenticity of all status data items in the runtime status data, thus avoiding additional computational overhead and information leakage, and improving the security of the target device's runtime status data.
[0067] For example, the root block is represented as h0 = Hash(Hash(Hash(f1)+Hash(f2))+Hash(Hash(f3)+Hash(f4))); multiple leaf blocks are represented as Hash(f1), Hash(f2), Hash(f3), and Hash(f4), where f1 to f4 are four different state data items in the running state data. The first intermediate block is Hash(Hash(f1)+Hash(f2)), and the second intermediate block is Hash(Hash(f3)+Hash(f4)). If the query for a leaf block is Hash(f3) that matches state data f3, it can be determined that the proof blocks are Hash(f4) that matches state data f4, and the first intermediate block is Hash(f1)+Hash(f2)).
[0068] The authenticity is verified by fusing the hash value Hash(fa3) corresponding to the query data item fa3 with the leaf block Hash(f4). This results in intermediate data Hash(Hash(fa3)+Hash(f4)). Then, by fusing the intermediate data Hash(Hash(fa3)+Hash(f4)) and Hash(Hash(f1)+Hash(f2)), another intermediate data Hash(Hash(f1)+Hash(f2))+Hash(Hash(fa3)+Hash(f4))) is obtained. Finally, the root block h0 is matched with this other intermediate data Hash(Hash(f1)+Hash(f2))+Hash(f3)+Hash(f4))) for verification. If the verification results match, it can be determined that the query data item fa3 indicated by the target request matches the status data item f3, indicating that the query data item has not been tampered with. Therefore, the authenticity of the queried data items can be verified based on multiple proof blocks determined by the Merkel proof mechanism, so as to avoid the redundancy of computational overhead and the risk of data leakage caused by the full running state data participating in the authenticity verification.
[0069] According to embodiments of this disclosure, the edge relationships of the target blockchain indicate the hierarchical attributes of each of the multiple proof blocks, and the query leaf block has an Nth-level attribute, where N is an integer greater than 1. For example, the leaf block has an Nth-level attribute, and the root block has a 1st-level attribute.
[0070] In some embodiments, verifying the authenticity of a query data item based on a proof block may include: fusing data with the nth intermediate data based on the nth proof block having the nth level attribute to obtain the (n-1)th intermediate data, where N ≥ n > 1; and, in the case of N = n = 2, verifying authenticity based on the data matching result between the first intermediate data and the root block to obtain a verification result.
[0071] In some embodiments, the Nth intermediate data is determined based on the query data item, for example, by performing a hash calculation on the query data item. The first intermediate data can be data representing the root block obtained by fusing the query data item and the proof block based on a Merkle tree mechanism. By matching the first intermediate data with the root block, the authenticity of the query data item can be determined based on the matching result. For example, if the matching result representations match, the query data item can be determined to be a genuine state data item; if the matching result representations do not match, the query data item can be determined to be a tampered state data item.
[0072] Figure 4 A schematic diagram illustrating the principle of an interaction method according to an embodiment of the present disclosure is shown.
[0073] like Figure 4 As shown, the query data item indicated by the target request is f3'. The eight leaf blocks a1 to a8 in the second target blockchain 400 represent eight different status data items in the target device's operating status data. For example, the eight different status data items f1 to f8 can be encrypted using a preset encryption algorithm to obtain the eight leaf blocks a1 to a8. The preset encryption algorithm can be represented as A(), ai = A(fi), i = 1, 2... 8. The intermediate blocks in the second target blockchain 400 can be determined by merging the blocks of the next level that have edge relationships. For example, intermediate block a14 is determined by merging intermediate blocks a12 and a34 with third-level attributes.
[0074] Based on the query data item f3' indicated by the target request of the query object, the query leaf block can be determined to be a3. Based on the edge relationships between multiple blocks in the second target blockchain 400, the multiple proof blocks corresponding to the query leaf block a3 can be determined as follows: the fourth proof block a4 with fourth-level attributes, the third proof block a12 with third-level attributes, and the second proof block a58 with second-level attributes.
[0075] When N=n=4, the query data item f3' is processed based on the preset encryption algorithm A() to obtain the fourth intermediate data fa3=A(f3'). The fourth intermediate data fa3 and the fourth proof block a4 are fused to obtain the third intermediate data fa34.
[0076] When N=n=3, the third intermediate data fa34 and the third proof block a12 are fused to obtain the second intermediate data fa14.
[0077] When N=n=2, the second intermediate data fa14 and the second proof block a58 are fused to obtain the first intermediate data fa18. The first intermediate data fa18 is then matched with the root block a0 to obtain the matching result. If the matching result indicates a match, the query data item f3' indicated by the target request is a genuine state data item in the target device's operational state data. If the matching result indicates a mismatch, the query data item f3' is a tampered state data item. Therefore, by obtaining the corresponding proof blocks at each level of the target blockchain, a smaller number of proof blocks can be obtained for authenticity verification, reducing the amount of data required for authenticity verification calculations and saving computational overhead. Simultaneously, by granting partial data access to the target object based on the query data item, the data security risks of the full operational state data can be avoided.
[0078] In some embodiments, determining the target blockchain that matches the query data item indicated by the target request may include: determining a target operating state topology corresponding to the query data item attribute from a plurality of preset operating state topologies based on the query data item attribute of the query data item; and determining the target blockchain representing the operating state data based on the target node that matches the query data item from a plurality of preset nodes of the target operating state topology.
[0079] According to embodiments of this disclosure, multiple preset nodes in a preset running state topology represent multiple preset running state data corresponding to the same preset data item attributes, and the preset running state data corresponds to a preset blockchain.
[0080] For example, multiple preset operational status data related to the fault status attribute within a preset time period all contain fault status data items with the fault status attribute. Using a blockchain mechanism, these multiple preset operational status data are calculated and stored separately, resulting in preset blockchains corresponding to each set of preset operational status data. Arranging these multiple preset blockchains related to the fault status attribute according to the collection time attribute corresponding to the preset operational status data, and establishing a mapping relationship between the preset blockchains and preset nodes, allows us to determine the preset operational status topology with multiple preset nodes. The topological relationship between the preset nodes in the preset operational status topology can represent the temporal relationship between the multiple preset nodes.
[0081] In some embodiments, the matching result between the query data item attribute and the preset data item attribute can determine the target running state topology corresponding to the query data item attribute. Based on the time range attribute represented by the query data item attribute, one or more target nodes related to the time range attribute can be determined from the target running state topology as target nodes that match the query data item.
[0082] In some embodiments, the target node matching the query data item can be determined from the target running state topology based on the specific data item type represented by the query data item attribute.
[0083] For example, if the query data item attribute is the engine fault type in the fault status attribute, a preset node related to the engine fault type can be determined as the target node based on the target operating state topology related to the fault status attribute. The preset operating state data corresponding to the target node includes engine fault data items corresponding to the engine fault type and battery fault data items related to the battery fault type. By determining the proof block related to the query data item from the target blockchain corresponding to the target node according to the method provided in the embodiments of this disclosure, and performing authenticity verification on the query data item based on the proof block, it is possible to determine whether the engine fault status data requested by the target is real data based on the verification result. This enables the rapid query to find the proof block that can perform authenticity verification to respond to the target request, improving the verification efficiency of the query object for different types of query data items.
[0084] In one example, a preset node can be obtained by hashing the root block corresponding to the target device's operational status data.
[0085] For example, the root block root_i, collection timestamp timestamp_i and device identifier VIN_i of the running status data Di can be hashed based on the following formula (1) to obtain the preset node N_i.
[0086] N_i = H(root_i || timestamp_i || VIN_i) (1).
[0087] For each data item attribute corresponding to multiple status data items in the operational status data Di, a predefined node is assigned an attribute index that matches the data item attribute to facilitate the construction of a predefined operational status topology corresponding to the predefined data item attributes. For example, a fault status index C_pr, a device component index Z_pr, and a device motion status index S_pr can be assigned to the fault status attribute, device component attribute, and device motion status attribute, respectively. The device component attribute represents a status data item generated for the same component in the target device, such as a fault status data item for a battery component or a power consumption curve record data item for a battery component.
[0088] Preset nodes can be stored based on the following data structure to facilitate the determination of target nodes according to the query data item attributes.
[0089] The data structure of the preset node includes: N_i = H(root_i || timestamp_i || VIN_i), and index indicators C_pr, Z_pr and S_pr.
[0090] Figure 5 The illustration schematically shows a principle diagram for determining a target blockchain according to an embodiment of the present disclosure.
[0091] like Figure 5 As shown, preset nodes corresponding to multiple operating status data can be set in multiple preset operating status topologies according to preset data item attributes. The preset operating status topologies can represent the temporal relationships between multiple preset nodes based on a directed acyclic graph structure. The operating status data corresponding to multiple preset nodes in the same preset operating status topology includes status data items that match the corresponding preset data item attributes. For example, multiple nodes in the first preset operating status topology L510 are related to engine status attributes, multiple nodes in the second preset operating status topology L520 are related to fault status attributes, and multiple nodes in the third preset operating status topology L530 are related to battery status attributes.
[0092] Based on the query data item "Engine speed: 10000 rpm, 10:10" indicated by the target request, the first preset operating state topology L510 can be determined as the target operating state topology related to the query data item attribute "Engine state attribute". Based on the query data item attribute "10:10", from multiple nodes N1 to N3 in the first preset operating state topology L510, the target node matching the query data item is determined as N2. Therefore, the target blockchain 512 can be determined through the target node N2. From the target blockchain 512, multiple proof blocks and the root block are determined.
[0093] By sending multiple proof blocks and a root block to the terminal device of the query object, the terminal device can process the multiple proof blocks to obtain first intermediate data, and verify the authenticity of the query data item based on the matching result between the first intermediate data and the root block, thus obtaining the verification result. Therefore, the interaction method provided by this disclosure can construct index information of the preset blockchain across multiple attribute dimensions through preset running state topologies associated with multiple preset data item attributes. This improves the flexibility of the query object in verifying the authenticity of state data items with different query data item attributes and enhances the query and verification efficiency of the query object.
[0094] In some embodiments, determining the target blockchain that matches the query data item indicated by the target request may further include: performing permission verification on the target request to obtain query data item attributes that match the query object.
[0095] According to embodiments of this disclosure, query data item attributes are used to determine a target node from multiple preset nodes. For example, a permission attribute table can be configured for the query object, storing multiple query data item attributes that match the query object's query permissions. Thus, by verifying the permissions of the target request, query data item attributes matching the query object's permissions can be determined from the permission attribute table. This enables precise permission management of the query object, preventing brute-force attacks on the operational status data stored in the blockchain through large-scale verification of diverse query data item attributes, thereby improving data security.
[0096] In one embodiment, the query time range attribute, request time, and query object identifier carried by the target request can also be stored in encrypted form. For example, the access token assigned to the query object can be bound to the query time range attribute, request time, and query object identifier and encrypted for calculation. This allows other related objects to trace the verification request process of the query object for the running status data, further improving the security and controllability of the running status data.
[0097] In some embodiments, a terminal device associated with the query object can be used as the execution subject of the interaction method provided in this disclosure. The query data item attribute of the query data item carried by the target request is {mile, error}, where the mile field represents the mileage attribute and the error field represents the fault status attribute. The mileage attribute and the fault status attribute are matched with the query permissions of the query object. By determining the matching result between the query data item and the status data item, the target blockchain corresponding to the mileage attribute and the fault status attribute is determined from the distributed server cluster storing the target blockchain, and the proof block used to verify the query data item is determined from each target blockchain. The server cluster can send multiple proof blocks and the root block used for authenticity verification to the terminal device based on the matching result. The terminal device performs data fusion based on the proof blocks and the query data item to obtain the first intermediate data, and performs authenticity verification on the mileage data item and the fault status data item by matching the first intermediate data with the root block to obtain the verification result.
[0098] Therefore, by setting access permissions related to status data items for query objects, a field-level access authorization mechanism can be set for multiple query objects. This allows query objects to verify whether the query data has been modified simply by obtaining the root block and proof block related to the authorized query data item attributes, thereby improving the data security of runtime status data.
[0099] In some embodiments, an access fingerprint can be set for the target request of the query object, so that the query behavior of the query object can be recorded by storing the access fingerprint, so as to facilitate timely tracing.
[0100] In one example, an access fingerprint can be represented as fingerprint = H(user_i|| vid || fie||time || nonce), where vid is the device identifier of the target device, fie identifies the region / location where the query object sent the target request, time represents the time attribute of sending the target request, and nonce represents a random number. The access fingerprint is signed using a private key to generate an access record token Token = Sign(fingerprint, Key_pri), where sign is the signature algorithm and Key_pri is the private key. The query behavior of the query object is managed by storing the timestamp of the target request, the access region, the time attribute, the device identifier of the target device, and the access record token as an access log. Based on the relevant information in the access log, authorization information can be provided to relevant authoritative review bodies to meet the relevant regulations or requirements for query behavior of the target device or query object.
[0101] It should be noted that the data acquisition involved in any embodiment of this disclosure, including but not limited to operational status data and target blockchain, is all data acquired with authorization from relevant personnel or organizations. Furthermore, the acquired data undergoes necessary encryption or de-identification processing to ensure data security.
[0102] Figure 6 A block diagram of an interactive device according to an embodiment of the present disclosure is shown schematically.
[0103] like Figure 6 As shown, the interactive device 600 includes: a target blockchain determination module 610, a proof block determination module 620, and a verification module 630.
[0104] The target blockchain determination module 610 is used to determine the target blockchain that matches the query data item indicated by the target request in response to receiving a target request for the query object. The root block and leaf block of the target blockchain represent the operating status data of the target device and the status data item in the operating status data, respectively.
[0105] The proof block determination module 620 is used to determine the proof block corresponding to the query data item from the target blockchain based on the matching result between the query data item and the state data item.
[0106] The verification module 630 is used to verify the authenticity of the queried data items based on the proof block, obtain the verification result, and push the verification result to the queried object.
[0107] According to embodiments of this disclosure, the leaf blocks of the target blockchain are the hash values of data items obtained by hashing state data items, and the root block is determined by fusing the hash values of data items corresponding to multiple state data items in the running state data based on the Merkle tree mechanism.
[0108] According to embodiments of this disclosure, multiple blocks in the target blockchain have edge relationships; the proof block determination module includes:
[0109] The first determining unit is used to determine the query leaf block related to the query data item from the target blockchain based on the matching result.
[0110] The second determining unit is used to determine multiple proof blocks that have edge relationships with the query leaf block from the target blockchain based on the edge relationship. The multiple proof blocks are used to obtain the root block by data fusion with the query leaf block. The number of multiple proof blocks is less than the number of blocks in the target blockchain.
[0111] According to embodiments of this disclosure, the edge relationships of the target blockchain indicate the hierarchical attributes of each of the multiple proof blocks, and the query leaf block has an Nth-level attribute, where N is an integer greater than 1; the verification module includes:
[0112] The first obtaining unit is used to perform data fusion with the nth intermediate data based on the nth proof block with the nth level attribute to obtain the (n-1)th intermediate data, where N≥n>1, and the Nth intermediate data is determined based on the query data item.
[0113] The verification unit is used to perform authenticity verification based on the data matching result between the first intermediate data and the root block when N=n=2, and obtain the verification result.
[0114] According to embodiments of this disclosure, the target blockchain determination module includes a third determination unit and a fourth determination unit.
[0115] The third determining unit is used to determine the target running state topology corresponding to the query data item attribute from multiple preset running state topologies based on the query data item attribute of the query data item. The multiple preset nodes in the preset running state topology represent multiple preset running state data corresponding to the same preset data item attribute, and the preset running state data corresponds to the preset blockchain.
[0116] The fourth determining unit is used to determine the target blockchain representing the operating state data by identifying the target node that matches the query data item among multiple preset nodes based on the target operating state topology.
[0117] According to embodiments of this disclosure, the target blockchain determination module further includes an authorization verification unit.
[0118] The permission verification unit is used to verify the permissions of the target request and obtain the query data item attributes that match the query object. The query data item attributes are used to determine the target node from multiple preset nodes.
[0119] According to embodiments of this disclosure, the interactive device further includes a receiving module and a decryption module.
[0120] The receiving module is used to receive encrypted operating status data from the target device.
[0121] The decryption module is used to decrypt the ciphertext of the running status to obtain the target blockchain related to the running status data. The target blockchain is determined by the target device through hash processing of multiple status data items in the received running status data based on the Merkle tree mechanism.
[0122] According to embodiments of this disclosure, the data item attributes of the status data item include at least one of the following: fault status attribute, device operation behavior attribute, and device motion status attribute.
[0123] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0124] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
[0125] According to embodiments of the present disclosure, a non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause a computer to perform the method described above.
[0126] According to an embodiment of this disclosure, a computer program product includes a computer program that, when executed by a processor, implements the method described above.
[0127] Figure 7 A schematic block diagram of an example electronic device that can be used to implement the interactive methods of embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0128] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded into random access memory (RAM) 703 from storage unit 708. The RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.
[0129] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0130] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as interactive methods. For example, in some embodiments, the interactive method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the interactive method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform interactive methods by any other suitable means (e.g., by means of firmware).
[0131] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0132] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0133] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0134] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0135] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0136] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.
[0137] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0138] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. An interaction method, comprising: In response to receiving a target request for a query object, a target blockchain that matches the query data item indicated by the target request is determined, wherein the root block and leaf block of the target blockchain represent the operating status data of the target device and the status data item in the operating status data, respectively. Based on the matching result between the query data item and the state data item, the proof block corresponding to the query data item is determined from the target blockchain; The authenticity of the queried data item is verified based on the proof block, a verification result is obtained, and the verification result is pushed to the queried object.
2. The method according to claim 1, wherein, The leaf blocks of the target blockchain are the hash values of the data items obtained by hashing the state data items, and the root block is determined by fusing the hash values of the data items corresponding to multiple state data items in the running state data based on the Merkle tree mechanism.
3. The method according to claim 1 or 2, wherein, Multiple blocks in the target blockchain have edge relationships; determining the proof block corresponding to the query data item from the target blockchain based on the matching result between the query data item and the state data item includes: Based on the matching results, determine the query leaf block related to the query data item from the target blockchain; Based on the edge relationship, a plurality of proof blocks that have an edge relationship with the query leaf block are determined from the target blockchain, wherein the plurality of proof blocks are used to obtain the root block by data fusion with the query leaf block, and the number of the plurality of proof blocks is less than the number of blocks in the target blockchain.
4. The method according to claim 3, wherein, The edge relationships of the target blockchain indicate the hierarchical attributes of each of the multiple proof blocks, and the query leaf block has an Nth-level attribute, where N is an integer greater than 1; the verification of the authenticity of the query data item based on the proof blocks includes: Based on the nth proof block with the nth level attribute, data fusion is performed with the nth intermediate data to obtain the (n-1)th intermediate data, where N ≥ n > 1, and the Nth intermediate data is determined based on the query data item; and When N=n=2, the authenticity is verified based on the data matching result between the first intermediate data and the root block, and the verification result is obtained.
5. The method according to claim 1, wherein, The process of determining the target blockchain that matches the query data item indicated by the target request includes: Based on the query data item attribute of the query data item, a target operating state topology corresponding to the query data item attribute is determined from multiple preset operating state topologies. The multiple preset nodes in the preset operating state topology represent multiple preset operating state data corresponding to the same preset data item attribute. The preset operating state data corresponds to a preset blockchain. Based on the target node that matches the query data item among multiple preset nodes of the target operating state topology, the target blockchain representing the operating state data is determined.
6. The method according to claim 5, wherein, The step of determining the target blockchain that matches the query data item indicated by the target request further includes: The target request is validated to obtain the query data item attributes that match the query object. The query data item attributes are used to determine the target node from multiple preset nodes.
7. The method according to claim 1 or 5, wherein, The interaction method also includes: Receive encrypted operating status data from the target device; and The encrypted running status data is decrypted to obtain a target blockchain associated with the running status data. The target blockchain is determined by the target device through hashing multiple status data items in the received running status data based on a Merkle tree mechanism.
8. The method according to claim 1, wherein, The data item attributes of the status data item include at least one of the following: Fault status attributes, equipment operation behavior attributes, and equipment motion status attributes.
9. An interactive device, comprising: The target blockchain determination module is used to determine the target blockchain that matches the query data item indicated by the target request in response to receiving a target request for a query object, wherein the root block and leaf block of the target blockchain represent the operating status data of the target device and the status data item in the operating status data, respectively. The proof block determination module is used to determine the proof block corresponding to the query data item from the target blockchain based on the matching result between the query data item and the state data item. The verification module is used to verify the authenticity of the query data item based on the proof block, obtain the verification result, and push the verification result to the query object.
10. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 8.
12. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 8.