WO2018227695A1 - Subscription data sending and receiving method, device and system - Google Patents

Subscription data sending and receiving method, device and system Download PDF

Info

Publication number
WO2018227695A1
WO2018227695A1 PCT/CN2017/093368 CN2017093368W WO2018227695A1 WO 2018227695 A1 WO2018227695 A1 WO 2018227695A1 CN 2017093368 W CN2017093368 W CN 2017093368W WO 2018227695 A1 WO2018227695 A1 WO 2018227695A1
Authority
WO
WIPO (PCT)
Prior art keywords
subscription
subscriber
data
receiving
party
Prior art date
Application number
PCT/CN2017/093368
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 WO2018227695A1 publication Critical patent/WO2018227695A1/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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Definitions

  • the present invention relates to the field of Internet of things, and in particular, to a method and a device for transmitting and receiving subscription data.
  • the rapid development of the Internet of Things has also produced massive data. How to properly handle and rationally use these massive data is the key to the next development of the Internet of Things. Because the massive data of the Internet of Things has real, high throughput, huge amount of data, and data specific content, the Internet of Things needs a data transmission mechanism that can support real, high concurrency, and support massive data, while the general data queue software. However, it is not a good solution to such problems.
  • the Internet of Things has a large number of access users and access devices, data subscription and transmission rules are also extremely complex, and the practical requirements for information transmission are also high, while the general data queue software is mainly The subscription and transmission of data based on the topic mechanism cannot support such scenarios under the premise of ensuring high processing efficiency.
  • the embodiments of the present invention provide a method, a device, and a system for sending and receiving subscription data, so as to solve the problem that the traditional Internet of Things data transmission mode cannot support massive data transmission.
  • a first aspect of the embodiments of the present invention provides a method for sending subscription data, which is applicable to a system for transmitting and receiving subscription data, where the system for transmitting and receiving subscription data includes a first level.
  • the node, the publishing agent, and the second node, the sending method of the subscription data includes:
  • the subscriber receives and stores, by the secondary node, a subscription relationship between the subscriber and the called party sent by the subscriber through the primary node;
  • the subscribing party When the subscribing party obtains the subscription content, the subscribing party searches for the subscriber of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and passes the subscription content through the Release intelligence The body is sent to the found subscriber.
  • a second aspect of the embodiments of the present invention provides a method for receiving subscription data, which is applicable to a system for transmitting and receiving subscription data, where the system for transmitting and receiving subscription data includes a first-level node, a publishing agent, and a second-level node, and the method for receiving the subscription data includes:
  • the subscriber sends the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscriber obtains the subscription content, and receives the subscription according to the secondary node.
  • the subscription relationship looks up a subscriber of the subscription content
  • the subscribing party receives the subscription content sent by the subscribing party through the publishing agent after finding the subscribing party of the subscription content.
  • a third aspect of the embodiments of the present invention provides a device for sending subscription data, where the device uses the sending and receiving system of the subscription data to implement data transmission, and the sending and receiving of the subscription data.
  • the receiving system includes a first-level node, a publishing agent, and a second-level node, including:
  • a first receiving module configured by the subscriber to receive and store, by the secondary node, a subscription relationship between the subscriber and the called party sent by the subscriber through the first-level node;
  • a first sending module configured to: when the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and The subscription content is sent by the publishing agent to the found subscriber.
  • a fourth aspect of the embodiments of the present invention provides a receiving device for receiving subscription data, wherein the device uses the sending and receiving system of the subscription data to implement data reception, and the sending of the subscription data is performed.
  • the receiving system includes a first-level node, a publishing agent, and a second-level node, including:
  • a second sending module configured to send, by the subscriber, the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscribed party obtains the subscription content ⁇ , searching for a subscriber of the subscription content according to the subscription relationship received by the secondary node;
  • the second receiving module is configured to receive, by the subscriber, the subscription content sent by the subscribing party through the publishing agent after finding the subscription party of the subscription content.
  • a fifth aspect of the embodiments of the present invention provides a method for transmitting and receiving subscription data, where the system for transmitting and receiving subscription data is included, and the system for transmitting and receiving subscription data includes: a first-level node, a publishing agent, and a second-level node, the method for transmitting and receiving subscription data Includes:
  • the subscriber receives and stores, by the secondary node, a subscription relationship between the subscriber and the called party sent by the subscriber through the primary node;
  • the subscriber sends the subscription relationship between the subscriber and the subscriber to the secondary node through the primary node
  • the subscribed party After the subscribed party obtains the subscription content, searching for the subscriber of the subscription content according to the subscription relationship received by the secondary node;
  • the subscribing party when the subscribing party obtains the subscription content, the subscribing party searches for the subscriber of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and passes the subscription content through the The publishing agent sends the discovered subscribers;
  • the subscribing party receives the subscription content sent by the subscribing party through the publishing agent after finding the subscriber of the subscription content.
  • a sixth aspect of the embodiments of the present invention provides a system for sending and receiving subscription data, including: a first-level node, a publishing agent, and a second-level node;
  • the first-level node is configured to receive a receiving request of the subscribing party and a sending request of the subscribing party, and send the receiving request and the sending request to the publishing agent;
  • the first-level node is further configured to receive a subscription relationship between the subscriber and the subscribing party sent by the subscribing party, and send the subscription relationship to the second-level node;
  • the first-level node is further configured to receive a query request by the subscribing party to query the subscription relationship, and obtain the subscription relationship after acquiring the subscription relationship from the second-level node according to the query request. a relationship is sent to the subscribing party;
  • the publishing agent is configured to learn, by the primary node, the receiving request of the subscriber, and obtain the sending request of the subscribed party by using the primary node, and create, according to the receiving request, Receiving a topic of the subscriber data, and transmitting the data by the topic according to the sending request;
  • the secondary node is configured to store the subscription relationship.
  • the technical solution provided by the embodiment of the present invention has the beneficial effects of: storing the subscription relationship between the data subscriber and the subscriber to the secondary node, and obtaining the subscription directly from the secondary node after the data is sent. Relationship, in order to send data according to the acquired subscription relationship, based on pre-storing the subscription relationship between the data subscriber and the subscriber, based on the characteristics of the secondary node processing the massive data, the data transmission method of the present invention can Support the transmission of massive data.
  • FIG. 1 is a schematic structural diagram of a system for transmitting and receiving subscription data according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a method for sending subscription data according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic diagram of a comparison between a conventional data structure and an improved data structure provided by Example 3 of the present invention.
  • FIG. 4 is a flowchart of a method for transmitting subscription data according to Embodiment 4 of the present invention.
  • FIG. 5 is a signaling flowchart of a subscription data sending and receiving process according to Embodiment 6 of the present invention.
  • FIG. 6 is a structural block diagram of a device for transmitting subscription data according to Embodiment 7 of the present invention.
  • FIG. 7 is a structural block diagram of a device for transmitting subscription data according to Embodiment 10 of the present invention.
  • FIG. 8 is a structural block diagram of a receiving device for receiving subscription data according to Embodiment 11 of the present invention.
  • the present invention provides a method for transmitting and receiving subscription data, a device, and a system.
  • the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • the server in the embodiment of the present invention may preferably include a publishing agent, a secondary node, and The first-level node, the data provider and the data receiver interact with the server to implement the entire process of data subscription, sending, and receiving, wherein the publishing agent mainly implements data subscription according to the topic.
  • the secondary node mainly undertakes the addition, deletion and change of data subscription, sending and receiving rules.
  • the foregoing publishing agent, the second-level node, and the first-level node mainly have the following functions:
  • the first-level node is configured to receive the receiving request of the subscribing party and the sending request of the subscribing party, and send the receiving request and the sending request to the publishing agent.
  • the primary node is further configured to receive a subscription relationship between the subscriber and the subscribed party sent by the subscriber, and send the subscription relationship to the secondary node.
  • the subscription relationship is mainly composed of Topic.
  • the first-level node is further configured to receive a request for the subscribing party to query the subscription relationship, and obtain the subscription relationship from the secondary node according to the request, and then send the subscription relationship to the subscribing party.
  • the publishing agent is configured to learn the receiving request of the subscriber through the primary node, and obtain the sending request of the subscribed party through the primary node, create a topic for receiving the data of the subscribed party according to the receiving request, and generate a request according to the sending request. Send data by topic.
  • the secondary node is used to store the subscription relationship.
  • the secondary node and the first-level node may be multiple, and the publishing agent, the second-level node, and the first-level node all have horizontal expansion capability, that is, can meet the needs of a large number of unstructured data storage, and configured. Convenient, even for a large file of a few terabytes, its change management is very simple. Scale-out through the global namespace allows for flexible management of the system. Managing a secondary node with 100 nodes is as simple as managing a secondary node with only one node.
  • the entire secondary node (publishing agent or level 1 node) can be managed as a single logic, no matter how large the number of nodes. . Therefore, for the IoT with massive data In terms of the network, the number of subscribers is huge. Correspondingly, the number of subscribers is huge, and the number of publishing agents, secondary nodes, and first-level nodes required is also huge, but no matter how large, the publishing agent with horizontal expansion capability, Both the secondary node and the primary node can be flexibly managed (processed).
  • the subscription relationship between the data subscriber and the subscriber is pre-stored in the secondary node, and after the data is sent, the subscription relationship may be directly obtained from the secondary node, according to the obtained subscription relationship.
  • the data is sent and then received by the subscriber.
  • the data transmission method of the present invention can support the transmission of massive data based on the characteristics of the secondary node processing the massive data.
  • An embodiment of the present invention provides a method for sending subscription data, which may be performed by a subscriber of the data, that is, a provider of the data, in order to implement data subscription and transmission according to the manner provided by the embodiment of the present invention.
  • the server in the embodiment of the present invention can perform operations by means of a system for integrating data transmission and reception by means of a system integrated with multiple servers.
  • FIG. 2 is a flowchart of the method. As shown in FIG. 2, the method includes the following steps. Steps:
  • Step S201 The subscriber receives and stores, by the secondary node, a subscription relationship between the subscriber and the called party that the subscriber sends through the primary node.
  • the subscriber is the subscriber of the data, that is, the provider of the data, such as the terminal device, and the subscriber, that is, the subscriber of the data, that is, the receiver of the data, for example, may be a client.
  • the terminal device receives and stores, by the secondary node, a subscription relationship between the client and the terminal device sent by the subscriber through the primary node.
  • the subscribing party receives and stores the subscription relationship between the subscribing party and the read party sent by the subscribing party through the second-level node, and the subscriber can clearly obtain the subscribing party and the read party.
  • Step S202 When the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and the subscription content is Sended to the found subscriber by the publishing agent.
  • the subscription relationship between the subscriber and the subscriber may be a one-to-many relationship, that is, one subscriber subscribes to multiple subscribers, for example, a consumer's mobile terminal subscribes to multiple device manufacturers' devices, and these Assume
  • the user can provide the subscribed content (such as the status of the device and the device) to the mobile terminal of the consumer within a preset time.
  • the subscription relationship between the subscriber and the subscriber is pre-stored in the secondary node (distributed data cache). Based on the pre-stored subscription relationship between the subscriber and the subscriber, the subscriber finds the subscriber of the subscription content (for example, consumption).
  • the mobile terminal C) sends the subscription content to the found subscriber through the publishing agent.
  • the method for sending subscription data provided by the embodiment of the present invention, by storing the subscription relationship between the data subscriber and the subscriber to the secondary node, can obtain the subscription relationship directly from the secondary node after the data is sent.
  • the data transmission method of the present invention can support a large amount of data according to the characteristics of the secondary node processing the massive data based on the pre-stored subscription relationship between the data subscriber and the subscribing party. The transmission of data.
  • the embodiment of the present invention is improved on the basis of the conventional data structure of the subscription data, and the improved data structure is shown in FIG. 3, wherein 31 is a regular data structure, 32 is The improved data structure, the data sent by the server, the subscriber, and the subscribing party all use the structure of the improved data, and the load portion of the improved data includes at least: device type code, device number, data type code And the specific content of the data, wherein the device type can be distinguished by the model code of the device.
  • the subscription relationship between the subscriber and the subscriber may specifically include the following:
  • a subscription relationship between the subscriber identity and the subscriber device type code, a subscription relationship between the subscriber identity and the subscriber device code, and/or a subscription relationship between the subscriber identity and the subscribed data type code may be determined by the subscriber according to the subscription content, for example, when the subscription relationship between the subscriber and the subscriber is between the subscriber identifier and the subscriber device type code.
  • the data subscribed by the subscriber is subscribed according to the device type, that is, the subscriber subscribes to the data of the specified type of device.
  • the embodiment of the present invention improves the data structure of the subscription data, so that the load of the improved data includes at least a device type code, a device number, a data type code, and a data specific content, and the subscription of the subscriber and the subscriber is embodied. Relationships, subscription relationships become more flexible.
  • Embodiment 4 An embodiment of the present invention provides a method for receiving subscription data, which is also implemented based on the sending and receiving system of subscription data in the foregoing Embodiment 1, and the method may be performed by a subscriber of data, that is, data receiving.
  • the server in the embodiment of the present invention can perform operations by using a system that integrates multiple servers, and the subscription data sending and receiving system.
  • 4 is a flow chart of the method. As shown in FIG. 4, the method includes step S401 and step S402.
  • Step S401 The subscriber sends the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscriber obtains the subscription content, according to the secondary
  • the subscription relationship received by the node finds a subscriber of the subscription content.
  • the subscriber may be a client (eg, a mobile terminal) in the Internet of Things
  • the first-level node receiving a receiving request of a subscriber (eg, a mobile terminal), and sending the receiving request to the publishing The agent, then the subscriber sends the subscription relationship to the first-level node, and then the first-level node sends the subscription relationship to the secondary node, so that the subscribed party (for example, the terminal device) obtains the subscription content, according to the second
  • the subscription relationship received by the level node searches for a subscriber of the subscription content (eg, mobile terminal)
  • the first-level node after receiving the receiving request of the subscribing party, the first-level node sends the receiving request to the publishing agent, and then the subscribing party sends the subscription relationship to the first-level node, and then The first-level node sends the subscription relationship to the secondary node, and the mode of responding and performing subsequent operations after receiving the request improves the efficiency of data processing, and avoids receiving the subscriber after receiving the request of the subscribed party.
  • the subscription request is a waste of resources caused by the sending of the subscription relationship.
  • Step S402 The subscriber receives the subscription content sent by the subscribing party through the publishing agent after finding the subscriber of the subscription content.
  • Step S202 when the subscribing party obtains the subscription content, the subscribing party searches for the subscriber of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and the subscription is The content is sent to the found subscriber through the publishing agent.
  • the publishing agent sends the subscription content to the found subscriber, and then the subscriber receives the subscription content from the subscriber through the publishing agent (for example, the humidity value in a certain place or environment preset segment).
  • a subscriber eg, a mobile terminal
  • the subscription content of the reading party for example, the temperature and humidity values in a certain place or environment for a period of time.
  • the subscribing party can obtain the living comfort corresponding to the temperature and humidity value, and further know the living comfort in the day or the preset period of the environment.
  • the first-level node after receiving the receiving request of the subscriber, the first-level node sends the receiving request to the publishing agent, and then the subscriber sends the subscription relationship to the first-level node, and then the first level.
  • the node sends the subscription relationship to the secondary node, and the mode of responding and performing subsequent operations after receiving the request improves the efficiency of data processing; the subscriber receives the subscription content from the subscribed party through the publishing agent, and makes full use of the publishing The performance of the agent further improves the processing efficiency.
  • the embodiment of the present invention improves on the basis of the conventional data structure of the subscription data, and the improved data structure is as shown in FIG. 3, wherein 31 is a regular data structure, and 32 is a
  • the improved data structure, the data sent by the server, the subscriber, and the subscribing party all use the structure of the improved data, and the load portion of the improved data includes at least: device type code, device number, data type code And the specific content of the data, wherein the device type can be distinguished by the model code of the device.
  • the subscription relationship between the subscriber and the subscriber may specifically include the following:
  • a subscription relationship between the subscriber identity and the subscriber device type code, a subscription relationship between the subscriber identity and the subscriber device code, and/or a subscription relationship between the subscriber identity and the subscribed data type code may be determined by the subscriber according to the subscription content, for example, when the subscription relationship between the subscriber and the subscriber is between the subscriber identifier and the subscriber device type code.
  • the data subscribed by the subscriber is subscribed according to the device type, that is, the subscriber subscribes to the data of the specified type of device.
  • the embodiment of the present invention improves the data structure of the subscription data, so that the load of the improved data includes at least a device type code, a device number, a data type code, and a data specific content, and the subscription of the subscriber and the subscriber is embodied. Relationships, subscription relationships become more flexible.
  • the foregoing embodiment 1 and the second embodiment respectively describe the sending and receiving schemes of the subscription data provided by the embodiment of the present invention from the operations performed by the server and the client, respectively.
  • the entire process of sending and receiving subscription data is performed through information exchange between the server and the client.
  • FIG. 5 is a signaling flowchart of a process for sending and receiving subscription data according to Embodiment 6 of the present invention. As shown in FIG. 5, the process includes the following processing:
  • S1 starting the terminal device M and the client C;
  • S2 create a topic named name
  • S3 the client subscribes to the data of the terminal device
  • S4 saving the subscription relationship between the terminal device M and the name
  • the subscriber client subscribes to the data, registers its name as a topic, and listens to the data sent to the topic, and then saves the association relationship between the subscriber and the name to the secondary node; based on this, in the sender After the client sends a device data, the name of the corresponding subscriber client can be found according to the saved association relationship, thereby finding the topic, and the subscription data is delivered to the subscriber client through the topic.
  • the server mainly implements the following functions:
  • the client adopts a dedicated API (Application Programming Interface) that encapsulates the Internet of Things model and the client to subscribe and receive data with the back end.
  • API Application Programming Interface
  • the client subscribes to the data to the server communicates with the first-level node, submits the subscription relationship between the client and the subscribed party, communicates with the publishing agent, creates a data topic, receives data based on the Topic, and sends data at the terminal device. : Communicate with the secondary node, query the subscription relationship between the terminal device and the data subscriber, according to the subscription Read the relationship to find the corresponding topic; communicate with the publishing agent, and send data based on the Topic.
  • Embodiments of the present invention utilize a secondary node (distributed data cache) to store a relationship between a subscriber and a subscribed device, convert a subscription transmission rule into an entry of a secondary node, and combine a secondary node (distributed data cache) Characteristics, regardless of the amount of data, the inter-turn complexity of the algorithm that processes the information can be performed in a constant order.
  • a secondary node distributed data cache
  • Reality capable of processing data, supporting fast forwarding of Internet of Things data
  • high throughput After testing, the scheme of the embodiment of the present invention can achieve at least 50W data processing capability per second; supporting massive data: actual use results Display, can run stably for a long time, process massive data;
  • Cluster scalability Ability to increase or decrease the processing capacity by increasing or decreasing the server according to requirements;
  • Stability The first-level node itself supports high availability, high stability, and the client can borrow This mechanism achieves high availability; the M2M feature of the overlay network, the device- and user-centric transmission mechanism, facilitates the use of service modules;
  • Low coupling The data sender and the data receiver are transparent to each other, without concern for internal details, reducing the system Coupling.
  • An embodiment of the present invention provides a device for transmitting subscription data, where the device can be located at a subscriber, that is, a provider of data, and the device can transmit and receive the subscription data provided in the foregoing Embodiment 1.
  • the information is exchanged to implement the function of sending the subscription data.
  • the device is used to implement the data transmission method provided in the second embodiment.
  • FIG. 6 is a structural block diagram of the device. As shown in FIG. 6, the device 60 includes a first receiving module. 61 and the first sending module 62, the functions of each module are as follows:
  • the first receiving module 61 is configured to receive, by the subscriber, the subscription relationship between the subscriber and the called party that is sent by the subscriber through the primary node by using the secondary node.
  • the first sending module 62 is configured to: when the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, The subscription content is sent to the found subscriber through the publishing agent.
  • the sending device of the subscription data provided by the embodiment of the present invention stores the subscription relationship between the data subscriber and the subscriber to the secondary node, and after the data is sent, the subscription relationship can be directly obtained from the secondary node.
  • the data subscriber is pre-stored and Based on the subscription relationship of the subscriber, based on the characteristics of the secondary node processing the massive data, the data transmission method of the present invention can support the transmission of massive data.
  • An embodiment of the present invention provides a device for transmitting subscription data, where the device can be located at a subscriber, that is, a provider of data, and the device can transmit and receive the subscription data provided in the foregoing Embodiment 1.
  • the information is exchanged to implement the function of sending the subscription data.
  • the device is used to implement the data transmission method provided in the third embodiment.
  • FIG. 6 is a structural block diagram of the device. As shown in FIG. 6, the device 60 includes a first receiving module. 61 and the first sending module 62, the functions of each module are as follows:
  • the first receiving module 61 is configured to receive, by the subscriber, the subscription relationship between the subscriber and the called party sent by the subscriber through the primary node by using the secondary node.
  • the first sending module 62 is configured to: when the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, The subscription content is sent to the found subscriber through the publishing agent.
  • the data sent between the server, the subscribing party, and the subscribing party in the embodiment of the present invention includes at least: a device type code, a device number, a data type code, and data specific content.
  • the subscription relationship between the subscriber and the subscriber may specifically include the following:
  • a subscription relationship between the subscriber identity and the subscriber device type code a subscription relationship between the subscriber identity and the subscriber device code, and/or a subscription relationship between the subscriber identity and the subscribed data type code .
  • the load of the improved data includes at least a device type code, a device number, a data type code, and a data specific content, and the subscription of the subscriber and the subscriber is embodied. Relationships, subscription relationships become more flexible.
  • An embodiment of the present invention provides a device for transmitting subscription data, where the device can be located at a subscriber, that is, a provider of data, and the device can transmit and receive the subscription data provided in the foregoing Embodiment 1.
  • the information is exchanged to implement the function of sending the subscription data.
  • the device is used to implement the data transmission method provided in the second embodiment.
  • FIG. 6 is a structural block diagram of the device. As shown in FIG. 6, the device 60 includes a first receiving module. 61 and the first sending module 62, the functions of each module are as follows: [0114]
  • the first receiving module 61 is configured to receive, by the subscriber, the subscription relationship between the subscriber and the called party that is sent by the subscriber through the primary node by using the secondary node.
  • the first sending module 62 is configured to: when the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, The subscription content is sent to the found subscriber through the publishing agent.
  • the foregoing apparatus 60 may further include: a registration module 63, configured to: after receiving the subscription request, register the identifier of the subscriber that sends the subscription request as a topic in the data queue; and the saving module 64 is configured to establish And the first sending module 62 is configured to: find the identifier of the subscriber client according to the subscription relationship, according to the subscription relationship of the subscriber and the subscribed relationship of the subscriber, The found identifier finds the corresponding topic and sends the data to the subscriber through the found topic.
  • a registration module 63 configured to: after receiving the subscription request, register the identifier of the subscriber that sends the subscription request as a topic in the data queue
  • the saving module 64 is configured to establish
  • the first sending module 62 is configured to: find the identifier of the subscriber client according to the subscription relationship, according to the subscription relationship of the subscriber and the subscribed relationship of the subscriber, The found identifier finds the corresponding topic and sends the data to the subscriber through the found topic.
  • the receiving device of the subscription data stores the subscription relationship between the data subscriber and the subscriber to the secondary node, and after the data is sent, the subscription relationship can be directly obtained from the secondary node.
  • the subscription relationship the identifier of the subscriber client is found, the corresponding topic is searched according to the found identifier, and the data is sent to the subscriber through the found topic, which is accurate and efficient, so that the data sending method of the present invention can support massive data. Send.
  • the embodiment of the present invention provides a receiving device for subscription data, where the device can be set to a subscriber, that is, a receiver of subscription data, and the device performs the sending and receiving system of the subscription data in the first embodiment.
  • the information exchange implements the function of receiving the subscription data.
  • the device is used to implement the method for receiving the subscription data provided in the fourth embodiment.
  • FIG. 7 is a structural block diagram of the device. As shown in FIG. 7, the device 70 includes a second sending module 71. And the second receiving module 72, the functions of each module are as follows:
  • the second sending module 71 is configured to send, by the subscriber, the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscribed party obtains the subscription.
  • Content ⁇ searching for a subscriber of the subscription content according to the subscription relationship received by the secondary node.
  • the second receiving module 72 is configured to receive, by the subscribing party, the subscription content sent by the subscribing party through the publishing agent after finding the subscribing party of the subscription content.
  • the primary node receives the receiving request of the subscriber, and then the receiving request is received.
  • the efficiency of data processing avoids the waste of resources caused by the transmission of the subscription relationship without receiving the subscription request of the subscriber after receiving the request by the subscriber.
  • the embodiment of the present invention provides a receiving device for subscription data, and the device may be disposed on a subscriber, that is, a receiver of subscription data, and the device performs the sending and receiving system of the subscription data in the first embodiment.
  • the information exchange implements the function of receiving the subscription data.
  • the device is used to implement the method for receiving the subscription data provided in the fifth embodiment.
  • FIG. 7 is a structural block diagram of the device. As shown in FIG. 7, the device 70 includes a second sending module 71. And the second receiving module 72, the functions of each module are as follows:
  • the second sending module 71 is configured to send, by the subscriber, the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscribed party obtains the subscription.
  • Content ⁇ searching for a subscriber of the subscription content according to the subscription relationship received by the secondary node.
  • the second receiving module 72 is configured to receive, by the subscriber, the subscription content sent by the subscribing party through the publishing agent after finding the subscriber of the subscription content.
  • the data sent between the subscriber, the subscriber, and the system at least includes: a device type code, a device number, a data type code, and a data specific content.
  • the subscription relationship between the subscriber and the subscriber includes: a subscription relationship between the subscriber identifier and the subscriber device type code, a subscription relationship between the subscriber identity and the subscriber device code, and/or The subscription relationship between the subscriber ID and the encoded data type encoding.
  • the embodiment of the present invention improves the data structure of the subscription data, so that the load of the improved data includes at least a device type code, a device number, a data type code, and a data specific content, and the subscription of the subscriber and the subscribed party is embodied. Relationships, subscription relationships become more flexible.
  • first, second, etc. are used herein to describe the various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another.
  • first The transmitting module may also be referred to as a second transmitting module, and the second transmitting module may also be referred to as a first transmitting module without departing from the scope of the present invention.
  • the first sending module and the second sending module are two acquisition modules, but they are not the same transmitting module. It is also to be understood that the singular forms "a” It should also be understood that "and/or” as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
  • each functional unit and module described above is exemplified. In practical applications, the above functions may be assigned differently according to needs.
  • the functional unit and the module are completed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
  • Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the integrated unit may be implemented by hardware.
  • Formal implementation can also be implemented in the form of software functional units.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the present invention is implemented
  • the technical solution of the example or the contribution of the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • a processor is used to perform all or part of the steps of the method described in the various embodiments of the embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (R 0M, Read-Only Memory), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present solution relates to the technical field of the Internet of Things, in particular to a subscription data sending and receiving method, device and system. The method comprises: a subscription-receiving party receives and stores, by means of a second-level node, a subscription relationship between a subscribing party and the subscription-receiving party sent by the subscribing party by means of a first-level node; and when the subscription-receiving party acquires subscription content, the subscription-receiving party finds the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscription-receiving party, and sends the subscription content to the found subscribing party by means of an intelligent release entity. According to the solution, the subscription relationship between a data subscribing party and a subscription-receiving party is stored in a second-level node; when data is sent, the subscription relationship may be directly acquired from the second-level node, so that the data is sent according to the acquired subscription relationship. On the basis of pre-storing the subscription relationship between the data subscribing party and the subscription-receiving party, the characteristic of processing mass data by means of the second-level node enables the data sending method according to the present solution to support sending of mass data.

