WO2023186154A1 - Data transmission system and method - Google Patents

Data transmission system and method Download PDF

Info

Publication number
WO2023186154A1
WO2023186154A1 PCT/CN2023/085769 CN2023085769W WO2023186154A1 WO 2023186154 A1 WO2023186154 A1 WO 2023186154A1 CN 2023085769 W CN2023085769 W CN 2023085769W WO 2023186154 A1 WO2023186154 A1 WO 2023186154A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
task
subscription relationship
status
task set
Prior art date
Application number
PCT/CN2023/085769
Other languages
French (fr)
Chinese (zh)
Inventor
石宜平
高磊
方崇荣
吕彪
祝顺民
蒋江伟
程鹏
陈积明
Original Assignee
浙江大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江大学 filed Critical 浙江大学
Publication of WO2023186154A1 publication Critical patent/WO2023186154A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Definitions

  • the embodiments of this specification relate to the field of data processing technology, and in particular, to a data transmission system.
  • the functions of task distribution and error recovery are essential in a system composed of large-scale terminals and servers. In this type of system, it is usually necessary to distribute tasks to different terminals for execution at a high frequency and complete the feedback of the results. Once an error occurs on the terminal, the task needs to be retried in a timely manner.
  • a task belongs to a topic, and the terminal obtains the task issued by the topic in the form of a change set by subscribing to the topic.
  • Task distribution uses the subscription relationship between the device and the topic to deliver the dispatched task to the target terminal in a timely manner, confirm the implementation of the task, and obtain feedback; when the task is issued for execution, it may be due to errors in the terminal device or the terminal device is offline.
  • massive terminals mean massive subscription relationships. For example, if a topic in the cloud network needs to distribute tasks to a terminal, then It will notify all devices that subscribe to it. This massive subscription connection relationship and notification will occupy a lot of unnecessary storage and computing resources. In systems with large-scale terminal scenarios, such as cloud networks, computing and storage resources are limited. If task distribution and error recovery functions occupy too many resources, network performance will be reduced.
  • embodiments of this specification provide two data transmission systems.
  • One or more embodiments of this specification simultaneously relate to a data transmission method, a data device, a computing device, a computer-readable storage medium, and a computer program to solve technical deficiencies existing in the prior art.
  • a data transmission system including:
  • the task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the device agent node according to the first subscription relationship with the device agent node;
  • the device agent node is configured to establish a first subscription relationship to the task distribution node according to the second subscription relationship with the device node, and obtain the task set corresponding to the first subscription relationship from the task distribution node. In this case, deliver the tasks in the task set to the corresponding device node according to the second subscription relationship with the device node;
  • the device node is configured to obtain the task issued by the device agent node according to the second subscription relationship with the device agent node.
  • a data transmission method including:
  • the tasks in the task set are distributed to the corresponding device node according to the second subscription relationship with the device node.
  • a data transmission system including:
  • the software-defined network task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the software-defined network agent node according to the first subscription relationship with the software-defined network agent node;
  • the software-defined network proxy node is configured to establish a first subscription relationship to the software-defined network task distribution node according to the second subscription relationship with the software-defined network node, and obtain the software-defined network task distribution node from the software-defined network task distribution node. In the case of a task set corresponding to the first subscription relationship, deliver the tasks in the task set to the corresponding software-defined network node according to the second subscription relationship with the software-defined network node;
  • the software-defined network node is configured to obtain the task issued by the software-defined network agent node according to the second subscription relationship with the software-defined network agent node.
  • a data transmission device including:
  • a creation module configured to establish a first subscription relationship with the task distribution node based on the second subscription relationship with the device node;
  • a distribution module configured to, when obtaining a task set corresponding to the first subscription relationship from the task distribution node, distribute the tasks in the task set to the device node according to the second subscription relationship with the device node. The corresponding device node.
  • a computing device including:
  • the memory is used to store computer-executable instructions
  • the processor is used to execute the computer-executable instructions.
  • the steps of the above data transmission method are implemented.
  • a computer-readable storage medium which stores computer-executable instructions. When the instructions are executed by a processor, the steps of the above data transmission method are implemented.
  • a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to perform the steps of the above data transmission method.
  • Embodiments of this specification provide a data transmission system and method, wherein the data transmission system includes: a task distribution node configured to deliver a first A task set corresponding to the subscription relationship; the device agent node is configured to establish a first subscription relationship to the task distribution node based on the second subscription relationship with the device node, and obtain the task set corresponding to the first subscription relationship from the task distribution node.
  • the tasks in the task set are delivered to the corresponding device nodes according to the second subscription relationship with the device node; the device node is configured to obtain the tasks issued by the device agent node according to the second subscription relationship with the device agent node.
  • Task Due to the addition of the device agent node, the device node can subscribe to tasks from the device agent node and then subscribe to the task distribution node through the device agent node, which reduces the communication resource usage of the task distribution node.
  • Figure 1 shows an architectural diagram of a data transmission system provided according to an embodiment of this specification
  • Figure 2 is a flow chart of a data transmission method provided by an embodiment of this specification
  • Figure 3 shows a schematic diagram of a data transmission method provided according to an embodiment of this specification
  • Figure 4 is a processing flow chart of a data transmission method provided by an embodiment of this specification.
  • Figure 5 is a schematic structural diagram of a data transmission device provided by an embodiment of this specification.
  • Figure 6 is a structural block diagram of a computing device provided by an embodiment of this specification.
  • first, second, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other.
  • the first may also be called the second, and similarly, the second may also be called the first.
  • the word "if” as used herein may be interpreted as "when” or “when” or “in response to determining.”
  • Token an asynchronous task distribution is called a token.
  • a changes set contains a change set ID, distribution status and a set of tasks.
  • Subscription Subscription, the subscription relationship includes topics and subscribers.
  • Topic a concept defined to implement the ability to push different content to different devices, a task belongs to For a topic, the device can obtain all notifications under the topic by subscribing to the topic.
  • Task Contains subject, object identification, timestamp, task data, etc.
  • SDN Software Defined Network
  • This specification also relates to a data transmission method, a data transmission device, a computing device, and a computer-readable storage medium. In the following embodiments, one by one Explain in detail.
  • Figure 1 shows an architectural diagram of a data transmission system provided according to an embodiment of this specification.
  • the data transmission system includes:
  • the task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the device agent node according to the first subscription relationship with the device agent node;
  • the device agent node is configured to establish a first subscription relationship to the task distribution node according to the second subscription relationship with the device node, in the case of obtaining a task set corresponding to the first subscription relationship from the task distribution node. Next, deliver the tasks in the task set to the corresponding device node according to the second subscription relationship with the device node;
  • the device node is configured to obtain the task issued by the device agent node according to the second subscription relationship with the device agent node.
  • the task distribution node can be understood as a node that delivers tasks, for example, a storage computing node;
  • the device agent can be understood as an intermediate node between the task distribution node and the device node, which can obtain tasks from the task distribution node and download them to the device node.
  • Send tasks; device nodes can be understood as nodes that apply tasks; task sets can be understood as topics.
  • the data transmission system consists of three parts: storage computing node, device agent node, and device node.
  • the device agent node subscribes to the storage computing node as the first-level subscription, and the device node registers and subscribes to the device agent node as the first-level subscription.
  • Secondary subscription the specific implementation is as follows:
  • the device agent node is a storage computing node, and the storage computing node is responsible for task distribution and task status feedback.
  • the storage computing node is responsible for distributing tasks to the device agent nodes.
  • the storage computing node receives the tasks expressed in the form of a change set, stores the original change set in the data storage, and re-creates the tasks based on the topics subscribed by different device agent nodes. Organize the change set and deliver the reorganized change set to the corresponding device agent.
  • the storage computing node is also responsible for receiving the task status obtained from the device agent and summarizing it into the total task status.
  • the device agent node subscribes to the topic and is responsible for distributing tasks to corresponding devices and obtaining task status feedback from the devices.
  • a device agent node obtains the topics that the device it represents needs to subscribe to, and the agent subscribes to these topics. After receiving the change set from the storage computing node, the device agent node creates a delivery task to the terminal device.
  • the device node registers with the device agent node, processes the tasks issued by the device agent node, and feeds back the task status. Give the device agent node.
  • the device node is configured to initiate a registration request to a device agent node, and upon receiving a registration completion message sent by the device agent node, establish the third connection with the device agent.
  • device node 1 sends a registration request to device agent node A, and device agent node A returns a registration completion message to device node 1. Then device agent node A completes the registration and creates a two-way connection with device node 1 for subsequent implementation. notifications received.
  • the device node is configured to determine the regional attributes of each device agent node when there are multiple device agent nodes, and determine the target device agent node according to the regional attributes, as well as
  • the geographical attribute of the device agent node can be understood as the geographical location of the device agent node.
  • the device agent node is located in location A.
  • the distance between the geographical location of the device agent node and the geographical location of the device node has a great impact on the communication delay.
  • the geographical location of the device agent node is different from the geographical location of the device node. The closer the distance between locations, the smaller the communication delay. Then, the device can select a nearby device proxy node to reduce communication delay and increase stability.
  • the device agent node includes device agent node A and device agent node B. If the distance between device agent node A and the current device node is relatively close, then device agent node A is selected as the target device agent node, and the device agent node A is established with the target device agent node. Second subscription relationship.
  • the device node is configured to determine the task set attributes of each device agent node when there are multiple device agent nodes, and determine the target device agent according to the task set attributes. node, and
  • the task set attribute of the device agent node can be understood as the topic subscribed by the device agent node.
  • the topics subscribed by the device agent node include topic A and topic B.
  • device agent nodes can also be allocated according to topic types. Dividing device agent nodes according to different topics can reduce the computing pressure of device agent nodes.
  • the device agent node includes device agent node A and device agent node B.
  • the topics subscribed by device agent node A include topic A and topic B.
  • the topics subscribed by device agent node B include topic C and topic D.
  • the device node needs to subscribe Topic A, select device agent node A as the target device agent node, and communicate with the target The device agent node establishes the second subscription relationship.
  • the task distribution node when the data of the target task set changes, is configured to determine the target device agent node corresponding to the target task set according to the first subscription relationship, and send the The target device agent node delivers the target task set;
  • the device agent node is configured to, upon receiving the target task set issued by the task distribution node, determine the target device node corresponding to the target task set according to the second subscription relationship, and send the target device node to the target device node. Send said target task.
  • the task distribution node when the task distribution node receives the data changes in the task, it needs to send the data changes to the device agent node, and then the device agent node sends it to the relevant device nodes.
  • the device agent node that subscribes to topic A is determined, and the added piece of data in topic A is sent to the corresponding device agent node in the form of a change set.
  • the device agent node After the change set is not received, the relevant device nodes that subscribe to topic A will be determined and the change set will be delivered to the relevant device nodes.
  • the device node is configured to respond to a task set modification instruction and update the second subscription relationship with the device agent node according to the target task set carried in the task set modification instruction.
  • the device node may need to add a subscription to a new topic or delete a subscription to a topic, and then delete the task in the subscription relationship. For example, if the device node needs to add a subscription to topic B, then add the subscription relationship of topic B to the second subscription relationship between the device node and the device agent node.
  • the device agent node is configured as:
  • a task set is determined according to the second subscription relationship, and if the first subscription relationship corresponding to the task set is not established, a first subscription relationship of the task set is established.
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • the device agent node is also configured to:
  • Embodiments of this specification provide a data transmission system including: a task distribution node configured to deliver a task set corresponding to the first subscription relationship to the device agent node according to the first subscription relationship with the device agent node; the device agent node is Configured to establish a first subscription relationship to the task distribution node based on the second subscription relationship with the device node, and in the case of obtaining a task set corresponding to the first subscription relationship from the task distribution node, based on the second subscription relationship with the device node , delivers the tasks in the task set to the corresponding device node; the device node is configured to obtain the tasks issued by the device agent node according to the second subscription relationship with the device agent node. Due to the addition of equipment The device agent node enables the device node to subscribe to tasks from the device agent node, and then subscribes to the task distribution node through the device agent node, thereby reducing the communication resource usage of the task distribution node.
  • Figure 2 shows a flow chart of a data transmission method provided according to an embodiment of this specification, which specifically includes the following steps.
  • Step 202 Establish a first subscription relationship with the task distribution node based on the second subscription relationship with the device node.
  • the device node needs to register with the device agent node to establish a second subscription relationship, and then based on the topic to which the device node subscribes, the device agent node then establishes a first subscription relationship with the task distribution node.
  • establishing a first subscription relationship to the task distribution node based on the second subscription relationship with the device node includes:
  • Figure 3 shows a schematic diagram illustrating a data transmission method provided according to an embodiment of this specification, which includes a storage computing node, a device agent node A and a device agent node B, and a device node 1.
  • Device node 2, device node 3, device node 4, and device node 5 determine topic A based on the second subscription relationship between device node 1 and device agent node A, and determine whether there is a first connection between topic A and the storage computing node. Subscription relationship. If the first subscription relationship including topic A and storage computing node already exists, the subscription processing will not be performed. If it does not exist, a subscription relationship between topic A and device agent node A will be created, and the subscription relationship will be created on device agent node A. Store new subscription relationships in memory.
  • Step 204 When the task set corresponding to the first subscription relationship is obtained from the task distribution node, deliver the tasks in the task set to the corresponding device according to the second subscription relationship with the device node. node.
  • the device agent node obtains the subscribed related task set and sends the tasks in the subscribed related task set to the locally registered device node.
  • issuing the tasks in the task set to the corresponding device nodes includes:
  • the device agent After receiving the change set, the device agent finds all the devices that follow the topic based on the topic and obtains the device list.
  • the second subscription relationship determines that the corresponding devices are device node 1, device node 2, device node 3, and device node 4. To the device node 1. Device node 2, device node 3, and device node 4 deliver the task in topic A.
  • issuing the tasks in the task set to the corresponding device includes:
  • each asynchronous task issuance is called a token, and all token statuses are queried in chronological order.
  • the token has six states, namely "initialization state”, “analysis state”, “running state”, “successful state”, “running error state”, and “failure state”.
  • Tokens store two pieces of information, token content and token status.
  • Token content stores change sets, including multiple topics and task lists contained in each topic; token status stores progress updates, including status, start time, number of affected devices, number of affected tasks, number of completed devices, and number of completed tasks and number of errors.
  • the "Initialization State” state indicates that the token is established for the first time. At this time, the token content and token status are stored in the external memory.
  • the "Analysis State” state indicates It is in the analysis state.
  • the device agent is still calculating the device list associated with the change set and creating a delivery task;
  • “Running state” indicates the execution state, and the device agent processes the tasks delivered to the device;
  • “Successful state” indicates execution Completed;
  • “Running Error Status” means that the task has been issued, but the execution has not yet been completed;
  • “Failure Status” means that the execution has been completed but an error occurred.
  • the device agent feeds back the task status to the storage computing node.
  • the feedback information obtained by the storage computing node is summarized and calculated, and the execution status of the change set is stored in the database for future reference.
  • the feedback information includes the number of affected devices, the number of affected tasks, the number of completed devices, the number of completed tasks and the number of errors.
  • the device list is: device node 1, device node 2, device node 3, and device node 4.
  • the tasks in topic A are delivered to device node 1, device node 2, device node 3, and device node 4 respectively, that is, create Deliver the transaction, set the status of the delivered transaction to "Analysis Status", and deliver the tasks in topic A to device node 1, device node 2, device node 3, and device node 4 respectively according to the delivered transaction.
  • the data transmission method in the embodiment of this specification also includes:
  • the device agent node feeds back the task status to the storage computing node.
  • the storage computing node receives the task status feedback from all connected device agent nodes, it feeds back the task status. Summarized into total task status feedback, marked as "Running Status".
  • tasks in topic A are delivered to device node 1, device node 2, device node 3, and device node 4 respectively based on the delivered transactions.
  • these delivered transactions are marked as “running status” and Feedback the status of the transaction issued to the storage computing node, that is, the status of the transaction issued by device node 1 is “running status”, the status of the transaction issued by device node 2 is “running status”, and the status of the transaction issued by device node 3 is “running status”.
  • the status of the transaction issued is "running status”
  • the status of the transaction issued by device node 4 is “running status"
  • modifying the status of the issued transaction according to the task distribution result includes:
  • the device agent node starts to execute the distribution task.
  • the storage computing node marks the task as "successful status”.
  • the storage settlement node receives return messages from the relevant device agent nodes of all change sets, and the return messages are in the completed state, the change set is marked as "completed state" and stored in the database.
  • device node 1 executes the task in topic A. After the execution is completed, it feeds back a message to device agent node A.
  • the device agent node marks the status of the transaction issued by device node 1 as "successful status", and device node 2 executes the topic. After the execution of the task in A is completed, a message is fed back to the device agent node A.
  • the device agent node marks the status of the transaction issued by device node 2 as "successful status”.
  • Device node 3 executes the task in topic A. During execution After completion, the message is fed back to the device agent node A.
  • the device agent node marks the status of the transaction issued by the device node 3 as "successful status”.
  • Device section 4 executes the task in topic A. After the execution is completed, it reports to the device agent Node A feeds back the message, and the device agent node marks the status of the transaction issued by device node 4 as "success status”. Correspondingly, it feeds back the "success status" of the transaction issued to the storage computing node, so that the storage computing node will always Task status feedback, marked as "success status”.
  • modifying the status of the issued transaction according to the task distribution result includes:
  • the task is marked as failed and added to the device's failed task list.
  • the device agent node will determine whether an error occurs for the first time based on the completion of the task, and whether the time since the last feedback of the task status has exceeded the cooling time.
  • device node 1 executes the task in topic A. After the execution is completed, it feeds back a message to device agent node A.
  • the device agent node marks the status of the transaction issued by device node 1 as "successful status", and device node 2 executes the topic. After the execution of the task in A fails, a message is fed back to the device agent node A.
  • the device agent node marks the status of the transaction issued by device node 2 as "failed status”.
  • Device node 3 executes the task in topic A. During execution After completion, the message is fed back to the device agent node A.
  • the device agent node marks the status of the transaction issued by the device node 3 as "successful status”.
  • Device section 4 executes the task in topic A.
  • the device agent Node A After the execution is completed, it reports to the device agent Node A feeds back the message, and the device agent node marks the status of the transaction issued by device node 4 as "success status”. Correspondingly, it feeds back the "success status" of the transaction issued to the storage computing node, so that the storage computing node will always Task status feedback, marked as "Running Error Status”. Add "Add to failed tasks list" Device node 2 failed to deliver the task in topic A.”
  • it also includes:
  • the retry mechanism is triggered and the task is retried.
  • device node 2 executes the task in topic A. After the execution fails, it feeds back a message to device agent node A.
  • the device agent node marks the status of the transaction issued by device node 2 as "failed status" and executes it on device node 2.
  • the retry mechanism is triggered 3 milliseconds after the task in topic A fails.
  • delivering the tasks in the task set to the corresponding device according to the failed task list includes:
  • the change set is read from the storage, the subscription of each topic is recalculated, and distributed to the corresponding device agent, and the number of retries of the delivery task is increased by one.
  • the device agent node finds all the devices paying attention to the topic based on topic A, and obtains the device list.
  • the device list is: device node 1, device node 2, device node 3, device node 4, traverses the device list, and checks the failed task list. Whether the task exists, if so, create a resend task.
  • the error has been resolved before the retry mechanism, then the corresponding task does not exist in the failed task list. If it does not exist, it means that the device has successfully retransmitted, and the task is ignored. .
  • the retransmission results are summarized and fed back to the task distribution node. If successful, the token status is set to "success status", otherwise the token status is still "failure status”. If the number of retries exceeds the retry threshold, output to the alarm system.
  • the number of retries of the delivered task will be increased by one. If the threshold of the number of retries is three, then when the number of retries reaches three, then Output to the alarm system so that the problem can be solved manually.
  • it also includes:
  • the regional attribute can be understood as the geographical location, for example, place A.
  • the device can choose Close device agent nodes to reduce communication delays and increase stability.
  • the device agent node includes device agent node A and device agent node B.
  • the distance between device agent node A and the current device node is relatively close.
  • device agent node B When the device node sends a registration request to device agent node B, device agent node B will register. The request is forwarded to device agent node A, which serves as the target device agent node and establishes the second subscription relationship with the target device agent node A.
  • it also includes:
  • the task set attribute can be understood as the subscribed topic.
  • the subscribed topics include topic A and topic B.
  • device agent nodes can also be allocated according to topic types, and dividing device agent nodes according to different topics can reduce the computing pressure of the device agent nodes.
  • the device agent node includes device agent node A and device agent node B.
  • the topics subscribed by device agent node A include topic A and topic B.
  • the topics subscribed by device agent node B include topic C and topic D.
  • the device node needs to subscribe Topic A, when the device node sends a registration request to the device agent node B, the device agent node B forwards the registration request to the device agent node A.
  • the device agent node A serves as the target device agent node and establishes with the target device agent node A. The second subscription relationship.
  • Embodiments of this specification provide a data transmission method, which includes: establishing a first subscription relationship to a task distribution node based on a second subscription relationship with a device node, and obtaining a task set corresponding to the first subscription relationship from the task distribution node. Next, according to the second subscription relationship with the device node, the tasks in the task set are delivered to the corresponding device node. Due to the addition of the device agent node, the device node can subscribe to the task from the device agent node, and then submit the task to the task through the device agent node. The distribution node subscribes to the task, which reduces the communication resource usage of the task distribution node.
  • FIG. 4 shows a process flow chart of a data transmission method provided by an embodiment of this specification, which specifically includes the following steps.
  • Step 402 The device agent node determines a task set according to the second subscription relationship.
  • topic A is determined according to the second subscription relationship between device node 1 and device agent node A.
  • Step 404 When the device agent node has not established a first subscription relationship corresponding to the task set, establish a first subscription relationship to the task distribution node according to the task set.
  • Step 406 The device agent node determines the corresponding device according to the second subscription relationship corresponding to the task set.
  • the second subscription relationship determines that the corresponding devices are device node 1, device node 2, device node 3, and device node 4.
  • Step 408 The device agent node creates a issued transaction for the task set, marks the status of the issued transaction as an analysis status, and feeds back the status of the issued transaction to the task distribution node.
  • the device list is: device node 1, device node 2, device node 3, and device node 4.
  • the tasks in topic A are delivered to device node 1, device node 2, device node 3, and device node 4 respectively, that is, , create a issued transaction, and set the status of the issued transaction to "Analysis Status".
  • Step 410 The device agent node delivers the tasks in the task set to the corresponding device according to the delivery transaction.
  • the tasks in topic A are delivered to device node 1, device node 2, device node 3, and device node 4 respectively according to the delivery transaction.
  • Step 412 The device agent node receives the task distribution result returned by each device node.
  • device node 1 executes the task in topic A. After the execution is completed, it feeds back a message to device agent node A.
  • the device agent node marks the status of the transaction issued by device node 1 as "successful status", and device node 2 Execute the task in topic A. After the execution is completed, a message is fed back to the device agent node A.
  • the device agent node marks the status of the transaction issued by device node 2 as "successful status”.
  • Device node 3 executes the task in topic A. After the task is executed, a message is fed back to the device agent node A.
  • the device agent node marks the status of the transaction issued by the device node 3 as "successful status”.
  • Device section 4 executes the task in topic A. After the execution is completed, Finally, the message is fed back to the device agent node A, and the device agent node marks the status of the transaction issued by the device node 4 as "successful status”.
  • Step 414 When each task distribution result is successful, the device agent node marks the status of the issued transaction as a successful status, and feeds back the status of the issued transaction to the task distribution node.
  • the "success status" of the transaction is fed back to the storage computing node, so that the storage computing node feeds back the total task status and marks it as "success status”.
  • the device agent node is added, so that the device node can subscribe to tasks from the device agent node, and then subscribe to the task to the task distribution node through the device agent node, thereby reducing the communication resource usage of the task distribution node.
  • This manual also provides a data transmission system, including:
  • the software-defined network task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the software-defined network agent node according to the first subscription relationship with the software-defined network agent node;
  • the software-defined network proxy node is configured to establish a first subscription relationship to the software-defined network task distribution node according to the second subscription relationship with the software-defined network node, and obtain the software-defined network task distribution node from the software-defined network task distribution node. In the case of a task set corresponding to the first subscription relationship, deliver the tasks in the task set to the corresponding software-defined network node according to the second subscription relationship with the software-defined network node;
  • the software-defined network node is configured to obtain the task issued by the software-defined network agent node according to the second subscription relationship with the software-defined network agent node.
  • the software-defined network agent node can be a gateway, private cloud and other devices.
  • the software-defined network node is configured to initiate a registration request to the software-defined network proxy node, and upon receiving the registration completion message sent by the software-defined network proxy node, communicate with the software-defined network proxy node.
  • the device agent establishes the second subscription relationship.
  • the software-defined network agent node is configured to determine a task set according to the second subscription relationship, and establish all the task sets when the first subscription relationship corresponding to the task set is not established.
  • the first subscription relationship of the above task set is not established.
  • the software-defined network node is configured to determine the regional attributes of each software-defined network agent node when there are multiple software-defined network agent nodes, and determine the regional attributes of each software-defined network agent node according to the regional properties identify the target software-defined network agent node, and
  • the software-defined network node is configured as a software-defined network agent When there are multiple nodes, determine the task set attributes of each software-defined network agent node, and determine the target software-defined network agent node according to the task set attributes, and
  • the software-defined network task distribution node when the data of the target task set changes, is configured to determine the target software definition corresponding to the target task set according to the first subscription relationship. a network agent node, and delivers the target task set to the target software-defined network agent node;
  • the software-defined network proxy node is configured to determine the target software-defined network node corresponding to the target task set according to the second subscription relationship when receiving the target task set issued by the software-defined network task distribution node, and sends the target task to the target software-defined network node.
  • the software-defined network node is configured to respond to a task set modification instruction and update the communication with the software-defined network agent node according to the target task set carried in the task set modification instruction. Second subscription relationship.
  • the software-defined network proxy node is configured as:
  • a task set is determined according to the second subscription relationship, and if the first subscription relationship corresponding to the task set is not established, a first subscription relationship of the task set is established.
  • the software-defined network proxy node is also configured to:
  • the software-defined network proxy node is also configured to:
  • the software-defined network proxy node is also configured to:
  • the software-defined network proxy node is also configured to:
  • the software-defined network proxy node is also configured to:
  • the status of the issued transaction is marked as successful, and feeding back the status of the issued transaction to the software-defined network task distribution node.
  • the software-defined network proxy node is also configured to:
  • the software-defined network proxy node is also configured to:
  • the software-defined network proxy node is also configured to:
  • the software-defined network proxy node is also configured to:
  • the software-defined network proxy node is also configured to:
  • Embodiments of this specification provide a data transmission system including: a software-defined network task distribution node configured to deliver tasks corresponding to the first subscription relationship to the software-defined network agent node according to the first subscription relationship with the software-defined network agent node. set; the software-defined network proxy node is configured to establish a first subscription relationship to the software-defined network task distribution node based on the second subscription relationship with the software-defined network node, and obtain the first subscription relationship from the software-defined network task distribution node In the case of the corresponding task set, the tasks in the task set are delivered to the corresponding software-defined network node according to the second subscription relationship with the software-defined network node; the software-defined network node is configured to be based on the software-defined network proxy node.
  • the second subscription relationship is to obtain the tasks issued by the software-defined network agent node. Due to the addition of the device agent node, the device node can subscribe to tasks from the device agent node and then subscribe to the task distribution node through the device agent node, which reduces the communication resource usage of the task distribution node.
  • Figure 5 shows a schematic structural diagram of a data transmission device provided by an embodiment of this specification. As shown in Figure 5, the device includes:
  • the creation module 502 is configured to establish a first subscription relationship to the task distribution node based on the second subscription relationship with the device node;
  • the distribution module 504 is configured to, after obtaining the task set corresponding to the first subscription relationship from the task distribution node, distribute the tasks in the task set according to the second subscription relationship with the device node. To the corresponding device node.
  • the creation module 502 is also configured to:
  • the distribution module 504 is also configured to:
  • the distribution module 504 is also configured to:
  • the distribution module 504 is also configured to:
  • the distribution module 504 is also configured to:
  • the distribution module 504 is also configured to:
  • the distribution module 504 is also configured to:
  • the distribution module 504 is also configured to:
  • Embodiments of this specification provide a data transmission device, wherein the data transmission device includes: a creation module configured to establish a first subscription relationship to a task distribution node based on a second subscription relationship with a device node; a distribution module configured to When the task set corresponding to the first subscription relationship is obtained from the task distribution node, the tasks in the task set are distributed to the corresponding device node according to the second subscription relationship with the device node. Due to the addition of the device agent node, the device node can subscribe to tasks from the device agent node and then subscribe to the task distribution node through the device agent node, which reduces the communication resource usage of the task distribution node.
  • the above is a schematic solution of a data transmission device in this embodiment. It should be noted that the technical solution of the data transmission device and the technical solution of the above-mentioned data transmission method belong to the same concept. For details that are not described in detail in the technical solution of the data transmission device, please refer to the description of the technical solution of the above-mentioned data transmission method. .
  • Figure 6 shows a structural block diagram of a computing device 600 provided according to an embodiment of this specification.
  • Components of the computing device 600 include, but are not limited to, memory 610 and processor 620 .
  • the processor 620 and the memory 610 are connected through a bus 630, and the database 650 is used to save data.
  • Computing device 600 also includes an access device 640 that enables computing device 600 to communicate via one or more networks 660 .
  • networks include the Public Switched Telephone Network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communications networks such as the Internet.
  • Access device 640 may include one or more of any type of network interface (eg, a network interface card (NIC)), wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interconnection for Microwave Access (WLAN) Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, etc.
  • NIC network interface card
  • the above-mentioned components of the computing device 600 and other components not shown in FIG. 6 may also be connected to each other, such as through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 6 is for illustrative purposes only and does not limit the scope of this description. Those skilled in the art can add or replace other components as needed.
  • Computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile telephone (e.g., smartphone ), a wearable computing device (e.g., smart watch, smart glasses, etc.) or other type of mobile device, or a stationary computing device such as a desktop computer or PC.
  • a mobile computer or mobile computing device e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.
  • a mobile telephone e.g., smartphone
  • a wearable computing device e.g., smart watch, smart glasses, etc.
  • stationary computing device such as a desktop computer or PC.
  • Computing device 600 may also be a mobile or stationary server.
  • the processor 620 is configured to execute the following computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above data transmission method are implemented.
  • the above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned data transmission method belong to the same concept. For details that are not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above data transmission method.
  • An embodiment of the present specification also provides a computer-readable storage medium that stores computer-executable instructions.
  • the computer-executable instructions are executed by a processor, the steps of the above data transmission method are implemented.
  • the above is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above-mentioned data transmission method belong to the same concept. For details that are not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-mentioned data transmission method.
  • An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to perform the steps of the above data transmission method.
  • the computer instructions include computer program code, which may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signals telecommunications signals
  • software distribution media etc.
  • the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of legislation and patent practice in the jurisdiction.
  • the computer-readable medium Excludes electrical carrier signals and telecommunications signals.

