Device data scheduling method, terminal and storage medium
By building a three-level blockchain network and cross-link routing, the problem of low data acquisition efficiency of quantum chip devices is solved, unified resource management and privacy protection are realized, and data acquisition efficiency is improved.
Patent Information
- Application Number
- CN202411087518.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-22
AI Technical Summary
Quantum chip design requires a diversified device data repository, but there are barriers between different repositories, resulting in low efficiency in device data acquisition.
By building a three-level blockchain network, including local device libraries, remote private device libraries and remote public device libraries, cross-link routing and adapters are built to realize three-level scheduling and unified resource management of device data.
It greatly improves the efficiency of device data acquisition, ensures the privacy and decentralized storage of quantum device data, is simple in design, and is suitable for a wide range of application scenarios.
Smart Images

Figure CN119011579A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain, and in particular relates to a device data scheduling method, a terminal and a storage medium. Background Art
[0002] A quantum chip integrates quantum circuits on a substrate to carry the function of quantum information processing. Compared with traditional chips, quantum chip design requires more device data, and the device data iteration is fast. Therefore, in order to meet the design requirements of quantum chips, it is necessary to introduce a variety of device storage libraries. However, there are barriers between different device storage libraries. In order to improve the efficiency of device data acquisition, it is necessary to integrate the resources of multiple device storage libraries.
[0003] Related technologies propose to dispatch device data to the blockchain to achieve resource integration. However, due to the excessive amount of device data, global queries are required in the subsequent device data acquisition process, resulting in low device data acquisition efficiency. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a device data scheduling method, a terminal and a storage medium to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a device data scheduling method, comprising: A primary blockchain is formed through a local device library node, a secondary blockchain is formed through a remote private device library node, and a tertiary blockchain is formed through a remote public device library node. The local device library node is a local computing node, the remote private device library node is a computing node of a remote private device library, and the remote public device library node is a computing node of a remote public device library. Cross-chain routes are respectively established for the primary blockchain, the secondary blockchain, and the tertiary blockchain and the business system, and adapters are configured for the cross-chain routes. The adapters dispatch the device data acquisition tasks initiated by the business system to the primary blockchain, the secondary blockchain, and the tertiary blockchain step by step.
[0006] In an optional embodiment, it also includes: Select one or more local devices to deploy one or more local device libraries, and set naming rules and classification systems for multiple local device libraries; Deploy one or more remote private device libraries in the cloud; Deploy one or more open device information repositories in the cloud as remote public device libraries.
[0007] In an optional embodiment, it also includes: Pre-set device data confidentiality level, remote private device library permission level and remote public device library permission level, as well as the corresponding relationship between confidentiality level and permission level; Get the confidentiality level of device data in the local device library; Based on the corresponding relationship and the permission level of the remote private device library and the permission level of the remote public device library, a matching device library of the device data is obtained, where the matching device library is a remote private device library or a remote public device library; The device data is synchronized to a matching device library.
[0008] In an optional implementation, the device data confidentiality level, the permission level of the remote private device library and the permission level of the remote public device library, and the corresponding relationship between the confidentiality level and the permission level are pre-set, including: Set up a first-level confidentiality level and a second-level confidentiality level, where the first-level confidentiality level is the confidentiality level of private data and the second-level confidentiality level is the confidentiality level of public data; Set a high permission level for the remote private device library and a low permission level for the remote public device library; Set the first confidentiality level to correspond to the high authority level, and the second confidentiality level to correspond to the low authority level.
[0009] In an optional embodiment, the method further comprises: Monitor the remaining storage resources of the local device library; If the remaining storage resource amount is lower than a preset resource threshold, some cold data in the local device library is cleared.
[0010] In an optional implementation, a primary blockchain is formed through a local device library node, a secondary blockchain is formed through a remote private device library node, and a tertiary blockchain is formed through a remote public device library node, including: Synchronize the brief information of the device data in the local device library to the block of the primary blockchain; Synchronize the brief information of the device data in the remote private device library to the block of the secondary blockchain; Synchronize the brief information of the device data in the remote public device library to the blocks of the third-level blockchain.
[0011] In an optional implementation, the brief information includes the device name, the device library name and address to which it belongs.
[0012] In an optional embodiment, the method further comprises: Set up data query smart contracts, data acquisition smart contracts, data publishing smart contracts and task publishing smart contracts for the first-level blockchain; Set up data query smart contracts, data acquisition smart contracts, data publishing smart contracts and task publishing smart contracts for the secondary blockchain; Set up data query smart contract, data acquisition smart contract and data publishing smart contract for the three-level blockchain.
[0013] In an optional embodiment, the triggering condition of the data query smart contract is receiving a device data acquisition task. After the data query smart contract is triggered, the target device name is parsed from the device data acquisition task and the target device name is saved to the task list, all blocks are traversed to obtain the target brief information including the target device name and the target brief information is cached to the target list, and the target device name in the task list that is not included in the target list is saved to the task list to be released.
[0014] In an optional embodiment, the triggering condition of the data acquisition smart contract includes generating a target list. After the data acquisition smart contract is triggered, the target device data is acquired from the corresponding device library based on the target brief information in the target list.
[0015] In an optional embodiment, the triggering condition of the data sending smart contract includes obtaining the target device data. After the data sending smart contract is triggered, the target device data is published to the data publishing topic of the adapter, and the data publishing topic is a topic subscribed by the business system.
[0016] In an optional embodiment, the triggering condition of the task publishing smart contract includes generating a list of tasks to be published. After the task publishing smart contract is triggered, the list of tasks to be published is published to the task publishing topic of the adapter. The level of the task publishing topic is consistent with the blockchain level, and the subscription object of the task publishing topic is the blockchain of the next level.
[0017] In an optional implementation, cross-chain routing is established for the primary blockchain, the secondary blockchain, and the tertiary blockchain and the business system, and an adapter is configured for the cross-chain routing, including: Set up three independent routing rules in the cross-chain routing, corresponding to the primary blockchain, the secondary blockchain, and the tertiary blockchain; Configure a corresponding cross-chain adapter for each routing rule to enable cross-chain routing to communicate with blockchains at adjacent levels; Develop the communication interface between the business system and the cross-chain routing; Deploy the blockchain interface subscription service in the adapter, create multiple topics, and establish subscription relationships between the blockchain and business system and the topics.
[0018] In an optional implementation, a blockchain interface subscription service is deployed in the adapter, multiple topics are created, and a subscription relationship between the blockchain and the business system and the topics is established, including: Create a data publishing topic, a first task publishing topic, a second task publishing topic, and a third task publishing topic; Instruct the business system to subscribe to a data publishing topic, wherein the business system includes a device data usage node, and the data publisher of the data publishing topic is a primary blockchain, a secondary blockchain, and a tertiary blockchain; Instruct the primary blockchain to subscribe to the first task publishing topic, where the data publisher of the first task publishing topic is the business system; Instruct the secondary blockchain to subscribe to the second task publishing topic, where the data publisher of the second task publishing topic is the primary blockchain; The third-level blockchain is ordered to subscribe to the third task publishing topic, and the data publisher of the third task publishing topic is the second-level blockchain.
[0019] In an optional embodiment, the method further includes: The adapter receives the device data acquisition task issued by the business system; Summarize the target device names of the target device data of the device data acquisition task into an initial task list; Sending the initial task list to a primary blockchain, the primary blockchain including a local device library node; Receive the first part of the target device data and the unqueried target device names returned by the primary blockchain, and summarize the unqueried target device names returned by the primary blockchain into a first task list; Sending the first task list to a secondary blockchain, the secondary blockchain comprising a remote private device library node; Receive the second part of the target device data and the unqueried target device names returned by the secondary blockchain, and summarize the unqueried target device names returned by the secondary blockchain into a second task list; Sending the second task list to a third-level blockchain, wherein the third-level blockchain includes a remote public device library node; Receive the third part of the target device data returned by the third-level blockchain, and return the first part of the target device data, the second part of the target device data and the third part of the target device data to the business system.
[0020] In an optional embodiment, the method further comprises: The first-level blockchain receives the initial task list published by the first task publishing topic; Trigger the data query smart contract, traverse all blocks to obtain the target brief information including the target device name and cache the target brief information to the target list, and save the target device names in the task list that are not included in the target list to the task list to be released; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; Triggering the data publishing smart contract to publish the target device data to the data publishing topic of the adapter; Trigger the task publishing smart contract and publish the list of tasks to be published as the first task list to the second task publishing topic of the adapter.
[0021] In an optional embodiment, the method further comprises: The secondary blockchain obtains the first task list by subscribing to the second task publishing topic; Triggering the data query smart contract, extracting the target device name from the first task list, traversing all blocks to obtain the target brief information containing the target device name and caching the target brief information to the target list, and saving the target device name in the first task list that is not included in the target list to the pending task list of the secondary blockchain; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; Triggering the data publishing smart contract to publish the target device data to the data publishing topic of the adapter; The task publishing smart contract is triggered, and the list of tasks to be published on the secondary blockchain is published as the second task list to the third task publishing topic of the adapter.
[0022] In an optional embodiment, the method further comprises: The third-level blockchain obtains the second task list by subscribing to the third task publishing topic; Triggering the data query smart contract, extracting the target device name from the second task list, traversing all blocks to obtain the target brief information including the target device name, and caching the target brief information into the target list; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; The data publishing smart contract is triggered to publish the target device data to the data publishing topic of the adapter.
[0023] In a second aspect, the present invention provides a device data scheduling system, comprising: A block formation module, used to form a primary blockchain through a local device library node, form a secondary blockchain through a remote private device library node, and form a tertiary blockchain through a remote public device library node, wherein the local device library node is a local computing node, the remote private device library node is a computing node of a remote private device library, and the remote public device library node is a computing node of a remote public device library; The cross-chain configuration module is used to build cross-chain routes for the primary blockchain, the secondary blockchain, the tertiary blockchain and the business system respectively, and configure adapters for the cross-chain routes. The adapters schedule the device data acquisition tasks initiated by the business system to the primary blockchain, the secondary blockchain and the tertiary blockchain step by step.
[0024] In a third aspect, a terminal is provided, including: processor, memory, wherein: The memory is used to store computer programs. The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0025] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.
[0026] The beneficial effect of the present invention is that the device data scheduling method, terminal and storage medium provided by the present invention realize the resource unification and differentiated management of a large amount of device data by constructing a three-level scheduling blockchain for the device data of the quantum chip. In addition, differentiated scheduling of device data is realized through an adapter, which greatly improves the efficiency of obtaining device data.
[0027] In addition, the present invention completes the step-by-step generation and release of the device task list through the three-level device blockchain network scheduling. At the same time, it can ensure the privacy of quantum device data, decentralized storage and distributed computing. The design principle of the present invention is reliable, the structure is simple, and it has a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 is a schematic flow chart of a device data management method according to an embodiment of the present invention.
[0030] Figure 2 It is a schematic principle diagram of a device data acquisition method according to an embodiment of the present invention.
[0031] Figure 3 It is a schematic flow chart of the scheduling process of the local device library node according to an embodiment of the present invention.
[0032] Figure 4 The figure is a schematic flow chart of a scheduling process of a remote private device library node according to an embodiment of the present invention.
[0033] Figure 5 It is a schematic flow chart of the scheduling process of a remote public device library node according to an embodiment of the present invention.
[0034] Figure 6 is a schematic block diagram of a system according to an embodiment of the present invention.
[0035] Figure 7 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0038] The key terms appearing in the present invention are explained below.
[0039] Blockchain technology has received extensive attention and development. Blockchain technology, also known as "distributed ledger technology", is a decentralized, collectively maintained distributed ledger technology solution. Its essence is a distributed database system in which multiple nodes participate collectively. Blockchain is not a single technology, but the result of the integration of multiple technologies. Using blockchain technology to maintain a reliable, tamper-proof ledger record can reduce the risk of trust and effectively reduce the maintenance cost of collaboration among all participants.
[0040] The device data scheduling method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the device data scheduling system runs in the computer device.
[0041] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a device data scheduling system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0042] First, you need to build a storage architecture. The method of building a storage architecture is as follows: Local device library: Established on a local server or data center, it prioritizes the storage of high-frequency access or highly sensitive device data to ensure the immediacy and security of data access. Implement data encryption, backup, and recovery strategies to prevent data loss or leakage.
[0043] Remote private device library: Deployed in a proprietary network environment provided by a cloud service provider, with access rights open to specific user groups or members within an organization. This library is used to store non-sensitive device data that requires high availability and scalability, and ensures data security through private network isolation.
[0044] Remote public device library: Deployed on the public cloud platform, it is open to all authorized users and provides device data sharing and access services. It uses the powerful computing and storage capabilities of the cloud platform to support large-scale data storage and efficient retrieval, while complying with strict access control and data encryption standards.
[0045] like Figure 1 As shown, the method includes: Step 110, a first-level blockchain is established through a local device library node, a second-level blockchain is established through a remote private device library node, and a third-level blockchain is established through a remote public device library node.
[0046] Level 1 blockchain (local device library blockchain): built on local nodes to ensure fast verification and non-tamperability of local device data transactions. Consensus mechanisms (such as Raft, PBFT, etc.) are used to ensure the consistency and security of on-chain data.
[0047] Secondary blockchain (remote private device library blockchain): connect the nodes of the remote private device library to build a cross-regional private blockchain network. Use more complex consensus mechanisms (such as PoS, DPoS) to support wider node participation and higher throughput while ensuring data privacy.
[0048] Level 3 blockchain (remote public device library blockchain): Build an open public blockchain network for global users. Adopt the most decentralized consensus mechanism (such as PoW, Ethereum's PoS), support global data sharing and verification, and achieve fine control of data access rights through smart contracts.
[0049] Step 120, respectively build cross-chain routes for the primary blockchain, the secondary blockchain, and the tertiary blockchain and the business system, and configure adapters for the cross-chain routes. The adapters schedule the device data acquisition tasks initiated by the business system to the primary blockchain, the secondary blockchain, and the tertiary blockchain step by step.
[0050] Cross-chain routing design: Independent cross-chain routing nodes are designed for the primary, secondary, and tertiary blockchains. These nodes are responsible for listening to data requests from the business system and selecting the appropriate blockchain for interaction based on the request type and data source.
[0051] Adapter configuration: Configure smart adapters for cross-chain routing. These adapters can parse the device data acquisition tasks issued by the business system, including task type, data range, priority, etc., and adjust task parameters according to the characteristics of the blockchain (such as transaction format, consensus speed). The adapter is also responsible for converting the data returned by the blockchain into a format recognizable by the business system to ensure seamless data connection.
[0052] Task scheduling and optimization: The adapter intelligently schedules data acquisition tasks based on the blockchain load, data access frequency, and business system requirements. For frequently accessed data, it can be pre-cached locally or the access path can be optimized; for tasks with low latency requirements, it is prioritized and scheduled to be executed on blockchain nodes with higher performance.
[0053] To facilitate understanding of the present invention, the device data scheduling method provided by the present invention is further described below based on the principle of the device data scheduling method of the present invention and in combination with the process of storing and scheduling device data in the embodiment.
[0054] For details, please refer to Figure 2 , the device data scheduling method comprises: S1. Deploy a local device library, a remote private device library, and a remote public device library. The local device library, the remote private device library, and the remote public device library are all used to store device data.
[0055] Select one or more local devices to deploy one or more local device libraries, and set naming rules and classification systems for multiple local device libraries; deploy one or more remote private device libraries in the cloud; deploy one or more open device information libraries in the cloud as remote public device libraries.
[0056] By deploying local device libraries, remote private device libraries, and remote public device libraries, multi-party storage of device data is achieved.
[0057] Due to the different importance of device data, device data can be stored separately. The specific methods include: S101. Preset the device data confidentiality level, the permission level of the remote private device library and the permission level of the remote public device library, and the corresponding relationship between the confidentiality level and the permission level.
[0058] Set the first-level confidentiality level and the second-level confidentiality level, where the first-level confidentiality level is the confidentiality level of private data, and the second-level confidentiality level is the confidentiality level of public data; set a high authority level for the remote private device library and a low authority level for the remote public device library; set the first-level confidentiality level to correspond to the high authority level, and the second-level confidentiality level to correspond to the low authority level.
[0059] S102: Obtain the confidentiality level of device data in the local device library.
[0060] S103 . Based on the corresponding relationship and the permission level of the remote private device library and the permission level of the remote public device library, a matching device library of the device data is obtained, where the matching device library is a remote private device library or a remote public device library.
[0061] S104: Synchronize the device data to a matching device library.
[0062] S105 , monitoring the remaining storage resource amount of the local device library; if the remaining storage resource amount is lower than a preset resource threshold, clearing part of the cold data of the local device library.
[0063] Differentiated storage of device data meets different storage requirements of device data, enriches storage resources of device data, and also adapts to different usage scenarios of device data. In addition, by cleaning up cold data in the local device library when necessary, it ensures that the local device library can meet the needs of storing important device data.
[0064] S2. A first-level blockchain is established through a local device library node, a second-level blockchain is established through a remote private device library node, and a third-level blockchain is established through a remote public device library node.
[0065] Synchronize the brief information of the device data in the local device library to the block of the first-level blockchain; synchronize the brief information of the device data in the remote private device library to the block of the second-level blockchain; synchronize the brief information of the device data in the remote public device library to the block of the third-level blockchain.
[0066] Specifically, the following steps are included: 1. Blockchain network construction.
[0067] Level 1 blockchain (local device library blockchain): This blockchain network mainly serves local or enterprise device libraries to ensure data security and fast access. It may be deployed on a private cloud or local server and uses consensus mechanisms (such as Raft, PBFT, etc.) to ensure data consistency and immutability.
[0068] Secondary blockchain (remote private device library blockchain): This blockchain network serves the private shared device library between multiple enterprises or organizations. It is connected through VPN or dedicated network and adopts more complex consensus mechanism (such as the consensus algorithm of consortium chain) to balance decentralization and performance requirements.
[0069] Level 3 blockchain (remote public device library blockchain): This is a completely open blockchain network for sharing and verifying data from various public device libraries. It uses public chain consensus mechanisms such as proof of work (PoW) and proof of stake (PoS) to ensure data transparency and credibility on a global scale.
[0070] 2. Data synchronization mechanism.
[0071] Data extraction and verification: At each level, smart contracts or scripts are used to periodically extract brief information about device data from their respective device libraries (such as device name, device library name and address, and other characteristic information of the device) and perform data verification to ensure the accuracy and completeness of the information.
[0072] Block generation and synchronization: The verified data is packaged into blocks, and the blocks are generated and synchronized on the chain according to the consensus mechanism of each blockchain. The necessary data interaction and verification can be achieved between blockchains at all levels through cross-chain technology.
[0073] 3. Security assurance.
[0074] Encryption technology: Encryption technology (such as AES, RSA) is used to encrypt, store and transmit sensitive data to ensure the security of data during transmission and storage.
[0075] Access Control: Implement strict access control policies to ensure that only authorized users or nodes can access and modify data on the blockchain.
[0076] Smart Contract Audit: Regularly conduct security audits on smart contracts to prevent potential vulnerabilities and attacks.
[0077] 4. Interaction and collaboration.
[0078] Cross-chain communication: Use cross-chain technology to achieve data sharing and verification between different blockchain networks, promote the circulation of information and the establishment of trust.
[0079] Event triggering and response: Set up smart contracts to listen to specific events (such as new devices entering the warehouse, data updates, etc.) and automatically trigger corresponding response actions (such as data synchronization, notifying relevant parties, etc.).
[0080] Collaborative governance: Establish a governance mechanism with the participation of multiple parties to jointly determine the rules, upgrades, security strategies, etc. of the blockchain network to ensure the long-term stable operation and healthy development of the network.
[0081] Based on the local device library, remote private device library and remote public device library, three blockchains are constructed respectively to achieve the unification and classification of resources, and then realize the orderly and unified management of device data, providing a storage architecture foundation for subsequent step-by-step scheduling.
[0082] S3. Build cross-chain routes for the primary blockchain, the secondary blockchain, and the tertiary blockchain and the business system respectively, and configure adapters for the cross-chain routes. The adapters dispatch the device data acquisition tasks initiated by the business system to the primary blockchain, the secondary blockchain, and the tertiary blockchain step by step.
[0083] S4. Set up smart contracts.
[0084] Set up data query smart contracts, data acquisition smart contracts, data release smart contracts and task release smart contracts for the first-level blockchain; set up data query smart contracts, data acquisition smart contracts, data release smart contracts and task release smart contracts for the second-level blockchain; set up data query smart contracts, data acquisition smart contracts and data release smart contracts for the third-level blockchain.
[0085] The triggering condition of the data query smart contract is receiving the device data acquisition task. After the data query smart contract is triggered, it parses the target device name from the device data acquisition task and saves the target device name to the task list, traverses all blocks to obtain the target brief information containing the target device name and caches the target brief information to the target list, and saves the target device name that is not included in the target list in the task list to the task list to be released.
[0086] The triggering conditions of the data acquisition smart contract include generating a target list. After the data acquisition smart contract is triggered, the target device data is obtained from the corresponding device library based on the target brief information in the target list.
[0087] The triggering conditions of the data sending smart contract include obtaining the target device data. After the data sending smart contract is triggered, the target device data is published to the data publishing topic of the adapter. The data publishing topic is the topic subscribed by the business system.
[0088] The triggering condition of the task release smart contract includes generating a list of tasks to be released. After the task release smart contract is triggered, the list of tasks to be released is released to the task release topic of the adapter. The level of the task release topic is consistent with the blockchain level, and the subscription object of the task release topic is the blockchain of the next level.
[0089] S5. Deploy subscription service.
[0090] Set up three independent routing rules in the cross-chain routing, corresponding to the first-level blockchain, the second-level blockchain, and the third-level blockchain respectively; configure the corresponding cross-chain adapter for each routing rule to enable the cross-chain routing to communicate with the blockchains of adjacent levels; develop the communication interface between the business system and the cross-chain routing; deploy the blockchain interface subscription service in the adapter, create multiple topics, and establish the subscription relationship between the blockchain and the business system and the topic.
[0091] Specifically, the subscription relationship setting method is as follows: Create a data publishing topic, a first task publishing topic, a second task publishing topic and a third task publishing topic; let the business system subscribe to the data publishing topic, the business system includes a device data usage node, and the data publisher of the data publishing topic is the first-level blockchain, the second-level blockchain and the third-level blockchain; let the first-level blockchain subscribe to the first task publishing topic, and the data publisher of the first task publishing topic is the business system; let the second-level blockchain subscribe to the second task publishing topic, and the data publisher of the second task publishing topic is the first-level blockchain; let the third-level blockchain subscribe to the third task publishing topic, and the data publisher of the third task publishing topic is the second-level blockchain.
[0092] In order to reduce the complexity of communication, a subscription service software based on the web socket communication protocol is deployed. Set up subscription relationships to build a multi-level communication architecture. For example, the device data usage node publishes a task list to the adapter device usage topic, referred to as Topic A, and the device data usage node simultaneously subscribes to the device usage topic referred to as B. The first-level blockchain network subscribes to Topic A, finds device data that meets the requirements of the list, and sends the found local device data to Topic B. At the same time, the first-level blockchain publishes a new device list to the adapter's remote private device task topic, referred to as Topic C. The second-level blockchain network subscribes to Topic C, finds remote private device data that meets the requirements on the device list, and publishes the found remote private device data to Topic B to transfer the device data. At the same time, the second-level blockchain generates a new device list and publishes it to the adapter's remote public device list topic, referred to as Topic D. The third-level blockchain network subscribes to Topic D, finds the public device according to the list, publishes the device data, and publishes it to Topic B.
[0093] By establishing this subscription relationship, the communication pressure between blockchains and between blockchains and business systems is reduced, the real-time nature of data interaction is improved, and the efficiency of acquiring device data is further improved.
[0094] In another embodiment of the present invention, a device data acquisition method is provided, comprising the following steps: (1) The adapter receives the device data acquisition task issued by the business system; (2) Summarizing the target device names of the target device data of the device data acquisition task into an initial task list; (3) sending the initial task list to a primary blockchain, wherein the primary blockchain includes a local device library node; (4) receiving the first part of the target device data and the names of the target devices that have not been queried returned by the primary blockchain, and summarizing the names of the target devices that have not been queried returned by the primary blockchain into a first task list; (5) sending the first task list to a secondary blockchain, wherein the secondary blockchain includes a remote private device library node; (6) receiving the second part of the target device data and the names of the target devices that have not been queried returned by the secondary blockchain, and summarizing the names of the target devices that have not been queried returned by the secondary blockchain into a second task list; (7) sending the second task list to a third-level blockchain, wherein the third-level blockchain includes a remote public device library node; (8) Receive the third part of the target device data returned by the third-level blockchain, and return the first part of the target device data, the second part of the target device data, and the third part of the target device data to the business system.
[0095] Among them, the adapter is a scheduling adapter for the first-level blockchain, the second-level blockchain and the third-level blockchain, and the adapter is configured in a cross-chain route, and the cross-chain route builds a communication connection between the first-level blockchain, the second-level blockchain and the third-level blockchain.
[0096] Based on the above blockchain subscription service and smart contract, a specific method for obtaining device data is given, please refer to Figure 2 , including the following steps: (1) The device data usage node publishes the device requirement task list to Topic A of the adapter responsible for scheduling; (2) The device uses the node to subscribe to the adapter's topic B; (3) The first-level blockchain network subscribes to Topic A of the adapter and obtains the task list published by the device data usage node; (4) The primary blockchain network obtains smart contracts based on the task list and the data of the primary blockchain, finds matching local device library nodes, and performs node consensus; (5) Execute the data acquisition smart contract to find the local device data that meets the device task list, and execute the data publishing smart contract to send the local device data to topic B. The device user node receives the device data sent by topic B; (6) Execute the task publishing smart contract to publish a new device list containing devices that cannot be matched by the local device library to the adapter's topic C, i.e., the remote private device task; (7) Execute the remote private device library scheduling task generation and release smart contracts, find out the devices that cannot be matched by the local device library, generate a new device list, and publish it to the scheduling adapter topic C, which is the remote private device list task; (8) The remote private device blockchain network subscribes to the scheduling adapter topic C and receives new inventory task information; (9) The remote private device blockchain network receives the new device task list issued by the local device blockchain network, finds the matching remote private device library node based on the capability smart contract issued by each node, and performs node consensus; (10) Execute the remote private device scheduling smart contract to find the remote private device that meets the device task list; (11) Execute the remote private device synchronization smart contract to synchronize the remote private device information to the scheduling server topic B, and the device usage node receives the device information sent by the remote private device blockchain network; (12) Execute the remote public device library scheduling task generation and release smart contracts, find out the devices that cannot be matched by the remote private device library, generate a new device list, and publish it to the device scheduling adapter topic remote public device list task, referred to as topic D; (13) The remote public device blockchain network subscribes to the scheduling adapter topic D and receives new inventory task information; (14) The remote public device blockchain network receives the device list task issued by the remote private device blockchain network, finds the matching remote public device library node based on the capability smart contract issued by each node of the remote public device library, and performs node consensus; (15) Execute the remote public device scheduling smart contract to find the remote public device that meets the device task list; (16) Execute the remote public device synchronization smart contract, synchronize the remote public device information to the scheduling adapter topic B, and use the node to receive the device information sent by the remote public device blockchain network.
[0097] Please refer to Figure 3 ,The first-level blockchain network scheduling execution process is as follows: (1) The device usage node publishes the device requirement task list and publishes the device requirement task list to the local device blockchain network through the adapter; (2) The local blockchain network receives the device list task, finds the matching device library node based on the capability smart contract published by each node, and performs node consensus; (3) Execute the device scheduling smart contract, find the local devices that meet the device task list and send them to the device usage node; (4) Execute the remote private device library scheduling task to generate and publish smart contracts, find out the devices that cannot be matched by the local device library, generate a new device list, and publish it to the remote private device blockchain network through the scheduling adapter.
[0098] Please refer to Figure 4 , the remote private device blockchain network scheduling execution process is as follows: (1) The remote private device blockchain network receives the new device task list published by the local device blockchain network, finds the matching remote private device library node based on the capability smart contract published by each node, and performs node consensus; (2) Execute the remote private device scheduling smart contract to find the remote private device that meets the device task list; (3) Execute the remote private device synchronization smart contract to synchronize the remote private device information to the device usage node; (4) Execute the remote public device library scheduling task to generate and publish smart contracts, find out the devices that cannot be matched by the remote private device library, generate a new device list, and publish it to the remote public device library blockchain network through the scheduling adapter.
[0099] Please refer to Figure 5 , the remote public device blockchain network scheduling execution process is as follows: (1) The remote public device blockchain network receives the device list task issued by the remote private device blockchain network, finds the matching remote public device library node based on the capability smart contract issued by each node of the remote public device library, and performs node consensus; (2) Execute the remote public device scheduling smart contract to find the remote public devices that meet the device task list; (3) Execute the remote public device synchronization smart contract to synchronize the remote public device information to the device usage node.
[0100] In some embodiments, the device data scheduling system may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the device data scheduling system may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Device data scheduling function.
[0101] In this embodiment, the device data scheduling system can be divided into multiple functional modules according to the functions it performs, such as Figure 6 As shown. The functional modules of the system 600 may include: a block component module 610, a cross-chain configuration module 620. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0102] The block building module is used to build a primary blockchain through a local device library node, a secondary blockchain through a remote private device library node, and a tertiary blockchain through a remote public device library node; The cross-chain configuration module is used to build cross-chain routes for the primary blockchain, the secondary blockchain, the tertiary blockchain and the business system respectively, and configure adapters for the cross-chain routes. The adapters schedule the device data acquisition tasks initiated by the business system to the primary blockchain, the secondary blockchain and the tertiary blockchain step by step.
[0103] Optionally, as an embodiment of the present invention, it further includes: Select one or more local devices to deploy one or more local device libraries, and set naming rules and classification systems for multiple local device libraries; Deploy one or more remote private device libraries in the cloud; Deploy one or more open device information repositories in the cloud as remote public device libraries.
[0104] Optionally, as an embodiment of the present invention, it further includes: Pre-set device data confidentiality level, remote private device library permission level and remote public device library permission level, as well as the corresponding relationship between confidentiality level and permission level; Get the confidentiality level of device data in the local device library; Based on the corresponding relationship and the permission level of the remote private device library and the permission level of the remote public device library, a matching device library of the device data is obtained, where the matching device library is a remote private device library or a remote public device library; The device data is synchronized to a matching device library.
[0105] Optionally, as an embodiment of the present invention, the device data confidentiality level, the permission level of the remote private device library and the permission level of the remote public device library, and the corresponding relationship between the confidentiality level and the permission level are pre-set, including: Set up a first-level confidentiality level and a second-level confidentiality level, where the first-level confidentiality level is the confidentiality level of private data and the second-level confidentiality level is the confidentiality level of public data; Set a high permission level for the remote private device library and a low permission level for the remote public device library; Set the first confidentiality level to correspond to the high authority level, and the second confidentiality level to correspond to the low authority level.
[0106] Optionally, as an embodiment of the present invention, it further includes: Monitor the remaining storage resources of the local device library; If the remaining storage resource amount is lower than a preset resource threshold, some cold data in the local device library is cleared.
[0107] Optionally, as an embodiment of the present invention, a primary blockchain is formed through a local device library node, a secondary blockchain is formed through a remote private device library node, and a tertiary blockchain is formed through a remote public device library node, including: Synchronize the brief information of the device data in the local device library to the block of the primary blockchain; Synchronize the brief information of the device data in the remote private device library to the block of the secondary blockchain; Synchronize the brief information of the device data in the remote public device library to the blocks of the third-level blockchain.
[0108] Optionally, as an embodiment of the present invention, the brief information includes a device name, a device library name and an address thereof.
[0109] Optionally, as an embodiment of the present invention, it further includes: Set up data query smart contracts, data acquisition smart contracts, data publishing smart contracts and task publishing smart contracts for the first-level blockchain; Set up data query smart contracts, data acquisition smart contracts, data publishing smart contracts and task publishing smart contracts for the secondary blockchain; Set up data query smart contract, data acquisition smart contract and data publishing smart contract for the three-level blockchain.
[0110] Optionally, as an embodiment of the present invention, the triggering condition of the data query smart contract is receiving a device data acquisition task. After the data query smart contract is triggered, the target device name is parsed from the device data acquisition task and the target device name is saved to the task list, all blocks are traversed to obtain the target brief information including the target device name and the target brief information is cached to the target list, and the target device name in the task list that is not included in the target list is saved to the task list to be released.
[0111] Optionally, as an embodiment of the present invention, the triggering condition of the data acquisition smart contract includes generating a target list, and after the data acquisition smart contract is triggered, the target device data is acquired from the corresponding device library based on the target brief information in the target list.
[0112] Optionally, as an embodiment of the present invention, the triggering condition of the data sending smart contract includes obtaining target device data, and after the data sending smart contract is triggered, the target device data is published to the data publishing topic of the adapter, and the data publishing topic is a topic subscribed by the business system.
[0113] Optionally, as an embodiment of the present invention, the triggering condition of the task publishing smart contract includes generating a list of tasks to be published. After the task publishing smart contract is triggered, the list of tasks to be published is published to the task publishing topic of the adapter. The level of the task publishing topic is consistent with the blockchain level, and the subscription object of the task publishing topic is the blockchain of the next level.
[0114] Optionally, as an embodiment of the present invention, cross-chain routing is respectively established for the primary blockchain, the secondary blockchain, and the tertiary blockchain and the business system, and an adapter is configured for the cross-chain routing, including: Set up three independent routing rules in the cross-chain routing, corresponding to the primary blockchain, the secondary blockchain, and the tertiary blockchain; Configure a corresponding cross-chain adapter for each routing rule to enable cross-chain routing to communicate with blockchains at adjacent levels; Develop the communication interface between the business system and the cross-chain routing; Deploy the blockchain interface subscription service in the adapter, create multiple topics, and establish subscription relationships between the blockchain and business system and the topics.
[0115] Optionally, as an embodiment of the present invention, a blockchain interface subscription service is deployed in the adapter, multiple topics are created, and a subscription relationship between the blockchain and the business system and the topics is established, including: Create a data publishing topic, a first task publishing topic, a second task publishing topic, and a third task publishing topic; Instruct the business system to subscribe to a data publishing topic, wherein the business system includes a device data usage node, and the data publisher of the data publishing topic is a primary blockchain, a secondary blockchain, and a tertiary blockchain; Instruct the primary blockchain to subscribe to the first task publishing topic, where the data publisher of the first task publishing topic is the business system; Instruct the secondary blockchain to subscribe to the second task publishing topic, where the data publisher of the second task publishing topic is the primary blockchain; The third-level blockchain is ordered to subscribe to the third task publishing topic, and the data publisher of the third task publishing topic is the second-level blockchain.
[0116] Optionally, as an embodiment of the present invention, it further includes: The adapter receives the device data acquisition task issued by the business system; Summarize the target device names of the target device data of the device data acquisition task into an initial task list; Sending the initial task list to a primary blockchain, the primary blockchain including a local device library node; Receive the first part of the target device data and the unqueried target device names returned by the primary blockchain, and summarize the unqueried target device names returned by the primary blockchain into a first task list; Sending the first task list to a secondary blockchain, the secondary blockchain comprising a remote private device library node; Receive the second part of the target device data and the unqueried target device names returned by the secondary blockchain, and summarize the unqueried target device names returned by the secondary blockchain into a second task list; Sending the second task list to a third-level blockchain, wherein the third-level blockchain includes a remote public device library node; Receive the third part of the target device data returned by the third-level blockchain, and return the first part of the target device data, the second part of the target device data and the third part of the target device data to the business system.
[0117] Optionally, as an embodiment of the present invention, it further includes: The first-level blockchain receives the initial task list published by the first task publishing topic; Trigger the data query smart contract, traverse all blocks to obtain the target brief information including the target device name and cache the target brief information to the target list, and save the target device names in the task list that are not included in the target list to the task list to be released; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; Triggering the data publishing smart contract to publish the target device data to the data publishing topic of the adapter; Trigger the task publishing smart contract and publish the list of tasks to be published as the first task list to the second task publishing topic of the adapter.
[0118] Optionally, as an embodiment of the present invention, it further includes: The secondary blockchain obtains the first task list by subscribing to the second task publishing topic; Triggering the data query smart contract, extracting the target device name from the first task list, traversing all blocks to obtain the target brief information containing the target device name and caching the target brief information to the target list, and saving the target device name in the first task list that is not included in the target list to the pending task list of the secondary blockchain; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; Triggering the data publishing smart contract to publish the target device data to the data publishing topic of the adapter; The task publishing smart contract is triggered, and the list of tasks to be published on the secondary blockchain is published as the second task list to the third task publishing topic of the adapter.
[0119] Optionally, as an embodiment of the present invention, it further includes: The third-level blockchain obtains the second task list by subscribing to the third task publishing topic; Triggering the data query smart contract, extracting the target device name from the second task list, traversing all blocks to obtain the target brief information including the target device name, and caching the target brief information into the target list; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; The data publishing smart contract is triggered to publish the target device data to the data publishing topic of the adapter.
[0120] Figure 7 A schematic diagram of the structure of a terminal 700 provided in an embodiment of the present invention. The terminal 700 can be used to execute the device data scheduling method provided in an embodiment of the present invention.
[0121] The terminal 700 may include: a processor 710, a memory 720 and a communication unit 730. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0122] The memory 720 can be used to store the execution instructions of the processor 710, and the memory 720 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, 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 memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 720 are executed by the processor 710, the terminal 700 can execute some or all of the steps in the following method embodiments.
[0123] The processor 710 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 720, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 710 can include only a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0124] The communication unit 730 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.
[0125] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0126] Therefore, the present invention realizes the resource unification and differentiated management of a large amount of device data by constructing a three-level scheduling blockchain for the device data of the quantum chip. In addition, the differentiated scheduling of the device data is realized through the adapter, which greatly improves the efficiency of obtaining the device data. The technical effects that can be achieved by this embodiment can be found in the description above and will not be repeated here.
[0127] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0128] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0129] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.
[0130] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0132] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person skilled in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and they shall be within the scope of protection of the present invention.
Claims
1. A device data scheduling method, characterized in that: include: A primary blockchain is formed through a local device library node, a secondary blockchain is formed through a remote private device library node, and a tertiary blockchain is formed through a remote public device library node. The local device library node is a local computing node, the remote private device library node is a computing node of a remote private device library, and the remote public device library node is a computing node of a remote public device library. Cross-chain routes are respectively established for the primary blockchain, the secondary blockchain, and the tertiary blockchain and the business system, and adapters are configured for the cross-chain routes. The adapters dispatch the device data acquisition tasks initiated by the business system to the primary blockchain, the secondary blockchain, and the tertiary blockchain step by step.
2. The method according to claim 1, characterized in that The method further comprises: Select one or more local devices to deploy one or more local device libraries, and set naming rules and classification systems for multiple local device libraries; Deploy one or more remote private device libraries in the cloud; Deploy one or more open device information repositories in the cloud as remote public device libraries.
3. The method according to claim 2, characterized in that Also includes: Pre-set device data confidentiality level, remote private device library permission level and remote public device library permission level, as well as the corresponding relationship between confidentiality level and permission level; Get the confidentiality level of device data in the local device library; Based on the corresponding relationship and the permission level of the remote private device library and the permission level of the remote public device library, a matching device library of the device data is obtained, where the matching device library is a remote private device library or a remote public device library; The device data is synchronized to a matching device library.
4. The method according to claim 3, characterized in that Pre-set device data confidentiality level, remote private device library permission level and remote public device library permission level, as well as the correspondence between confidentiality level and permission level, including: Set up a first-level confidentiality level and a second-level confidentiality level, where the first-level confidentiality level is the confidentiality level of private data and the second-level confidentiality level is the confidentiality level of public data; Set a high permission level for the remote private device library and a low permission level for the remote public device library; Set the first confidentiality level to correspond to the high authority level, and the second confidentiality level to correspond to the low authority level.
5. The method according to claim 1 or 3, characterized in that: The method further comprises: Monitor the remaining storage resources of the local device library; If the remaining storage resource amount is lower than a preset resource threshold, some cold data in the local device library is cleared.
6. The method according to claim 1, characterized in that The first-level blockchain is established through the local device library node, the second-level blockchain is established through the remote private device library node, and the third-level blockchain is established through the remote public device library node, including: Synchronize the brief information of the device data in the local device library to the block of the primary blockchain; Synchronize the brief information of the device data in the remote private device library to the block of the secondary blockchain; Synchronize the brief information of the device data in the remote public device library to the block of the third-level blockchain.
7. The method according to claim 6, characterized in that The brief information includes the device name, the device library name and address.
8. The method according to claim 6, characterized in that The method further comprises: Set up data query smart contracts, data acquisition smart contracts, data publishing smart contracts and task publishing smart contracts for the first-level blockchain; Set up data query smart contracts, data acquisition smart contracts, data publishing smart contracts and task publishing smart contracts for the secondary blockchain; Set up data query smart contract, data acquisition smart contract and data publishing smart contract for the three-level blockchain.
9. The method according to claim 8, characterized in that The triggering condition of the data query smart contract is receiving a device data acquisition task. After the data query smart contract is triggered, the target device name is parsed from the device data acquisition task and the target device name is saved to the task list, all blocks are traversed to obtain the target brief information including the target device name and the target brief information is cached to the target list, and the target device name that is not included in the target list in the task list is saved to the task list to be released.
10. The method according to claim 9, characterized in that The triggering condition of the data acquisition smart contract includes generating a target list. After the data acquisition smart contract is triggered, the target device data is acquired from the corresponding device library based on the target brief information in the target list.
11. The method according to claim 10, characterized in that The triggering condition of the data sending smart contract includes obtaining the target device data. After the data sending smart contract is triggered, the target device data is published to the data publishing topic of the adapter, and the data publishing topic is a topic subscribed by the business system.
12. The method according to claim 9, characterized in that The triggering condition of the task publishing smart contract includes generating a list of tasks to be published. After the task publishing smart contract is triggered, the list of tasks to be published is published to the task publishing topic of the adapter. The level of the task publishing topic is consistent with the blockchain level, and the subscription object of the task publishing topic is the blockchain of the next level.
13. The method according to claim 1, characterized in that Build cross-chain routing for the primary blockchain, secondary blockchain, and tertiary blockchain and business systems respectively, and configure adapters for cross-chain routing, including: Set up three independent routing rules in the cross-chain routing, corresponding to the primary blockchain, the secondary blockchain, and the tertiary blockchain; Configure a corresponding cross-chain adapter for each routing rule to enable cross-chain routing to communicate with blockchains at adjacent levels; Develop the communication interface between the business system and the cross-chain routing; Deploy the blockchain interface subscription service in the adapter, create multiple topics, and establish subscription relationships between the blockchain and business system and the topics.
14. The method according to claim 13, characterized in that Deploy the blockchain interface subscription service in the adapter, create multiple topics, and establish subscription relationships between the blockchain and business system and topics, including: Create a data publishing topic, a first task publishing topic, a second task publishing topic, and a third task publishing topic; Instruct the business system to subscribe to a data publishing topic, wherein the business system includes a device data usage node, and the data publisher of the data publishing topic is a primary blockchain, a secondary blockchain, and a tertiary blockchain; Instruct the primary blockchain to subscribe to the first task publishing topic, where the data publisher of the first task publishing topic is the business system; Instruct the secondary blockchain to subscribe to the second task publishing topic, where the data publisher of the second task publishing topic is the primary blockchain; The third-level blockchain is ordered to subscribe to the third task publishing topic, and the data publisher of the third task publishing topic is the second-level blockchain.
15. The method according to claim 14, characterized in that Also includes: The adapter receives the device data acquisition task issued by the business system; Summarize the target device names of the target device data of the device data acquisition task into an initial task list; Sending the initial task list to a primary blockchain, the primary blockchain including a local device library node; Receive the first part of the target device data and the unqueried target device names returned by the primary blockchain, and summarize the unqueried target device names returned by the primary blockchain into a first task list; Sending the first task list to a secondary blockchain, the secondary blockchain comprising a remote private device library node; Receive the second part of the target device data and the unqueried target device names returned by the secondary blockchain, and summarize the unqueried target device names returned by the secondary blockchain into a second task list; Sending the second task list to a third-level blockchain, wherein the third-level blockchain includes a remote public device library node; Receive the third part of the target device data returned by the third-level blockchain, and return the first part of the target device data, the second part of the target device data and the third part of the target device data to the business system.
16. The method according to claim 15, characterized in that The method further comprises: The first-level blockchain receives the initial task list published by the first task publishing topic; Trigger the data query smart contract, traverse all blocks to obtain the target brief information including the target device name and cache the target brief information to the target list, and save the target device names in the task list that are not included in the target list to the task list to be released; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; Triggering the data publishing smart contract to publish the target device data to the data publishing topic of the adapter; Trigger the task publishing smart contract and publish the list of tasks to be published as the first task list to the second task publishing topic of the adapter.
17. The method according to claim 16, characterized in that The method further comprises: The secondary blockchain obtains the first task list by subscribing to the second task publishing topic; Triggering the data query smart contract, extracting the target device name from the first task list, traversing all blocks to obtain the target brief information containing the target device name and caching the target brief information to the target list, and saving the target device name in the first task list that is not included in the target list to the pending task list of the secondary blockchain; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; Triggering the data publishing smart contract to publish the target device data to the data publishing topic of the adapter; The task publishing smart contract is triggered, and the list of tasks to be published on the secondary blockchain is published as the second task list to the third task publishing topic of the adapter.
18. The method according to claim 17, characterized in that The method further comprises: The third-level blockchain obtains the second task list by subscribing to the third task publishing topic; Triggering the data query smart contract, extracting the target device name from the second task list, traversing all blocks to obtain the target brief information including the target device name, and caching the target brief information into the target list; Triggering the data acquisition smart contract, extracting the device library name and address of the target device data from the target brief information in the target list, and acquiring the target device data from the corresponding device library based on the device library name and address; The data publishing smart contract is triggered to publish the target device data to the data publishing topic of the adapter.
19. A terminal, characterized in that: include: a memory for storing a device data scheduler; A processor is used to implement the steps of the device data scheduling method and the device data acquisition method as described in any one of claims 1 to 18 when executing the device data scheduling program.
20. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a device data scheduling program, and when the device data scheduling program is executed by a processor, the steps of the device data scheduling method and the device data acquisition method according to any one of claims 1 to 18 are implemented.