Description

订阅数据的发送、 接收方法、 装置及系统 技术领域  Method, device and system for transmitting and receiving subscription data
[0001] 本发明涉及物联网技术领域, 尤其涉及一种订阅数据的发送、 接收方法、 装置 及系统。  [0001] The present invention relates to the field of Internet of things, and in particular, to a method and a device for transmitting and receiving subscription data.
背景技术  Background technique
[0002] 物联网快速发展的同吋也制造了海量数据, 如何妥善处理及合理利用这些海量 数据是物联网下一步发展的关键。 由于物联网的海量数据具有实吋、 高吞吐、 数据量巨大以及数据具体内容杂, 因此物联网需要一种能够支持实吋、 高并发 、 支持海量数据的数据发送机制, 而通用的数据队列软件却不能很好地解决此 类问题, 物联网具有海量的接入用户和接入设备, 数据订阅和发送规则也极为 庞杂, 信息传递的实吋性要求也较高, 而通用的数据队列软件主要基于 topic机 制进行数据的订阅和发送, 不能在保证高处理效率的前提下对这种场景进行支 持。  [0002] The rapid development of the Internet of Things has also produced massive data. How to properly handle and rationally use these massive data is the key to the next development of the Internet of Things. Because the massive data of the Internet of Things has real, high throughput, huge amount of data, and data specific content, the Internet of Things needs a data transmission mechanism that can support real, high concurrency, and support massive data, while the general data queue software. However, it is not a good solution to such problems. The Internet of Things has a large number of access users and access devices, data subscription and transmission rules are also extremely complex, and the practical requirements for information transmission are also high, while the general data queue software is mainly The subscription and transmission of data based on the topic mechanism cannot support such scenarios under the premise of ensuring high processing efficiency.
[0003] 综上可知, 传统物联网数据发送方式无法为海量数据发送提供支持。  [0003] In summary, the traditional Internet of Things data transmission method cannot provide support for massive data transmission.
技术问题  technical problem
[0004] 鉴于此, 本发明实施例提供一种订阅数据的发送、 接收方法、 装置及系统, 以 解决传统物联网数据发送方式无法支持海量数据发送提供支持的问题。  In view of this, the embodiments of the present invention provide a method, a device, and a system for sending and receiving subscription data, so as to solve the problem that the traditional Internet of Things data transmission mode cannot support massive data transmission.
问题的解决方案  Problem solution
技术解决方案  Technical solution
[0005] 本发明实施例的第一方面, 提供了一种订阅数据的发送方法, 其特征在于, 应 用于订阅数据的发送与接收的系统, 所述订阅数据的发送与接收的系统包括一 级节点、 发布智能体以及二级节点, 所述订阅数据的发送方法包括:  [0005] A first aspect of the embodiments of the present invention provides a method for sending subscription data, which is applicable to a system for transmitting and receiving subscription data, where the system for transmitting and receiving subscription data includes a first level. The node, the publishing agent, and the second node, the sending method of the subscription data includes:
[0006] 被订阅方通过所述二级节点接收并存储订阅方通过所述一级节点发送的订阅方 与被阅方的订阅关系;  [0006] the subscriber receives and stores, by the secondary node, a subscription relationship between the subscriber and the called party sent by the subscriber through the primary node;
[0007] 当所述被订阅方获取到订阅内容吋, 所述被订阅方根据所述订阅方与被订阅方 的订阅关系査找到所述订阅内容的订阅方, 将所述订阅内容通过所述发布智能 体发送给査找到的订阅方。 [0007] When the subscribing party obtains the subscription content, the subscribing party searches for the subscriber of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and passes the subscription content through the Release intelligence The body is sent to the found subscriber.
[0008] 本发明实施例的第二方面, 提供了一种订阅数据的接收方法, 其特征在于, 应 用于所述订阅数据的发送与接收的系统, 所述订阅数据的发送与接收的系统包 括一级节点、 发布智能体以及二级节点, 所述订阅数据的接收方法, 包括: [0008] A second aspect of the embodiments of the present invention provides a method for receiving subscription data, which is applicable to a system for transmitting and receiving subscription data, where the system for transmitting and receiving subscription data includes a first-level node, a publishing agent, and a second-level node, and the method for receiving the subscription data includes:
[0009] 订阅方通过所述一级节点将订阅方与被订阅方的订阅关系发送至所述二级节点 , 使所述被订阅方在获取到订阅内容吋, 根据所述二级节点接收到的所述订阅 关系査找所述订阅内容的订阅方; [0009] the subscriber sends the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscriber obtains the subscription content, and receives the subscription according to the secondary node. The subscription relationship looks up a subscriber of the subscription content;
[0010] 所述订阅方接收所述被订阅方在査找到所述订阅内容的订阅方后通过所述发布 智能体发送的订阅内容。  [0010] the subscribing party receives the subscription content sent by the subscribing party through the publishing agent after finding the subscribing party of the subscription content.
[0011] 本发明实施例的第三方面, 提供了一种订阅数据的发送装置, 其特征在于, 该 装置使用所述订阅数据的发送与接收系统实现数据的发送, 所述订阅数据的发 送与接收的系统包括一级节点、 发布智能体以及二级节点, 包括:  [0011] A third aspect of the embodiments of the present invention provides a device for sending subscription data, where the device uses the sending and receiving system of the subscription data to implement data transmission, and the sending and receiving of the subscription data. The receiving system includes a first-level node, a publishing agent, and a second-level node, including:
[0012] 第一接收模块, 用于被订阅方通过所述二级节点接收并存储订阅方通过所述一 级节点发送的订阅方与被阅方的订阅关系;  [0012] a first receiving module, configured by the subscriber to receive and store, by the secondary node, a subscription relationship between the subscriber and the called party sent by the subscriber through the first-level node;
[0013] 第一发送模块, 用于当所述被订阅方获取到订阅内容吋, 所述被订阅方根据所 述订阅方与被订阅方的订阅关系査找到所述订阅内容的订阅方, 将所述订阅内 容通过所述发布智能体发送给査找到的订阅方。  [0013] a first sending module, configured to: when the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and The subscription content is sent by the publishing agent to the found subscriber.
[0014] 本发明实施例的第四方面, 提供了一种订阅数据的接收装置, 其特征在于, 该 装置使用所述订阅数据的发送与接收系统实现数据的接收, 所述订阅数据的发 送与接收的系统包括一级节点、 发布智能体以及二级节点, 包括:  A fourth aspect of the embodiments of the present invention provides a receiving device for receiving subscription data, wherein the device uses the sending and receiving system of the subscription data to implement data reception, and the sending of the subscription data is performed. The receiving system includes a first-level node, a publishing agent, and a second-level node, including:
[0015] 第二发送模块, 用于通过所述订阅方通过所述一级节点将订阅方与被订阅方的 订阅关系发送至所述二级节点, 使所述被订阅方在获取到订阅内容吋, 根据所 述二级节点接收到的所述订阅关系査找所述订阅内容的订阅方;  [0015] a second sending module, configured to send, by the subscriber, the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscribed party obtains the subscription content查找, searching for a subscriber of the subscription content according to the subscription relationship received by the secondary node;
[0016] 第二接收模块, 用于所述订阅方接收所述被订阅方在査找到所述订阅内容的订 阅方后通过所述发布智能体发送的订阅内容。  [0016] The second receiving module is configured to receive, by the subscriber, the subscription content sent by the subscribing party through the publishing agent after finding the subscription party of the subscription content.
[0017] 本发明实施例的第五方面, 提供了一种订阅数据的发送与接收方法, 其特征在 于, 应用于订阅数据的发送与接收的系统, 所述订阅数据的发送与接收的系统 包括一级节点、 发布智能体以及二级节点, 所述订阅数据的发送与接收方法包 括: A fifth aspect of the embodiments of the present invention provides a method for transmitting and receiving subscription data, where the system for transmitting and receiving subscription data is included, and the system for transmitting and receiving subscription data includes: a first-level node, a publishing agent, and a second-level node, the method for transmitting and receiving subscription data Includes:
[0018] 被订阅方通过所述二级节点接收并存储订阅方通过所述一级节点发送的订阅方 与被阅方的订阅关系;  [0018] the subscriber receives and stores, by the secondary node, a subscription relationship between the subscriber and the called party sent by the subscriber through the primary node;
[0019] 订阅方通过所述一级节点将订阅方与被订阅方的订阅关系发送至所述二级节点 [0019] the subscriber sends the subscription relationship between the subscriber and the subscriber to the secondary node through the primary node
, 使所述被订阅方在获取到订阅内容吋, 根据所述二级节点接收到的所述订阅 关系査找所述订阅内容的订阅方; After the subscribed party obtains the subscription content, searching for the subscriber of the subscription content according to the subscription relationship received by the secondary node;
[0020] 当所述被订阅方获取到订阅内容吋, 所述被订阅方根据所述订阅方与被订阅方 的订阅关系査找到所述订阅内容的订阅方, 将所述订阅内容通过所述发布智能 体发送给査找到的订阅方; [0020] when the subscribing party obtains the subscription content, the subscribing party searches for the subscriber of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and passes the subscription content through the The publishing agent sends the discovered subscribers;
[0021] 所述订阅方接收所述被订阅方在査找到所述订阅内容的订阅方后通过所述发布 智能体发送的订阅内容。 [0021] The subscribing party receives the subscription content sent by the subscribing party through the publishing agent after finding the subscriber of the subscription content.
[0022] 本发明实施例的第六方面, 提供了一种订阅数据的发送与接收系统, 包括: 一 级节点、 发布智能体以及二级节点; [0022] A sixth aspect of the embodiments of the present invention provides a system for sending and receiving subscription data, including: a first-level node, a publishing agent, and a second-level node;
[0023] 所述一级节点用于接收订阅方的接收请求以及被订阅方的发送请求, 将所述接 收请求以及所述发送请求发送给所述发布智能体; [0023] the first-level node is configured to receive a receiving request of the subscribing party and a sending request of the subscribing party, and send the receiving request and the sending request to the publishing agent;
[0024] 所述一级节点还用于接收所述被订阅方发送的订阅方与被订阅方的订阅关系, 将所述订阅关系发送给二级节点; [0024] the first-level node is further configured to receive a subscription relationship between the subscriber and the subscribing party sent by the subscribing party, and send the subscription relationship to the second-level node;
[0025] 所述一级节点还用于接收所述被订阅方査询所述订阅关系的査询请求, 根据所 述査询请求从所述二级节点获取所述订阅关系后将所述订阅关系发送给所述被 订阅方; [0025] the first-level node is further configured to receive a query request by the subscribing party to query the subscription relationship, and obtain the subscription relationship after acquiring the subscription relationship from the second-level node according to the query request. a relationship is sent to the subscribing party;
[0026] 所述发布智能体用于通过所述一级节点获知所述订阅方的接收请求, 以及通过 所述一级节点获知所述被订阅方的发送请求, 根据所述接收请求创建用于接收 被订阅方数据的 topic, 以及根据所述发送请求通过 topic发送数据;  [0026] the publishing agent is configured to learn, by the primary node, the receiving request of the subscriber, and obtain the sending request of the subscribed party by using the primary node, and create, according to the receiving request, Receiving a topic of the subscriber data, and transmitting the data by the topic according to the sending request;
[0027] 所述二级节点用于存储所述订阅关系。  [0027] The secondary node is configured to store the subscription relationship.
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0028] 本发明实施例提供的技术方案带来的有益效果是: 将数据订阅方与被订阅方的 订阅关系存储到二级节点中, 在数据发送吋, 可以直接从二级节点中获取订阅 关系, 以根据获取到的订阅关系进行数据的发送, 在预先存储了数据订阅方与 被订阅方的订阅关系的基础上, 基于二级节点处理海量数据的特点, 使得本发 明的数据发送方法能够支持海量数据的发送。 [0028] The technical solution provided by the embodiment of the present invention has the beneficial effects of: storing the subscription relationship between the data subscriber and the subscriber to the secondary node, and obtaining the subscription directly from the secondary node after the data is sent. Relationship, in order to send data according to the acquired subscription relationship, based on pre-storing the subscription relationship between the data subscriber and the subscriber, based on the characteristics of the secondary node processing the massive data, the data transmission method of the present invention can Support the transmission of massive data.
对附图的简要说明  Brief description of the drawing
附图说明  DRAWINGS
[0029] 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所需要 使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一 些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还 可以根据这些附图获得其他的附图。  [0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
[0030] 图 1是本发明实施例一提供的订阅数据的发送与接收系统的结构示意图 1 is a schematic structural diagram of a system for transmitting and receiving subscription data according to Embodiment 1 of the present invention;
[0031] 图 2是本发明实施例二提供的订阅数据的发送方法的流程图; 2 is a flowchart of a method for sending subscription data according to Embodiment 2 of the present invention;
[0032] 图 3是本发明实例三提供的传统数据结构与改进后的数据结构的对比示意图; [0033] 图 4是本发明实施例四提供的订阅数据的发送方法的流程图; 3 is a schematic diagram of a comparison between a conventional data structure and an improved data structure provided by Example 3 of the present invention; [0033] FIG. 4 is a flowchart of a method for transmitting subscription data according to Embodiment 4 of the present invention;
[0034] 图 5是本发明实施例六提供的订阅数据发送与接收流程的信令流程图; 5 is a signaling flowchart of a subscription data sending and receiving process according to Embodiment 6 of the present invention;
[0035] 图 6是本发明实施例七提供的订阅数据的发送装置的结构框图; 6 is a structural block diagram of a device for transmitting subscription data according to Embodiment 7 of the present invention;
[0036] 图 7是本发明实施例十提供的订阅数据的发送装置的结构框图; 7 is a structural block diagram of a device for transmitting subscription data according to Embodiment 10 of the present invention;
[0037] 图 8是本发明实施例十一提供的订阅数据的接收装置的结构框图。 8 is a structural block diagram of a receiving device for receiving subscription data according to Embodiment 11 of the present invention.
本发明的实施方式 Embodiments of the invention
[0038] 为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明实施 方式作进一步地详细描述。  The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0039] 现在将详细地参考具体实施例, 这些实施例的示例在附图中被示出。 在下面的 详细描述中示出了许多具体细节, 以便于提供对各种所描述的实施例的充分理 解。 但是, 对本领域的普通技术人员来讲显而易见的是, 各种所描述的实施例 可以没有在这些具体细节的情况下被实践。 在其他情况下, 没有详细地描述众 所周知的方法、 过程、 部件、 电路、 和网络, 从而不会不必要地使实施例的方 面晦涩难懂。  [0039] Reference will now be made in detail to the particular embodiments, Numerous specific details are shown in the following detailed description in order to provide a It will be apparent to those skilled in the art, however, that the various described embodiments may be practiced without the specific details. In other instances, well-known methods, procedures, components, circuits, and networks are not described in detail so as not to unnecessarily obscure the embodiments.
[0040] 为了解决传统物联网数据的发送与接收方式无法支持海量数据发送与接收的问 题, 本发明提供了一种订阅数据的发送、 接收方法、 装置及系统, 以下结合附 图以及实施例, 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体 实施例仅仅用以解释本发明, 并不限定本发明。 [0040] In order to solve the problem that the transmission and reception of traditional Internet of Things data cannot support the transmission and reception of massive data The present invention provides a method for transmitting and receiving subscription data, a device, and a system. The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0041] 实施例一 [0041] Embodiment 1
[0042] 图 1是本发明实施例一提供的订阅数据的发送与接收系统的结构示意图, 如图 1 所示, 本发明实施例中的服务端优选地可以包括发布智能体、 二级节点以及一 级节点, 数据提供者与数据接收者通过与服务端进行交互来实现数据订阅、 发 送以及接收的整个流程, 其中, 发布智能体主要实现按照 topic进行数据的订阅 1 is a schematic structural diagram of a system for transmitting and receiving subscription data according to Embodiment 1 of the present invention. As shown in FIG. 1, the server in the embodiment of the present invention may preferably include a publishing agent, a secondary node, and The first-level node, the data provider and the data receiver interact with the server to implement the entire process of data subscription, sending, and receiving, wherein the publishing agent mainly implements data subscription according to the topic.
、 发送以及接收, 二级节点主要承担数据订阅、 发送以及接收规则的增刪改査 , sending and receiving, the secondary node mainly undertakes the addition, deletion and change of data subscription, sending and receiving rules.
[0043] 具体的, 上述发布智能体、 二级节点以及一级节点主要具有如下功能: [0043] Specifically, the foregoing publishing agent, the second-level node, and the first-level node mainly have the following functions:
[0044] 一级节点用于接收订阅方的接收请求以及被订阅方的发送请求, 将接收请求以 及发送请求发送给发布智能体。  [0044] The first-level node is configured to receive the receiving request of the subscribing party and the sending request of the subscribing party, and send the receiving request and the sending request to the publishing agent.
[0045] 一级节点还用于接收被订阅方发送的订阅方与被订阅方的订阅关系, 将订阅关 系发送给二级节点。 其中, 由于订阅关系主要由 Topic组成。 [0045] The primary node is further configured to receive a subscription relationship between the subscriber and the subscribed party sent by the subscriber, and send the subscription relationship to the secondary node. Among them, because the subscription relationship is mainly composed of Topic.
[0046] 一级节点还用于接收被订阅方査询订阅关系的请求, 根据请求从二级节点获取 订阅关系后将订阅关系发送给被订阅方。 [0046] The first-level node is further configured to receive a request for the subscribing party to query the subscription relationship, and obtain the subscription relationship from the secondary node according to the request, and then send the subscription relationship to the subscribing party.
[0047] 发布智能体用于通过一级节点获知订阅方的接收请求, 以及通过一级节点获知 被订阅方的发送请求, 根据接收请求创建用于接收被订阅方数据的 topic , 以及 根据发送请求通过 topic发送数据。 [0047] the publishing agent is configured to learn the receiving request of the subscriber through the primary node, and obtain the sending request of the subscribed party through the primary node, create a topic for receiving the data of the subscribed party according to the receiving request, and generate a request according to the sending request. Send data by topic.
[0048] 二级节点用于存储订阅关系。 [0048] The secondary node is used to store the subscription relationship.
[0049] 优选地, 二级节点和一级节点均可以是多个, 发布智能体、 二级节点和一级节 点均具备横向扩展能力, 即可以应付大量非结构化数据存储的需要, 配置吋方 便, 即使是一个几 TB的大文件, 其变更管理也十分简单。 横向扩展通过全局命 名空间, 可以实现系统的灵活管理, 管理具有 100个节点的二级节点和管理只有 1个节点的二级节点一样简单。 对于可横向扩展的二级节点 (发布智能体或一级 节点) 来说, 无论其中节点的数量多么庞大, 都可以将整个二级节点 (发布智 能体或一级节点) 作为一个单一逻辑来管理。 因此, 对于拥有海量数据的物联 网来说, 被订阅方数量庞大, 相应地, 订阅方数量庞大, 需要的发布智能体、 二级节点和一级节点数量也很庞大, 但是无论多么庞大, 具备横向扩展能力的 发布智能体、 二级节点和一级节点均可以灵活管理 (处理) 。 [0049] Preferably, the secondary node and the first-level node may be multiple, and the publishing agent, the second-level node, and the first-level node all have horizontal expansion capability, that is, can meet the needs of a large number of unstructured data storage, and configured. Convenient, even for a large file of a few terabytes, its change management is very simple. Scale-out through the global namespace allows for flexible management of the system. Managing a secondary node with 100 nodes is as simple as managing a secondary node with only one node. For a horizontally expandable secondary node (publishing agent or level 1 node), the entire secondary node (publishing agent or level 1 node) can be managed as a single logic, no matter how large the number of nodes. . Therefore, for the IoT with massive data In terms of the network, the number of subscribers is huge. Correspondingly, the number of subscribers is huge, and the number of publishing agents, secondary nodes, and first-level nodes required is also huge, but no matter how large, the publishing agent with horizontal expansion capability, Both the secondary node and the primary node can be flexibly managed (processed).
[0050] 本发明实施例通过将数据订阅方与被订阅方的订阅关系预先存储到二级节点中 , 在数据发送吋, 可以直接从二级节点中获取订阅关系, 以根据获取到的订阅 关系进行数据的发送, 随后订阅方接收。 在预先存储了数据订阅方与被订阅方 的订阅关系的基础上, 基于二级节点处理海量数据的特点, 使得本发明的数据 发送方法能够支持海量数据的发送。  [0050] In the embodiment of the present invention, the subscription relationship between the data subscriber and the subscriber is pre-stored in the secondary node, and after the data is sent, the subscription relationship may be directly obtained from the secondary node, according to the obtained subscription relationship. The data is sent and then received by the subscriber. Based on the pre-stored subscription relationship between the data subscriber and the subscriber, the data transmission method of the present invention can support the transmission of massive data based on the characteristics of the secondary node processing the massive data.
[0051] 实施例二  Embodiment 2
[0052] 本发明实施例提供了一种订阅数据的发送方法, 该方法可以由数据的被订阅方 , 即数据的提供方来执行, 为了按照本发明实施例提供的方式实现数据的订阅 以及发送, 本发明实施例中的服务端可以借助于集成有多种服务器的系统, 订 阅数据的发送与接收系统来执行操作, 图 2是该方法的流程图, 如图 2所示, 该 方法包括如下步骤:  An embodiment of the present invention provides a method for sending subscription data, which may be performed by a subscriber of the data, that is, a provider of the data, in order to implement data subscription and transmission according to the manner provided by the embodiment of the present invention. The server in the embodiment of the present invention can perform operations by means of a system for integrating data transmission and reception by means of a system integrated with multiple servers. FIG. 2 is a flowchart of the method. As shown in FIG. 2, the method includes the following steps. Steps:
[0053] 步骤 S201 : 被订阅方通过所述二级节点接收并存储订阅方通过所述一级节点发 送的订阅方与被阅方的订阅关系。  [0053] Step S201: The subscriber receives and stores, by the secondary node, a subscription relationship between the subscriber and the called party that the subscriber sends through the primary node.
[0054] 其中, 被订阅方即数据的被订阅方, 也就是数据的提供方, 例如终端设备, 订 阅方即数据的订阅方, 也就是数据的接收方, 例如可以是客户端。 例如, 终端 设备通过所述二级节点接收并存储订阅方通过所述一级节点发送的客户端与终 端设备的订阅关系。 [0054] wherein the subscriber is the subscriber of the data, that is, the provider of the data, such as the terminal device, and the subscriber, that is, the subscriber of the data, that is, the receiver of the data, for example, may be a client. For example, the terminal device receives and stores, by the secondary node, a subscription relationship between the client and the terminal device sent by the subscriber through the primary node.
[0055] 本发明实施例中, 被订阅方通过所述二级节点接收并存储订阅方通过所述一级 节点发送的订阅方与被阅方的订阅关系, 可以清晰地获取订阅方与被阅方的订 阅关系并将订阅关系预先存储。  [0055] In the embodiment of the present invention, the subscribing party receives and stores the subscription relationship between the subscribing party and the read party sent by the subscribing party through the second-level node, and the subscriber can clearly obtain the subscribing party and the read party. The party's subscription relationship and pre-store the subscription relationship.
[0056] 步骤 S202: 当所述被订阅方获取到订阅内容吋, 所述被订阅方根据所述订阅方 与被订阅方的订阅关系査找到所述订阅内容的订阅方, 将所述订阅内容通过所 述发布智能体发送给査找到的订阅方。 [0056] Step S202: When the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and the subscription content is Sended to the found subscriber by the publishing agent.
[0057] 订阅方与被订阅方的订阅关系可以是一对多的关系, 即一个订阅方订阅了多个 被订阅方, 例如一个消费者的移动终端订阅了多家设备制造商的设备, 这些设 备可以在预设的吋间内向该消费者的移动终端提供所订阅的内容 (例如设备及 设备的状态) 。 订阅方与被订阅方的订阅关系预先存储在二级节点 (分布式数 据缓存) 中, 基于预先存储的订阅方与被订阅方的订阅关系, 被订阅方査找到 订阅内容的订阅方 (例如消费者的移动终端 C) ,将订阅内容通过发布智能体发送 给査找到的订阅方。 [0057] The subscription relationship between the subscriber and the subscriber may be a one-to-many relationship, that is, one subscriber subscribes to multiple subscribers, for example, a consumer's mobile terminal subscribes to multiple device manufacturers' devices, and these Assume The user can provide the subscribed content (such as the status of the device and the device) to the mobile terminal of the consumer within a preset time. The subscription relationship between the subscriber and the subscriber is pre-stored in the secondary node (distributed data cache). Based on the pre-stored subscription relationship between the subscriber and the subscriber, the subscriber finds the subscriber of the subscription content (for example, consumption). The mobile terminal C) sends the subscription content to the found subscriber through the publishing agent.
[0058] 本发明实施例提供的订阅数据的发送方法, 通过将数据订阅方与被订阅方的订 阅关系存储到二级节点中, 在数据发送吋, 可以直接从二级节点中获取订阅关 系, 以根据获取到的订阅关系进行数据的发送, 在预先存储了数据订阅方与被 订阅方的订阅关系的基础上, 基于二级节点处理海量数据的特点, 使得本发明 的数据发送方法能够支持海量数据的发送。  [0058] The method for sending subscription data provided by the embodiment of the present invention, by storing the subscription relationship between the data subscriber and the subscriber to the secondary node, can obtain the subscription relationship directly from the secondary node after the data is sent. The data transmission method of the present invention can support a large amount of data according to the characteristics of the secondary node processing the massive data based on the pre-stored subscription relationship between the data subscriber and the subscribing party. The transmission of data.
[0059] 实施例三  [0059] Embodiment 3
[0060] 在实施例二的基础上, 本发明实施例在订阅数据的常规数据结构的基础上进行 了改进, 改进后的数据结构如图 3所示, 其中, 31为常规数据结构, 32为改进后 的数据结构, 服务端、 订阅方、 以及被订阅方之间发送的数据均使用改进后的 数据的结构, 改进后的数据的负载部分至少包括: 设备类型编码、 设备编号、 数据类型编码以及数据具体内容, 其中, 设备类型可以用设备的型号编码来区 分。  [0060] On the basis of the second embodiment, the embodiment of the present invention is improved on the basis of the conventional data structure of the subscription data, and the improved data structure is shown in FIG. 3, wherein 31 is a regular data structure, 32 is The improved data structure, the data sent by the server, the subscriber, and the subscribing party all use the structure of the improved data, and the load portion of the improved data includes at least: device type code, device number, data type code And the specific content of the data, wherein the device type can be distinguished by the model code of the device.
[0061] 在本发明实施例中, 订阅方与被订阅方的订阅关系具体可以包括以下几种: [0061] In the embodiment of the present invention, the subscription relationship between the subscriber and the subscriber may specifically include the following:
[0062] 订阅方标识与被订阅方设备类型编码之间的订阅关系、 订阅方标识与被订阅方 设备编码之间的订阅关系和 /或订阅方标识与被订阅数据类型编码之间的订阅关 系, 其中, 订阅方与被订阅方之间的订阅关系可以是订阅方根据订阅内容来确 定, 例如, 当订阅方与被订阅方的订阅关系是订阅方标识与被订阅方设备类型 编码之间的订阅关系吋, 订阅方订阅的数据是根据设备类型来进行订阅的, 即 , 订阅方订阅了指定类型的设备的数据。 [0062] a subscription relationship between the subscriber identity and the subscriber device type code, a subscription relationship between the subscriber identity and the subscriber device code, and/or a subscription relationship between the subscriber identity and the subscribed data type code The subscription relationship between the subscriber and the subscriber may be determined by the subscriber according to the subscription content, for example, when the subscription relationship between the subscriber and the subscriber is between the subscriber identifier and the subscriber device type code. In the subscription relationship, the data subscribed by the subscriber is subscribed according to the device type, that is, the subscriber subscribes to the data of the specified type of device.
[0063] 本发明实施例通过改进订阅数据的数据结构, 使改进后的数据的负载至少包括 设备类型编码、 设备编号、 数据类型编码以及数据具体内容, 具体化了订阅方 与被订阅方的订阅关系, 订阅关系变得更灵活。  [0063] The embodiment of the present invention improves the data structure of the subscription data, so that the load of the improved data includes at least a device type code, a device number, a data type code, and a data specific content, and the subscription of the subscriber and the subscriber is embodied. Relationships, subscription relationships become more flexible.
[0064] 实施例四 [0065] 本发明实施例提供了一种订阅数据的接收方法, 该方法同样基于上述实施例一 中的订阅数据的发送与接收系统来实现, 该方法可以由数据的订阅方, 即数据 的接收方来执行, 为了按照本发明实施例提供的方式实现数据的订阅以及接收 , 本发明实施例中的服务端可以借助于集成有多种服务器的系统, 订阅数据的 发送与接收系统来执行操作, 图 4是该方法的流程图, 如图 4所示, 该方法包括 步骤 S401和步骤 S402 [0064] Embodiment 4 An embodiment of the present invention provides a method for receiving subscription data, which is also implemented based on the sending and receiving system of subscription data in the foregoing Embodiment 1, and the method may be performed by a subscriber of data, that is, data receiving. In order to implement data subscription and reception in the manner provided by the embodiment of the present invention, the server in the embodiment of the present invention can perform operations by using a system that integrates multiple servers, and the subscription data sending and receiving system. 4 is a flow chart of the method. As shown in FIG. 4, the method includes step S401 and step S402.
[0066] 步骤 S401 : 订阅方通过所述一级节点将订阅方与被订阅方的订阅关系发送至所 述二级节点, 使所述被订阅方在获取到订阅内容吋, 根据所述二级节点接收到 的所述订阅关系査找所述订阅内容的订阅方。  [0066] Step S401: The subscriber sends the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscriber obtains the subscription content, according to the secondary The subscription relationship received by the node finds a subscriber of the subscription content.
[0067] 其中, 订阅方可以是物联网中的客户端 (例如, 移动终端) , 所述一级节点接 收订阅方 (例如, 移动终端) 的接收请求, 将所述接收请求发送给所述发布智 能体, 随后订阅方将订阅关系发送给一级节点, 再后一级节点将订阅关系发送 给二级节点, 以使得被订阅方 (例如, 终端设备) 在获取到订阅内容吋根据所 述二级节点接收到的所述订阅关系査找所述订阅内容的订阅方 (例如, 移动终[0067] wherein the subscriber may be a client (eg, a mobile terminal) in the Internet of Things, the first-level node receiving a receiving request of a subscriber (eg, a mobile terminal), and sending the receiving request to the publishing The agent, then the subscriber sends the subscription relationship to the first-level node, and then the first-level node sends the subscription relationship to the secondary node, so that the subscribed party (for example, the terminal device) obtains the subscription content, according to the second The subscription relationship received by the level node searches for a subscriber of the subscription content (eg, mobile terminal)
Λ Λ
[0068] 在本发明实施例中, 一级节点接收到订阅方的接收请求吋, 才将所述接收请求 发送给所述发布智能体, 随后订阅方将订阅关系发送给一级节点, 再后一级节 点将订阅关系发送给二级节点, 这种接收到请求后才响应并进行后续操作的模 式提高了数据处理的效率, 避免了接收到被订阅方的发送请求后, 无需接收到 订阅方的订阅请求就进行订阅关系的发送造成的资源浪费。 [0068] In the embodiment of the present invention, after receiving the receiving request of the subscribing party, the first-level node sends the receiving request to the publishing agent, and then the subscribing party sends the subscription relationship to the first-level node, and then The first-level node sends the subscription relationship to the secondary node, and the mode of responding and performing subsequent operations after receiving the request improves the efficiency of data processing, and avoids receiving the subscriber after receiving the request of the subscribed party. The subscription request is a waste of resources caused by the sending of the subscription relationship.
[0069] 步骤 S402: 所述订阅方接收所述被订阅方在査找到所述订阅内容的订阅方后通 过所述发布智能体发送的订阅内容。  [0069] Step S402: The subscriber receives the subscription content sent by the subscribing party through the publishing agent after finding the subscriber of the subscription content.
[0070] 由步骤 S202: 当所述被订阅方获取到订阅内容吋, 所述被订阅方根据所述订阅 方与被订阅方的订阅关系査找到所述订阅内容的订阅方, 将所述订阅内容通过 所述发布智能体发送给査找到的订阅方。 可知, 发布智能体将订阅内容发送给 找到的订阅方, 随后订阅方通过发布智能体接收来自被订阅方的订阅内容 (例 如, 某个场所或者环境预设段吋间内的湿度值) 。 例如, 订阅方 (例如, 移动 终端) 通过服务端的订阅数据的发送与接收系统中的发布智能体接收来自被订 阅方的订阅内容 (例如, 某个场所或者环境一段吋间内的温湿度值) 。 根据接 收到的温湿度值, 订阅方可以获取到与该温湿度值相对应的生活舒适度, 进而 获知所述场所或者环境预设段吋间内的生活舒适度。 [0070] Step S202: when the subscribing party obtains the subscription content, the subscribing party searches for the subscriber of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and the subscription is The content is sent to the found subscriber through the publishing agent. It can be seen that the publishing agent sends the subscription content to the found subscriber, and then the subscriber receives the subscription content from the subscriber through the publishing agent (for example, the humidity value in a certain place or environment preset segment). For example, a subscriber (eg, a mobile terminal) receives a subscription from a publishing agent in a sending and receiving system of a subscription data of a server. The subscription content of the reading party (for example, the temperature and humidity values in a certain place or environment for a period of time). According to the received temperature and humidity value, the subscribing party can obtain the living comfort corresponding to the temperature and humidity value, and further know the living comfort in the day or the preset period of the environment.
[0071] 本发明实施例通过一级节点接收到订阅方的接收请求吋, 才将所述接收请求发 送给所述发布智能体, 随后订阅方将订阅关系发送给一级节点, 再后一级节点 将订阅关系发送给二级节点, 这种接收到请求后才响应并进行后续操作的模式 提高了数据处理的效率; 订阅方通过发布智能体接收来自被订阅方的订阅内容 , 充分利用了发布智能体的性能, 使得处理效率进一步得到提升。  [0071] In the embodiment of the present invention, after receiving the receiving request of the subscriber, the first-level node sends the receiving request to the publishing agent, and then the subscriber sends the subscription relationship to the first-level node, and then the first level. The node sends the subscription relationship to the secondary node, and the mode of responding and performing subsequent operations after receiving the request improves the efficiency of data processing; the subscriber receives the subscription content from the subscribed party through the publishing agent, and makes full use of the publishing The performance of the agent further improves the processing efficiency.
[0072] 实施例五  Embodiment 5
[0073] 在实施例四的基础上, 本发明实施例在订阅数据的常规数据结构的基础上进行 了改进, 改进后的数据结构如图 3所示, 其中, 31为常规数据结构, 32为改进后 的数据结构, 服务端、 订阅方、 以及被订阅方之间发送的数据均使用改进后的 数据的结构, 改进后的数据的负载部分至少包括: 设备类型编码、 设备编号、 数据类型编码以及数据具体内容, 其中, 设备类型可以用设备的型号编码来区 分。  On the basis of the fourth embodiment, the embodiment of the present invention improves on the basis of the conventional data structure of the subscription data, and the improved data structure is as shown in FIG. 3, wherein 31 is a regular data structure, and 32 is a The improved data structure, the data sent by the server, the subscriber, and the subscribing party all use the structure of the improved data, and the load portion of the improved data includes at least: device type code, device number, data type code And the specific content of the data, wherein the device type can be distinguished by the model code of the device.
[0074] 在本发明实施例中, 订阅方与被订阅方的订阅关系具体可以包括以下几种: [0074] In the embodiment of the present invention, the subscription relationship between the subscriber and the subscriber may specifically include the following:
[0075] 订阅方标识与被订阅方设备类型编码之间的订阅关系、 订阅方标识与被订阅方 设备编码之间的订阅关系和 /或订阅方标识与被订阅数据类型编码之间的订阅关 系, 其中, 订阅方与被订阅方之间的订阅关系可以是订阅方根据订阅内容来确 定, 例如, 当订阅方与被订阅方的订阅关系是订阅方标识与被订阅方设备类型 编码之间的订阅关系吋, 订阅方订阅的数据是根据设备类型来进行订阅的, 即 , 订阅方订阅了指定类型的设备的数据。 [0075] a subscription relationship between the subscriber identity and the subscriber device type code, a subscription relationship between the subscriber identity and the subscriber device code, and/or a subscription relationship between the subscriber identity and the subscribed data type code The subscription relationship between the subscriber and the subscriber may be determined by the subscriber according to the subscription content, for example, when the subscription relationship between the subscriber and the subscriber is between the subscriber identifier and the subscriber device type code. In the subscription relationship, the data subscribed by the subscriber is subscribed according to the device type, that is, the subscriber subscribes to the data of the specified type of device.
[0076] 本发明实施例通过改进订阅数据的数据结构, 使改进后的数据的负载至少包括 设备类型编码、 设备编号、 数据类型编码以及数据具体内容, 具体化了订阅方 与被订阅方的订阅关系, 订阅关系变得更灵活。  [0076] The embodiment of the present invention improves the data structure of the subscription data, so that the load of the improved data includes at least a device type code, a device number, a data type code, and a data specific content, and the subscription of the subscriber and the subscriber is embodied. Relationships, subscription relationships become more flexible.
[0077] 实施例六  Embodiment 6
[0078] 上述实施例一以及实施例二分别从服务端以及客户端两端各自执行的操作来对 本发明实施例提供的订阅数据的发送与接收方案进行了说明, 本发明实施例则 通过服务端与客户端进行信息交互完成订阅数据的发送与接收的整个过程进行 说明。 [0078] The foregoing embodiment 1 and the second embodiment respectively describe the sending and receiving schemes of the subscription data provided by the embodiment of the present invention from the operations performed by the server and the client, respectively. The entire process of sending and receiving subscription data is performed through information exchange between the server and the client.
[0079] 图 5是本发明实施例六的提供的订阅数据的发送与接收流程的信令流程图, 如 图 5所示, 该流程包括如下处理:  5 is a signaling flowchart of a process for sending and receiving subscription data according to Embodiment 6 of the present invention. As shown in FIG. 5, the process includes the following processing:
[0080] S1 : 启动终端设备 M和客户端 C; [0080] S1: starting the terminal device M and the client C;
[0081] S2: 创建 topic , 名为 name; [0081] S2: create a topic named name;
[0082] S3: 客户端订阅终端设备的数据; [0082] S3: the client subscribes to the data of the terminal device;
[0083] S4: 保存终端设备 M与 name的订阅关系; [0083] S4: saving the subscription relationship between the terminal device M and the name;
[0084] S5: 准备发送终端设备 M的数据; [0084] S5: preparing data for transmitting the terminal device M;
[0085] S6: 发送送终端设备 M的数据; [0085] S6: transmitting data of the terminal device M;
[0086] S7: 査找终端设备 M对应的客户端 C; [0086] S7: Find the client C corresponding to the terminal device M;
[0087] S8: 发送终端设备 M的订阅数据; [0087] S8: transmitting subscription data of the terminal device M;
[0088] S9: 客户端接收订阅数据。 [0088] S9: The client receives the subscription data.
[0089] 订阅方客户端订阅数据吋, 将其 name作为 topic进行注册, 并监听发送到此 topic 的数据, 然后将其订阅设备与 name的关联关系保存到二级节点; 基于此, 在发 送方的客户端发送某设备数据吋, 根据保存的关联关系既可找到对应的订阅方 客户端的 name , 从而找到 topic , 并通过 topic将订阅数据传递到订阅方客户端。  [0089] The subscriber client subscribes to the data, registers its name as a topic, and listens to the data sent to the topic, and then saves the association relationship between the subscriber and the name to the secondary node; based on this, in the sender After the client sends a device data, the name of the corresponding subscriber client can be found according to the saved association relationship, thereby finding the topic, and the subscription data is delivered to the subscriber client through the topic.
[0090] 在上述流程中, 服务端主要实现以下功能:  [0090] In the above process, the server mainly implements the following functions:
[0091] 在输入端, 接收来自客户端的数据订阅请求;  [0091] receiving, at the input end, a data subscription request from the client;
[0092] 在输出端, 与二级节点交互, 对数据订阅规则进行增刪改査; 与发布智能体交 互, 进行数据 topic的增刪改査;  [0092] at the output end, interacting with the secondary node, adding, deleting, and revising the data subscription rule; interacting with the publishing agent to perform addition, deletion, and redirection of the data topic;
[0093] 在上述流程中, 在客户端主要实现以下功能: 客户端采用封装了物联网模型和 客户端的专用的 API(Application Programming Interface, 应用程序编程接口)与后 端进行数据的订阅和接收。 [0093] In the above process, the following functions are mainly implemented on the client: The client adopts a dedicated API (Application Programming Interface) that encapsulates the Internet of Things model and the client to subscribe and receive data with the back end.
[0094] 其中, 专用 API封装的细节包括: [0094] The details of the dedicated API package include:
[0095] 客户端向服务端订阅数据吋: 与一级节点通信, 提交客户端与被订阅方的订阅 关系; 与发布智能体通信, 创建数据 Topic , 基于 Topic接收数据; 在终端设备发 送数据吋: 与二级节点通信, 査询终端设备与数据订阅方的订阅关系, 按照订 阅关系找到对应的 topic; 与发布智能体通信, 基于 Topic发送数据。 [0095] The client subscribes to the data to the server: communicates with the first-level node, submits the subscription relationship between the client and the subscribed party, communicates with the publishing agent, creates a data topic, receives data based on the Topic, and sends data at the terminal device. : Communicate with the secondary node, query the subscription relationship between the terminal device and the data subscriber, according to the subscription Read the relationship to find the corresponding topic; communicate with the publishing agent, and send data based on the Topic.
[0096] 本发明实施例利用二级节点 (分布式数据缓存) 存储订阅者与被订阅设备之间 的关系, 将订阅发送规则转变为二级节点的条目, 结合二级节点 (分布式数据 缓存) 特性, 无论数据量多大, 对信息进行处理的算法的吋间复杂度都能够以 常数阶进行。 [0096] Embodiments of the present invention utilize a secondary node (distributed data cache) to store a relationship between a subscriber and a subscribed device, convert a subscription transmission rule into an entry of a secondary node, and combine a secondary node (distributed data cache) Characteristics, regardless of the amount of data, the inter-turn complexity of the algorithm that processes the information can be performed in a constant order.
[0097] 本发明实施例提供的订阅数据发送与接收的方法及装置与现有技术相比, 具有 以下优越性:  The method and apparatus for sending and receiving subscription data provided by the embodiments of the present invention have the following advantages compared with the prior art:
[0098] 实吋性: 能够实吋处理数据, 支持物联网数据快速转发; 高吞吐: 经过测试, 采用本发明实施例的方案至少可达到每秒 50W数据处理能力; 支持海量数据: 实 际使用结果显示, 可长期稳定运行, 处理海量数据; 集群扩展性: 能够根据需 求, 通过增减服务器提升或降低整理处理能力; 稳定性: 一级节点本身支持高 可用, 稳定性较高, 客户端可借此机制获得高可用能力; 贴合物联网 M2M特性 , 以设备和用户为中心的发送机制, 方便业务模块使用; 低耦合性: 数据发送 端与数据接收端彼此透明, 无需关心内部细节, 降低系统耦合度。  [0098] Reality: capable of processing data, supporting fast forwarding of Internet of Things data; high throughput: After testing, the scheme of the embodiment of the present invention can achieve at least 50W data processing capability per second; supporting massive data: actual use results Display, can run stably for a long time, process massive data; Cluster scalability: Ability to increase or decrease the processing capacity by increasing or decreasing the server according to requirements; Stability: The first-level node itself supports high availability, high stability, and the client can borrow This mechanism achieves high availability; the M2M feature of the overlay network, the device- and user-centric transmission mechanism, facilitates the use of service modules; Low coupling: The data sender and the data receiver are transparent to each other, without concern for internal details, reducing the system Coupling.
[0099] 实施例七  [0099] Example 7
[0100] 本发明实施例提供了一种订阅数据的发送装置, 该装置可以位于被订阅方, 即 数据的提供方, 该装置可以通过与上述实施例一中提供的订阅数据的发送与接 收系统进行信息交互来实现订阅数据的发送功能, 该装置用于实现上述实施例 二中提供的数据发送方法, 图 6是该装置的结构框图, 如图 6所示, 该装置 60包 括第一接收模块 61和第一发送模块 62, 各模块的功能如下:  An embodiment of the present invention provides a device for transmitting subscription data, where the device can be located at a subscriber, that is, a provider of data, and the device can transmit and receive the subscription data provided in the foregoing Embodiment 1. The information is exchanged to implement the function of sending the subscription data. The device is used to implement the data transmission method provided in the second embodiment. FIG. 6 is a structural block diagram of the device. As shown in FIG. 6, the device 60 includes a first receiving module. 61 and the first sending module 62, the functions of each module are as follows:
[0101] 第一接收模块 61, 用于被订阅方通过所述二级节点接收并存储订阅方通过所述 一级节点发送的订阅方与被阅方的订阅关系。  [0101] The first receiving module 61 is configured to receive, by the subscriber, the subscription relationship between the subscriber and the called party that is sent by the subscriber through the primary node by using the secondary node.
[0102] 第一发送模块 62, 用于当所述被订阅方获取到订阅内容吋, 所述被订阅方根据 所述订阅方与被订阅方的订阅关系査找到所述订阅内容的订阅方, 将所述订阅 内容通过所述发布智能体发送给査找到的订阅方。  [0102] The first sending module 62 is configured to: when the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, The subscription content is sent to the found subscriber through the publishing agent.
[0103] 本发明实施例提供的订阅数据的发送装置, 通过将数据订阅方与被订阅方的订 阅关系存储到二级节点中, 在数据发送吋, 可以直接从二级节点中获取订阅关 系, 以根据获取到的订阅关系进行数据的发送, 在预先存储了数据订阅方与被 订阅方的订阅关系的基础上, 基于二级节点处理海量数据的特点, 使得本发明 的数据发送方法能够支持海量数据的发送。 [0103] The sending device of the subscription data provided by the embodiment of the present invention stores the subscription relationship between the data subscriber and the subscriber to the secondary node, and after the data is sent, the subscription relationship can be directly obtained from the secondary node. In order to send data according to the acquired subscription relationship, the data subscriber is pre-stored and Based on the subscription relationship of the subscriber, based on the characteristics of the secondary node processing the massive data, the data transmission method of the present invention can support the transmission of massive data.
[0104] 实施例八 Embodiment 8
[0105] 本发明实施例提供了一种订阅数据的发送装置, 该装置可以位于被订阅方, 即 数据的提供方, 该装置可以通过与上述实施例一中提供的订阅数据的发送与接 收系统进行信息交互来实现订阅数据的发送功能, 该装置用于实现上述实施例 三中提供的数据发送方法, 图 6是该装置的结构框图, 如图 6所示, 该装置 60包 括第一接收模块 61和第一发送模块 62, 各模块的功能如下:  An embodiment of the present invention provides a device for transmitting subscription data, where the device can be located at a subscriber, that is, a provider of data, and the device can transmit and receive the subscription data provided in the foregoing Embodiment 1. The information is exchanged to implement the function of sending the subscription data. The device is used to implement the data transmission method provided in the third embodiment. FIG. 6 is a structural block diagram of the device. As shown in FIG. 6, the device 60 includes a first receiving module. 61 and the first sending module 62, the functions of each module are as follows:
[0106] 第一接收模块 61, 用于被订阅方通过所述二级节点接收并存储订阅方通过所述 一级节点发送的订阅方与被阅方的订阅关系。  [0106] The first receiving module 61 is configured to receive, by the subscriber, the subscription relationship between the subscriber and the called party sent by the subscriber through the primary node by using the secondary node.
[0107] 第一发送模块 62, 用于当所述被订阅方获取到订阅内容吋, 所述被订阅方根据 所述订阅方与被订阅方的订阅关系査找到所述订阅内容的订阅方, 将所述订阅 内容通过所述发布智能体发送给査找到的订阅方。  [0107] The first sending module 62 is configured to: when the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, The subscription content is sent to the found subscriber through the publishing agent.
[0108] 在本发明实施例中服务端、 订阅方、 以及被订阅方之间发送的数据至少包括: 设备类型编码、 设备编号、 数据类型编码以及数据具体内容。  [0108] The data sent between the server, the subscribing party, and the subscribing party in the embodiment of the present invention includes at least: a device type code, a device number, a data type code, and data specific content.
[0109] 其中, 订阅方与被订阅方的订阅关系具体可以包括以下几种:  [0109] The subscription relationship between the subscriber and the subscriber may specifically include the following:
[0110] 订阅方标识与被订阅方设备类型编码之间的订阅关系、 订阅方标识与被订阅方 设备编码之间的订阅关系和 /或订阅方标识与被订阅数据类型编码之间的订阅关 系。  [0110] a subscription relationship between the subscriber identity and the subscriber device type code, a subscription relationship between the subscriber identity and the subscriber device code, and/or a subscription relationship between the subscriber identity and the subscribed data type code .
[0111] 本发明实施例通过改进订阅数据的数据结构, 使改进后的数据的负载至少包括 设备类型编码、 设备编号、 数据类型编码以及数据具体内容, 具体化了订阅方 与被订阅方的订阅关系, 订阅关系变得更灵活。  [0111] In the embodiment of the present invention, by improving the data structure of the subscription data, the load of the improved data includes at least a device type code, a device number, a data type code, and a data specific content, and the subscription of the subscriber and the subscriber is embodied. Relationships, subscription relationships become more flexible.
[0112] 实施例九  Example 9
[0113] 本发明实施例提供了一种订阅数据的发送装置, 该装置可以位于被订阅方, 即 数据的提供方, 该装置可以通过与上述实施例一中提供的订阅数据的发送与接 收系统进行信息交互来实现订阅数据的发送功能, 该装置用于实现上述实施例 二中提供的数据发送方法, 图 6是该装置的结构框图, 如图 6所示, 该装置 60包 括第一接收模块 61和第一发送模块 62, 各模块的功能如下: [0114] 第一接收模块 61, 用于被订阅方通过所述二级节点接收并存储订阅方通过所述 一级节点发送的订阅方与被阅方的订阅关系。 [0113] An embodiment of the present invention provides a device for transmitting subscription data, where the device can be located at a subscriber, that is, a provider of data, and the device can transmit and receive the subscription data provided in the foregoing Embodiment 1. The information is exchanged to implement the function of sending the subscription data. The device is used to implement the data transmission method provided in the second embodiment. FIG. 6 is a structural block diagram of the device. As shown in FIG. 6, the device 60 includes a first receiving module. 61 and the first sending module 62, the functions of each module are as follows: [0114] The first receiving module 61 is configured to receive, by the subscriber, the subscription relationship between the subscriber and the called party that is sent by the subscriber through the primary node by using the secondary node.
[0115] 第一发送模块 62, 用于当所述被订阅方获取到订阅内容吋, 所述被订阅方根据 所述订阅方与被订阅方的订阅关系査找到所述订阅内容的订阅方, 将所述订阅 内容通过所述发布智能体发送给査找到的订阅方。  [0115] The first sending module 62 is configured to: when the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, The subscription content is sent to the found subscriber through the publishing agent.
[0116] 进一步的, 上述装置 60还可以包括: 注册模块 63, 用于在接收到订阅请求吋, 将发送订阅请求的订阅方的标识作为 topic在数据队列中注册; 保存模块 64, 用 于建立订阅方的标识与被订阅方的订阅关系, 将建立的订阅关系保存到二级节 点; 基于此, 上述第一发送模块 62具体用于: 根据订阅关系, 査找到订阅方客 户端的标识, 根据査找到的标识査找对应的 topic , 通过査找到的 topic将数据发 送至订阅方。  [0116] Further, the foregoing apparatus 60 may further include: a registration module 63, configured to: after receiving the subscription request, register the identifier of the subscriber that sends the subscription request as a topic in the data queue; and the saving module 64 is configured to establish And the first sending module 62 is configured to: find the identifier of the subscriber client according to the subscription relationship, according to the subscription relationship of the subscriber and the subscribed relationship of the subscriber, The found identifier finds the corresponding topic and sends the data to the subscriber through the found topic.
[0117] 本发明实施例提供的订阅数据的接收装置, 通过将数据订阅方与被订阅方的订 阅关系存储到二级节点中, 在数据发送吋, 可以直接从二级节点中获取订阅关 系, 根据订阅关系, 査找到订阅方客户端的标识, 根据査找到的标识査找对应 的 topic , 通过査找到的 topic将数据发送至订阅方, 精确且效率高, 使得本发明 的数据发送方法能够支持海量数据的发送。  The receiving device of the subscription data provided by the embodiment of the present invention stores the subscription relationship between the data subscriber and the subscriber to the secondary node, and after the data is sent, the subscription relationship can be directly obtained from the secondary node. According to the subscription relationship, the identifier of the subscriber client is found, the corresponding topic is searched according to the found identifier, and the data is sent to the subscriber through the found topic, which is accurate and efficient, so that the data sending method of the present invention can support massive data. Send.
[0118] 实施例十  Embodiment 10
[0119] 本发明实施例提供了一种订阅数据的接收装置, 该装置可以设置于订阅方, 即 订阅数据的接收方, 该装置通过与上述实施例一中的订阅数据的发送与接收系 统进行信息交互实现订阅数据的接收功能, 该装置用于实现上述实施例四中提 供的订阅数据的接收方法, 图 7该装置的结构框图, 如图 7所示, 该装置 70包括 第二发送模块 71和第二接收模块 72, 各个模块的功能如下:  [0119] The embodiment of the present invention provides a receiving device for subscription data, where the device can be set to a subscriber, that is, a receiver of subscription data, and the device performs the sending and receiving system of the subscription data in the first embodiment. The information exchange implements the function of receiving the subscription data. The device is used to implement the method for receiving the subscription data provided in the fourth embodiment. FIG. 7 is a structural block diagram of the device. As shown in FIG. 7, the device 70 includes a second sending module 71. And the second receiving module 72, the functions of each module are as follows:
[0120] 第二发送模块 71, 用于通过所述订阅方通过所述一级节点将订阅方与被订阅方 的订阅关系发送至所述二级节点, 使所述被订阅方在获取到订阅内容吋, 根据 所述二级节点接收到的所述订阅关系査找所述订阅内容的订阅方。  [0120] The second sending module 71 is configured to send, by the subscriber, the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscribed party obtains the subscription. Content 吋, searching for a subscriber of the subscription content according to the subscription relationship received by the secondary node.
[0121] 第二接收模块 72, 用于所述订阅方接收所述被订阅方在査找到所述订阅内容的 订阅方后通过所述发布智能体发送的订阅内容。  [0121] The second receiving module 72 is configured to receive, by the subscribing party, the subscription content sent by the subscribing party through the publishing agent after finding the subscribing party of the subscription content.
[0122] 在本发明实施例中, 一级节点接收到订阅方的接收请求吋, 才将所述接收请求 发送给所述发布智能体, 随后订阅方将订阅关系发送给一级节点, 再后一级节 点将订阅关系发送给二级节点, 这种接收到请求后才响应并进行后续操作的模 式提高了数据处理的效率, 避免了接收到被订阅方的发送请求后, 无需接收到 订阅方的订阅请求就进行订阅关系的发送造成的资源浪费。 [0122] In the embodiment of the present invention, the primary node receives the receiving request of the subscriber, and then the receiving request is received. Sending to the publishing agent, the subscriber then sends the subscription relationship to the first-level node, and then the first-level node sends the subscription relationship to the second-level node, and the mode of responding and performing subsequent operations after receiving the request is improved. The efficiency of data processing avoids the waste of resources caused by the transmission of the subscription relationship without receiving the subscription request of the subscriber after receiving the request by the subscriber.
[0123] 实施例十一 Embodiment 11
[0124] 本发明实施例提供了一种订阅数据的接收装置, 该装置可以设置于订阅方, 即 订阅数据的接收方, 该装置通过与上述实施例一中的订阅数据的发送与接收系 统进行信息交互实现订阅数据的接收功能, 该装置用于实现上述实施例五中提 供的订阅数据的接收方法, 图 7该装置的结构框图, 如图 7所示, 该装置 70包括 第二发送模块 71和第二接收模块 72, 各个模块的功能如下:  [0124] The embodiment of the present invention provides a receiving device for subscription data, and the device may be disposed on a subscriber, that is, a receiver of subscription data, and the device performs the sending and receiving system of the subscription data in the first embodiment. The information exchange implements the function of receiving the subscription data. The device is used to implement the method for receiving the subscription data provided in the fifth embodiment. FIG. 7 is a structural block diagram of the device. As shown in FIG. 7, the device 70 includes a second sending module 71. And the second receiving module 72, the functions of each module are as follows:
[0125] 第二发送模块 71, 用于通过所述订阅方通过所述一级节点将订阅方与被订阅方 的订阅关系发送至所述二级节点, 使所述被订阅方在获取到订阅内容吋, 根据 所述二级节点接收到的所述订阅关系査找所述订阅内容的订阅方。  [0125] The second sending module 71 is configured to send, by the subscriber, the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscribed party obtains the subscription. Content 吋, searching for a subscriber of the subscription content according to the subscription relationship received by the secondary node.
[0126] 第二接收模块 72, 用于所述订阅方接收所述被订阅方在査找到所述订阅内容的 订阅方后通过所述发布智能体发送的订阅内容。  [0126] The second receiving module 72 is configured to receive, by the subscriber, the subscription content sent by the subscribing party through the publishing agent after finding the subscriber of the subscription content.
[0127] 在本发明实施例中, 订阅方、 被订阅方、 以及系统之间发送的数据至少包括: 设备类型编码、 设备编号、 数据类型编码以及数据具体内容。  [0127] In the embodiment of the present invention, the data sent between the subscriber, the subscriber, and the system at least includes: a device type code, a device number, a data type code, and a data specific content.
[0128] 其中, 订阅方与被订阅方的订阅关系, 包括: 订阅方标识与被订阅方设备类型 编码之间的订阅关系、 订阅方标识与被订阅方设备编码之间的订阅关系和 /或订 阅方标识与被订阅数据类型编码之间的订阅关系。  [0128] wherein, the subscription relationship between the subscriber and the subscriber includes: a subscription relationship between the subscriber identifier and the subscriber device type code, a subscription relationship between the subscriber identity and the subscriber device code, and/or The subscription relationship between the subscriber ID and the encoded data type encoding.
[0129] 本发明实施例通过改进订阅数据的数据结构, 使改进后的数据的负载至少包括 设备类型编码、 设备编号、 数据类型编码以及数据具体内容, 具体化了订阅方 与被订阅方的订阅关系, 订阅关系变得更灵活。  [0129] The embodiment of the present invention improves the data structure of the subscription data, so that the load of the improved data includes at least a device type code, a device number, a data type code, and a data specific content, and the subscription of the subscriber and the subscribed party is embodied. Relationships, subscription relationships become more flexible.
[0130] 尽管为示例目的, 已经公幵了本发明的优选实施例, 本领域的技术人员将意识 到各种改进、 增加和取代也是可能的, 因此, 本发明的范围应当不限于上述实 施例。  [0130] While the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are also possible. Therefore, the scope of the present invention should not be limited to the embodiments described above. .
[0131] 应当理解的是, 本文中虽然使用术语第一、 第二等描述各个元件, 但是这些元 件应该不受这些术语的限制。 这些术语仅被用于彼此区分元件。 例如, 第第一 发送模块也可以称之为第二发送模块, 第二发送模块也可被称之为第一发送模 块而不脱离本发明的范围。 第一发送模块和第二发送模块是两个获取模块, 但 是它们不是相同的发送模块。 还应当理解的是, 在本文中使用的, 除非上下文 清楚地支持例外情况, 单数形式"一个"旨在也包括复数形式。 还应该理解的是, 在本文中使用的"和 /或"是指包括一个或者一个以上相关联地列出的项目的任意 和所有可能组合。 [0131] It should be understood that although the terms first, second, etc. are used herein to describe the various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, first The transmitting module may also be referred to as a second transmitting module, and the second transmitting module may also be referred to as a first transmitting module without departing from the scope of the present invention. The first sending module and the second sending module are two acquisition modules, but they are not the same transmitting module. It is also to be understood that the singular forms "a" It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
[0132] 应当理解的是, 上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。  It should be understood that the serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
[0133] 所属领域的技术人员可以清楚地了解到, 为了描述的方便和简洁, 仅以上述各 功能单元、 模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功 能分配由不同的功能单元、 模块完成, 即将所述装置的内部结构划分成不同的 功能单元或模块, 以完成以上描述的全部或者部分功能。 实施例中的各功能单 元、 模块可以集成在一个处理单元中, 也可以是各个单元单独物理存在, 也可 以两个或两个以上单元集成在一个单元中, 上述集成的单元既可以采用硬件的 形式实现, 也可以采用软件功能单元的形式实现。 另外, 各功能单元、 模块的 具体名称也只是为了便于相互区分, 并不用于限制本申请的保护范围。 上述系 统中单元、 模块的具体工作过程, 可以参考前述方法实施例中的对应过程, 在 此不再赘述。 [0133] It will be clearly understood by those skilled in the art that, for convenience and brevity of description, only the division of each functional unit and module described above is exemplified. In practical applications, the above functions may be assigned differently according to needs. The functional unit and the module are completed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the integrated unit may be implemented by hardware. Formal implementation can also be implemented in the form of software functional units. In addition, the specific names of the respective functional units and modules are only for the purpose of facilitating mutual differentiation, and are not intended to limit the scope of protection of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
[0134] 本领域普通技术人员可以意识到, 结合本文中所公幵的实施例描述的各示例的 单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结合来实现 。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特定应用和设 计约束条件。 专业技术人员可以对每个特定的应用来使用不同方法来实现所描 述的功能, 但是这种实现不应认为超出本发明的范围。  [0134] Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
[0135] 另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可 以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件功能单元的形式 实现。  [0135] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0136] 所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用 吋, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明实施 例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部 或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个存储介 质中, 包括若干指令用以使得一台计算机设备 (可以是个人计算机, 服务器, 或者网络设备等) 或处理器 (processor) 执行本发明实施例各个实施例所述方法 的全部或部分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器 (R 0M, Read-Only Memory) 、 随机存取存储器 (RAM, Random Access Memory ) 、 磁碟或者光盘等各种可以存储程序代码的介质。 [0136] The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the present invention is implemented The technical solution of the example or the contribution of the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions. A computer device (which may be a personal computer, a server, or a network device, etc.) or a processor is used to perform all or part of the steps of the method described in the various embodiments of the embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (R 0M, Read-Only Memory), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. medium.
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡在本发明的 精神和原则之内所作的任何修改、 等同替换和改进等, 均应包含在本发明的保 护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims

权利要求书 Claim
一种订阅数据的发送方法, 其特征在于, 应用于订阅数据的发送与接 收的系统, 所述订阅数据的发送与接收的系统包括一级节点、 发布智 能体以及二级节点, 所述订阅数据的发送方法包括: A method for transmitting subscription data, characterized in that, for a system for transmitting and receiving subscription data, the system for transmitting and receiving subscription data includes a first-level node, a publishing agent, and a second-level node, and the subscription data The sending method includes:
被订阅方通过所述二级节点接收并存储订阅方通过所述一级节点发送 的订阅方与被订阅方的订阅关系; The subscriber receives and stores, by the secondary node, a subscription relationship between the subscriber and the subscribed party that the subscriber sends through the primary node;
当所述被订阅方获取到订阅内容吋, 所述被订阅方根据所述订阅方与 被订阅方的订阅关系査找到所述订阅内容的订阅方, 将所述订阅内容 通过所述发布智能体发送给査找到的订阅方。 When the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and passes the subscription content through the publishing agent. Send to the found subscriber.
根据权利要求 1所述的订阅数据的发送方法, 其特征在于, 所述订阅 内容至少包括: The method for transmitting subscription data according to claim 1, wherein the subscription content comprises at least:
设备类型编码、 设备编号、 数据类型编码以及数据具体内容。 Device type code, device number, data type code, and data specific content.
一种订阅数据的接收方法, 其特征在于, 应用于所述订阅数据的发送 与接收的系统, 所述订阅数据的发送与接收的系统包括一级节点、 发 布智能体以及二级节点, 所述订阅数据的接收方法, 包括: 订阅方通过所述一级节点将订阅方与被订阅方的订阅关系发送至所述 二级节点, 使所述被订阅方在获取到订阅内容吋, 根据所述二级节点 接收到的所述订阅关系査找所述订阅内容的订阅方; A method for receiving subscription data, characterized in that, in a system for transmitting and receiving the subscription data, the system for transmitting and receiving subscription data includes a first-level node, a publishing agent, and a second-level node, The method for receiving the subscription data includes: the subscriber transmitting, by the first-level node, the subscription relationship between the subscriber and the subscriber to the secondary node, so that the subscribed party obtains the subscription content, according to the The subscription relationship received by the secondary node searches for a subscriber of the subscription content;
所述订阅方接收所述被订阅方在査找到所述订阅内容的订阅方后通过 所述发布智能体发送的订阅内容。 The subscribing party receives the subscription content sent by the subscribing party through the publishing agent after finding the subscribing party of the subscription content.
根据权利要求 3所述的订阅数据的接收方法, 其特征在于, 所述订阅 内容至少包括: The method for receiving subscription data according to claim 3, wherein the subscription content comprises at least:
设备类型编码、 设备编号、 数据类型编码以及数据具体内容。 Device type code, device number, data type code, and data specific content.
一种订阅数据的发送装置, 其特征在于, 该装置使用所述订阅数据的 发送与接收系统实现数据的发送, 所述订阅数据的发送与接收的系统 包括一级节点、 发布智能体以及二级节点, 包括: A device for transmitting subscription data, characterized in that the device uses the sending and receiving system of the subscription data to implement data transmission, and the system for transmitting and receiving the subscription data includes a first-level node, a publishing agent, and a second level. Node, including:
第一接收模块, 用于被订阅方通过所述二级节点接收并存储订阅方通 过所述一级节点发送的订阅方与被阅方的订阅关系; 第一发送模块, 用于当所述被订阅方获取到订阅内容吋, 所述被订阅 方根据所述订阅方与被订阅方的订阅关系査找到所述订阅内容的订阅 方, 将所述订阅内容通过所述发布智能体发送给査找到的订阅方。 a first receiving module, configured by the subscriber to receive and store, by the secondary node, a subscription relationship between the subscriber and the called party sent by the subscriber through the primary node; a first sending module, configured to: when the subscribed party obtains the subscription content, the subscribing party searches for a subscription of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and the subscription is The content is sent to the found subscriber through the publishing agent.
[权利要求 6] 根据权利要求 5所述的装置, 其特征在于, 所述订阅内容至少包括: 设备类型编码、 设备编号、 数据类型编码以及数据具体内容。  [Claim 6] The device according to claim 5, wherein the subscription content comprises at least: a device type code, a device number, a data type code, and data specific content.
[权利要求 7] —种订阅数据的接收装置, 其特征在于, 该装置使用所述订阅数据的 发送与接收系统实现数据的接收, 所述订阅数据的发送与接收的系统 包括一级节点、 发布智能体以及二级节点, 包括: 第二发送模块, 用于通过所述订阅方通过所述一级节点将订阅方与被 订阅方的订阅关系发送至所述二级节点, 使所述被订阅方在获取到订 阅内容吋, 根据所述二级节点接收到的所述订阅关系査找所述订阅内 容的订阅方;  [Claim 7] A receiving device for subscription data, wherein the device uses the transmitting and receiving system of the subscription data to implement data reception, and the system for transmitting and receiving the subscription data includes a first-level node and a release The agent and the secondary node include: a second sending module, configured to send, by the subscriber, the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscribed After obtaining the subscription content, the party searches for the subscriber of the subscription content according to the subscription relationship received by the secondary node;
第二接收模块, 用于所述订阅方接收所述被订阅方在査找到所述订阅 内容的订阅方后通过所述发布智能体发送的订阅内容。  And a second receiving module, configured to receive, by the subscribing party, the subscription content sent by the subscribing party through the publishing agent after finding the subscribing party of the subscription content.
[权利要求 8] 根据权利要求 7所述的装置, 其特征在于, 所述订阅内容至少包括: 设备类型编码、 设备编号、 数据类型编码以及数据具体内容。  [Claim 8] The device according to claim 7, wherein the subscription content comprises at least: a device type code, a device number, a data type code, and data specific content.
[权利要求 9] 一种订阅数据的发送与接收的方法, 其特征在于, 应用于订阅数据的 发送与接收的系统, 所述订阅数据的发送与接收的系统包括一级节点 、 发布智能体以及二级节点, 所述订阅数据的发送与接收方法包括: 被订阅方通过所述二级节点接收并存储订阅方通过所述一级节点发送 的订阅方与被阅方的订阅关系;  [Claim 9] A method for transmitting and receiving subscription data, characterized in that, for a system for transmitting and receiving subscription data, the system for transmitting and receiving subscription data includes a first-level node, a publishing agent, and The secondary node, the sending and receiving method of the subscription data includes: receiving, by the subscriber, the subscription relationship between the subscriber and the called party sent by the subscriber through the primary node by using the secondary node;
订阅方通过所述一级节点将订阅方与被订阅方的订阅关系发送至所述 二级节点, 使所述被订阅方在获取到订阅内容吋, 根据所述二级节点 接收到的所述订阅关系査找所述订阅内容的订阅方;  And the subscriber sends the subscription relationship between the subscriber and the subscriber to the secondary node by using the primary node, so that the subscribed party obtains the subscription content, according to the received by the secondary node. a subscription relationship to find a subscriber of the subscription content;
当所述被订阅方获取到订阅内容吋, 所述被订阅方根据所述订阅方与 被订阅方的订阅关系査找到所述订阅内容的订阅方, 将所述订阅内容 通过所述发布智能体发送给査找到的订阅方;  When the subscribing party obtains the subscription content, the subscribing party searches for the subscribing party of the subscription content according to the subscription relationship between the subscribing party and the subscribing party, and passes the subscription content through the publishing agent. Sent to the found subscribers;
所述订阅方接收所述被订阅方在査找到所述订阅内容的订阅方后通过 所述发布智能体发送的订阅内容。 Receiving, by the subscriber, the subscriber after passing the subscriber of the subscription content The publishing content sent by the agent is sent.
[权利要求 10] —种订阅数据的发送与接收的系统, 其特征在于, 包括: 一级节点、 发布智能体以及二级节点;  [Claim 10] A system for transmitting and receiving subscription data, comprising: a primary node, a publishing agent, and a secondary node;
所述一级节点用于接收订阅方的接收请求以及被订阅方的发送请求, 将所述接收请求以及所述发送请求发送给所述发布智能体; 所述一级节点还用于接收所述订阅方发送的订阅方与被订阅方的订阅 关系, 将所述订阅关系发送给所述二级节点;  The primary node is configured to receive a receiving request of the subscriber and a sending request of the subscribed party, and send the receiving request and the sending request to the publishing agent; the primary node is further configured to receive the a subscription relationship between the subscriber and the subscriber sent by the subscriber, and sending the subscription relationship to the secondary node;
所述一级节点还用于接收所述被订阅方査询所述订阅关系的査询请求 , 根据所述査询请求从所述二级节点获取所述订阅关系后将所述订阅 关系发送给所述被订阅方;  The first-level node is further configured to receive the query request that the subscribing party queries the subscription relationship, and obtain the subscription relationship from the second-level node according to the query request, and then send the subscription relationship to the subscription relationship. The subscriber;
所述发布智能体用于通过所述一级节点获知所述订阅方的接收请求, 以及通过所述一级节点获知所述被订阅方的发送请求, 根据所述接收 请求创建用于接收被订阅方数据的 topic , 以及根据所述发送请求通过 topic发送数据; 所述数据为与所述订阅关系对应的订阅内容; 所述二级节点用于存储所述订阅关系。  The publishing agent is configured to learn, by the first-level node, the receiving request of the subscribing party, and obtain the sending request of the subscribing party by using the first-level node, and create a subscription for receiving according to the receiving request. a topic of the party data, and sending the data by the topic according to the sending request; the data is a subscription content corresponding to the subscription relationship; and the secondary node is configured to store the subscription relationship.
PCT/CN2017/093368 2017-06-16 2017-07-18 Subscription data sending and receiving method, device and system WO2018227695A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710461460.8A CN107426300A (en) 2017-06-16 2017-06-16 Subscribe to sending, receiving method, the apparatus and system of data
CN201710461460.8 2017-06-16