Abstract

Embodiments of the present invention provide a data transmission system and method. The data transmission system comprises: a task distribution node configured to issue a task set corresponding to a first subscription relationship to a device proxy node according to the first subscription relationship with the device proxy node; the device proxy node configured to establish a first subscription relationship for the task distribution node according to a second subscription relationship with a device node, and in a case of obtaining the task set corresponding to the first subscription relationship from the task distribution node, issue a task in the task set to the corresponding device node according to the second subscription relationship with the device node; and the device node configured to obtain the task issued by the device proxy node according to the second subscription relationship with the device proxy node. Due to the fact that the device proxy node is added, the device node can subscribe a task from the device proxy node, the task is subscribed to the task distribution node by means of the device proxy node, and the use amount of communication resources of the task distribution node is reduced.

Description

数据传输系统以及方法Data transmission system and method
本申请要求于2022年04月02日提交中国专利局、申请号为202210345992.6、申请名称为“数据传输系统以及方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on April 2, 2022, with the application number 202210345992.6 and the application title "Data transmission system and method", the entire content of which is incorporated into this application by reference.
技术领域Technical field
本说明书实施例涉及数据处理技术领域,特别涉及一种数据传输系统。The embodiments of this specification relate to the field of data processing technology, and in particular, to a data transmission system.
背景技术Background technique
在一个大规模终端和服务器构成的系统中任务分发与错误恢复的功能是必不可少的。在这类系统中,通常需要高频度将任务分发到不同终端执行,并完成结果的反馈,一旦终端发生错误,需要及时重试任务。在这个过程中一个任务属于一个话题,终端通过订阅话题,获得话题以变更集形式下发的任务。任务分发使用设备和话题间的订阅关系,及时将派出的任务交给目标终端,确认任务的实现,获得反馈;而在任务下发执行时,可能会由于终端设备的错误或终端设备离线等原因导致总任务执行失败,所以需要及时发现终端上发生的任务失败错误,在发现终端出错后需要以一定的逻辑重试,实现错误恢复,以维持整个配置分发系统的正常运作。因此,任务分发和错误恢复的方法对于配置分发领域是至关重要的。The functions of task distribution and error recovery are essential in a system composed of large-scale terminals and servers. In this type of system, it is usually necessary to distribute tasks to different terminals for execution at a high frequency and complete the feedback of the results. Once an error occurs on the terminal, the task needs to be retried in a timely manner. In this process, a task belongs to a topic, and the terminal obtains the task issued by the topic in the form of a change set by subscribing to the topic. Task distribution uses the subscription relationship between the device and the topic to deliver the dispatched task to the target terminal in a timely manner, confirm the implementation of the task, and obtain feedback; when the task is issued for execution, it may be due to errors in the terminal device or the terminal device is offline. As a result, the total task execution fails, so task failure errors that occur on the terminal need to be discovered in time. After the terminal error is discovered, it needs to be retried with certain logic to achieve error recovery to maintain the normal operation of the entire configuration distribution system. Therefore, methods of task distribution and error recovery are crucial to configuring the distribution domain.
但是,随着系统复杂度的提升和规模的不断扩张,大规模终端场景需要容纳海量终端,而海量终端意味着海量订阅关系,比如,云网络中的一个话题需要给一台终端分发任务,那么它会通知所有订阅它的设备,这种海量的订阅连接关系和通知,将占据大量不必要的存储和计算资源。而大规模终端场景的系统,如云网络中,计算和存储资源是有限的,如果任务分发和错误恢复功能占据了过多的资源,将导致网络性能的降低。However, as the complexity of the system increases and the scale continues to expand, large-scale terminal scenarios need to accommodate massive terminals, and massive terminals mean massive subscription relationships. For example, if a topic in the cloud network needs to distribute tasks to a terminal, then It will notify all devices that subscribe to it. This massive subscription connection relationship and notification will occupy a lot of unnecessary storage and computing resources. In systems with large-scale terminal scenarios, such as cloud networks, computing and storage resources are limited. If task distribution and error recovery functions occupy too many resources, network performance will be reduced.
发明内容Contents of the invention
有鉴于此,本说明书实施例提供了两种数据传输系统。本说明书一个或者多个实施例同时涉及一种数据传输方法,一种数据装置,一种计算设备,一种计算机可读存储介质以及一种计算机程序,以解决现有技术中存在的技术缺陷。In view of this, embodiments of this specification provide two data transmission systems. One or more embodiments of this specification simultaneously relate to a data transmission method, a data device, a computing device, a computer-readable storage medium, and a computer program to solve technical deficiencies existing in the prior art.
根据本说明书实施例的第一方面,提供了一种数据传输系统,包括:According to a first aspect of the embodiment of this specification, a data transmission system is provided, including:
任务分发节点,被配置为根据与设备代理节点的第一订阅关系,向所述设备代理节点下发所述第一订阅关系对应的任务集;The task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the device agent node according to the first subscription relationship with the device agent node;
设备代理节点,被配置为根据与设备节点的第二订阅关系,建立对所述任务分发节点的第一订阅关系,在从所述任务分发节点获得所述第一订阅关系对应的任务集的 情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点;The device agent node is configured to establish a first subscription relationship to the task distribution node according to the second subscription relationship with the device node, and obtain the task set corresponding to the first subscription relationship from the task distribution node. In this case, deliver the tasks in the task set to the corresponding device node according to the second subscription relationship with the device node;
设备节点,被配置为根据与所述设备代理节点的第二订阅关系,获取所述设备代理节点下发的任务。The device node is configured to obtain the task issued by the device agent node according to the second subscription relationship with the device agent node.
根据本说明书实施例的第二方面,提供了一种数据传输方法,包括:According to the second aspect of the embodiment of this specification, a data transmission method is provided, including:
根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系;Establish a first subscription relationship to the task distribution node according to the second subscription relationship with the device node;
在从所述任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点。When the task set corresponding to the first subscription relationship is obtained from the task distribution node, the tasks in the task set are distributed to the corresponding device node according to the second subscription relationship with the device node.
根据本说明书实施例的第三方面,提供了一种数据传输系统,包括:According to the third aspect of the embodiment of this specification, a data transmission system is provided, including:
软件定义网络任务分发节点,被配置为根据与软件定义网络代理节点的第一订阅关系,向所述软件定义网络代理节点下发所述第一订阅关系对应的任务集;The software-defined network task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the software-defined network agent node according to the first subscription relationship with the software-defined network agent node;
软件定义网络代理节点,被配置为根据与软件定义网络节点的第二订阅关系,建立对所述软件定义网络任务分发节点的第一订阅关系,在从所述软件定义网络任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述软件定义网络节点的第二订阅关系,将所述任务集中的任务下发给对应的软件定义网络节点;The software-defined network proxy node is configured to establish a first subscription relationship to the software-defined network task distribution node according to the second subscription relationship with the software-defined network node, and obtain the software-defined network task distribution node from the software-defined network task distribution node. In the case of a task set corresponding to the first subscription relationship, deliver the tasks in the task set to the corresponding software-defined network node according to the second subscription relationship with the software-defined network node;
软件定义网络节点,被配置为根据与所述软件定义网络代理节点的第二订阅关系,获取所述软件定义网络代理节点下发的任务。The software-defined network node is configured to obtain the task issued by the software-defined network agent node according to the second subscription relationship with the software-defined network agent node.
根据本说明书实施例的第四方面,提供了一种数据传输装置,包括:According to the fourth aspect of the embodiments of this specification, a data transmission device is provided, including:
创建模块,被配置为根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系;A creation module configured to establish a first subscription relationship with the task distribution node based on the second subscription relationship with the device node;
分发模块,被配置为在从所述任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点。A distribution module configured to, when obtaining a task set corresponding to the first subscription relationship from the task distribution node, distribute the tasks in the task set to the device node according to the second subscription relationship with the device node. The corresponding device node.
根据本说明书实施例的第五方面,提供了一种计算设备,包括:According to a fifth aspect of the embodiments of this specification, a computing device is provided, including:
存储器和处理器;memory and processor;
所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令,该计算机可执行指令被处理器执行时实现上述数据传输方法的步骤。The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above data transmission method are implemented.
根据本说明书实施例的第六方面,提供了一种计算机可读存储介质,其存储有计算机可执行指令,该指令被处理器执行时实现上述数据传输方法的步骤。According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the instructions are executed by a processor, the steps of the above data transmission method are implemented.
根据本说明书实施例的第七方面,提供了一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述数据传输方法的步骤。According to a seventh aspect of the embodiment of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to perform the steps of the above data transmission method.
本说明书实施例提供一种数据传输系统以及方法,其中数据传输系统包括:任务分发节点,被配置为根据与设备代理节点的第一订阅关系,向设备代理节点下发第一 订阅关系对应的任务集;设备代理节点,被配置为根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系,在从任务分发节点获得第一订阅关系对应的任务集的情况下,根据与设备节点的第二订阅关系,将任务集中的任务下发给对应的设备节点;设备节点,被配置为根据与设备代理节点的第二订阅关系,获取设备代理节点下发的任务。由于增加了设备代理节点,使得设备节点可以从设备代理节点订阅任务,再通过设备代理节点向任务分发节点订阅任务,减少了任务分发节点的通信资源使用量。Embodiments of this specification provide a data transmission system and method, wherein the data transmission system includes: a task distribution node configured to deliver a first A task set corresponding to the subscription relationship; the device agent node is configured to establish a first subscription relationship to the task distribution node based on the second subscription relationship with the device node, and obtain the task set corresponding to the first subscription relationship from the task distribution node. In this case, the tasks in the task set are delivered to the corresponding device nodes according to the second subscription relationship with the device node; the device node is configured to obtain the tasks issued by the device agent node according to the second subscription relationship with the device agent node. Task. Due to the addition of the device agent node, the device node can subscribe to tasks from the device agent node and then subscribe to the task distribution node through the device agent node, which reduces the communication resource usage of the task distribution node.
附图说明Description of drawings
图1示出了根据本说明书一个实施例提供的一种数据传输系统的架构图;Figure 1 shows an architectural diagram of a data transmission system provided according to an embodiment of this specification;
图2是本说明书一个实施例提供的一种数据传输方法的流程图;Figure 2 is a flow chart of a data transmission method provided by an embodiment of this specification;
图3示出了根据本说明书一个实施例提供的一种数据传输方法的示意图;Figure 3 shows a schematic diagram of a data transmission method provided according to an embodiment of this specification;
图4是本说明书一个实施例提供的一种数据传输方法的处理过程流程图;Figure 4 is a processing flow chart of a data transmission method provided by an embodiment of this specification;
图5是本说明书一个实施例提供的一种数据传输装置的结构示意图;Figure 5 is a schematic structural diagram of a data transmission device provided by an embodiment of this specification;
图6是本说明书一个实施例提供的一种计算设备的结构框图。Figure 6 is a structural block diagram of a computing device provided by an embodiment of this specification.
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本说明书。但是本说明书能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本说明书内涵的情况下做类似推广,因此本说明书不受下面公开的具体实施的限制。In the following description, numerous specific details are set forth to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described here. Those skilled in the art can make similar extensions without violating the connotation of this specification. Therefore, this specification is not limited by the specific implementation disclosed below.
在本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本说明书一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the one or more embodiments of this specification. As used in one or more embodiments of this specification and the appended claims, the singular forms "a," "the" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used in one or more embodiments of this specification refers to and includes any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本说明书一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be called the second, and similarly, the second may also be called the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determining."
首先,对本说明书一个或多个实施例涉及的名词术语进行解释。First, terminology used in one or more embodiments of this specification will be explained.
令牌:Token,一次异步任务分发称为一次令牌。Token: Token, an asynchronous task distribution is called a token.
变更集:一个变更集包含变更集标识,分发状态和一组任务。Change Set: A changes set contains a change set ID, distribution status and a set of tasks.
订阅:Subscription,订阅关系包括话题、订阅者。Subscription: Subscription, the subscription relationship includes topics and subscribers.
话题:Topic,用于实现向不同设备推送不同内容能力而定义的概念,一个任务属 于一个话题,设备可以通过订阅话题来获取到该话题下的所有通知。Topic: Topic, a concept defined to implement the ability to push different content to different devices, a task belongs to For a topic, the device can obtain all notifications under the topic by subscribing to the topic.
任务:包含主题,对象标识,时间戳,任务数据等。Task: Contains subject, object identification, timestamp, task data, etc.
软件定义网络(Software Defined Network,SDN):是一种新型网络创新架构,是网络虚拟化的一种实现方式。Software Defined Network (SDN): It is a new innovative network architecture and an implementation method of network virtualization.
在本说明书中,提供了两种数据传输系统,本说明书同时涉及一种数据传输方法,一种数据传输装置,一种计算设备,以及一种计算机可读存储介质,在下面的实施例中逐一进行详细说明。In this specification, two data transmission systems are provided. This specification also relates to a data transmission method, a data transmission device, a computing device, and a computer-readable storage medium. In the following embodiments, one by one Explain in detail.
参见图1,图1示出了根据本说明书一个实施例提供的一种数据传输系统的架构图,该数据传输系统包括:Referring to Figure 1, Figure 1 shows an architectural diagram of a data transmission system provided according to an embodiment of this specification. The data transmission system includes:
任务分发节点,被配置为根据与设备代理节点的第一订阅关系,向所述设备代理节点下发所述第一订阅关系对应的任务集;The task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the device agent node according to the first subscription relationship with the device agent node;
设备代理节点,被配置为根据与设备节点的第二订阅关系,建立对所述任务分发节点的第一订阅关系,在从所述任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点;The device agent node is configured to establish a first subscription relationship to the task distribution node according to the second subscription relationship with the device node, in the case of obtaining a task set corresponding to the first subscription relationship from the task distribution node. Next, deliver the tasks in the task set to the corresponding device node according to the second subscription relationship with the device node;
设备节点,被配置为根据与所述设备代理节点的第二订阅关系,获取所述设备代理节点下发的任务。The device node is configured to obtain the task issued by the device agent node according to the second subscription relationship with the device agent node.
其中,任务分发节点可以理解为下发任务的节点,例如,存储计算节点;设备代理可以理解为任务分发节点与设备节点之间的中间节点,能够从任务分发节点获取任务,并向设备节点下发任务;设备节点可以理解为应用任务的节点;任务集可以理解为话题。Among them, the task distribution node can be understood as a node that delivers tasks, for example, a storage computing node; the device agent can be understood as an intermediate node between the task distribution node and the device node, which can obtain tasks from the task distribution node and download them to the device node. Send tasks; device nodes can be understood as nodes that apply tasks; task sets can be understood as topics.
在实际应用中,参见图1,数据传输系统由存储计算节点、设备代理节点、设备节点三个部分组成,设备代理节点订阅存储计算节点为第一级订阅,设备节点注册订阅设备代理节点为第二级订阅,具体实施方式如下所述:In practical applications, see Figure 1, the data transmission system consists of three parts: storage computing node, device agent node, and device node. The device agent node subscribes to the storage computing node as the first-level subscription, and the device node registers and subscribes to the device agent node as the first-level subscription. Secondary subscription, the specific implementation is as follows:
设备代理节点为存储计算节点,存储计算节点负责任务的分发和任务状态的反馈。首先,存储计算节点负责给设备代理节点分发任务,存储计算节点收到以变更集的形式表示的任务,将这个原始的变更集存储至数据存储中,并根据不同设备代理节点订阅的话题,重新组织变更集,并把重组后的变更集下发给对应的设备代理。其次,存储计算节点还负责接收从设备代理处获得的任务状态,将其汇总为总任务状态。The device agent node is a storage computing node, and the storage computing node is responsible for task distribution and task status feedback. First, the storage computing node is responsible for distributing tasks to the device agent nodes. The storage computing node receives the tasks expressed in the form of a change set, stores the original change set in the data storage, and re-creates the tasks based on the topics subscribed by different device agent nodes. Organize the change set and deliver the reorganized change set to the corresponding device agent. Secondly, the storage computing node is also responsible for receiving the task status obtained from the device agent and summarizing it into the total task status.
设备代理节点订阅话题并负责将任务分发给对应设备和获得设备的任务状态反馈。一台设备代理节点获取其代理的设备需要订阅的话题,并代理订阅这些话题。收到来自存储计算节点的变更集后,设备代理节点创建给终端设备的下发任务。The device agent node subscribes to the topic and is responsible for distributing tasks to corresponding devices and obtaining task status feedback from the devices. A device agent node obtains the topics that the device it represents needs to subscribe to, and the agent subscribes to these topics. After receiving the change set from the storage computing node, the device agent node creates a delivery task to the terminal device.
设备节点注册到设备代理节点,处理设备代理节点下发的任务并将任务状态反馈 给设备代理节点。The device node registers with the device agent node, processes the tasks issued by the device agent node, and feeds back the task status. Give the device agent node.
在一种可实现方式中,所述设备节点,被配置为向设备代理节点发起注册请求,在收到所述设备代理节点发送的完成注册消息的情况下,与所述设备代理建立所述第二订阅关系。In an implementable manner, the device node is configured to initiate a registration request to a device agent node, and upon receiving a registration completion message sent by the device agent node, establish the third connection with the device agent. 2. Subscription relationship.
例如,设备节点1向设备代理节点A发送注册请求,设备代理节点A向设备节点1返回完成注册消息,则设备代理节点A完成注册,并与设备节点1之间创建双向连接,用于实现后续的通知接收。For example, device node 1 sends a registration request to device agent node A, and device agent node A returns a registration completion message to device node 1. Then device agent node A completes the registration and creates a two-way connection with device node 1 for subsequent implementation. notifications received.
在一种可实现方式中,所述设备节点,被配置为在设备代理节点为多个的情况下,确定各所述设备代理节点的地域属性,并根据所述地域属性确定目标设备代理节点,以及In an implementable manner, the device node is configured to determine the regional attributes of each device agent node when there are multiple device agent nodes, and determine the target device agent node according to the regional attributes, as well as
向所述目标设备代理节点发起注册请求,在收到所述目标设备代理节点发送的完成注册消息的情况下,与所述目标设备代理建立所述第二订阅关系。Initiate a registration request to the target device proxy node, and establish the second subscription relationship with the target device proxy when receiving a registration completion message sent by the target device proxy node.
其中,设备代理节点的地域属性可以理解为设备代理节点的地理位置,例如,设备代理节点位于A地。The geographical attribute of the device agent node can be understood as the geographical location of the device agent node. For example, the device agent node is located in location A.
在实际应用中,设备代理节点的地理位置与设备节点的地理位置之间的距离对通信延迟的有很大的影响,在其他条件相同的情况下,设备代理节点的地理位置与设备节点的地理位置之间的距离越近,通信延迟越小,那么,设备可以选择相近的设备代理节点,以减小通信延迟,增加稳定性。In practical applications, the distance between the geographical location of the device agent node and the geographical location of the device node has a great impact on the communication delay. Under other conditions being the same, the geographical location of the device agent node is different from the geographical location of the device node. The closer the distance between locations, the smaller the communication delay. Then, the device can select a nearby device proxy node to reduce communication delay and increase stability.
例如,设备代理节点包括设备代理节点A和设备代理节点B,设备代理节点A与当前设备节点的距离较近,则选择设备代理节点A作为目标设备代理节点,并与目标设备代理节点建立所述第二订阅关系。For example, the device agent node includes device agent node A and device agent node B. If the distance between device agent node A and the current device node is relatively close, then device agent node A is selected as the target device agent node, and the device agent node A is established with the target device agent node. Second subscription relationship.
在一种可实现方式中,所述设备节点,被配置为在设备代理节点为多个的情况下,确定各所述设备代理节点的任务集属性,并根据所述任务集属性确定目标设备代理节点,以及In an implementable manner, the device node is configured to determine the task set attributes of each device agent node when there are multiple device agent nodes, and determine the target device agent according to the task set attributes. node, and
向所述目标设备代理节点发起注册请求,在收到所述目标设备代理节点发送的完成注册消息的情况下,与所述目标设备代理建立所述第二订阅关系。Initiate a registration request to the target device proxy node, and establish the second subscription relationship with the target device proxy when receiving a registration completion message sent by the target device proxy node.
其中,设备代理节点的任务集属性可以理解为设备代理节点订阅的话题,例如,设备代理节点订阅的话题包括话题A和话题B。The task set attribute of the device agent node can be understood as the topic subscribed by the device agent node. For example, the topics subscribed by the device agent node include topic A and topic B.
在实际应用中,还可以根据话题的类型分配设备代理节点,按照不同的话题划分设备代理节点可以减少设备代理节点的计算压力。In practical applications, device agent nodes can also be allocated according to topic types. Dividing device agent nodes according to different topics can reduce the computing pressure of device agent nodes.
例如,设备代理节点包括设备代理节点A和设备代理节点B,设备代理节点A订阅的话题备包括话题A和话题B,设备代理节点B订阅的话题备包括话题C和话题D,设备节点需要订阅话题A,则选择设备代理节点A作为目标设备代理节点,并与目标 设备代理节点建立所述第二订阅关系。For example, the device agent node includes device agent node A and device agent node B. The topics subscribed by device agent node A include topic A and topic B. The topics subscribed by device agent node B include topic C and topic D. The device node needs to subscribe Topic A, select device agent node A as the target device agent node, and communicate with the target The device agent node establishes the second subscription relationship.
在一种可实现方式中,在目标任务集的数据变更的情况下,所述任务分发节点,被配置为根据所述第一订阅关系确定所述目标任务集对应的目标设备代理节点,并向所述目标设备代理节点下发所述目标任务集;In an implementable manner, when the data of the target task set changes, the task distribution node is configured to determine the target device agent node corresponding to the target task set according to the first subscription relationship, and send the The target device agent node delivers the target task set;
所述设备代理节点,被配置为接收到所述任务分发节点下发的目标任务集的情况下,根据所述第二订阅关系确定目标任务集对应的目标设备节点,并向所述目标设备节点发送所述目标任务。The device agent node is configured to, upon receiving the target task set issued by the task distribution node, determine the target device node corresponding to the target task set according to the second subscription relationship, and send the target device node to the target device node. Send said target task.
其中,在目标任务集的数据变更的情况下可以理解为任务对应的数据存在变化的情况,例如,任务A增加了一项数据。Among them, when the data of the target task set changes, it can be understood that the data corresponding to the task has changed. For example, task A adds an item of data.
在实际应用中,在任务分发节点接收到任务中的数据变化,那么需要将数据变化的情况下发给设备代理节点,再由设备代理节点发送给相关的设备节点。In practical applications, when the task distribution node receives the data changes in the task, it needs to send the data changes to the device agent node, and then the device agent node sends it to the relevant device nodes.
例如,话题A的任务中增加了一项数据,则确定订阅话题A的设备代理节点,并将话题A中的增加一项数据以变更集的形式下发给对应的设备代理节点,设备代理节点没收到变更集后,将确定订阅话题A的相关设备节点,并将变更集下发至相关设备节点。For example, if a piece of data is added to the task of topic A, the device agent node that subscribes to topic A is determined, and the added piece of data in topic A is sent to the corresponding device agent node in the form of a change set. The device agent node After the change set is not received, the relevant device nodes that subscribe to topic A will be determined and the change set will be delivered to the relevant device nodes.
在一种可实现方式中,所述设备节点,被配置为响应于任务集修改指令,根据所述任务集修改指令中携带的目标任务集,更新与所述设备代理节点的第二订阅关系。In an implementable manner, the device node is configured to respond to a task set modification instruction and update the second subscription relationship with the device agent node according to the target task set carried in the task set modification instruction.
在实际应用中,可能设备节点需要增加新的话题的订阅或者删除某个话题的订阅,则将订阅关系中该任务删除。例如,设备节点需要增加话题B的订阅,则在设备节点与设备代理节点的第二订阅关系中添加话题B的订阅关系。In actual applications, the device node may need to add a subscription to a new topic or delete a subscription to a topic, and then delete the task in the subscription relationship. For example, if the device node needs to add a subscription to topic B, then add the subscription relationship of topic B to the second subscription relationship between the device node and the device agent node.
在一种可实现方式中,所述设备代理节点,被配置为:In an implementable manner, the device agent node is configured as:
根据所述第二订阅关系确定任务集,在未建立所述任务集对应的第一订阅关系的情况下,建立所述任务集的第一订阅关系。A task set is determined according to the second subscription relationship, and if the first subscription relationship corresponding to the task set is not established, a first subscription relationship of the task set is established.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
根据所述第二订阅关系确定任务集;Determine a task set according to the second subscription relationship;
在未建立所述任务集对应的第一订阅关系的情况下,根据所述任务集建立对所述任务分发节点的第一订阅关系。If the first subscription relationship corresponding to the task set is not established, establish a first subscription relationship to the task distribution node according to the task set.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
根据所述任务集对应的第二订阅关系确定对应的设备;Determine the corresponding device according to the second subscription relationship corresponding to the task set;
向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
针对所述任务集创建下发事务,并将所述下发事务的状态标记为分析状态,以及将所述下发事务的状态反馈至所述任务分发节点; Create a issued transaction for the task set, mark the status of the issued transaction as an analysis status, and feed back the status of the issued transaction to the task distribution node;
根据所述下发事务向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the delivery transaction.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
接收每个设备节点返回的任务分发结果;Receive the task distribution results returned by each device node;
根据所述任务分发结果修改所述下发事务的状态。Modify the status of the issued transaction according to the task distribution result.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
在每个任务分发结果为成功的情况下,将所述下发事务的状态标记为成功状态,以及将所述下发事务的状态反馈至所述任务分发节点。When each task distribution result is successful, the status of the issued transaction is marked as a successful status, and the status of the issued transaction is fed back to the task distribution node.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
在任意一个任务分发结果为失败的情况下,将所述下发事务的状态标记为失败状态,并在失败任务列表中添加所述任务分发结果对应的任务,以及When any task distribution result is a failure, mark the status of the issued transaction as a failure status, and add the task corresponding to the task distribution result in the failed task list, and
将所述下发事务的状态反馈至所述任务分发节点。Feed back the status of the issued transaction to the task distribution node.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
重新获取所述任务集,并记录获取次数;Reacquire the task set and record the number of acquisitions;
根据所述失败任务列表向对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the failed task list.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
在所述任务在所述失败任务列表中的情况下,针对所述任务下发失败的设备创建重发事务;If the task is in the failed task list, create a reissue transaction for the device that failed to deliver the task;
根据所述重发事务向所述对应的设备下发所述任务。Deliver the task to the corresponding device according to the retransmission transaction.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
接收所述设备节点的注册请求,根据所述注册请求携带的地域属性匹配目标设备代理节点;Receive the registration request from the device node, and match the target device proxy node according to the regional attribute carried in the registration request;
将所述注册请求转发至目标设备代理节点。Forward the registration request to the target device proxy node.
在一种可实现方式中,所述设备代理节点,还被配置为:In an implementable manner, the device agent node is also configured to:
接收所述设备节点的注册请求,根据所述注册请求携带的任务集属性匹配目标设备代理节点;Receive the registration request of the device node, and match the target device proxy node according to the task set attribute carried in the registration request;
将所述注册请求转发至目标设备代理节点。Forward the registration request to the target device proxy node.
本说明书实施例提供一种数据传输系统包括:任务分发节点,被配置为根据与设备代理节点的第一订阅关系,向设备代理节点下发第一订阅关系对应的任务集;设备代理节点,被配置为根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系,在从任务分发节点获得第一订阅关系对应的任务集的情况下,根据与设备节点的第二订阅关系,将任务集中的任务下发给对应的设备节点;设备节点,被配置为根据与设备代理节点的第二订阅关系,获取设备代理节点下发的任务。由于增加了设 备代理节点,使得设备节点可以从设备代理节点订阅任务,再通过设备代理节点向任务分发节点订阅任务,减少了任务分发节点的通信资源使用量。Embodiments of this specification provide a data transmission system including: a task distribution node configured to deliver a task set corresponding to the first subscription relationship to the device agent node according to the first subscription relationship with the device agent node; the device agent node is Configured to establish a first subscription relationship to the task distribution node based on the second subscription relationship with the device node, and in the case of obtaining a task set corresponding to the first subscription relationship from the task distribution node, based on the second subscription relationship with the device node , delivers the tasks in the task set to the corresponding device node; the device node is configured to obtain the tasks issued by the device agent node according to the second subscription relationship with the device agent node. Due to the addition of equipment The device agent node enables the device node to subscribe to tasks from the device agent node, and then subscribes to the task distribution node through the device agent node, thereby reducing the communication resource usage of the task distribution node.
参见图2,图2示出了根据本说明书一个实施例提供的一种数据传输方法的流程图,具体包括以下步骤。Referring to Figure 2, Figure 2 shows a flow chart of a data transmission method provided according to an embodiment of this specification, which specifically includes the following steps.
步骤202:根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系。Step 202: Establish a first subscription relationship with the task distribution node based on the second subscription relationship with the device node.
在实际应用中,设备节点需要向设备代理节点进行注册,以建立第二订阅关系,然后根据设备节点订阅的话题,设备代理节再向任务分发节点建立第一订阅关系。In practical applications, the device node needs to register with the device agent node to establish a second subscription relationship, and then based on the topic to which the device node subscribes, the device agent node then establishes a first subscription relationship with the task distribution node.
具体地,所述根据与设备节点的第二订阅关系,建立对所述任务分发节点的第一订阅关系,包括:Specifically, establishing a first subscription relationship to the task distribution node based on the second subscription relationship with the device node includes:
根据所述第二订阅关系确定任务集;Determine a task set according to the second subscription relationship;
在未建立所述任务集对应的第一订阅关系的情况下,根据所述任务集建立对所述任务分发节点的第一订阅关系。If the first subscription relationship corresponding to the task set is not established, establish a first subscription relationship to the task distribution node according to the task set.
例如,参见图3,图3示出了示出了根据本说明书一个实施例提供的一种数据传输方法的示意图,其中,包括存储计算节点,设备代理节点A和设备代理节点B,以及设备节点1、设备节点2、设备节点3、设备节点4、设备节点5,根据设备节点1与设备代理节点A的第二订阅关系确定话题A,确定是否存在包含话题A的与存储计算节点的第一订阅关系,如果已存在包含话题A与存储计算节点的第一订阅关系,则不执行订阅处理,如果不存在,则创建话题A和设备代理节点A之间的订阅关系,并在设备代理节点A的内存中存储新的订阅关系。For example, referring to Figure 3, Figure 3 shows a schematic diagram illustrating a data transmission method provided according to an embodiment of this specification, which includes a storage computing node, a device agent node A and a device agent node B, and a device node 1. Device node 2, device node 3, device node 4, and device node 5 determine topic A based on the second subscription relationship between device node 1 and device agent node A, and determine whether there is a first connection between topic A and the storage computing node. Subscription relationship. If the first subscription relationship including topic A and storage computing node already exists, the subscription processing will not be performed. If it does not exist, a subscription relationship between topic A and device agent node A will be created, and the subscription relationship will be created on device agent node A. Store new subscription relationships in memory.
步骤204:在从所述任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点。Step 204: When the task set corresponding to the first subscription relationship is obtained from the task distribution node, deliver the tasks in the task set to the corresponding device according to the second subscription relationship with the device node. node.
在实际应用中,在任务分发节点接收到任务的情况下,设备代理节点获取订阅的相关的任务集,并将订阅的相关任务集中的任务下发给在本地注册的设备节点。在一种可实现方式中,所述将所述任务集中的任务下发给对应的设备节点,包括:In practical applications, when the task distribution node receives a task, the device agent node obtains the subscribed related task set and sends the tasks in the subscribed related task set to the locally registered device node. In an implementable manner, issuing the tasks in the task set to the corresponding device nodes includes:
根据所述任务集对应的第二订阅关系确定对应的设备;Determine the corresponding device according to the second subscription relationship corresponding to the task set;
向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device.
在实际应用中,设备代理接收到变更集后,根据话题找到所有关注该话题的设备,得到设备列表。In practical applications, after receiving the change set, the device agent finds all the devices that follow the topic based on the topic and obtains the device list.
例如,参见图3,对于设备代理节点A来说,如果任务集为话题A,则第二订阅关系确定对应的设备为设备节点1,设备节点2,设备节点3,设备节点4,向设备节点1,设备节点2,设备节点3,设备节点4下发话题A中的任务。For example, see Figure 3. For device agent node A, if the task set is topic A, the second subscription relationship determines that the corresponding devices are device node 1, device node 2, device node 3, and device node 4. To the device node 1. Device node 2, device node 3, and device node 4 deliver the task in topic A.
在一种可实现方式中,根据向所述对应的设备下发所述任务集中的任务,包括: In an implementable manner, issuing the tasks in the task set to the corresponding device includes:
针对所述任务集创建下发事务,并将所述下发事务的状态标记为分析状态,以及将所述下发事务的状态反馈至所述任务分发节点;Create a issued transaction for the task set, mark the status of the issued transaction as an analysis status, and feed back the status of the issued transaction to the task distribution node;
根据所述下发事务向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the delivery transaction.
在实际应用中,每一次异步任务下发称作一次令牌,按照时间顺序查询所有的令牌状态。令牌有六种状态,分别为“初始化状态”、“分析状态”、“运行中状态”、“成功状态”、“运行中出错状态”、“失败状态”。令牌存储两部分信息,令牌内容和令牌状态。令牌内容存储变更集,包含多个话题和每个话题中包含的任务列表;令牌状态存储进度更新,包含状态、起始时间、影响设备数、影响任务数、完成设备数、完成任务数和错误数。其中,“初始化状态”状态表示令牌首次建立,此时令牌的内容和令牌状态都被存储中外部存储器,及时中间服务宕机,仍可从外部存储中恢复;“分析状态”状态表示处于分析状态,此时设备代理还在计算该变更集关联的设备列表,并创建下发任务;“运行中状态”表示执行状态,设备代理处理下发给设备的任务;“成功状态”表示执行完成;“运行中出错状态”表示已经出现了下发任务,但是执行尚未完成;“失败状态”表示执行已完成但是出现了错误。下发所述任务集中的任务的情况下,首先遍历设备列表,对每一个设备列表中的设备创建下发任务,这个过程中,任务状态被标记为“分析状态”。当所有的下发任务创建完毕后,设备代理将任务状态反馈给存储计算节点。存储计算节点将得到的反馈信息,进行汇总计算,并将变更集的执行情况存储到数据库中备查。其中,反馈信息包含影响设备数、影响任务数、完成设备数、完成任务数和错误数。In actual applications, each asynchronous task issuance is called a token, and all token statuses are queried in chronological order. The token has six states, namely "initialization state", "analysis state", "running state", "successful state", "running error state", and "failure state". Tokens store two pieces of information, token content and token status. Token content stores change sets, including multiple topics and task lists contained in each topic; token status stores progress updates, including status, start time, number of affected devices, number of affected tasks, number of completed devices, and number of completed tasks and number of errors. Among them, the "Initialization State" state indicates that the token is established for the first time. At this time, the token content and token status are stored in the external memory. Even if the intermediate service goes down, it can still be recovered from the external storage; the "Analysis State" state indicates It is in the analysis state. At this time, the device agent is still calculating the device list associated with the change set and creating a delivery task; "Running state" indicates the execution state, and the device agent processes the tasks delivered to the device; "Successful state" indicates execution Completed; "Running Error Status" means that the task has been issued, but the execution has not yet been completed; "Failure Status" means that the execution has been completed but an error occurred. When delivering tasks in the task set, the device list is first traversed, and a delivery task is created for each device in the device list. During this process, the task status is marked as "analysis status". When all delivered tasks are created, the device agent feeds back the task status to the storage computing node. The feedback information obtained by the storage computing node is summarized and calculated, and the execution status of the change set is stored in the database for future reference. Among them, the feedback information includes the number of affected devices, the number of affected tasks, the number of completed devices, the number of completed tasks and the number of errors.
例如,设备列表为:设备节点1,设备节点2,设备节点3,设备节点4,分别向设备节点1,设备节点2,设备节点3,设备节点4下发话题A中的任务,即,创建下发事务,并将下发事务的状态设置为“分析状态”,分别根据下发事务向设备节点1,设备节点2,设备节点3,设备节点4下发话题A中的任务。For example, the device list is: device node 1, device node 2, device node 3, and device node 4. The tasks in topic A are delivered to device node 1, device node 2, device node 3, and device node 4 respectively, that is, create Deliver the transaction, set the status of the delivered transaction to "Analysis Status", and deliver the tasks in topic A to device node 1, device node 2, device node 3, and device node 4 respectively according to the delivered transaction.
在一种可实现方式中,本说明书实施例的数据传输方法还包括:In an implementable manner, the data transmission method in the embodiment of this specification also includes:
接收每个设备节点返回的任务分发结果;Receive the task distribution results returned by each device node;
根据所述任务分发结果修改所述下发事务的状态。Modify the status of the issued transaction according to the task distribution result.
在实际应用中,当所有的下发任务创建完毕后,设备代理节点将任务状态反馈给存储计算节点,当存储计算节点收到所有连接的设备代理节点的任务状态反馈后,将这些任务状态反馈汇总为总任务状态反馈,标记为“运行中状态”。In actual applications, after all distributed tasks are created, the device agent node feeds back the task status to the storage computing node. When the storage computing node receives the task status feedback from all connected device agent nodes, it feeds back the task status. Summarized into total task status feedback, marked as "Running Status".
例如,分别根据下发事务向设备节点1,设备节点2,设备节点3,设备节点4下发话题A中的任务,在下发完成后,这些下发事务均标记为“运行中状态”,并向存储计算节点进行反馈下发事务的状态,即,设备节点1的下发事务的状态为“运行中状态”,设备节点2的下发事务的状态为“运行中状态”,设备节点3的下发事务的状态为“运行中状态”,设备节点4的下发事务的状态为“运行中状态”,以使存储 计算节点将总任务状态反馈,标记为“运行中状态”。For example, tasks in topic A are delivered to device node 1, device node 2, device node 3, and device node 4 respectively based on the delivered transactions. After the delivery is completed, these delivered transactions are marked as "running status" and Feedback the status of the transaction issued to the storage computing node, that is, the status of the transaction issued by device node 1 is "running status", the status of the transaction issued by device node 2 is "running status", and the status of the transaction issued by device node 3 is "running status". The status of the transaction issued is "running status", and the status of the transaction issued by device node 4 is "running status", so that the storage The computing node feeds back the total task status and marks it as "running status".
具体地,所述根据所述任务分发结果修改所述下发事务的状态,包括:Specifically, modifying the status of the issued transaction according to the task distribution result includes:
在每个任务分发结果为成功的情况下,将所述下发事务的状态标记为成功状态,以及将所述下发事务的状态反馈至所述任务分发节点。When each task distribution result is successful, the status of the issued transaction is marked as a successful status, and the status of the issued transaction is fed back to the task distribution node.
在实际应用中,设备代理节点开始执行分发任务,当每个设备上的任务执行完成后,存储计算节点将任务标记为“成功状态”。当存储结算节点收到所有变更集的相关设备代理节点的返回消息,且返回消息为已完成状态时,标记该变更集为“已完成状态”,并存储在数据库中。In actual applications, the device agent node starts to execute the distribution task. When the task execution on each device is completed, the storage computing node marks the task as "successful status". When the storage settlement node receives return messages from the relevant device agent nodes of all change sets, and the return messages are in the completed state, the change set is marked as "completed state" and stored in the database.
例如,设备节点1执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点1的下发事务的状态标记为“成功状态”,设备节点2执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点2的下发事务的状态标记为“成功状态”,设备节点3执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点3的下发事务的状态标记为“成功状态”,设备节,4执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点4的下发事务的状态标记为“成功状态”,相应地,向存储计算节点进行反馈下发事务的“成功状态”,以使存储计算节点将总任务状态反馈,标记为“成功状态”。For example, device node 1 executes the task in topic A. After the execution is completed, it feeds back a message to device agent node A. The device agent node marks the status of the transaction issued by device node 1 as "successful status", and device node 2 executes the topic. After the execution of the task in A is completed, a message is fed back to the device agent node A. The device agent node marks the status of the transaction issued by device node 2 as "successful status". Device node 3 executes the task in topic A. During execution After completion, the message is fed back to the device agent node A. The device agent node marks the status of the transaction issued by the device node 3 as "successful status". Device section 4 executes the task in topic A. After the execution is completed, it reports to the device agent Node A feeds back the message, and the device agent node marks the status of the transaction issued by device node 4 as "success status". Correspondingly, it feeds back the "success status" of the transaction issued to the storage computing node, so that the storage computing node will always Task status feedback, marked as "success status".
在一种可实现方式中,所述根据所述任务分发结果修改所述下发事务的状态,包括:In an implementable manner, modifying the status of the issued transaction according to the task distribution result includes:
在任意一个任务分发结果为失败的情况下,将所述下发事务的状态标记为失败状态,并在失败任务列表中添加所述任务分发结果对应的任务,以及When any task distribution result is a failure, mark the status of the issued transaction as a failure status, and add the task corresponding to the task distribution result in the failed task list, and
将所述下发事务的状态反馈至所述任务分发节点。Feed back the status of the issued transaction to the task distribution node.
在实际应用中,如果执行失败,则将任务标记为已失败,并在设备的失败任务列表中添加该任务。每当任务执行状态被刷新时,设备代理节点会根据任务的完成情况判断是否首次出现错误,距离上次反馈任务情况是否已大于冷却时间。In a practical application, if execution fails, the task is marked as failed and added to the device's failed task list. Whenever the task execution status is refreshed, the device agent node will determine whether an error occurs for the first time based on the completion of the task, and whether the time since the last feedback of the task status has exceeded the cooling time.
例如,设备节点1执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点1的下发事务的状态标记为“成功状态”,设备节点2执行话题A中的任务,在执行失败后,向设备代理节点A反馈消息,设备代理节点将设备节点2的下发事务的状态标记为“失败状态”,设备节点3执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点3的下发事务的状态标记为“成功状态”,设备节,4执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点4的下发事务的状态标记为“成功状态”,相应地,向存储计算节点进行反馈下发事务的“成功状态”,以使存储计算节点将总任务状态反馈,标记为“运行中出错状态”。在失败任务列表中添加“向 设备节点2下发话题A中的任务失败”。For example, device node 1 executes the task in topic A. After the execution is completed, it feeds back a message to device agent node A. The device agent node marks the status of the transaction issued by device node 1 as "successful status", and device node 2 executes the topic. After the execution of the task in A fails, a message is fed back to the device agent node A. The device agent node marks the status of the transaction issued by device node 2 as "failed status". Device node 3 executes the task in topic A. During execution After completion, the message is fed back to the device agent node A. The device agent node marks the status of the transaction issued by the device node 3 as "successful status". Device section 4 executes the task in topic A. After the execution is completed, it reports to the device agent Node A feeds back the message, and the device agent node marks the status of the transaction issued by device node 4 as "success status". Correspondingly, it feeds back the "success status" of the transaction issued to the storage computing node, so that the storage computing node will always Task status feedback, marked as "Running Error Status". Add "Add to failed tasks list" Device node 2 failed to deliver the task in topic A."
在一种可实现方式中,还包括:In one possible implementation, it also includes:
重新获取所述任务集,并记录获取次数;Reacquire the task set and record the number of acquisitions;
根据所述失败任务列表向对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the failed task list.
在实际应用中,在任务分发结果为失败的情况下,判断失败是否超过配置的重试延迟时间,如果超过配置的重试延迟时间则触发重试机制,重试任务下发。In actual applications, when the task distribution result is a failure, it is determined whether the failure exceeds the configured retry delay time. If the configured retry delay time is exceeded, the retry mechanism is triggered and the task is retried.
例如,设备节点2执行话题A中的任务,在执行失败后,向设备代理节点A反馈消息,设备代理节点将设备节点2的下发事务的状态标记为“失败状态”,在设备节点2执行话题A中的任务失败3毫秒之后,触发重试机制。For example, device node 2 executes the task in topic A. After the execution fails, it feeds back a message to device agent node A. The device agent node marks the status of the transaction issued by device node 2 as "failed status" and executes it on device node 2. The retry mechanism is triggered 3 milliseconds after the task in topic A fails.
具体地,所述根据所述失败任务列表向对应的设备下发所述任务集中的任务,包括:Specifically, delivering the tasks in the task set to the corresponding device according to the failed task list includes:
在所述任务在所述失败任务列表中的情况下,针对所述任务下发失败的设备创建重发事务;If the task is in the failed task list, create a reissue transaction for the device that failed to deliver the task;
根据所述重发事务向所述对应的设备下发所述任务。Deliver the task to the corresponding device according to the retransmission transaction.
在实际应用中,将变化集从存储中读取出来,并重新计算每个话题的订阅,并分发至相应归属的设备代理,将下发任务的重试次数加一。In actual applications, the change set is read from the storage, the subscription of each topic is recalculated, and distributed to the corresponding device agent, and the number of retries of the delivery task is increased by one.
例如,设备代理节点根据话题A找到所有关注该话题的设备,得到设备列表,设备列表为:设备节点1,设备节点2,设备节点3,设备节点4,遍历设备列表,并检查失败任务列表中是否存在该任务,如果存在,则创建重发任务。For example, the device agent node finds all the devices paying attention to the topic based on topic A, and obtains the device list. The device list is: device node 1, device node 2, device node 3, device node 4, traverses the device list, and checks the failed task list. Whether the task exists, if so, create a resend task.
在一种可实现的方式中,失败任务列表中存在“向设备节点2下发话题A中的任务失败”,则向设备节点2下发话题A中的任务,即,创建重发事务,并将下发事务的状态设置为“分析状态”。In an implementable way, if there is "failed to deliver the task in topic A to device node 2" in the failed task list, then deliver the task in topic A to device node 2, that is, create a retransmission transaction, and Set the status of the issued transaction to "Analysis Status".
在另一中可实现的方式中,有可能在重试机制之前错误已经被解决掉,那么失败任务列表中不存在相应的任务,如果不存在,表示该设备已重发成功,则忽略该任务。In another possible way, it is possible that the error has been resolved before the retry mechanism, then the corresponding task does not exist in the failed task list. If it does not exist, it means that the device has successfully retransmitted, and the task is ignored. .
例如,失败任务列表中已经不存在“向设备节点2下发话题A中的任务失败”,则忽略重试“向设备节点2下发话题A中的任务失败”。For example, if "Failed to deliver task in topic A to device node 2" does not exist in the failed task list, then the retry "Failed to deliver task in topic A to device node 2" will be ignored.
进一步地,将重发的结果汇总反馈至任务分发节点,如果成功则令牌状态置为“成功状态”,否则令牌状态仍然为“失败状态”,如果重试次数超过重试阈值,则输出给报警系统。Further, the retransmission results are summarized and fed back to the task distribution node. If successful, the token status is set to "success status", otherwise the token status is still "failure status". If the number of retries exceeds the retry threshold, output to the alarm system.
例如,失败任务列表中存在“向设备节点2下发话题A中的任务失败”,则向设备节点2下发话题A中的任务,即,创建重发事务,并将下发事务的状态设置为“分析状态”,在设备节点2反馈下发事务的状态为“成功状态”的情况下,将重发的结果汇总反馈至任务分发节点,即,设备代理节点将设备节点1的下发事务的状态标记为 “成功状态”,设备代理节点将设备节点2的下发事务的状态标记为“成功状态”,设备代理节点将设备节点3的下发事务的状态标记为“成功状态”,设备代理节点将设备节点4的下发事务的状态标记为“成功状态”,将设备节点1,设备节点2,设备节点3,设备节点4的下发事务的状态反馈至任务分发节点,令牌状态置为“成功状态”。For example, if there is "Failed to deliver the task in topic A to device node 2" in the failed task list, then deliver the task in topic A to device node 2, that is, create a retransmission transaction and set the status of the delivered transaction. is the "Analysis Status", and when device node 2 feedbacks that the status of the transaction issued is "successful status", the retransmission results will be summarized and fed back to the task distribution node, that is, the device agent node will transmit the transaction issued by device node 1 status is marked as "Success status", the device agent node marks the status of the transaction issued by device node 2 as "success status", the device agent node marks the status of the transaction issued by device node 3 as "success status", the device agent node marks the device The status of the transaction issued by node 4 is marked as "successful status". The status of the transaction issued by device node 1, device node 2, device node 3 and device node 4 is fed back to the task distribution node, and the token status is set to "successful". state".
如果设备节点2反馈下发事务的状态仍然为“失败状态”的情况下,将下发任务的重试次数加一,若重试次数的阈值为三,则在重试次数达到三时,则输出给报警系统,以便手动解决该问题。If device node 2 reports that the status of the delivered transaction is still "failed", the number of retries of the delivered task will be increased by one. If the threshold of the number of retries is three, then when the number of retries reaches three, then Output to the alarm system so that the problem can be solved manually.
在一种可实现方式中,还包括:In one possible implementation, it also includes:
接收所述设备节点的注册请求,根据所述注册请求携带的地域属性匹配目标设备代理节点;Receive the registration request from the device node, and match the target device proxy node according to the regional attribute carried in the registration request;
将所述注册请求转发至目标设备代理节点。Forward the registration request to the target device proxy node.
其中,地域属性可以理解为地理位置,例如,A地。Among them, the regional attribute can be understood as the geographical location, for example, place A.
在实际应用中,如前述实施例中所述,在其他条件相同的情况下,设备代理节点的地理位置与设备节点的地理位置之间的距离越近,通信延迟越小,那么,设备可以选择相近的设备代理节点,以减小通信延迟,增加稳定性。In practical applications, as described in the previous embodiments, under the same conditions, the closer the geographical location of the device agent node to the geographical location of the device node, the smaller the communication delay. Then, the device can choose Close device agent nodes to reduce communication delays and increase stability.
例如,设备代理节点包括设备代理节点A和设备代理节点B,设备代理节点A与当前设备节点的距离较近,在设备节点向设备代理节点B发送注册请求的情况下,设备代理节点B将注册请求转发至设备代理节点A,设备代理节点A作为目标设备代理节点,并与目标设备代理节点A建立所述第二订阅关系。For example, the device agent node includes device agent node A and device agent node B. The distance between device agent node A and the current device node is relatively close. When the device node sends a registration request to device agent node B, device agent node B will register. The request is forwarded to device agent node A, which serves as the target device agent node and establishes the second subscription relationship with the target device agent node A.
在一种可实现方式中,还包括:In one possible implementation, it also includes:
接收所述设备节点的注册请求,根据所述注册请求携带的任务集属性匹配目标设备代理节点;Receive the registration request of the device node, and match the target device proxy node according to the task set attribute carried in the registration request;
将所述注册请求转发至目标设备代理节点。Forward the registration request to the target device proxy node.
其中,任务集属性可以理解为订阅的话题,例如,订阅的话题包括话题A和话题B。Among them, the task set attribute can be understood as the subscribed topic. For example, the subscribed topics include topic A and topic B.
在实际应用中,如前述实施例中所述,还可以根据话题的类型分配设备代理节点,按照不同的话题划分设备代理节点可以减少设备代理节点的计算压力。In practical applications, as described in the foregoing embodiments, device agent nodes can also be allocated according to topic types, and dividing device agent nodes according to different topics can reduce the computing pressure of the device agent nodes.
例如,设备代理节点包括设备代理节点A和设备代理节点B,设备代理节点A订阅的话题备包括话题A和话题B,设备代理节点B订阅的话题备包括话题C和话题D,设备节点需要订阅话题A,在设备节点向设备代理节点B发送注册请求的情况下,设备代理节点B将注册请求转发至设备代理节点A,设备代理节点A作为目标设备代理节点,并与目标设备代理节点A建立所述第二订阅关系。 For example, the device agent node includes device agent node A and device agent node B. The topics subscribed by device agent node A include topic A and topic B. The topics subscribed by device agent node B include topic C and topic D. The device node needs to subscribe Topic A, when the device node sends a registration request to the device agent node B, the device agent node B forwards the registration request to the device agent node A. The device agent node A serves as the target device agent node and establishes with the target device agent node A. The second subscription relationship.
本说明书实施例提供一种数据传输方法,包括:根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系,在从任务分发节点获得第一订阅关系对应的任务集的情况下,根据与设备节点的第二订阅关系,将任务集中的任务下发给对应的设备节点,由于增加了设备代理节点,使得设备节点可以从设备代理节点订阅任务,再通过设备代理节点向任务分发节点订阅任务,减少了任务分发节点的通信资源使用量。Embodiments of this specification provide a data transmission method, which includes: establishing a first subscription relationship to a task distribution node based on a second subscription relationship with a device node, and obtaining a task set corresponding to the first subscription relationship from the task distribution node. Next, according to the second subscription relationship with the device node, the tasks in the task set are delivered to the corresponding device node. Due to the addition of the device agent node, the device node can subscribe to the task from the device agent node, and then submit the task to the task through the device agent node. The distribution node subscribes to the task, which reduces the communication resource usage of the task distribution node.
下述结合附图4,以本说明书提供的数据传输方法在设备代理节点的应用为例,对所述数据传输方法进行进一步说明。其中,图4示出了本说明书一个实施例提供的一种数据传输方法的处理过程流程图,具体包括以下步骤。The data transmission method will be further described below with reference to Figure 4, taking the application of the data transmission method provided in this specification at a device agent node as an example. Among them, FIG. 4 shows a process flow chart of a data transmission method provided by an embodiment of this specification, which specifically includes the following steps.
步骤402:设备代理节点根据所述第二订阅关系确定任务集。Step 402: The device agent node determines a task set according to the second subscription relationship.
例如,根据设备节点1与设备代理节点A的第二订阅关系确定话题A。For example, topic A is determined according to the second subscription relationship between device node 1 and device agent node A.
步骤404:设备代理节点在未建立所述任务集对应的第一订阅关系的情况下,根据所述任务集建立对所述任务分发节点的第一订阅关系。Step 404: When the device agent node has not established a first subscription relationship corresponding to the task set, establish a first subscription relationship to the task distribution node according to the task set.
沿用上例,确定是否存在包含话题A的与存储计算节点的第一订阅关系,如果已存在包含话题A与存储计算节点的第一订阅关系,则不执行订阅处理,如果不存在,则创建话题A和设备代理节点A之间的订阅关系,并在设备代理节点A的内存中存储新的订阅关系。Following the above example, determine whether there is a first subscription relationship between topic A and the storage computing node. If there is already a first subscription relationship between topic A and the storage computing node, the subscription processing will not be performed. If it does not exist, the topic will be created. The subscription relationship between A and the device agent node A, and the new subscription relationship is stored in the memory of the device agent node A.
步骤406:设备代理节点根据所述任务集对应的第二订阅关系确定对应的设备。Step 406: The device agent node determines the corresponding device according to the second subscription relationship corresponding to the task set.
沿用上例,对于设备代理节点A来说,如果任务集为话题A,则第二订阅关系确定对应的设备为设备节点1,设备节点2,设备节点3,设备节点4。Following the above example, for device agent node A, if the task set is topic A, the second subscription relationship determines that the corresponding devices are device node 1, device node 2, device node 3, and device node 4.
步骤408:设备代理节点针对所述任务集创建下发事务,并将所述下发事务的状态标记为分析状态,以及将所述下发事务的状态反馈至所述任务分发节点。Step 408: The device agent node creates a issued transaction for the task set, marks the status of the issued transaction as an analysis status, and feeds back the status of the issued transaction to the task distribution node.
沿用上例,设备列表为:设备节点1,设备节点2,设备节点3,设备节点4,分别向设备节点1,设备节点2,设备节点3,设备节点4下发话题A中的任务,即,创建下发事务,并将下发事务的状态设置为“分析状态”。Following the above example, the device list is: device node 1, device node 2, device node 3, and device node 4. The tasks in topic A are delivered to device node 1, device node 2, device node 3, and device node 4 respectively, that is, , create a issued transaction, and set the status of the issued transaction to "Analysis Status".
步骤410:设备代理节点根据所述下发事务向所述对应的设备下发所述任务集中的任务。Step 410: The device agent node delivers the tasks in the task set to the corresponding device according to the delivery transaction.
沿用上例,分别根据下发事务向设备节点1,设备节点2,设备节点3,设备节点4下发话题A中的任务。Following the above example, the tasks in topic A are delivered to device node 1, device node 2, device node 3, and device node 4 respectively according to the delivery transaction.
步骤412:设备代理节点接收每个设备节点返回的任务分发结果。Step 412: The device agent node receives the task distribution result returned by each device node.
沿用上例,设备节点1执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点1的下发事务的状态标记为“成功状态”,设备节点2执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点2的下发事务的状态标记为“成功状态”,设备节点3执行话题A中 的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点3的下发事务的状态标记为“成功状态”,设备节,4执行话题A中的任务,在执行完成后,向设备代理节点A反馈消息,设备代理节点将设备节点4的下发事务的状态标记为“成功状态”。Following the above example, device node 1 executes the task in topic A. After the execution is completed, it feeds back a message to device agent node A. The device agent node marks the status of the transaction issued by device node 1 as "successful status", and device node 2 Execute the task in topic A. After the execution is completed, a message is fed back to the device agent node A. The device agent node marks the status of the transaction issued by device node 2 as "successful status". Device node 3 executes the task in topic A. After the task is executed, a message is fed back to the device agent node A. The device agent node marks the status of the transaction issued by the device node 3 as "successful status". Device section 4 executes the task in topic A. After the execution is completed, Finally, the message is fed back to the device agent node A, and the device agent node marks the status of the transaction issued by the device node 4 as "successful status".
步骤414:设备代理节点在每个任务分发结果为成功的情况下,将所述下发事务的状态标记为成功状态,以及将所述下发事务的状态反馈至所述任务分发节点。Step 414: When each task distribution result is successful, the device agent node marks the status of the issued transaction as a successful status, and feeds back the status of the issued transaction to the task distribution node.
沿用上例,向存储计算节点进行反馈下发事务的“成功状态”,以使存储计算节点将总任务状态反馈,标记为“成功状态”。Following the above example, the "success status" of the transaction is fed back to the storage computing node, so that the storage computing node feeds back the total task status and marks it as "success status".
本说明书实施例由于增加了设备代理节点,使得设备节点可以从设备代理节点订阅任务,再通过设备代理节点向任务分发节点订阅任务,减少了任务分发节点的通信资源使用量。In the embodiment of this specification, the device agent node is added, so that the device node can subscribe to tasks from the device agent node, and then subscribe to the task to the task distribution node through the device agent node, thereby reducing the communication resource usage of the task distribution node.
本说明书还提供了一种数据传输系统,包括:This manual also provides a data transmission system, including:
软件定义网络任务分发节点,被配置为根据与软件定义网络代理节点的第一订阅关系,向所述软件定义网络代理节点下发所述第一订阅关系对应的任务集;The software-defined network task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the software-defined network agent node according to the first subscription relationship with the software-defined network agent node;
软件定义网络代理节点,被配置为根据与软件定义网络节点的第二订阅关系,建立对所述软件定义网络任务分发节点的第一订阅关系,在从所述软件定义网络任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述软件定义网络节点的第二订阅关系,将所述任务集中的任务下发给对应的软件定义网络节点;The software-defined network proxy node is configured to establish a first subscription relationship to the software-defined network task distribution node according to the second subscription relationship with the software-defined network node, and obtain the software-defined network task distribution node from the software-defined network task distribution node. In the case of a task set corresponding to the first subscription relationship, deliver the tasks in the task set to the corresponding software-defined network node according to the second subscription relationship with the software-defined network node;
软件定义网络节点,被配置为根据与所述软件定义网络代理节点的第二订阅关系,获取所述软件定义网络代理节点下发的任务。The software-defined network node is configured to obtain the task issued by the software-defined network agent node according to the second subscription relationship with the software-defined network agent node.
其中,软件定义网络代理节点可以为网关、私有云等设备。Among them, the software-defined network agent node can be a gateway, private cloud and other devices.
在一种可实现的方式中,所述软件定义网络节点,被配置为向软件定义网络代理节点发起注册请求,在收到所述软件定义网络代理节点发送的完成注册消息的情况下,与所述设备代理建立所述第二订阅关系。In an implementable manner, the software-defined network node is configured to initiate a registration request to the software-defined network proxy node, and upon receiving the registration completion message sent by the software-defined network proxy node, communicate with the software-defined network proxy node. The device agent establishes the second subscription relationship.
在一种可实现的方式中,所述软件定义网络代理节点,被配置为根据所述第二订阅关系确定任务集,在未建立所述任务集对应的第一订阅关系的情况下,建立所述任务集的第一订阅关系。In an implementable manner, the software-defined network agent node is configured to determine a task set according to the second subscription relationship, and establish all the task sets when the first subscription relationship corresponding to the task set is not established. The first subscription relationship of the above task set.
在一种可实现的方式中,所述软件定义网络节点,被配置为在软件定义网络代理节点为多个的情况下,确定各所述软件定义网络代理节点的地域属性,并根据所述地域属性确定目标软件定义网络代理节点,以及In an implementable manner, the software-defined network node is configured to determine the regional attributes of each software-defined network agent node when there are multiple software-defined network agent nodes, and determine the regional attributes of each software-defined network agent node according to the regional properties identify the target software-defined network agent node, and
向所述目标软件定义网络代理节点发起注册请求,在收到所述目标软件定义网络代理节点发送的完成注册消息的情况下,与所述目标设备代理建立所述第二订阅关系。Initiate a registration request to the target software-defined network proxy node, and establish the second subscription relationship with the target device proxy upon receiving a registration completion message sent by the target software-defined network proxy node.
在一种可实现的方式中,所述软件定义网络节点,被配置为在软件定义网络代理 节点为多个的情况下,确定各所述软件定义网络代理节点的任务集属性,并根据所述任务集属性确定目标软件定义网络代理节点,以及In an implementable manner, the software-defined network node is configured as a software-defined network agent When there are multiple nodes, determine the task set attributes of each software-defined network agent node, and determine the target software-defined network agent node according to the task set attributes, and
向所述目标软件定义网络代理节点发起注册请求,在收到所述目标软件定义网络代理节点发送的完成注册消息的情况下,与所述目标设备代理建立所述第二订阅关系。Initiate a registration request to the target software-defined network proxy node, and establish the second subscription relationship with the target device proxy upon receiving a registration completion message sent by the target software-defined network proxy node.
在一种可实现的方式中,在目标任务集的数据变更的情况下,所述软件定义网络任务分发节点,被配置为根据所述第一订阅关系确定所述目标任务集对应的目标软件定义网络代理节点,并向所述目标软件定义网络代理节点下发所述目标任务集;In an implementable manner, when the data of the target task set changes, the software-defined network task distribution node is configured to determine the target software definition corresponding to the target task set according to the first subscription relationship. a network agent node, and delivers the target task set to the target software-defined network agent node;
所述软件定义网络代理节点,被配置为接收到所述软件定义网络任务分发节点下发的目标任务集的情况下,根据所述第二订阅关系确定目标任务集对应的目标软件定义网络节点,并向所述目标软件定义网络节点发送所述目标任务。The software-defined network proxy node is configured to determine the target software-defined network node corresponding to the target task set according to the second subscription relationship when receiving the target task set issued by the software-defined network task distribution node, and sends the target task to the target software-defined network node.
在一种可实现的方式中,所述软件定义网络节点,被配置为响应于任务集修改指令,根据所述任务集修改指令中携带的目标任务集,更新与所述软件定义网络代理节点的第二订阅关系。In an implementable manner, the software-defined network node is configured to respond to a task set modification instruction and update the communication with the software-defined network agent node according to the target task set carried in the task set modification instruction. Second subscription relationship.
在一种可实现方式中,所述软件定义网络代理节点,被配置为:In an implementable manner, the software-defined network proxy node is configured as:
根据所述第二订阅关系确定任务集,在未建立所述任务集对应的第一订阅关系的情况下,建立所述任务集的第一订阅关系。A task set is determined according to the second subscription relationship, and if the first subscription relationship corresponding to the task set is not established, a first subscription relationship of the task set is established.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
根据所述第二订阅关系确定任务集;Determine a task set according to the second subscription relationship;
在未建立所述任务集对应的第一订阅关系的情况下,根据所述任务集建立对所述软件定义网络任务分发节点的第一订阅关系。If the first subscription relationship corresponding to the task set is not established, establish a first subscription relationship to the software-defined network task distribution node according to the task set.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
根据所述任务集对应的第二订阅关系确定对应的设备;Determine the corresponding device according to the second subscription relationship corresponding to the task set;
向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
针对所述任务集创建下发事务,并将所述下发事务的状态标记为分析状态,以及将所述下发事务的状态反馈至所述软件定义网络任务分发节点;Create a issued transaction for the task set, mark the status of the issued transaction as an analysis status, and feed back the status of the issued transaction to the software-defined network task distribution node;
根据所述下发事务向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the delivery transaction.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
接收每个软件定义网络节点返回的任务分发结果;Receive the task distribution results returned by each software-defined network node;
根据所述任务分发结果修改所述下发事务的状态。Modify the status of the issued transaction according to the task distribution result.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
在每个任务分发结果为成功的情况下,将所述下发事务的状态标记为成功状态, 以及将所述下发事务的状态反馈至所述软件定义网络任务分发节点。When the distribution result of each task is successful, the status of the issued transaction is marked as successful, and feeding back the status of the issued transaction to the software-defined network task distribution node.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
在任意一个任务分发结果为失败的情况下,将所述下发事务的状态标记为失败状态,并在失败任务列表中添加所述任务分发结果对应的任务,以及When any task distribution result is a failure, mark the status of the issued transaction as a failure status, and add the task corresponding to the task distribution result in the failed task list, and
将所述下发事务的状态反馈至所述软件定义网络任务分发节点。Feed back the status of the issued transaction to the software-defined network task distribution node.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
重新获取所述任务集,并记录获取次数;Reacquire the task set and record the number of acquisitions;
根据所述失败任务列表向对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the failed task list.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
在所述任务在所述失败任务列表中的情况下,针对所述任务下发失败的设备创建重发事务;If the task is in the failed task list, create a reissue transaction for the device that failed to deliver the task;
根据所述重发事务向所述对应的设备下发所述任务。Deliver the task to the corresponding device according to the retransmission transaction.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
接收所述软件定义网络节点的注册请求,根据所述注册请求携带的地域属性匹配目标软件定义网络代理节点;Receive the registration request of the software-defined network node, and match the target software-defined network proxy node according to the regional attribute carried in the registration request;
将所述注册请求转发至目标软件定义网络代理节点。Forward the registration request to the target software-defined network proxy node.
在一种可实现方式中,所述软件定义网络代理节点,还被配置为:In an implementable manner, the software-defined network proxy node is also configured to:
接收所述软件定义网络节点的注册请求,根据所述注册请求携带的任务集属性匹配目标软件定义网络代理节点;Receive the registration request of the software-defined network node, and match the target software-defined network proxy node according to the task set attribute carried in the registration request;
将所述注册请求转发至目标软件定义网络代理节点。Forward the registration request to the target software-defined network proxy node.
本说明书实施例提供一种数据传输系统包括:软件定义网络任务分发节点,被配置为根据与软件定义网络代理节点的第一订阅关系,向软件定义网络代理节点下发第一订阅关系对应的任务集;软件定义网络代理节点,被配置为根据与软件定义网络节点的第二订阅关系,建立对软件定义网络任务分发节点的第一订阅关系,在从软件定义网络任务分发节点获得第一订阅关系对应的任务集的情况下,根据与软件定义网络节点的第二订阅关系,将任务集中的任务下发给对应的软件定义网络节点;软件定义网络节点,被配置为根据与软件定义网络代理节点的第二订阅关系,获取软件定义网络代理节点下发的任务。由于增加了设备代理节点,使得设备节点可以从设备代理节点订阅任务,再通过设备代理节点向任务分发节点订阅任务,减少了任务分发节点的通信资源使用量。Embodiments of this specification provide a data transmission system including: a software-defined network task distribution node configured to deliver tasks corresponding to the first subscription relationship to the software-defined network agent node according to the first subscription relationship with the software-defined network agent node. set; the software-defined network proxy node is configured to establish a first subscription relationship to the software-defined network task distribution node based on the second subscription relationship with the software-defined network node, and obtain the first subscription relationship from the software-defined network task distribution node In the case of the corresponding task set, the tasks in the task set are delivered to the corresponding software-defined network node according to the second subscription relationship with the software-defined network node; the software-defined network node is configured to be based on the software-defined network proxy node. The second subscription relationship is to obtain the tasks issued by the software-defined network agent node. Due to the addition of the device agent node, the device node can subscribe to tasks from the device agent node and then subscribe to the task distribution node through the device agent node, which reduces the communication resource usage of the task distribution node.
与上述方法实施例相对应,本说明书还提供了数据传输装置实施例,图5示出了本说明书一个实施例提供的一种数据传输装置的结构示意图。如图5所示,该装置包括: Corresponding to the above method embodiments, this specification also provides an embodiment of a data transmission device. Figure 5 shows a schematic structural diagram of a data transmission device provided by an embodiment of this specification. As shown in Figure 5, the device includes:
创建模块502,被配置为根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系;The creation module 502 is configured to establish a first subscription relationship to the task distribution node based on the second subscription relationship with the device node;
分发模块504,被配置为在从所述任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点。The distribution module 504 is configured to, after obtaining the task set corresponding to the first subscription relationship from the task distribution node, distribute the tasks in the task set according to the second subscription relationship with the device node. To the corresponding device node.
在一种可实现的方式中,所述创建模块502,还被配置为:In an implementable manner, the creation module 502 is also configured to:
根据所述第二订阅关系确定任务集;Determine a task set according to the second subscription relationship;
在未建立所述任务集对应的第一订阅关系的情况下,根据所述任务集建立对所述任务分发节点的第一订阅关系。If the first subscription relationship corresponding to the task set is not established, establish a first subscription relationship to the task distribution node according to the task set.
在一种可实现的方式中,所述分发模块504,还被配置为:In an implementable manner, the distribution module 504 is also configured to:
根据所述任务集对应的第二订阅关系确定对应的设备;Determine the corresponding device according to the second subscription relationship corresponding to the task set;
向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device.
在一种可实现的方式中,所述分发模块504,还被配置为:In an implementable manner, the distribution module 504 is also configured to:
针对所述任务集创建下发事务,并将所述下发事务的状态标记为分析状态,以及将所述下发事务的状态反馈至所述任务分发节点;Create a issued transaction for the task set, mark the status of the issued transaction as an analysis status, and feed back the status of the issued transaction to the task distribution node;
根据所述下发事务向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the delivery transaction.
在一种可实现的方式中,所述分发模块504,还被配置为:In an implementable manner, the distribution module 504 is also configured to:
接收每个设备节点返回的任务分发结果;Receive the task distribution results returned by each device node;
根据所述任务分发结果修改所述下发事务的状态。Modify the status of the issued transaction according to the task distribution result.
在一种可实现的方式中,所述分发模块504,还被配置为:In an implementable manner, the distribution module 504 is also configured to:
在每个任务分发结果为成功的情况下,将所述下发事务的状态标记为成功状态,以及将所述下发事务的状态反馈至所述任务分发节点。When each task distribution result is successful, the status of the issued transaction is marked as a successful status, and the status of the issued transaction is fed back to the task distribution node.
在一种可实现的方式中,所述分发模块504,还被配置为:In an implementable manner, the distribution module 504 is also configured to:
在任意一个任务分发结果为失败的情况下,将所述下发事务的状态标记为失败状态,并在失败任务列表中添加所述任务分发结果对应的任务,以及When any task distribution result is a failure, mark the status of the issued transaction as a failure status, and add the task corresponding to the task distribution result in the failed task list, and
将所述下发事务的状态反馈至所述任务分发节点。Feed back the status of the issued transaction to the task distribution node.
在一种可实现的方式中,所述分发模块504,还被配置为:In an implementable manner, the distribution module 504 is also configured to:
重新获取所述任务集,并记录获取次数;Reacquire the task set and record the number of acquisitions;
根据所述失败任务列表向对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the failed task list.
在一种可实现的方式中,所述分发模块504,还被配置为:In an implementable manner, the distribution module 504 is also configured to:
在所述任务在所述失败任务列表中的情况下,针对所述任务下发失败的设备创建重发事务 If the task is in the failed task list, create a reissue transaction for the device that failed to deliver the task.
根据所述重发事务向所述对应的设备下发所述任务。Deliver the task to the corresponding device according to the retransmission transaction.
本说明书实施例提供一种数据传输装置,其中数据传输装置包括:创建模块,被配置为根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系;分发模块,被配置为在从所述任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点。由于增加了设备代理节点,使得设备节点可以从设备代理节点订阅任务,再通过设备代理节点向任务分发节点订阅任务,减少了任务分发节点的通信资源使用量。Embodiments of this specification provide a data transmission device, wherein the data transmission device includes: a creation module configured to establish a first subscription relationship to a task distribution node based on a second subscription relationship with a device node; a distribution module configured to When the task set corresponding to the first subscription relationship is obtained from the task distribution node, the tasks in the task set are distributed to the corresponding device node according to the second subscription relationship with the device node. Due to the addition of the device agent node, the device node can subscribe to tasks from the device agent node and then subscribe to the task distribution node through the device agent node, which reduces the communication resource usage of the task distribution node.
上述为本实施例的一种数据传输装置的示意性方案。需要说明的是,该数据传输装置的技术方案与上述的数据传输方法的技术方案属于同一构思,数据传输装置的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。The above is a schematic solution of a data transmission device in this embodiment. It should be noted that the technical solution of the data transmission device and the technical solution of the above-mentioned data transmission method belong to the same concept. For details that are not described in detail in the technical solution of the data transmission device, please refer to the description of the technical solution of the above-mentioned data transmission method. .
图6示出了根据本说明书一个实施例提供的一种计算设备600的结构框图。该计算设备600的部件包括但不限于存储器610和处理器620。处理器620与存储器610通过总线630相连接,数据库650用于保存数据。Figure 6 shows a structural block diagram of a computing device 600 provided according to an embodiment of this specification. Components of the computing device 600 include, but are not limited to, memory 610 and processor 620 . The processor 620 and the memory 610 are connected through a bus 630, and the database 650 is used to save data.
计算设备600还包括接入设备640,接入设备640使得计算设备600能够经由一个或多个网络660通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备640可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口,等等。Computing device 600 also includes an access device 640 that enables computing device 600 to communicate via one or more networks 660 . Examples of these networks include the Public Switched Telephone Network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communications networks such as the Internet. Access device 640 may include one or more of any type of network interface (eg, a network interface card (NIC)), wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interconnection for Microwave Access (WLAN) Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, etc.
在本说明书的一个实施例中,计算设备600的上述部件以及图6中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图6所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。In one embodiment of the present description, the above-mentioned components of the computing device 600 and other components not shown in FIG. 6 may also be connected to each other, such as through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 6 is for illustrative purposes only and does not limit the scope of this description. Those skilled in the art can add or replace other components as needed.
计算设备600可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备600还可以是移动式或静止式的服务器。Computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile telephone (e.g., smartphone ), a wearable computing device (e.g., smart watch, smart glasses, etc.) or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 600 may also be a mobile or stationary server.
其中,处理器620用于执行如下计算机可执行指令,该计算机可执行指令被处理器执行时实现上述数据传输方法的步骤。The processor 620 is configured to execute the following computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above data transmission method are implemented.
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的数据传输方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。 The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned data transmission method belong to the same concept. For details that are not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above data transmission method.
本说明书一实施例还提供一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现上述数据传输方法的步骤。An embodiment of the present specification also provides a computer-readable storage medium that stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the above data transmission method are implemented.
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的数据传输方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。The above is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above-mentioned data transmission method belong to the same concept. For details that are not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-mentioned data transmission method.
本说明书一实施例还提供一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述数据传输方法的步骤。An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to perform the steps of the above data transmission method.
上述为本实施例的一种计算机程序的示意性方案。需要说明的是,该计算机程序的技术方案与上述的数据传输方法的技术方案属于同一构思,计算机程序的技术方案未详细描述的细节内容,均可以参见上述数据传输方法的技术方案的描述。The above is a schematic solution of a computer program in this embodiment. It should be noted that the technical solution of the computer program and the technical solution of the above-mentioned data transmission method belong to the same concept. For details that are not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the above-mentioned data transmission method.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desired results. Additionally, the processes depicted in the figures do not necessarily require the specific order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible or may be advantageous in certain implementations.
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The computer instructions include computer program code, which may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium Excludes electrical carrier signals and telecommunications signals.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本说明书实施例并不受所描述的动作顺序的限制,因为依据本说明书实施例,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本说明书实施例所必须的。It should be noted that for the convenience of description, each of the foregoing method embodiments is expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of this specification are not limited by the described action sequence. limitation, because according to the embodiments of this specification, certain steps may be performed in other orders or at the same time. Secondly, those skilled in the art should also know that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily necessary for the embodiments of this specification.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, each embodiment is described with its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
以上公开的本说明书优选实施例只是用于帮助阐述本说明书。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本说明书实施例的内容,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本说明书实施例的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本说明书。本说明书仅受权利要求书及其全部范围和等效物的限制。 The preferred embodiments of this specification disclosed above are only used to help explain this specification. Alternative embodiments are not described in all details, nor are the inventions limited to the specific embodiments described. Obviously, many modifications and changes can be made based on the contents of the embodiments of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the embodiments in this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims (21)

  1. 一种数据传输系统,包括:A data transmission system including:
    任务分发节点,被配置为根据与设备代理节点的第一订阅关系,向所述设备代理节点下发所述第一订阅关系对应的任务集;The task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the device agent node according to the first subscription relationship with the device agent node;
    设备代理节点,被配置为根据与设备节点的第二订阅关系,建立对所述任务分发节点的第一订阅关系,在从所述任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点;The device agent node is configured to establish a first subscription relationship to the task distribution node according to the second subscription relationship with the device node, in the case of obtaining a task set corresponding to the first subscription relationship from the task distribution node. Next, deliver the tasks in the task set to the corresponding device node according to the second subscription relationship with the device node;
    设备节点,被配置为根据与所述设备代理节点的第二订阅关系,获取所述设备代理节点下发的任务。The device node is configured to obtain the task issued by the device agent node according to the second subscription relationship with the device agent node.
  2. 根据权利要求1所述的系统,还包括:The system of claim 1, further comprising:
    所述设备节点,被配置为向设备代理节点发起注册请求,在收到所述设备代理节点发送的完成注册消息的情况下,与所述设备代理建立所述第二订阅关系。The device node is configured to initiate a registration request to a device agent node, and upon receiving a registration completion message sent by the device agent node, establish the second subscription relationship with the device agent.
  3. 根据权利要求1所述的系统,还包括:The system of claim 1, further comprising:
    所述设备代理节点,被配置为根据所述第二订阅关系确定任务集,在未建立所述任务集对应的第一订阅关系的情况下,建立所述任务集的第一订阅关系。The device agent node is configured to determine a task set according to the second subscription relationship, and establish a first subscription relationship for the task set if the first subscription relationship corresponding to the task set is not established.
  4. 根据权利要求1所述的系统,还包括:The system of claim 1, further comprising:
    所述设备节点,被配置为在设备代理节点为多个的情况下,确定各所述设备代理节点的地域属性,并根据所述地域属性确定目标设备代理节点,以及The device node is configured to determine the regional attributes of each device agent node when there are multiple device agent nodes, and determine the target device agent node according to the regional attributes, and
    向所述目标设备代理节点发起注册请求,在收到所述目标设备代理节点发送的完成注册消息的情况下,与所述目标设备代理建立所述第二订阅关系。Initiate a registration request to the target device proxy node, and establish the second subscription relationship with the target device proxy when receiving a registration completion message sent by the target device proxy node.
  5. 根据权利要求1所述的系统,还包括:The system of claim 1, further comprising:
    所述设备节点,被配置为在设备代理节点为多个的情况下,确定各所述设备代理节点的任务集属性,并根据所述任务集属性确定目标设备代理节点,以及The device node is configured to determine the task set attributes of each device agent node when there are multiple device agent nodes, and determine the target device agent node according to the task set attributes, and
    向所述目标设备代理节点发起注册请求,在收到所述目标设备代理节点发送的完成注册消息的情况下,与所述目标设备代理建立所述第二订阅关系。Initiate a registration request to the target device proxy node, and establish the second subscription relationship with the target device proxy when receiving a registration completion message sent by the target device proxy node.
  6. 根据权利要求1所述的系统,还包括:The system of claim 1, further comprising:
    在目标任务集的数据变更的情况下,所述任务分发节点,被配置为根据所述第一订阅关系确定所述目标任务集对应的目标设备代理节点,并向所述目标设备代理节点下发所述目标任务集;When the data of the target task set changes, the task distribution node is configured to determine the target device agent node corresponding to the target task set according to the first subscription relationship, and deliver the data to the target device agent node. The target task set;
    所述设备代理节点,被配置为接收到所述任务分发节点下发的目标任务集的情况下,根据所述第二订阅关系确定目标任务集对应的目标设备节点,并向所述目标设备节点发送所述目标任务。 The device agent node is configured to, upon receiving the target task set issued by the task distribution node, determine the target device node corresponding to the target task set according to the second subscription relationship, and send the target device node to the target device node. Send said target task.
  7. 根据权利要求1所述的系统,还包括:The system of claim 1, further comprising:
    所述设备节点,被配置为响应于任务集修改指令,根据所述任务集修改指令中携带的目标任务集,更新与所述设备代理节点的第二订阅关系。The device node is configured to respond to a task set modification instruction and update the second subscription relationship with the device agent node according to the target task set carried in the task set modification instruction.
  8. 一种数据传输方法,应用于设备代理节点,包括:A data transmission method, applied to device agent nodes, including:
    根据与设备节点的第二订阅关系,建立对任务分发节点的第一订阅关系;Establish a first subscription relationship to the task distribution node according to the second subscription relationship with the device node;
    在从所述任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述设备节点的第二订阅关系,将所述任务集中的任务下发给对应的设备节点。When the task set corresponding to the first subscription relationship is obtained from the task distribution node, the tasks in the task set are distributed to the corresponding device node according to the second subscription relationship with the device node.
  9. 根据权利要求8所述的方法,所述根据与设备节点的第二订阅关系,建立对所述任务分发节点的第一订阅关系,包括:The method according to claim 8, establishing a first subscription relationship to the task distribution node based on a second subscription relationship with a device node, including:
    根据所述第二订阅关系确定任务集;Determine a task set according to the second subscription relationship;
    在未建立所述任务集对应的第一订阅关系的情况下,根据所述任务集建立对所述任务分发节点的第一订阅关系。If the first subscription relationship corresponding to the task set is not established, establish a first subscription relationship to the task distribution node according to the task set.
  10. 根据权利要求8所述的方法,所述将所述任务集中的任务下发给对应的设备节点,包括:The method according to claim 8, said delivering tasks in the task set to corresponding device nodes includes:
    根据所述任务集对应的第二订阅关系确定对应的设备;Determine the corresponding device according to the second subscription relationship corresponding to the task set;
    向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device.
  11. 根据权利要求10所述的方法,根据向所述对应的设备下发所述任务集中的任务,包括:The method according to claim 10, according to delivering the tasks in the task set to the corresponding device, including:
    针对所述任务集创建下发事务,并将所述下发事务的状态标记为分析状态,以及将所述下发事务的状态反馈至所述任务分发节点;Create a issued transaction for the task set, mark the status of the issued transaction as an analysis status, and feed back the status of the issued transaction to the task distribution node;
    根据所述下发事务向所述对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the delivery transaction.
  12. 根据权利要求11所述的方法,还包括:The method of claim 11, further comprising:
    接收每个设备节点返回的任务分发结果;Receive the task distribution results returned by each device node;
    根据所述任务分发结果修改所述下发事务的状态。Modify the status of the issued transaction according to the task distribution result.
  13. 根据权利要求12所述的方法,所述根据所述任务分发结果修改所述下发事务的状态,包括:The method according to claim 12, modifying the status of the issued transaction according to the task distribution result includes:
    在每个任务分发结果为成功的情况下,将所述下发事务的状态标记为成功状态,以及将所述下发事务的状态反馈至所述任务分发节点。When each task distribution result is successful, the status of the issued transaction is marked as a successful status, and the status of the issued transaction is fed back to the task distribution node.
  14. 根据权利要求12所述的方法,所述根据所述任务分发结果修改所述下发事务的状态,包括:The method according to claim 12, modifying the status of the issued transaction according to the task distribution result includes:
    在任意一个任务分发结果为失败的情况下,将所述下发事务的状态标记为失败状态,并在失败任务列表中添加所述任务分发结果对应的任务,以及 When any task distribution result is a failure, mark the status of the issued transaction as a failure status, and add the task corresponding to the task distribution result in the failed task list, and
    将所述下发事务的状态反馈至所述任务分发节点。Feed back the status of the issued transaction to the task distribution node.
  15. 根据权利要求14所述的方法,还包括:The method of claim 14, further comprising:
    重新获取所述任务集,并记录获取次数;Reacquire the task set and record the number of acquisitions;
    根据所述失败任务列表向对应的设备下发所述任务集中的任务。Deliver the tasks in the task set to the corresponding device according to the failed task list.
  16. 根据权利要求15所述的方法,所述根据所述失败任务列表向对应的设备下发所述任务集中的任务,包括:The method according to claim 15, said delivering the tasks in the task set to the corresponding device according to the failed task list, including:
    在所述任务在所述失败任务列表中的情况下,针对任务下发失败的设备创建重发事务;If the task is in the failed task list, create a reissue transaction for the device that failed to deliver the task;
    根据所述重发事务向所述对应的设备下发所述任务。Deliver the task to the corresponding device according to the retransmission transaction.
  17. 根据权利要求8所述的方法,还包括:The method of claim 8, further comprising:
    接收所述设备节点的注册请求,根据所述注册请求携带的地域属性匹配目标设备代理节点;Receive the registration request from the device node, and match the target device proxy node according to the regional attribute carried in the registration request;
    将所述注册请求转发至目标设备代理节点。Forward the registration request to the target device proxy node.
  18. 根据权利要求8所述的方法,还包括:The method of claim 8, further comprising:
    接收所述设备节点的注册请求,根据所述注册请求携带的任务集属性匹配目标设备代理节点;Receive the registration request of the device node, and match the target device proxy node according to the task set attribute carried in the registration request;
    将所述注册请求转发至目标设备代理节点。Forward the registration request to the target device proxy node.
  19. 一种数据传输系统,包括:A data transmission system including:
    软件定义网络任务分发节点,被配置为根据与软件定义网络代理节点的第一订阅关系,向所述软件定义网络代理节点下发所述第一订阅关系对应的任务集;The software-defined network task distribution node is configured to deliver a task set corresponding to the first subscription relationship to the software-defined network agent node according to the first subscription relationship with the software-defined network agent node;
    软件定义网络代理节点,被配置为根据与软件定义网络节点的第二订阅关系,建立对所述软件定义网络任务分发节点的第一订阅关系,在从所述软件定义网络任务分发节点获得所述第一订阅关系对应的任务集的情况下,根据与所述软件定义网络节点的第二订阅关系,将所述任务集中的任务下发给对应的软件定义网络节点;The software-defined network proxy node is configured to establish a first subscription relationship to the software-defined network task distribution node according to the second subscription relationship with the software-defined network node, and obtain the software-defined network task distribution node from the software-defined network task distribution node. In the case of a task set corresponding to the first subscription relationship, deliver the tasks in the task set to the corresponding software-defined network node according to the second subscription relationship with the software-defined network node;
    软件定义网络节点,被配置为根据与所述软件定义网络代理节点的第二订阅关系,获取所述软件定义网络代理节点下发的任务。The software-defined network node is configured to obtain the task issued by the software-defined network agent node according to the second subscription relationship with the software-defined network agent node.
  20. 一种计算设备,包括:A computing device including:
    存储器和处理器;memory and processor;
    所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求8至18任意一项所述数据传输方法的步骤。The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the data transmission method described in any one of claims 8 to 18 are implemented. .
  21. 一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求8至18任意一项所述数据传输方法的步骤。 A computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the data transmission method described in any one of claims 8 to 18 are implemented.
