CN110012083B - Data transmission method, server and data transmission device - Google Patents

Data transmission method, server and data transmission device Download PDF

Info

Publication number
CN110012083B
CN110012083B CN201910234196.3A CN201910234196A CN110012083B CN 110012083 B CN110012083 B CN 110012083B CN 201910234196 A CN201910234196 A CN 201910234196A CN 110012083 B CN110012083 B CN 110012083B
Authority
CN
China
Prior art keywords
data
devices
server
topic
subscribed
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN201910234196.3A
Other languages
Chinese (zh)
Other versions
CN110012083A (en
Inventor
李冬冬
肖虹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Juhaolian Technology Co ltd
Original Assignee
Qingdao Juhaolian Technology Co ltd
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 Qingdao Juhaolian Technology Co ltd filed Critical Qingdao Juhaolian Technology Co ltd
Priority to CN201910234196.3A priority Critical patent/CN110012083B/en
Publication of CN110012083A publication Critical patent/CN110012083A/en
Application granted granted Critical
Publication of CN110012083B publication Critical patent/CN110012083B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明涉及物联网技术领域,特别涉及一种数据传输方法、服务器及数据传输装置,用以解决业务系统在通过多个business设备向服务器订阅同一主题的数据后,业务系统会接收到多个重复的数据,造成资源浪费的问题。本发明实施例服务器接收第一设备发布的数据;在第一设备发布的数据的主题中包含队列标识时,从订阅所述主题数据的多个第二设备中选取一个处于可用状态的目标第二设备;其中,队列标识用于表示主题数据是由业务系统通过多个第二设备订阅的;服务器将第一设备发布的数据发送给目标第二设备,以使目标第二设备将所述数据发送给对接的业务系统。从而业务系统仅接收到一个第二设备转发的数据,有效避免的资源浪费的问题。

Figure 201910234196

The invention relates to the technical field of the Internet of Things, in particular to a data transmission method, a server and a data transmission device, which are used to solve the problem that after a business system subscribes to the server for data of the same subject through multiple business devices, the business system will receive multiple duplicates. data, resulting in a waste of resources. In this embodiment of the present invention, the server receives data published by the first device; when the topic of the data published by the first device includes a queue identifier, selects a target second device in an available state from multiple second devices that subscribe to the topic data. device; wherein, the queue identifier is used to indicate that the topic data is subscribed by the business system through multiple second devices; the server sends the data published by the first device to the target second device, so that the target second device sends the data To the docking business system. Therefore, the service system only receives data forwarded by one second device, which effectively avoids the problem of resource waste.

Figure 201910234196

Description

Data transmission method, server and data transmission device
Technical Field
The invention relates to the technical field of communication of the Internet of things, in particular to a data transmission method, a server and a data transmission device.
Background
In the field of internet of things, MQTT (Message Queuing Telemetry Transport) is a client-server based Message publishing/subscribing Transport protocol. The MQTT protocol is lightweight, simple, open, and easy to implement, which makes it very versatile, including in limited environments, such as: machine-to-machine (M2M) communication and internet of things (IoT) communication, and has also been widely used in communicating sensors over satellite links, occasionally dial-up medical devices, smart homes, and some miniaturized devices.
In the communication process, the MQTT protocol has three identities: publisher (Publish), server, subscriber (Subscribe); both the publisher and the subscriber of the message are clients, and the publisher of the message can be the subscriber at the same time. As shown in fig. 1, where device a is a publisher, device B and device C are subscribers, device B subscribes to the data with the topic of "temperature" from the server, and device C subscribes to the data with the topic of "temperature" from the server; device a issues data entitled "temperature" to the server, e.g., "temperature 15 ℃", and the server pushes "temperature 15 ℃" to device B and device C.
In internet of things communication, when a business system needs to acquire some data, business equipment is often deployed for the business system, and the business system subscribes the data needed by the business system to a server through the business equipment; in order to avoid unreliability caused by only deploying one business device, a plurality of business devices are deployed for one service system in the current communication architecture, that is, the business devices subscribe to data of the same topic from the server. After the server receives the data published by the publisher, the data is pushed to all the business devices subscribing the data of the topic, and after the business devices receive the data pushed by the server, the received data is sent to the butted business system, so that the business system receives a plurality of repeated data, and resource waste is caused.
Disclosure of Invention
The invention provides a data transmission method and a server, which are used for solving the problem that a service system receives a plurality of repeated data after subscribing data of the same theme to the server through a plurality of business devices, so that the resource is wasted.
Based on the foregoing problem, in a first aspect, an embodiment of the present invention provides a data transmission method, including:
the server receives data issued by the first equipment;
when the topic of the data published by the first device contains a queue identifier, the server selects a target second device in an available state from a plurality of second devices subscribing the topic data; wherein the queue identification is for data representing the topic subscribed to by a business system through a plurality of second devices;
and the server sends the data issued by the first equipment to the target second equipment so that the target second equipment sends the data to the butted service system.
In a second aspect, an embodiment of the present invention provides a server, including a processing unit, a storage unit, and a transceiver unit;
wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the following:
receiving data issued by first equipment through the transceiving unit;
when the topic of the data published by the first device contains a queue identifier, selecting a target second device in an available state from a plurality of second devices subscribing the topic data; wherein the queue identification is for data representing the topic subscribed to by a business system through a plurality of second devices;
and sending the data issued by the first device to the target second device through the transceiver unit so that the target second device sends the data to the docked service system.
In a third aspect, an embodiment of the present invention provides a data transmission apparatus, including:
the receiving module is used for receiving data issued by the first equipment;
an obtaining module, configured to, when a topic of data published by the first device includes a queue identifier, select a target second device in an available state from multiple second devices subscribing to the topic data; wherein the queue identification is for data representing the topic subscribed to by a business system through a plurality of second devices;
and the sending module is used for sending the data issued by the first equipment to the target second equipment so as to enable the target second equipment to send the data to the butted service system.
In a fourth aspect, embodiments of the present invention provide a computer-readable medium on which a computer program is stored, which when executed by a processor implements the steps of the method according to the first aspect.
According to the embodiment of the invention, when the theme of the data issued by the first device contains the queue identifier, the server sends the data issued by the first device to the target second device which is selected from the plurality of second devices and is in an available state, only the data issued by the first device is sent to the target second device, and the target second device forwards the received data to the butted service system, so that the service system only receives the data forwarded by one second device, and the problem of resource waste is effectively avoided.
Drawings
FIG. 1 is a schematic diagram of a communication architecture in the background art;
fig. 2 is a schematic structural diagram of a first communication architecture according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a method for a client to access an access platform according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a communication architecture according to a second embodiment of the present invention;
FIG. 5 is a flow chart of a data transmission method according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a data transmission method according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a server according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a data transmission device according to an embodiment of the present invention.
Detailed Description
The communication architecture of the embodiment of the invention comprises a plurality of clients, an access platform consisting of a load balancing server, an MQTT server and a plurality of business devices, and a service system. The connection relationship of a specific communication architecture is shown in fig. 2.
In implementation, a client accesses an access platform through a domain name; specifically, before the client establishes connection with the access platform, the client acquires the IP address of the access platform through the domain name server. The IP address returned by the domain name server to the client points to the address of the load balancing server in the access platform, and the load balancing server forwards the request of the client to the MQTT server. The business equipment realizes bidirectional butt joint with the MQTT server and the business system; the business device and the service system communicate with each other through http (hypertext transfer protocol).
Specifically, when the client accesses the access platform, the client communicates with the access platform by calling the SDK interface. As shown in fig. 3, it is assumed that the client includes a smart television, a smart refrigerator, a smart washing machine, a smart lamp, a smart switch, and the like, where the smart television, the smart refrigerator, and the smart washing machine call the SDK to access the access platform through an Application Programming Interface (API), and the smart lamp and the smart switch call the SDK to access the access platform through a smart gateway and then through the API; and the interface of the SDK is communicated with the access platform based on the MQTT.
An alternative communication architecture, as shown in fig. 4, includes a first device, a server, a business system, and at least two second devices interfacing with the business system. In the communication architecture, a first device serves as a data publishing device, and a second device serves as a data subscribing device; the service system is used for collecting required data, in order to facilitate the service system to collect the required data, at least two second devices are deployed for the service system, and the second devices subscribe the data required by the service system to the server. For example, if the service system needs to collect the operating temperature of the device, at least two second devices subscribe to the server for data whose topic (topic) is "temperature".
The first equipment issues data to the server, and the issued uplink data carries the theme of the issued data; after receiving data published by first equipment, a server judges whether second equipment subscribing the data of the theme exists according to the theme of the data published by the first equipment; for example, when the topic of the data issued by the first device is "temperature", the server pushes the received data with the topic of "temperature" to the second device, and the second device sends the received data with the topic of "temperature" to the docked service system. However, based on the current MQTT protocol, since at least two second devices subscribe to the data with the topic of "temperature", the server will push the data with the topic of "temperature" published by the first device to all the second devices, and each second device will send the received data with the topic of "temperature" to the service system, so that the service system receives a plurality of same data.
Based on the above problem, the embodiment of the present invention provides a solution, in which a field of a subject is modified, and in implementation, a queue identifier may be added to the field of the subject;
wherein the queue identification indicates that the data representing the topic is subscribed to by the business system through a plurality of second devices.
An alternative embodiment is to add a "queue" identifier to the topic field.
For example, when the business system needs to collect data, the business system subscribes the data to the server through a plurality of second devices; specifically, a plurality of second devices send subscription messages to the server, the subscription messages carry topics of subscription data, and queue identifiers are added to the topics;
when the first device issues the uplink data to the server, the first device also needs to carry a theme of the uplink data, and a queue identifier is also added to the theme of the uplink data;
the server pushes the data published by the first device to the second device when determining that the theme of the data published by the first device is the same as the theme of the data subscribed by the second device;
it should be noted here that, when the topic of the data subscribed by the second device includes the queue identifier, the server determines that the topic of the data published by the first device is the same as the topic of the data subscribed by the second device only when the topic of the data published by the first device also includes the queue identifier.
As shown in fig. 5, a data transmission method according to an embodiment of the present invention includes:
step 501, a server receives data issued by first equipment;
step 502, when the topic of the data published by the first device contains a queue identifier, the server selects a target second device in an available state from a plurality of second devices subscribing the topic data; wherein the queue identification is for data representing the topic subscribed to by a business system through a plurality of second devices;
step 503, the server sends the data issued by the first device to the target second device, so that the target second device sends the data to the docked service system.
It should be noted that, the server receives data issued by different first devices, and stores the data issued by the first devices according to topics respectively; for example, the server receives data with topic of topic1 sent by device a and data with topic of topic2 sent by device B.
The server in the embodiment of the invention is a server supporting MQTT, which can be called as an agent or a Broker; the second device is a business device which is in butt joint with the business system.
In addition, an embodiment of the present invention further provides an optional manner for the second device to subscribe to data from the server:
the server receives subscription information sent by the service system through a plurality of second devices; determining topics of data subscribed by the plurality of second devices according to the subscription message; wherein the topics of the data subscribed by the plurality of second devices are the same.
Configuring the theme of the data to be subscribed of the second equipment according to the type of the data to be acquired by the service system;
for example, if the business system needs to collect the remaining power of the device, the topic of the data that the second device needs to subscribe to the server is configured as "remaining power".
It should be noted that, in the embodiment of the present invention, a technician configures a theme of data to be subscribed for the second device according to the type of data collected by the service system.
Because the embodiment of the invention deploys the plurality of second devices for the service system, the plurality of second devices deployed for the service system all need to subscribe data to the service, and topic of the data subscribed to the server by the plurality of second devices is the same, compared with the case of deploying one second device for the service system, the problem that the data published by the first device cannot be sent to the service system due to failure of the deployed second device can be avoided.
In an optional embodiment, when the plurality of second devices subscribe to the server, a queue identifier is added to a topic of the subscription data.
A data publishing process for a first device:
the first equipment sends data to the server;
after receiving data sent by a first device, a server detects states of a plurality of second devices subscribing the theme data, determines second devices in available states in the plurality of second devices, and generates a list consisting of the second devices in available states;
that is, the topic of the data subscribed by the second device included in the list is the same as the topic of the data published by the first device;
it should be noted here that the server can determine the status of each second device through the service registration discovery procedure, and therefore, the server can determine the second devices in the available status.
When the theme contains the queue identification, the server selects a target second device from the list, and the server sends the data issued by the first device to the target second device;
and when the theme does not contain the queue identification, the server sends the data issued by the first equipment to each second equipment in the list.
It should be noted that, when the service system subscribes to data of a certain theme through the plurality of second devices, whether the theme subscribed by the plurality of second devices carries the queue identifier is pre-configured according to the type of the service system and the user requirement; and the type of the subject of the data issued by the first device, whether the subject of the data carries a queue identifier, which is also determined according to the pre-configuration in the first device.
The method for data transmission according to the embodiment of the present invention is described below with reference to a specific embodiment.
Assume that three second devices, device 1, device 2, and device 3, are deployed for the service system.
Fig. 6 shows an overall flowchart of a data transmission method implemented by the present invention.
601, the second device sends subscription messages to the server respectively, wherein the topic of the data to be subscribed contained in the subscription messages is topic 1;
that is, the device 1, the device 2, and the device 3 each transmit a subscription message to the server.
In step 602, the server stores the topic of the data subscribed by each second device as topic 1.
Step 603, the first device issues data to the server, and the topic of the data is topic 1.
Step 604, the server acquires the second device in the available state with the subscribed data topic of topic1, and generates a list consisting of the second device in the available state;
the list generated by the server contains: device 1, device 2, device 3;
step 605, the server determines whether the topic1 includes a queue identifier, if yes, step 606 is executed, and if not, step 609 is executed;
step 606, the server selects a target second device from the list;
assume that the selected target second device is device 1.
Step 607, the server pushes the data issued by the first device to the device 1.
Step 608, the device 1 sends the received data to the service system.
Step 609, the server pushes the data issued by the first equipment to each second equipment;
that is, the server pushes data issued by the first device to the device 1, the device 2, and the device 3.
And step 610, each second device sends the received data to the service system.
Based on the same inventive concept, the embodiment of the present invention further provides a server, and as the principle of solving the problem of the server is similar to the method for data transmission in the embodiment of the present invention, the implementation of the server may refer to the implementation of the method, and repeated details are not repeated.
It should be noted that the server available protocol provided by the embodiment of the present invention includes: ac-mqtt, ac-mqtt-business, mqtt SDK, and the like.
As shown in fig. 7, a server according to an embodiment of the present invention includes a processing unit 701, a storage unit 702, and a transceiver unit 703;
wherein the storage unit 702 stores program code which, when executed by the processing unit 701, causes the processing unit 701 to perform the following:
receiving data issued by the first device through the transceiver 703;
when the topic of the data published by the first device contains a queue identifier, selecting a target second device in an available state from a plurality of second devices subscribed to the topic data; wherein the queue identification is for data representing the topic subscribed to by a business system through a plurality of second devices;
the data issued by the first device is sent to the target second device through the transceiver 703, so that the target second device sends the data to a docked service system.
Optionally, the processing unit 701 is further configured to:
before receiving data published by first equipment, receiving subscription information sent by the service system through a plurality of second equipment; determining the topic of the data subscribed by each second device according to the subscription message; wherein the topics of the data subscribed by the plurality of second devices are the same.
Optionally, the processing unit 701 is specifically configured to:
detecting states of a plurality of second devices subscribing to data of the topic; determining a second device in an available state in the plurality of second devices, and generating a first list consisting of the second devices in the available state; selecting a target second device from the first list.
Optionally, the processing unit 701 is further configured to:
when the topic of the data published by the first device does not contain a queue identifier, determining a second list consisting of second devices subscribing to the topic data;
and sending the data issued by the first device to each second device in the second list, so that each second device sends the received data to the docked service system.
Optionally, the server is a server supporting MQTT;
the first device and the second device are MQTT-supporting devices.
As shown in fig. 8, a data transmission apparatus according to an embodiment of the present invention includes:
a receiving module 801, configured to receive data issued by a first device;
an obtaining module 802, configured to, when a topic of data published by the first device includes a queue identifier, select a target second device in an available state from multiple second devices subscribing to the topic data; wherein the queue identification is for data representing the topic subscribed to by a business system through a plurality of second devices;
a sending module 803, configured to send the data issued by the first device to the target second device, so that the target second device sends the data to a docked service system.
Optionally, the receiving module 801 is further configured to:
before receiving data published by first equipment, receiving subscription information sent by the service system through a plurality of second equipment; determining the topic of the data subscribed by each second device according to the subscription message; wherein the topics of the data subscribed by the plurality of second devices are the same.
Optionally, the obtaining module 802 is specifically configured to:
detecting states of a plurality of second devices subscribing to data of the topic; determining a second device in an available state in the plurality of second devices, and generating a first list consisting of the second devices in the available state; selecting a target second device from the first list.
Optionally, when the topic of the data issued by the first device does not include a queue identifier, the obtaining module 802 is further configured to: determining a second list consisting of second devices subscribed to the topic data;
the sending module 803 is further configured to: and sending the data issued by the first device to each second device in the second list, so that each second device sends the received data to the docked service system.
An embodiment of the present invention further provides a computer-readable medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of any one of the methods described above.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (6)

1.一种数据传输方法,其特征在于,该方法包括:1. a data transmission method, is characterized in that, the method comprises: 服务器接收第一设备发布的数据;The server receives the data published by the first device; 在所述第一设备发布的数据的主题中包含队列标识时,所述服务器从订阅所述主题数据的多个第二设备中选取一个处于可用状态的目标第二设备;其中,所述队列标识用于表示所述主题的数据是由业务系统通过多个第二设备订阅的;所述业务系统部署多个第二设备,第二设备向所述服务器订阅业务系统所需的数据;When the topic of the data published by the first device includes a queue identifier, the server selects a target second device in an available state from a plurality of second devices subscribed to the topic data; wherein the queue identifier The data used to represent the topic is subscribed by the business system through a plurality of second devices; the business system deploys a plurality of second devices, and the second devices subscribe to the server for data required by the business system; 所述服务器将所述第一设备发布的数据发送给所述目标第二设备,以使所述目标第二设备将所述数据发送给对接的业务系统;The server sends the data published by the first device to the target second device, so that the target second device sends the data to the docked service system; 在所述服务器接收第一设备发布的数据之前,还包括:Before the server receives the data published by the first device, the method further includes: 所述服务器接收所述业务系统通过多个第二设备发送的订阅消息;receiving, by the server, subscription messages sent by the business system through multiple second devices; 所述服务器根据所述订阅消息确定每个第二设备订阅的数据的主题;其中,所述多个第二设备订阅的数据的主题相同;The server determines the topic of the data subscribed by each second device according to the subscription message; wherein, the topics of the data subscribed by the plurality of second devices are the same; 所述服务器从订阅所述主题数据的多个第二设备中选取一个处于可用状态的目标第二设备,包括:The server selects a target second device in an available state from a plurality of second devices subscribed to the topic data, including: 所述服务器检测订阅所述主题数据的多个第二设备的状态;其中,服务器通过服务注册发现流程,确定每个第二设备的状态;The server detects the status of multiple second devices subscribed to the topic data; wherein, the server determines the status of each second device through a service registration discovery process; 所述服务器确定所述多个第二设备中处于可用状态的第二设备,生成由所述处于可用状态的第二设备组成的列表;The server determines a second device in an available state among the plurality of second devices, and generates a list consisting of the second devices in an available state; 所述服务器从所述列表中选取目标第二设备。The server selects the target second device from the list. 2.如权利要求1所述的方法,其特征在于,该方法还包括:2. The method of claim 1, wherein the method further comprises: 在所述第一设备发布的数据的主题中不包含队列标识时,所述服务器确定由订阅所述主题数据的第二设备组成的列表;When the topic of the data published by the first device does not contain a queue identifier, the server determines a list composed of second devices that subscribe to the topic data; 所述服务器将所述第一设备发布的数据发送给所述列表中的每个第二设备,以使所述每个第二设备将接收到的所述数据发送给对接的业务系统。The server sends the data published by the first device to each second device in the list, so that each second device sends the received data to the connected service system. 3.如权利要求1~2任一项所述的方法,其特征在于,所述服务器为支持消息队列遥测传输协议MQTT的服务器;3. The method according to any one of claims 1 to 2, wherein the server is a server supporting the message queue telemetry transmission protocol MQTT; 所述第一设备和所述第二设备为支持MQTT的设备。The first device and the second device are devices that support MQTT. 4.一种服务器,其特征在于,包括处理单元、存储单元和收发单元;4. A server, comprising a processing unit, a storage unit and a transceiver unit; 其中,所述存储单元存储有程序代码,当所述程序代码被所述处理单元执行时,使得所述处理单元执行下列过程:Wherein, the storage unit stores program codes, and when the program codes are executed by the processing unit, the processing unit is caused to perform the following processes: 通过所述收发单元接收第一设备发布的数据;Receive data published by the first device through the transceiver unit; 在所述第一设备发布的数据的主题中包含队列标识时,从订阅所述主题数据的多个第二设备中选取一个处于可用状态的目标第二设备;其中,所述队列标识用于表示所述主题的数据是由业务系统通过多个第二设备订阅的;所述业务系统部署多个第二设备,第二设备向所述服务器订阅业务系统所需的数据;When the topic of the data published by the first device includes a queue identifier, select a target second device in an available state from multiple second devices that subscribe to the topic data; wherein the queue identifier is used to indicate The data of the subject is subscribed by the business system through a plurality of second devices; the business system deploys a plurality of second devices, and the second devices subscribe the server to the data required by the business system; 通过所述收发单元将所述第一设备发布的数据发送给所述目标第二设备,以使所述目标第二设备将所述数据发送给对接的业务系统;Send the data published by the first device to the target second device through the transceiver unit, so that the target second device sends the data to the docked service system; 所述处理单元还用于:The processing unit is also used to: 在接收第一设备发布的数据之前,接收所述业务系统通过多个第二设备发送的订阅消息;根据所述订阅消息确定每个第二设备订阅的数据的主题;其中,所述多个第二设备订阅的数据的主题相同;Before receiving the data published by the first device, receive subscription messages sent by the business system through multiple second devices; determine the topic of the data subscribed by each second device according to the subscription messages; wherein the multiple second devices The subject of the data subscribed by the two devices is the same; 所述处理单元具体用于:The processing unit is specifically used for: 检测订阅所述主题数据的多个第二设备的状态;确定所述多个第二设备中处于可用状态的第二设备,生成由所述处于可用状态的第二设备组成的第一列表;从所述第一列表中选取目标第二设备;其中,服务器通过服务注册发现流程,确定每个第二设备的状态。Detecting the status of a plurality of second devices subscribed to the topic data; determining a second device in an available state among the plurality of second devices, and generating a first list consisting of the second devices in an available state; from The target second device is selected from the first list; wherein, the server determines the status of each second device through the service registration discovery process. 5.如权利要求4所述的服务器,其特征在于,所述处理单元还用于:5. The server of claim 4, wherein the processing unit is further configured to: 在所述第一设备发布的数据的主题中不包含队列标识时,确定由订阅所述主题数据的第二设备组成的第二列表;When the topic of the data published by the first device does not contain a queue identifier, determining a second list composed of second devices that subscribe to the topic data; 将所述第一设备发布的数据发送给所述第二列表中的每个第二设备,以使所述每个第二设备将接收到的所述数据发送给对接的业务系统。The data published by the first device is sent to each second device in the second list, so that each second device sends the received data to the connected service system. 6.一种数据传输装置,其特征在于,包括:6. A data transmission device, characterized in that, comprising: 接收模块,用于接收第一设备发布的数据;a receiving module for receiving data published by the first device; 获取模块,用于在所述第一设备发布的数据的主题中包含队列标识时,从订阅所述主题数据的多个第二设备中选取一个处于可用状态的目标第二设备;其中,所述队列标识用于表示所述主题的数据是由业务系统通过多个第二设备订阅的;所述业务系统部署多个第二设备,第二设备向服务器订阅业务系统所需的数据;an acquisition module, configured to select a target second device in an available state from a plurality of second devices subscribed to the topic data when a queue identifier is included in the topic of the data published by the first device; wherein, the The queue identifier is used to indicate that the data of the topic is subscribed by the business system through a plurality of second devices; the business system deploys a plurality of second devices, and the second devices subscribe the server to the data required by the business system; 发送模块,用于将所述第一设备发布的数据发送给所述目标第二设备,以使所述目标第二设备将所述数据发送给对接的业务系统;a sending module, configured to send the data published by the first device to the target second device, so that the target second device sends the data to the docked service system; 所述接收模块还用于:在接收第一设备发布的数据之前,接收所述业务系统通过多个第二设备发送的订阅消息;根据所述订阅消息确定每个第二设备订阅的数据的主题;其中,所述多个第二设备订阅的数据的主题相同;The receiving module is further configured to: before receiving the data published by the first device, receive a subscription message sent by the business system through a plurality of second devices; and determine the topic of the data subscribed by each second device according to the subscription message ; Wherein, the subject of the data subscribed by the plurality of second devices is the same; 所述获取模块,具体用于:The acquisition module is specifically used for: 检测订阅所述主题的数据的多个第二设备的状态;确定所述多个第二设备中处于可用状态的第二设备,生成由所述处于可用状态的第二设备组成的第一列表;从所述第一列表中选取目标第二设备;其中,服务器通过服务注册发现流程,确定每个第二设备的状态。Detecting the status of a plurality of second devices subscribed to the data of the topic; determining a second device in an available state among the plurality of second devices, and generating a first list consisting of the second devices in an available state; The target second device is selected from the first list; wherein, the server determines the status of each second device through the service registration discovery process.
CN201910234196.3A 2019-03-26 2019-03-26 Data transmission method, server and data transmission device Expired - Fee Related CN110012083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910234196.3A CN110012083B (en) 2019-03-26 2019-03-26 Data transmission method, server and data transmission device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910234196.3A CN110012083B (en) 2019-03-26 2019-03-26 Data transmission method, server and data transmission device

Publications (2)

Publication Number Publication Date
CN110012083A CN110012083A (en) 2019-07-12
CN110012083B true CN110012083B (en) 2022-07-01

Family

ID=67168231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910234196.3A Expired - Fee Related CN110012083B (en) 2019-03-26 2019-03-26 Data transmission method, server and data transmission device

Country Status (1)

Country Link
CN (1) CN110012083B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405021A (en) * 2020-03-10 2020-07-10 中国建设银行股份有限公司 Data transmission method, device, equipment and storage medium of peer-to-peer node
CN111464598A (en) * 2020-03-19 2020-07-28 中国人民财产保险股份有限公司 Data pushing method and device
CN111669716B (en) * 2020-04-30 2022-04-12 杭州涂鸦信息技术有限公司 Communication method and communication system of network interphone
CN112751916B (en) * 2020-12-28 2022-03-25 中国科学院软件研究所 Data publishing-subscribing method and system for micro-service governance
CN112929437A (en) * 2021-02-05 2021-06-08 中国石油大学(北京) Data transmission system, method and device based on Internet of things MQTT technical framework
CN115314332B (en) * 2022-07-11 2024-06-25 青岛海尔科技有限公司 Device theme setting method and device, storage medium and electronic device
CN116112568A (en) * 2023-02-17 2023-05-12 四川科道芯国智能技术股份有限公司 Distributed Connection Management Uplink Message Receiving System Based on Message Queue
CN116192942B (en) * 2023-02-24 2026-01-20 四川科道芯国智能技术股份有限公司 Method for processing downlink message and acknowledgement message based on message queue

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043396A (en) * 2006-06-15 2007-09-26 华为技术有限公司 Method for establishing subscribe communication and method for subscribing user events
CN103209213A (en) * 2013-03-27 2013-07-17 北京京东尚科信息技术有限公司 Data transmission method and system for data subscription
CN103746897A (en) * 2013-12-20 2014-04-23 华为技术有限公司 Devices, method and system for notifying user state
CN105553682A (en) * 2015-12-23 2016-05-04 华为技术有限公司 Event notification method and event notification system
CN109151043A (en) * 2018-09-06 2019-01-04 北京赛佰特科技有限公司 Message delivery system based on cloud service

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8924489B2 (en) * 2011-01-05 2014-12-30 Apple Inc. Message push notification client improvements for multi-user devices
CN103905471B (en) * 2012-12-25 2019-01-01 腾讯科技(深圳)有限公司 Information-pushing method, server and the social networks of social networks
CN106130882B (en) * 2016-07-13 2019-04-30 北京百度网讯科技有限公司 Method and apparatus for transmitting messages
CN108924183B (en) * 2018-05-31 2022-01-11 北京百度网讯科技有限公司 Method and device for processing information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043396A (en) * 2006-06-15 2007-09-26 华为技术有限公司 Method for establishing subscribe communication and method for subscribing user events
CN103209213A (en) * 2013-03-27 2013-07-17 北京京东尚科信息技术有限公司 Data transmission method and system for data subscription
CN103746897A (en) * 2013-12-20 2014-04-23 华为技术有限公司 Devices, method and system for notifying user state
CN105553682A (en) * 2015-12-23 2016-05-04 华为技术有限公司 Event notification method and event notification system
CN109151043A (en) * 2018-09-06 2019-01-04 北京赛佰特科技有限公司 Message delivery system based on cloud service

Also Published As

Publication number Publication date
CN110012083A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN110012083B (en) Data transmission method, server and data transmission device
KR102046700B1 (en) Message bus service directory
EP1542409A1 (en) Protocol for multi-hop ad-hoc networks
JP2014501978A5 (en) Method and system for multi-connection in a file system session
CN103795689A (en) Resource subscription method and device
JP2005312045A5 (en)
EP3298806A1 (en) Methods and apparatus for analyzing and grouping service layer subscriptions and notifications for enhanced efficiency
CN103547339B (en) File uploading method, client side and server side
CN104394067A (en) Local area network communication method and device
JP2004220549A (en) Extensible communication control
CN104486327A (en) Method and client side of communication between pages and long connection servers
CN112261146B (en) Edge cloud cooperative communication system and method based on message communication and file transmission
US20140297763A1 (en) Method of Managing Networked Devices
CN115996187B (en) Routing information processing method and device, routing information interaction system and routing equipment
CN114760348B (en) Business processing method, device, storage medium and electronic device
JP5661579B2 (en) Communication control method and system for reducing power consumption of wireless terminal
CN104618517B (en) A kind of method, system and device of PUSH message
JP5887231B2 (en) COMMUNICATION TERMINAL DEVICE, MESSAGE DISTRIBUTION SYSTEM, AND COMMUNICATION METHOD
EP3896926B1 (en) Network device and packet processing method using same
WO2018133542A1 (en) File transmission method, system and apparatus, and electronic device, and computer storage medium
US20230403320A1 (en) Lwm2m server device, lwm2m client device, and methods thereof
JP2007013353A (en) Character/data transmission/reception system, terminal management equipment and character/data transmission/reception method to be used for the same and its program
JP7213385B1 (en) message relay device and program
KR101319940B1 (en) Push System using Session Relay Server and Method Therefor
CN115129487B (en) Event communication method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220701