Publications (1)

Publication Number Publication Date
WO2018227695A1 true WO2018227695A1 (en) 2018-12-20

Family

ID=60428846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/093368 WO2018227695A1 (en) 2017-06-16 2017-07-18 Subscription data sending and receiving method, device and system

Country Status (2)

Country Link
CN (1) CN107426300A (en)
WO (1) WO2018227695A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230007006A1 (en) * 2020-03-27 2023-01-05 Motorola Solutions, Inc. Method and apparatus for preventing access to an iot device

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108289118A (en) * 2017-12-12 2018-07-17 北京奇艺世纪科技有限公司 A kind of management method and device of distributed message stream
CN109379353A (en) * 2018-10-08 2019-02-22 北京科东电力控制系统有限责任公司 Collecting method and device
CN110659292A (en) * 2019-09-21 2020-01-07 北京海致星图科技有限公司 Spark and Ignite-based distributed real-time graph construction and query method and system
CN112527521B (en) * 2020-12-03 2023-07-04 中国联合网络通信集团有限公司 Message processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104617666A (en) * 2015-01-14 2015-05-13 国家电网公司 Power distribution network data transmission method using publishing and subscribing communication model
CN106101178A (en) * 2016-05-30 2016-11-09 海尔优家智能科技(北京)有限公司 A kind of subscription message distribution, method of reseptance, device and related system
CN106230896A (en) * 2016-07-18 2016-12-14 深圳国泰安教育技术股份有限公司 A kind of information push method, Apparatus and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104617666A (en) * 2015-01-14 2015-05-13 国家电网公司 Power distribution network data transmission method using publishing and subscribing communication model
CN106101178A (en) * 2016-05-30 2016-11-09 海尔优家智能科技(北京)有限公司 A kind of subscription message distribution, method of reseptance, device and related system
CN106230896A (en) * 2016-07-18 2016-12-14 深圳国泰安教育技术股份有限公司 A kind of information push method, Apparatus and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230007006A1 (en) * 2020-03-27 2023-01-05 Motorola Solutions, Inc. Method and apparatus for preventing access to an iot device
US12041055B2 (en) * 2020-03-27 2024-07-16 Motorola Solutions, Inc. Method and apparatus for preventing access to an IoT device