PCT/CN2023/085769 2022-04-02 2023-03-31 Data transmission system and method WO2023186154A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210345992.6A CN114885020B (en) 2022-04-02 2022-04-02 Data transmission system and method
CN202210345992.6 2022-04-02

Publications (1)

Publication Number Publication Date
WO2023186154A1 true WO2023186154A1 (en) 2023-10-05

Family

ID=82669479

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/085769 WO2023186154A1 (en) 2022-04-02 2023-03-31 Data transmission system and method

Country Status (2)

Country Link
CN (1) CN114885020B (en)
WO (1) WO2023186154A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114885020B (en) * 2022-04-02 2024-02-13 浙江大学 Data transmission system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
US20130227119A1 (en) * 2012-02-29 2013-08-29 Research In Motion Limited System and method for providing access to presence status for mobile devices
CN113162970A (en) * 2021-01-27 2021-07-23 中央财经大学 Message routing method, device, equipment and medium based on publish/subscribe model
CN114885020A (en) * 2022-04-02 2022-08-09 浙江大学 Data transmission system and method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140101607A (en) * 2013-02-12 2014-08-20 삼성테크윈 주식회사 Apparatus and method for managing database in data distribution service
CN107908465B (en) * 2017-10-19 2020-11-03 深圳索信达数据技术有限公司 Task scheduling method for big data platform
CN112769885A (en) * 2019-11-04 2021-05-07 千寻位置网络有限公司 Proxy broadcasting method and device based on data point subscription
CN112788074A (en) * 2019-11-07 2021-05-11 中兴通讯股份有限公司 Data transmitting method, processing method, receiving method and equipment and storage medium
CN113726896B (en) * 2021-09-01 2022-09-27 看屋(上海)信息科技有限公司 Task distribution system based on commercial intelligent real estate industry

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
US20130227119A1 (en) * 2012-02-29 2013-08-29 Research In Motion Limited System and method for providing access to presence status for mobile devices
CN113162970A (en) * 2021-01-27 2021-07-23 中央财经大学 Message routing method, device, equipment and medium based on publish/subscribe model
CN114885020A (en) * 2022-04-02 2022-08-09 浙江大学 Data transmission system and method