Also Published As

Publication number Publication date
CN107426300A (en) 2017-12-01

Similar Documents

Publication Publication Date Title
US11411897B2 (en) Communication method and communication apparatus for message queue telemetry transport
WO2018227695A1 (en) Subscription data sending and receiving method, device and system
KR101753766B1 (en) Distributed cache for graph data
Tracey et al. A holistic architecture for the internet of things, sensing services and big data
EP3861706B1 (en) Framework for dynamic brokerage and management of topics and data at the service layer
CN110413845B (en) Resource storage method and device based on Internet of things operating system
US10148739B2 (en) M2M data querying and invoking methods, querying and invoking devices, and system
WO2019109923A1 (en) Message processing method and system, storage medium and electronic device
CN111786998A (en) Authority management method and device based on micro-service calling and storage medium
CN102769640B (en) The update method of user profile, server and system
AU2013397053B2 (en) Content sharing method and social synchronization apparatus
KR20190033589A (en) Method, apparatus and system for notification
WO2010025653A1 (en) Searching information method, system, device, and vertical search engine register method
WO2017181863A1 (en) Resource access control method and apparatus
CN114090388A (en) Information acquisition method, server cluster, server and equipment
WO2020198192A1 (en) Policy enhancement for mixed capability devices
WO2024179343A1 (en) Data processing method, system and apparatus, and electronic device and storage medium
CN106028311B (en) A kind of terminal registration method and device
WO2014166213A1 (en) Method and apparatus for searching for expected user by using phone address book
WO2009006779A1 (en) Method and system for determining user home index node and home service node
CN111881086B (en) Big data storage method, query method, electronic device and storage medium
WO2012152076A1 (en) Service adaptation method, device and system
CN111814020A (en) Data acquisition method and device
Pu et al. Practical implementation of an OPC UA multi-server aggregation and management architecture for IIoT
WO2017206634A1 (en) Method and device for querying semantics

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: 17913332

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19.05.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17913332

Country of ref document: EP

Kind code of ref document: A1