Also Published As

Publication number Publication date
CN114885020B (en) 2024-02-13
CN114885020A (en) 2022-08-09

Similar Documents

Publication Publication Date Title
CN111091429B (en) Electronic bill identification distribution method and device and electronic bill generation system
CN102255935B (en) Cloud service consuming method, cloud service intermediary and cloud system
WO2016177285A1 (en) Data pushing method and device
CN111277639B (en) Method and device for maintaining data consistency
WO2021088641A1 (en) Data transmission method, data processing method, data reception method and device, and storage medium
US8380820B1 (en) Sending synchronous responses to requests from frontend applications
WO2013078689A1 (en) Method and device for realizing message transfer in cloud message service
CN114363407B (en) Message service method and device, readable storage medium and electronic equipment
CN102143194A (en) Data synchronization method and system, immediate data node and terminal data node
WO2023186154A1 (en) Data transmission system and method
WO2019109923A1 (en) Message processing method and system, storage medium and electronic device
US20120278398A1 (en) System and method for reliable distributed communication with guaranteed service levels
CN111277483B (en) Multi-terminal message synchronization method, server and storage medium
WO2023143503A1 (en) Resource scheduling system and method
WO2023185934A1 (en) Data processing method and device
CN114025002A (en) MQTT information transmission method, system and communication equipment
CN108390919B (en) Message synchronization system and method for high-reliability dual-computer hot standby
US9043274B1 (en) Updating local database and central database
WO2023193671A1 (en) Data transmission method and system
WO2019201111A1 (en) Information processing method, apparatus and device, and computer-readable storage medium
CN110661857B (en) Data synchronization method and device
WO2020220272A1 (en) Method and system for changing resource state, terminal, and storage medium
CN112052104A (en) Message queue management method based on multi-computer-room realization and electronic equipment
US20230139834A1 (en) Asynchronous network inventory system
CN113762677B (en) Service processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23778518

Country of ref document: EP

Kind code of ref document: A1