CN117201623A - Method and device for transmitting data - Google Patents

Method and device for transmitting data Download PDF

Info

Publication number
CN117201623A
CN117201623A CN202210601368.8A CN202210601368A CN117201623A CN 117201623 A CN117201623 A CN 117201623A CN 202210601368 A CN202210601368 A CN 202210601368A CN 117201623 A CN117201623 A CN 117201623A
Authority
CN
China
Prior art keywords
data
service
publishing
subscribing
subscriber
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.)
Pending
Application number
CN202210601368.8A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210601368.8A priority Critical patent/CN117201623A/en
Priority to PCT/CN2023/096274 priority patent/WO2023231892A1/en
Publication of CN117201623A publication Critical patent/CN117201623A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a method and a device for transmitting data, wherein the method comprises the following steps: the method comprises the steps that a publishing end device receives a first subscription message from at least one subscribing end device, wherein the first subscription message is used for subscribing a first service, and the data format of data of the first service is unknown to the subscribing end device; the publishing end device publishes a first full-volume packet to the subscribing end device, the first full-volume packet including data of the first service and information indicating a data format of the data of the first service. According to the method and the device for transmitting the data, the publishing end device can transmit the data types and the data meanings while transmitting the data, so that the subscribing end device can accurately analyze the data while the interaction times are saved, and the transmission efficiency can be effectively improved.

Description

Method and device for transmitting data
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a method and a device for transmitting data.
Background
Publish-subscribe is a data transmission mode that is currently in wide use. Under the scene of publishing and subscribing, when the subscribing terminal equipment and the publishing terminal equipment interact data, the subscribing terminal equipment needs to know the data format of the data published by the publishing terminal equipment, so that the subscribing terminal equipment can accurately analyze the corresponding data, and the data format is generally already agreed in advance. For data with unknown data format of the subscribing terminal device, the subscribing terminal device cannot analyze correctly. Meanwhile, due to the fact that subscription time and release period of different data are different, a plurality of data are difficult to release to a subscriber terminal device through one message.
Therefore, how to correctly parse data in an unknown data format and how to carry multiple data in one message as much as possible by the subscriber device, so as to further save signaling overhead is a current urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides a data transmission method, which can improve the data transmission efficiency.
In a first aspect, a method for transmitting data is provided, including: the method comprises the steps that a publishing end device receives a first subscription message from a subscribing end device, wherein the first subscription message is used for subscribing a first service, the data format of data of the first service is unknown to the subscribing end device, and the subscribing end device comprises one or more devices; the publisher device publishes a first full-size packet to the subscriber device, the first full-size packet including first data of the first service and information indicating a data format of the first data of the first service, the information indicating the data format of the first data of the first service including information indicating a data type of the first data of the first service and information indicating a data meaning of the first data of the first service.
In the embodiment of the application, the data format of the data of the first service is unknown in advance by the subscribing terminal equipment, so that the data of the first service is published in the form of a first full packet when the publishing terminal equipment firstly publishes the data of the first service. Because the first full packet contains the data of the first service and the information of the data format for indicating the data of the first service, the subscriber terminal equipment can correctly analyze the data of the first service and acquire the meaning of the data of the first service. The method can simultaneously transmit data and corresponding data formats, and can save the interaction times of the subscribing terminal equipment and the publishing terminal equipment. By specifying the full package of the type in the standard in advance, the subscriber-side equipment can correctly analyze and acquire the meaning of the data expanded by the manufacturer when receiving the data.
With reference to the first aspect, in certain implementation manners of the first aspect, the publishing end device determines a first reduced packet according to the first subscription message, where the first reduced packet includes second data of the first service; after the publishing end device publishes the first full-volume packet to the subscribing end device, the publishing end device publishes the first simplified packet to the subscribing end device, the time when the publishing end device publishes the first simplified packet is different from the time when the publishing end device publishes the first full-volume packet by N first publishing periods, the first publishing periods are publishing periods of the first service, and N is an integer greater than or equal to 1.
In the embodiment of the application, for the data with unknown data format of the subscribing terminal equipment, at any release time after the releasing terminal releases the data in the form of full-volume packet for the first time, the transmission mode of the simplified packet can be adopted, so that the transmission quantity of the data can be reduced.
With reference to the first aspect, in certain implementation manners of the first aspect, the first subscription message includes an identifier of the first service, and the publishing end device determines the first full package according to the identifier of the first service in the first subscription message.
In the embodiment of the application, the subscription message carries the identifier of the data to be subscribed by the subscription terminal equipment, so that the publishing terminal equipment can determine the data subscribed by the subscription terminal equipment according to the identifier of the data, thereby facilitating the publishing terminal equipment to further determine the mode of publishing the data according to the subscription terminal message.
With reference to the first aspect, in certain implementation manners of the first aspect, the publishing end device publishes a first full package to the subscribing end device, including: the publishing terminal device determines a first publishing reference moment according to the receiving moment of the first subscription message; the issuing end device issues the first full package at the first issuing reference time.
It should be appreciated that the publisher device may determine the first publication reference time based on the time of receipt of the first subscription message (e.g., the first subscription message). The first distribution reference time is a time when data of the first service (first data of the first service) is first distributed. Thereafter, any one of the distribution timings of the data of the first service (the second data of the first service) may be determined according to the first distribution reference timing and the distribution period of the first service.
With reference to the first aspect, in certain implementation manners of the first aspect, after the publishing end device receives a first subscription message from a subscribing end device, the method further includes: the publishing terminal equipment receives a second subscription message from the subscribing terminal equipment, wherein the second subscription message is used for subscribing a second service, and the data format of the data of the second service is the data of a data format known to the subscribing terminal equipment; the publishing end device determines a second simplified packet according to the second subscription message, wherein the second simplified packet comprises data of a second service; the publishing end device publishes the second simplifying package to the subscribing end device, the time of the publishing end device publishing the second simplifying package is different from the time of the first publishing reference by M second publishing periods, the second publishing periods are publishing periods of the second service, and M is an integer greater than or equal to 0.
It should be appreciated that the time at which the second subscription message is received by the publisher device may be any time after the first subscription message is received. When the publishing end device publishes the first full packet, the publishing end device receives the second subscription message, and then the publishing end device may determine a publishing time of the second service (including a first publishing time of data of the second service) according to the first publishing reference time and a publishing period of the second service, where the first publishing time of the data of the second service is different from the first publishing time of the data of the first service (the first publishing reference time), that is, where M is greater than 0. When the publishing end device has received the second subscription message before the publishing end device publishes the first full packet, the publishing end device may determine a publishing time of the data of the second service (including a first publishing time of the data of the second service) according to the first publishing reference time and a publishing period of the second service, where the first publishing time of the data of the second service may be the same as the first publishing time of the data of the first service (the first publishing reference time), that is, where M is equal to 0. It is also understood that the data of the first service and the data of the second service are not necessarily issued simultaneously at the first issue reference.
In the embodiment of the application, the issuing end equipment determines the first issuing reference moment. When the publishing end device receives the subscription message (such as the second subscription message) of other data at any time after receiving the first subscription message, the publishing time can be further determined according to the first publishing reference time and the publishing period of other data. That is, the first distribution time of the other data may be aligned with any distribution time (including the first distribution reference time) of the data of the first service, and since the distribution period of the data of each service may be different, the subsequent distribution times of the plurality of data may be aligned as much as possible. The method can realize the package and transmission of a plurality of data, thereby improving the efficiency of data release.
With reference to the first aspect, in certain implementation manners of the first aspect, the publishing end device publishes a first full package to the subscribing end device, including: when the number of the subscribing terminal devices is one, the publishing terminal device publishes the first full-quantity package to the subscribing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the publishing-end device publishes the first full package to the plurality of subscriber-end devices through multicast.
With reference to the first aspect, in certain implementation manners of the first aspect, the publishing end device publishes the first reduced package to the subscribing end device, including: when the number of the subscribing terminal devices is one, the publishing terminal device publishes the first simplifying package to the subscribing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the publishing-end device publishes the first reduced package to the subscriber-end device through multicast.
With reference to the first aspect, in certain implementation manners of the first aspect, the publishing end device publishes the second reduced package to the subscribing end device, including: when the number of the subscribing terminal devices is one, the publishing terminal device publishes the second simplifying package to the subscribing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the publishing-end device publishes the second reduced package to the subscriber-end device through multicast.
In the embodiment of the application, the publishing terminal equipment can send the data subscribed by the subscribing terminal equipment in a unicast or multicast mode according to different numbers of subscribing terminal equipment, so that the transmission efficiency can be further improved.
With reference to the first aspect, in certain implementations of the first aspect, the information indicating a data type of the first data of the first service includes a string, integer or floating point.
With reference to the first aspect, in certain implementation manners of the first aspect, the information for indicating a data meaning of the first data of the first service includes any one of the following: humidity, temperature, methane concentration or temperature, etc.
In a second aspect, there is provided a method of transmitting data, comprising: the method comprises the steps that a subscribing terminal device sends a first subscription message to a publishing terminal device, wherein the first subscription message is used for subscribing a first service, the data format of data of the first service is unknown to the subscribing terminal device, and the subscribing terminal device comprises one or more devices; the subscriber-side device receives a first full-size packet from the publisher-side device, the first full-size packet including first data of the first service and information indicating a data format of the first data of the first service, the information indicating the data format of the first data of the first service including information indicating a data type of the first data of the first service and information indicating a data meaning of the first data of the first service.
With reference to the second aspect, in some implementations of the second aspect, after the subscriber end device receives the first full-size packet from the publisher end device, the method further includes the subscriber end device receiving a first reduced packet from the publisher end device, where the first reduced packet includes second data of the first service, and a time when the subscriber end device receives the first reduced packet differs from a time when the subscriber end device receives the first full-size packet by N first distribution periods, where the first distribution periods are distribution periods of the first service, and N is an integer greater than or equal to 1.
With reference to the second aspect, in certain implementations of the second aspect, the first subscription message includes an identification of the first service.
With reference to the second aspect, in certain implementations of the second aspect, the subscriber-side device receives a first full-volume packet from the publisher-side device, including: the subscriber terminal equipment receives the first full-quantity package published by the publisher terminal equipment at the moment of the first publishing standard.
With reference to the second aspect, in some implementations of the second aspect, after the subscriber-end device sends the first subscription message to the publisher-end device, the method further includes: the subscribing terminal device sends a second subscription message to the publishing terminal device, wherein the second subscription message is used for subscribing a second service, and the data format of the data of the second service is a data format known by the subscribing terminal device; the subscribing terminal equipment receives a second simplified packet from the publishing terminal equipment, the second simplified packet comprises data of the second service, the moment of receiving the second simplified packet by the subscribing terminal equipment is different from the moment of receiving the first simplified packet by M second publishing periods, the second publishing periods are publishing periods of the second service, and M is an integer larger than or equal to 0.
With reference to the second aspect, in certain implementations of the second aspect, the subscriber-side device receives a first full-volume packet from the publisher-side device, including: when the subscribing terminal device is one, the subscribing terminal device receives the first full-quantity package published by the publishing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the subscriber-end device receives the first full-volume packet published by the publisher-end device through multicast.
With reference to the second aspect, in certain implementations of the second aspect, the subscriber-side device receives a first reduced package from the publisher-side device, including: when the subscribing terminal device is one, the subscribing terminal device receives the first simplified packet which is published by the publishing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the subscriber-end device receives the first simplified packet which is published by the publisher-end device through multicast.
With reference to the second aspect, in certain implementations of the second aspect, the subscriber-side device receives a second reduced package from the publisher-side device, including: when the subscribing terminal device is one, the subscribing terminal device receives the second simplified packet which is published by the publishing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the subscriber-end device receives the second reduced package published by the publisher-end device through multicast.
With reference to the second aspect, in some implementations of the second aspect, the information indicating a data type of the first data of the first service includes a string, integer, or floating point.
With reference to the second aspect, in certain implementations of the second aspect, the information for indicating a data meaning of the first data of the first service includes any one of: humidity, temperature, methane concentration or temperature, etc.
In a third aspect, a method of transmitting data is provided, comprising: the method comprises the steps that a publishing end device receives a third subscription message from a subscribing end device, wherein the third subscription message is used for subscribing to a third service, and the subscribing end device comprises one or more devices; the publishing terminal device determines a second publishing reference moment according to the receiving moment of the third subscription message; and the publishing end equipment publishes the first data of the third service to the subscribing end equipment at the second publishing reference moment.
In the embodiment of the application, the publishing terminal equipment can determine the publishing reference time (second publishing reference time) according to the time of the received first subscription message (third subscription message) so as to obtain the accurate time of data publishing. When the subsequent issuing terminal equipment needs to issue a plurality of data, the issuing time of the plurality of data can be respectively determined based on the issuing reference time, so that the plurality of data are packed and sent as much as possible, and the data transmission efficiency is improved.
With reference to the third aspect, in some implementations of the third aspect, after the publishing end device receives a third subscription message from the subscribing end device, the method further includes: the publishing terminal equipment receives a fourth subscription message from the subscribing terminal equipment, wherein the fourth subscription message is used for subscribing a fourth service; the publishing terminal equipment publishes the data of the fourth service to the subscribing terminal equipment, the time of the publishing terminal equipment publishing the data of the fourth service is different from the second publishing reference time by M fourth publishing periods, the fourth publishing periods are the publishing periods of the fourth service, and M is an integer greater than or equal to 0.
In the embodiment of the application, the publishing terminal equipment can determine the publishing reference moment according to the receiving moment of the subscription message. Therefore, for single data, no matter what time is subscribed when subscribing the terminal equipment, the fixed publishing time can be determined; the distribution time of the data can be unified for a plurality of data, and the distribution time of the plurality of data can be aligned as much as possible. The method can realize simultaneous transmission of multiple data as much as possible and improves transmission efficiency.
With reference to the third aspect, in some implementations of the third aspect, the publishing end device publishes first data of the third service to the subscribing end device at the second publishing reference time, including: when the data format of the data of the third service is the data format unknown to the subscriber-end equipment, the publishing-end equipment publishes a third full-volume packet to the subscriber-end equipment at the second publishing reference moment, wherein the third full-volume packet comprises the first data of the third service and information for indicating the data format of the first data of the third service, and the information for indicating the data format of the first data of the third service comprises information for indicating the data type of the first data of the third service and information for indicating the data meaning of the first data of the third service; or when the data format of the data of the third service is the data format known by the subscriber-end equipment, the publishing-end equipment publishes the third simplifying packet to the subscriber-end equipment at the second publishing reference moment, and the third simplifying packet comprises the first data of the third service.
With reference to the third aspect, in some implementations of the third aspect, the publishing end device publishes data of the fourth service to the subscribing end device, including: when the data format of the data of the fourth service is the data format unknown to the subscribing terminal device, the publishing terminal device publishes a fourth full-volume packet to the subscribing terminal device, the fourth full-volume packet including the data of the fourth service and information indicating the data format of the data of the fourth service, the information indicating the data format of the data of the fourth service including information indicating the data type of the data of the fourth service and information indicating the data meaning of the book of the fourth service; or when the data format of the data of the fourth service is the data format unknown to the subscribing terminal device, the publishing terminal device publishes a fourth simplifying packet to the subscribing terminal device, wherein the fourth simplifying packet comprises the data of the fourth service; or when the data format of the data of the fourth service is the data format known to the subscriber-end equipment, the publishing-end equipment publishes the fourth simplifying package to the subscriber-end equipment.
In the embodiment of the application, when the publishing end equipment firstly publishes the data with unknown data format of the subscribing end equipment, the data needs to be published in a full-quantity package form, and the data can be published in a simplified package form at any publishing time; when a publisher device publishes data in a data format known to subscriber devices, the data may be published in a reduced package. Thus, the data quantity transmitted can be reduced as much as possible while the subscriber terminal equipment can be ensured to correctly analyze the data.
With reference to the third aspect, in some implementations of the third aspect, the publishing end device publishes first data of the third service to the subscribing end device at the second publishing reference time, including: when the number of the subscribing terminal devices is one, the publishing terminal device publishes the first data of the third service to the subscribing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the publishing-end device publishes the first data of the third service to the multiple subscriber-end devices through multicast.
With reference to the third aspect, in some implementations of the third aspect, the publishing end device publishes data of the fourth service to the subscribing end device, including: when the number of the subscribing terminal devices is one, the publishing terminal device publishes the data of the fourth service to the subscribing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the publishing-end device publishes the data of the fourth service to the plurality of subscriber-end devices through multicast.
In the embodiment of the application, the publishing terminal equipment can send the data subscribed by the subscribing terminal equipment in a unicast or multicast mode according to different numbers of subscribing terminal equipment, so that the transmission efficiency can be further improved.
With reference to the third aspect, in certain implementations of the third aspect, the information indicating a data type of the first data of the third service includes a string, integer or floating point; the information indicating the data type of the data of the fourth service includes a character string, integer or floating point.
With reference to the third aspect, in some implementations of the third aspect, the data meaning information of the first data of the third service includes any one of the following: humidity, temperature, speed, or methane concentration, etc.; or the data meaning information of the data of the fourth service includes any one of the following: humidity, temperature, velocity, or methane concentration, etc.
In a fourth aspect, there is provided a method of transmitting data, comprising: the method comprises the steps that a subscribing terminal device sends a third subscription message to a publishing terminal device, wherein the third subscription message is used for subscribing a third service, and the subscribing terminal device comprises one or more devices; the subscriber terminal equipment receives the first data of the third service published by the publisher terminal equipment at the second publishing reference moment.
With reference to the fourth aspect, in some implementations of the fourth aspect, after the subscriber-end device sends the third subscription message to the publisher-end device, the method further includes: the subscribing terminal device sends a fourth subscription message to the publishing terminal device, wherein the fourth subscription message is used for subscribing a fourth service; the subscribing terminal equipment receives the data of the fourth service from the publishing terminal equipment, the time of the subscribing terminal equipment receiving the data of the fourth service is different from the second publishing reference time by M fourth publishing periods, the fourth publishing periods are the publishing periods of the fourth service, and M is an integer greater than or equal to 0.
With reference to the fourth aspect, in some implementations of the fourth aspect, the subscriber-side device receives first data of the third service published by the publisher-side device at a second publication reference time, including: when the data format of the data of the third service is the data format unknown to the subscriber-end equipment, the subscriber-end equipment receives a third full-volume packet which is issued by the issue-end equipment at a second issue reference moment, wherein the third full-volume packet comprises the first data of the third service and information for indicating the data format of the first data of the third service, and the information for indicating the data format of the first data of the third service comprises information for indicating the data type of the first data of the third service and information for indicating the data meaning of the first data of the third service; or when the data format of the data of the third service is the data format known by the subscriber-end equipment, the subscriber-end equipment receives a third simplifying packet which is published by the publishing-end equipment at the second publishing reference moment, and the third simplifying packet comprises the first data of the third service.
With reference to the fourth aspect, in some implementations of the fourth aspect, the subscriber-side device receives data of the fourth service from the publisher-side device, including: when the data format of the data of the fourth service is the data format unknown to the subscriber-side equipment, the subscriber-side equipment receives a fourth full-volume packet from the publisher-side equipment, wherein the fourth full-volume packet comprises the data of the fourth service and information for indicating the data format of the data of the fourth service, and the information for indicating the data format of the data of the fourth service comprises information for indicating the data type of the data of the fourth service and information for indicating the data meaning of the fourth service; or when the data format of the data of the fourth service is the data format unknown to the subscriber-end equipment, the subscriber-end equipment receives a fourth simplifying packet from the publishing-end equipment, wherein the fourth simplifying packet comprises the data of the fourth service; or when the data format of the data of the fourth service is a data format known to the subscriber-end device, the subscriber-end device receives the fourth reduced package from the publisher-end device.
With reference to the fourth aspect, in some implementations of the fourth aspect, the subscriber-side device receives first data of the third service published by the publisher-side device at a second publication reference time, including: when the number of the subscribing terminal devices is one, the subscribing terminal device receives first data of the third service which is published by the publishing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the subscriber-end device receives the first data of the third service published by the publisher-end device through multicast.
With reference to the fourth aspect, in some implementations of the fourth aspect, the subscriber-side device receives data of the fourth service from the publisher-side device, including: when the number of the subscribing terminal devices is one, the subscribing terminal device receives the data of the fourth service published by the publishing terminal device through unicast; or when the number of the subscriber-end devices is multiple, the subscriber-end device receives the data of the fourth service published by the publisher-end device through multicast.
With reference to the fourth aspect, in some implementations of the fourth aspect, the information indicating a data type of the first data of the third service includes a string, integer or floating point; the information indicating the data type of the data of the fourth service includes a character string, integer or floating point.
With reference to the fourth aspect, in some implementations of the fourth aspect, the information for indicating a data meaning of the data of the third service includes any one of: humidity, temperature, speed, or methane concentration, etc.; or the information indicating the data meaning of the data of the fourth service includes any one of the following: humidity, temperature, velocity, or methane concentration, etc.
In a fifth aspect, an apparatus for transmitting data is provided, including a transceiver unit, configured to receive a first subscription message from a subscribing device, where the first subscription message is used to subscribe to a first service, and a data format of data of the first service is a data format unknown to the subscribing device, and the subscribing device includes one or more devices; the transceiver unit is further configured to issue a first full packet to the subscriber device, where the first full packet includes first data of the first service and information indicating a data format of the first data of the first service, and the information indicating the data format of the first data of the first service includes information indicating a data type of the first data of the first service and information indicating a data meaning of the first data of the first service.
With reference to the fifth aspect, in certain implementation manners of the fifth aspect, the apparatus further includes a processing unit, where the method further includes determining, by the processing unit, a first reduced packet including second data of the first service according to the first subscription message; the transceiver unit is further configured to, after the first full-volume packet is published to the subscriber-side device, publish the first reduced packet, where a time of publishing the first reduced packet is different from a time of publishing the first full-volume packet by N first publishing periods, where the first publishing periods are publishing periods of the first service, and N is an integer greater than or equal to 1.
With reference to the fifth aspect, in certain implementations of the fifth aspect, the first subscription message includes an identification of the first service, the method further includes: the processing unit is further configured to determine the first full package according to an identifier of the first service in the first subscription message.
With reference to the fifth aspect, in certain implementation manners of the fifth aspect, the processing unit is further configured to determine, by the device, a first publishing reference time according to a receiving time of the first subscription message; the transceiver unit is specifically configured to issue the first full-quantity packet at the first issue reference moment.
With reference to the fifth aspect, in some implementations of the fifth aspect, the transceiver unit is further configured to receive a second subscription message from the subscriber device, where the second subscription message is used to subscribe to a second service, and a data format of the second service is a data format known to the subscriber device; the processing unit is further configured to determine a second reduced packet according to the second subscription message, where the second reduced packet includes data of the second service; the transceiver unit is further configured to issue the second reduced packet to the subscriber terminal device, where an instant of issuing the second reduced packet differs from an instant of issuing the first reference by M second issue periods, where the second issue period is an issue period of the second service, and M is an integer greater than or equal to 0.
With reference to the fifth aspect, in some implementations of the fifth aspect, the receiving unit is specifically configured to publish, when the subscriber end device is one, the first full package to the subscriber end device through unicast; or the receiving unit is specifically configured to publish, when the number of the subscriber-end devices is multiple, the first full package to the multiple subscriber-end devices through multicast.
With reference to the fifth aspect, in some implementations of the fifth aspect, the receiving unit is specifically configured to publish, when the subscriber end device is one, the first reduced package to the subscriber end device through unicast; or the receiving unit is specifically configured to publish, when the number of the subscriber-end devices is multiple, the first reduced package to the subscriber-end device through multicast.
With reference to the fifth aspect, in some implementations of the fifth aspect, the receiving unit is specifically configured to publish, when the subscriber end device is one, the second reduced package to the subscriber end device through unicast; or the receiving unit is specifically configured to publish, when the number of the subscriber-end devices is multiple, the second reduced package to the subscriber-end device through multicast.
With reference to the fifth aspect, in certain implementations of the fifth aspect, the information indicating a data type of the first data of the first service includes a string, integer, or floating point.
With reference to the fifth aspect, in certain implementations of the fifth aspect, the information for indicating a data meaning of the first data of the first service includes any one of the following: humidity, temperature, methane concentration or temperature, etc.
In a sixth aspect, there is provided an apparatus for transmitting data, comprising: the device comprises a receiving and transmitting unit, a sending unit and a receiving unit, wherein the receiving and transmitting unit is used for transmitting a first subscription message to a publishing end device, the first subscription message is used for subscribing a first service, the data format of the data of the first service is unknown to the device, and the device comprises one or more than one devices; the transceiver unit is further configured to receive a first full packet from the publisher device, where the first full packet includes first data of the first service and information indicating a data format of the first data of the first service, and the information indicating the data format of the first data of the first service includes information indicating a data type of the first data of the first service and information indicating a data meaning of the first data of the first service.
With reference to the sixth aspect, in some implementations of the sixth aspect, the transceiver is further configured to receive a first reduced packet from the publishing end device, where the first reduced packet includes second data of the first service, and a time of receiving the first reduced packet differs from a time of receiving the first full packet by N first publishing periods, where the first publishing period is a publishing period of the first service, and N is an integer greater than or equal to 1.
With reference to the sixth aspect, in certain implementations of the sixth aspect, the first subscription message includes an identification of the first service.
With reference to the sixth aspect, in some implementations of the sixth aspect, the transceiver unit is specifically configured to receive the first full-dose packet issued by the issuing end device at the first issuing reference time.
With reference to the sixth aspect, in some implementations of the sixth aspect, the transceiver unit is further configured to send a second subscription message to the publishing end device, where the second subscription message is used to subscribe to a second service, and a data format of data of the second service is a data format known by the device; the transceiver unit is further configured to receive a second reduced packet from the publishing end device, where the second reduced packet includes data of the second service, and a time of receiving the second reduced packet differs from the first publishing reference by M second publishing periods, where the second publishing periods are publishing periods of the second service, and M is an integer greater than or equal to 0.
With reference to the sixth aspect, in some implementations of the sixth aspect, the transceiver unit is specifically configured to receive, when the apparatus is one, the first full-dose packet issued by the issuing end device through unicast; or the transceiver unit is specifically configured to receive the first full-volume packet issued by the issuing end device through multicast when the device is plural.
With reference to the sixth aspect, in certain implementation manners of the sixth aspect, the transceiver unit is specifically configured to receive, when the apparatus is one, the first reduced packet issued by the issuing side device through unicast; or the transceiver unit is specifically configured to receive the first reduced packet issued by the issuing end device through multicast when the device is plural.
With reference to the sixth aspect, in certain implementation manners of the sixth aspect, the transceiver unit is specifically configured to receive, when the apparatus is one, the second reduced packet issued by the issuing side device through unicast; or the transceiver unit is specifically configured to receive, when the device is plural, the second reduced packet issued by the issuing end device through multicast.
With reference to the sixth aspect, in some implementations of the sixth aspect, the information indicating a data type of the first data of the first service includes a string, integer or floating point.
With reference to the sixth aspect, in certain implementations of the sixth aspect, the information for indicating a data meaning of the first data of the first service includes any one of the following: humidity, temperature, methane concentration or temperature, etc.
In a seventh aspect, there is provided an apparatus for transmitting data, comprising: the receiving and transmitting unit is used for receiving a third subscription message from the subscribing terminal device, wherein the third subscription message is used for subscribing a third service, and the subscribing terminal device comprises one or more devices; a determining unit, configured to determine a second publishing reference time according to the receiving time of the third subscription message; the receiving and transmitting unit is further configured to publish, at the second publishing reference time, first data of the third service to the subscriber terminal device.
With reference to the seventh aspect, in some implementations of the seventh aspect, the transceiver unit is further configured to receive a fourth subscription message from the subscriber device, where the fourth subscription message is used to subscribe to a fourth service; the transceiver unit is further configured to publish, to the subscriber terminal device, data of the fourth service, where a time of publishing the data of the fourth service is different from the second publishing reference time by M fourth publishing periods, where the fourth publishing period is a publishing period of the fourth service, and M is an integer greater than or equal to 0.
With reference to the seventh aspect, in certain implementation manners of the seventh aspect, the transceiver unit is specifically configured to issue, when a data format of the data of the third service is a data format unknown to the subscriber device, a third full-volume packet to the subscriber device at the second issue reference time, where the third full-volume packet includes first data of the third service and information indicating a data format of the first data of the third service, and the information indicating a data format of the first data of the third service includes information indicating a data type of the first data of the third service and information indicating a data meaning of the first data of the third service; or the transceiver unit is specifically configured to issue the third reduced packet to the subscriber terminal device at the second issue reference time when the data format of the data of the third service is a data format known to the subscriber terminal device, where the third reduced packet includes the first data of the third service.
With reference to the seventh aspect, in certain implementation manners of the seventh aspect, the transceiver unit is specifically configured to issue a fourth full packet to the subscribing device when the data format of the data of the fourth service is the data format unknown to the subscribing device, where the fourth full packet includes the data of the fourth service and information indicating the data format of the data of the fourth service, and the information indicating the data format of the data of the fourth service includes information indicating the data type of the data of the fourth service and information indicating the data meaning of the book of the fourth service; or the transceiver unit is specifically configured to issue a fourth reduced packet to the subscribing device when the data format of the data of the fourth service is the data format unknown to the subscribing device, where the fourth reduced packet includes the data of the fourth service; or the transceiver unit is specifically configured to issue the fourth reduced package to the subscribing device when the data format of the fourth data is a data format known to the subscribing device.
With reference to the seventh aspect, in some implementations of the seventh aspect, the transceiver unit is specifically configured to publish, when the subscriber end device is one, first data of the third service to the subscriber end device through unicast; or the transceiver unit is specifically configured to publish, when the number of the subscriber-end devices is multiple, the first data of the third service to the multiple subscriber-end devices through multicast.
With reference to the seventh aspect, in some implementations of the seventh aspect, the transceiver unit is specifically configured to publish, when the subscriber end device is one, data of the fourth service to the subscriber end device through unicast; or the transceiver unit is specifically configured to publish, when the number of the subscriber terminal devices is multiple, data of the fourth service to the multiple subscriber terminal devices through multicast.
With reference to the seventh aspect, in certain implementations of the seventh aspect, the information indicating a data type of the first data of the third service includes a string, integer or floating point; the information indicating the data type of the data of the fourth service includes a character string, integer or floating point.
With reference to the seventh aspect, in certain implementation manners of the seventh aspect, the data meaning information of the first data of the third service includes any one of the following: humidity, temperature, speed, or methane concentration, etc.; or the data meaning information of the data of the fourth service includes any one of the following: humidity, temperature, velocity, or methane concentration, etc.
In an eighth aspect, there is provided an apparatus for transmitting data, comprising: a transceiver unit, configured to send a third subscription message to a publishing end device, where the third subscription message is used to subscribe to a third service, and the apparatus includes one or more than one device; the receiving and transmitting unit is further configured to receive first data of the third service that is published by the publishing end device at the second publishing reference moment.
With reference to the eighth aspect, in some implementations of the eighth aspect, the transceiver unit is further configured to send a fourth subscription message to the publishing end device, where the fourth subscription message is used to subscribe to a fourth service; the transceiver unit is further configured to receive data of the fourth service from the publishing end device, where a time of receiving the data of the fourth service is different from the second publishing reference time by M fourth publishing periods, where the fourth publishing period is a publishing period of the fourth service, and M is an integer greater than or equal to 0.
With reference to the eighth aspect, in certain implementation manners of the eighth aspect, the transceiver unit is specifically configured to, when a data format of the data of the third service is a data format unknown to the apparatus, receive a third full-dose packet that is issued by the issuing-side device at the second issue reference time, where the third full-dose packet includes the first data of the third service and information indicating a data format of the first data of the third service, and the information indicating a data format of the first data of the third service includes information indicating a data type of the first data of the third service and information indicating a data meaning of the first data of the third service; or the transceiver unit is specifically configured to receive a third reduced packet issued by the issuing end device at the second issuing reference time when the data format of the data of the third service is the data format known by the device, where the third reduced packet includes the first data of the third service.
With reference to the eighth aspect, in certain implementation manners of the eighth aspect, the transceiver unit is specifically configured to receive a fourth full packet from the issuing side device when a data format of the data of the fourth service is a data format unknown to the apparatus, where the fourth full packet includes the data of the fourth service and information indicating a data format of the data of the fourth service, and the information indicating a data format of the data of the fourth service includes information indicating a data type of the data of the fourth service and information indicating a data meaning of a book of the fourth service; or the transceiver unit is specifically configured to receive a fourth reduced packet from the issuing end device when the data format of the data of the fourth service is a data format unknown to the device, where the fourth reduced packet includes the data of the fourth service; or the transceiver unit is specifically configured to receive the fourth reduced packet from the issuing side device when the data format of the data of the fourth service is the data format known to the device.
With reference to the eighth aspect, in some implementations of the eighth aspect, the transceiver unit is specifically configured to receive, when the apparatus is one, first data of the third service that is published by the publisher device through unicast; or the transceiver unit is specifically configured to receive, when the device is multiple, the first data of the third service that is distributed by the distribution terminal device through multicast.
With reference to the eighth aspect, in some implementations of the eighth aspect, the transceiver unit is specifically configured to receive, when the apparatus is one, data of the fourth service that is published by the publisher device through unicast; or the transceiver unit is specifically configured to receive, when the device is multiple, data of the fourth service that is distributed by the distribution terminal device through multicast.
With reference to the eighth aspect, in certain implementations of the eighth aspect, the information indicating a data type of the first data of the third service includes a string, integer or floating point; the information indicating the data type of the data of the fourth service includes a character string, integer or floating point.
With reference to the eighth aspect, in certain implementations of the eighth aspect, the information for indicating a data meaning of the data of the third service includes any one of the following: humidity, temperature, speed, or methane concentration, etc.; or the information indicating the data meaning of the data of the fourth service includes any one of the following: humidity, temperature, velocity, or methane concentration, etc.
In a ninth aspect, there is provided a communication apparatus comprising: a processor coupled to a memory for storing a computer program for running the computer program to cause the communication device to perform the method as in the first aspect and any of its possible implementations, or to perform the method as in the second aspect and any of its possible implementations, or to perform the method as in the third aspect and any of its possible implementations, or to perform the method as in the fourth aspect and any of its possible implementations.
In a tenth aspect, a computer readable storage medium is provided, comprising a computer program or instructions which, when run on a computer, cause a method as in the first aspect and any one of its possible implementations to be performed, or cause a method as in the second aspect and any one of its possible implementations to be performed, or cause a method as in the third aspect and any one of its possible implementations to be performed, or cause a method as in the fourth aspect and any one of its possible implementations to be performed.
In an eleventh aspect, a computer program product is provided, comprising a computer program or instructions which, when run on a computer, cause a method as in the first aspect and any of its possible implementations to be performed or cause a method as in the second aspect and any of its possible implementations to be performed or cause a method as in the third aspect and any of its possible implementations to be performed or cause a method as in the fourth aspect and any of its possible implementations to be performed.
A twelfth aspect provides a computer program which, when run on a computer, causes the method as in the first aspect and any one of its possible implementations to be performed or causes the method as in the second aspect and any one of its possible implementations to be performed or causes the method as in the third aspect and any one of its possible implementations to be performed or causes the method as in the fourth aspect and any one of its possible implementations to be performed.
Drawings
FIG. 1 is a schematic diagram of a publish-subscribe system according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a publish-subscribe scenario provided in an embodiment of the present application.
Fig. 3 is a schematic flow chart of a method for transmitting data according to an embodiment of the present application.
Fig. 4 is a schematic diagram of full packet field information provided in an embodiment of the present application.
Fig. 5 is a schematic diagram of a full package provided by an embodiment of the present application.
Fig. 6 is a schematic flow chart of another method for transmitting data according to an embodiment of the present application.
Fig. 7 is a schematic diagram of a simplified package provided by an embodiment of the present application.
Fig. 8 is a schematic diagram of a method for transmitting data in a publish-subscribe mode according to an embodiment of the present application.
Fig. 9 is a schematic diagram of alignment of data release time according to an embodiment of the present application.
Fig. 10 is a schematic flow chart of another method for transmitting data according to an embodiment of the present application.
Fig. 11 is an exemplary block diagram of a communication device according to an embodiment of the present application.
Fig. 12 is an exemplary structural diagram of a communication device according to another embodiment of the present application.
FIG. 13 is a schematic block diagram of an apparatus according to an embodiment of the present application
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
The technical scheme of the embodiment of the application can be applied to various communication systems, such as: a long term evolution (long term evolution, LTE) system, an LTE frequency division duplex (frequency division duplex, FDD) system, an LTE time division duplex (time division duplex, TDD), a fifth generation (5th generation,5G) system, or a New Radio (NR), or a communication system that evolves after 5G (e.g., a 6G communication system), or an ethernet system, etc. The application is not limited in this regard.
The terminal device in the embodiment of the application can be a device for realizing a wireless communication function, such as a terminal or a chip which can be used in the terminal. The terminal device may refer to a User Equipment (UE), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a User terminal, a wireless communication device, a User agent, or a User equipment. The terminal device may also be a wireless terminal in industrial control (industrial control), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city, a wireless terminal in smart home, etc. Alternatively, the terminal may be a terminal in the internet of vehicles (V2X) (e.g., an internet of vehicles Device), a terminal in a Device-to-Device (Device) communication, or a terminal in a machine-to-machine (machine to machine, M2M) communication, a terminal in a 5G network, a terminal in a 5G later evolution communication system, or a terminal in a future evolution public land mobile network (public land mobile network, PLMN), etc., which embodiments of the present application are not limited.
In the embodiment provided by the application, the publishing end device can be a publisher, and the subscribing end device can be a subscriber. The publishing end device and the subscribing end device can be applied to the publishing and subscribing system shown in fig. 1 to realize message interaction. A publish-subscribe system is a middleware system in which participants (participating devices) interact in a distributed system in a publish-subscribe manner. In a publish-subscribe system, information interacted between a producer and a consumer of information is referred to as an event. Where the producer of the information is referred to as a publisher and the consumer of the information is referred to as a subscriber. Both the publisher and subscriber devices may be referred to as clients.
FIG. 2 illustrates a schematic diagram of a publish-subscribe scenario. When a publisher device and a subscriber device are exchanging data, the data format of the data published by the subscriber device to the publisher is generally known. When the subscriber terminal equipment receives the published data, the subscriber terminal equipment can correctly analyze the data and determine the correct meaning of the data. For example, the data format of the data may be preset in the standard, for example, the data set 1 and the data set 2 in fig. 2. However, for data corresponding to the data format not written in the standard, the data format of such data is unknown to the subscriber-end device, and therefore, after receiving such data published by the publisher-end device, the subscriber-end device cannot correctly parse and know the meaning of such data, such as the extended data set 3 in fig. 2. The data of the data format unknown to the subscriber terminal device in advance can be manufacturer extended data, and is not recorded in the standard. In addition, the publishing terminal device may divide the data into data sets, and may divide the data sets according to the data type or the meaning of the data, and the specific method for dividing the data combination is not limited.
For the case that the subscriber terminal equipment subscribes to the unknown data format data, three methods exist in the prior art. Firstly, after the publishing terminal equipment expands the data with unknown data format, the subscribing terminal equipment synchronously expands so as to ensure that the subscribing terminal equipment can accurately analyze the data. The method needs synchronous modification of the subscription terminal equipment, but the subscription terminal equipment and the publishing terminal may not be realized by one manufacturer, and the difficulty of the synchronous expansion is higher because of the fact that the subscription terminal equipment and the publishing terminal are not realized by the same manufacturer. Secondly, adding a data format query flow between the subscribing terminal device and the publishing terminal device in the standard, wherein the subscribing terminal device needs to query the data format of the extended data when subscribing the extended data. The method increases the interaction times. Thirdly, one interaction is added in the standard, and when the release end device releases the extension data, the data format is transmitted first, and then the data is transmitted. The method increases the interaction times. In summary, the existing method cannot solve the problem that the subscriber terminal equipment correctly analyzes the data of the unknown data format under the condition of original interaction times or simpler realization. Therefore, in order to enable the expansion data to be correctly analyzed by the subscribing terminal equipment, the application provides a method for transmitting the data, and in the scene of publishing and subscribing, the subscribing terminal equipment can correctly and conveniently analyze the expansion data by improving the data transmission process.
Fig. 3 shows a schematic flow chart of a method 300 for transmitting data according to an embodiment of the present application. The method can be applied to the scene shown in fig. 1, and the specific steps are as follows:
s301, the publishing terminal device receives the first subscription message, and accordingly, the subscribing terminal device sends the first subscription message.
It should be understood that the first subscription message is used to subscribe to the first service, where the data format of the data of the first service is a data format unknown to the subscribing device. Wherein the data of the first service may also be a data set. It is also understood that the data of the first service is data that is not predefined in the standard and is vendor extended.
S302, the publishing end device publishes the first full package, and accordingly, the subscribing end device receives the first full package.
It should be noted that, the publishing end device publishes the first full package to the subscribing end device at the first publishing time of the first data of the first service. The first full packet includes first data of the first service and information indicating a data format of the first data of the first service, and the information indicating the data format of the first data of the first service includes information indicating a first data type of the first service and information indicating a data meaning of the first data of the first service. Full packets are one way of data transmission.
For ease of understanding, fig. 4 shows a schematic diagram of field information within a full packet. Specifically, the full packet field information includes a field type, a field value, and a field meaning. Fig. 5 shows a schematic diagram of a full package. When the data is plural, it may be represented as a data set. The data set may be a field list, which is made up of a plurality of fields. The field type and the field meaning belong to auxiliary information, and are used for helping to analyze the field and acquiring the meaning corresponding to the field value. For example, in fig. 5, the field value is the first data of the first service, the field type is information indicating the data type of the first data of the first service, and the field meaning is information indicating the data meaning of the first data of the first service.
Specifically, the field type may indicate a type corresponding to the field value, for example, a character string, integer, or floating point, etc., and may be used to correctly parse the field value; the meaning of the field may indicate an attribute of the communication device to which the field value corresponds, for example, the field value represents humidity, temperature, speed, or methane concentration, etc., and may be used to obtain the meaning to which the field value corresponds. It is understood that the above two kinds of information are used to represent data formats. The data can be correctly analyzed and the meaning of the data can be obtained through the two field information.
In some embodiments, the first subscription message includes an identifier of the first service, and the publishing end device determines the first full package according to the identifier of the first service in the first subscription message.
In the method for transmitting data provided by the embodiment of the application, the data format of the data of the first service is unknown in advance by the subscribing terminal equipment, so that the data of the first service (the first data of the first service) is published in the form of a first full packet when the publishing terminal equipment firstly publishes the data of the first service. Because the first full package contains information for indicating the data format, the subscriber terminal equipment can correctly analyze the data and acquire the meaning of the data. The method can simultaneously transmit data and corresponding data formats, and can save the interaction times of the subscribing terminal equipment and the publishing terminal equipment. By specifying the full package of the type in the standard in advance, the subscriber-side equipment can correctly analyze and acquire the meaning of the data expanded by the manufacturer when receiving the data.
Fig. 6 shows a schematic flow chart of another method 600 for transmitting data according to an embodiment of the present application. The method can be applied to the scene shown in fig. 1, and the specific steps are as follows:
s601, the publishing terminal device receives the first subscription message, and accordingly, the subscribing terminal device sends the first subscription message.
It should be understood that the first subscription message is used to subscribe to the first service, where the data format of the data of the first service is a data format unknown to the subscribing device.
S602, the publishing terminal device receives the second subscription message, and accordingly, the subscribing terminal device sends the second subscription message.
It should be understood that the second subscription message is used to subscribe to the second service, where the data format of the data of the second service is a data format known to the subscribing device, and it is also understood that the data of the second service is predefined in the standard.
S603, the issuing side determines a first full package.
In some embodiments, the first subscription message includes an identification of the first service, and the publisher device may determine the first full package based on the identification of the first service in the first subscription message.
S604, the issuing side device determines a first simplified packet.
It should be appreciated that the first reduced packet includes the second data of the first service. If the data format of the data is unknown to the subscriber-end equipment, the data can be published in the form of a full package when the publisher-end equipment firstly publishes the data. The full package contains field values, field types and field meanings, and the three kinds of information can be simultaneously transmitted to the subscriber terminal equipment through the full package without generating additional multiple interactions. However, the data of the service subscribed to by the subscriber-end device is usually continuously published, and the time interval of the publication is the publication period of the corresponding service. The issuing end device can adopt a simplified packet transmission mode at any issuing time after issuing the service in the form of a full packet for the first time, so that the transmission quantity of data can be reduced. That is, the full packets and the reduced packets may be transmitted alternately, requiring the transmission of the full packets when the data format changes or there is a new subscription.
It should be understood that, in the embodiment of the present application, the first data refers to data that is issued by a service for the first time, and the second data refers to data that is issued at any issuing time after the first service is issued.
For ease of understanding, fig. 7 shows a schematic diagram of a simplified package. Only field values are carried in the reduced packet. When the subscribing terminal device subscribes to the data with the known data format, the publishing terminal device can publish a simplified packet only carrying field values, and the subscribing terminal device can correctly analyze the data and acquire the meaning of the data.
S605, the issuing side device determines a second reduced package.
In some embodiments, the publisher device determines a second reduced package from an identification of data of a second service in the second subscription message.
It should be appreciated that the second reduced packet is similar to the first reduced packet. When the data format of the data of the second service is a data format known to the subscriber device, it is not necessary to determine a full packet containing information indicating the data format of the data of the second service. The second reduced packet includes only data of the second service and does not include information indicating a data format of the data of the second service. .
Further, the time when the publishing end device first publishes the data of the first service or the data of the second service is uncertain, and the reference time of data publishing is related to the time when the data is subscribed for first time. Thus, the publisher device may perform the following steps to determine the publication reference time.
S604, the issuing side equipment determines the first issuing reference moment.
It should be appreciated that the publishing-end device determines the first publication reference time based on the time of receipt of the first subscription message. After receiving the first subscription message (the first subscription message), the publishing end device may determine the first publishing reference time according to the receiving time of the subscription message. The following numerical relationship exists between the publishing reference time and the subscribing time:
publication reference time = subscription time + random value
For ease of understanding, the following exemplifies how the publisher device determines the first publication reference. Illustratively, the random value may be a random number within 0-10 s. The subscription time of the data of the first service is 12:36:41, and the first publishing reference time is 12:36:45 when the subscription time is increased by 4 s.
S607, the publishing end device publishes the first full package, and accordingly, the subscribing end device receives the first full package.
S608, the publishing end device publishes the first reduced package, and accordingly, the subscribing end device receives the first reduced package.
It should be appreciated that the publisher device publishes the first reduced package to the subscriber device after publishing the first full package to the subscriber device. The time of the issuing end issuing the first simplified packet is different from the time of issuing the first full-quantity packet by N first issuing periods, wherein the first issuing periods are the issuing periods of the first service, and N is an integer greater than or equal to 1. That is, at any one of the distribution times after the first distribution time of the data of the first service (first data of the first service), the distribution end device may distribute the first reduced package to the subscriber end device. The distribution periods of the first business are different from each other by N times when the data of the first business are distributed.
S609, the publishing end device publishes the second reduced package, and accordingly, the subscribing end device receives the second reduced package.
It should be appreciated that the publishing end device publishes the second reduced package to the subscribing end device at the first time of publishing the data of the second service. The second reduced packet includes only data of the second service and does not include information indicating a data format of the data of the second service. At any subsequent time of distribution of the data of the second service, the distributing terminal device distributes the second simplifying packet to the subscribing terminal device. The second service distribution period is a distribution period of the second service, wherein the difference between any distribution moments of the data of the second service is N second distribution periods. That is, when the data subscribed to by the subscribing terminal device is data in a known data format, in order to reduce the transmission amount of each time, the data can be published in a simplified package manner at any publishing time of the data.
The release period of the first service and the release period of the second service may be the same or different, which is not limited in the embodiment of the present application.
Fig. 8 is a schematic diagram for illustrating a method for transmitting data in a publish-subscribe mode according to an embodiment of the present application for convenience of understanding. Illustratively, one publisher device and one subscriber device are shown in fig. 8, where the publisher device includes a data set 1, a data set 2, an extension data set 3, and an extension data set 4. Wherein data set 1 and data set 2 are data of a data format known in advance to the subscribing end device (e.g., data of the second service above); the extended data set 3 and the extended data set 4 are data of a data format unknown in advance to the subscriber-end device (for example, data of the first service hereinabove). When the subscribing terminal device subscribes to the data set 1 or the data set 2, the publishing terminal device publishes the data set 1 or the data set 2 to the subscribing terminal device in a corresponding data set publishing period in a simplified package mode. When subscribing end equipment subscribes to the extension data set 3 or the extension data set 4, the publishing end equipment publishes the corresponding data set in a full-package mode at the first publishing time of the corresponding extension data, and publishes the corresponding data set in a simplified package mode at the publishing time after the corresponding extension data.
In some embodiments, the publishing end device publishes a second reduced packet to the subscribing end device, where a time when the publishing end device publishes the second reduced packet differs from the first publishing reference time by M second publishing periods, where the second publishing periods are publishing periods of the second service, and M is an integer greater than or equal to 0.
It should be understood that, after the issuing end device determines the first issuing reference time, the issuing end device issues the first data of the first service for the first time at the first issuing reference time, that is, issues the first full-volume packet at the first issuing reference time. And the data release time for the second service needs to be determined according to the following expression:
release time = release reference time + release period x M
Wherein M is an integer greater than or equal to 0. For certain data, whenever the subscribing terminal device subscribes, according to the expression, the time of each release of the data can be determined, and the time of each release of the data is irrelevant to the subscribing time. For example, when the first release time of the data of the second service is the same as the first release time (first release reference time) of the data of the first service, the release end device releases the first full-size packet and the second reduced packet at the first release reference time. When the first release time of the data of the second service is the same as the subsequent release time of the data of the first service, the release terminal device releases the first simplified packet and the second simplified packet at the release time. When the subsequent release time of the data of the second service is the same as the subsequent release time of the data of the first service, the release terminal device simultaneously releases the first simplified packet and the second simplified packet at the release time.
For ease of understanding, an example of how the distribution end device distributes data after determining the first distribution reference moment is described below.
Illustratively, the first case: the publishing end device receives the first subscription message at 12:09:55, determines that the first publishing reference moment is 12:10:00, and publishes the data of the first service (the first data of the first service) for the first time at 12:10:00, and since the period of the first service is 10s, the next publishing moment of the data of the first service (the second data of the first service) is 12:10:10. The publishing end device receives the second subscription message at 12:09:57, and the publishing end device firstly publishes the data of the second service at 12:10:00 because the determined first publishing reference time is 12:10:00, and the next publishing time of the data of the second service is 12:10:05 because the period of the second service is 5 s. In this case, the issuing device issues the data of the first service and the data of the second service for the first time at the first issuing reference time 12:10:00.
Second case: the publishing end device receives the first subscription message at 12:09:55, determines that the first publishing reference moment is 12:10:00, and publishes the data of the first service (the first data of the first service) for the first time at 12:10:00, and since the period of the first service is 10s, the next publishing moment of the data of the first service (the second data of the first service) is 12:10:10. The publishing end device receives the second subscription message at 12:10:03, and the publishing end device firstly publishes the data of the second service at 12:10:05 because the determined first publishing reference time is 12:10:00, and the next publishing time of the data of the second service is 12:10:10 because the period of the second service is 5 s. In this case, the issuing side device issues only the data of the first service at the first issuing reference time, and may issue the data of the first service and the data of the second service at the subsequent issuing time 12:10:10.
For ease of understanding, fig. 9 shows a schematic diagram of data distribution timing alignment in the first case above. The data to be published by the publisher device includes data 1, data 2 and data 3. The data format of the above data is not limited if the subscriber-side device knows the data in advance. Wherein, the release period of the data 1 is 1s, the release period of the data 2 is 2s, and the release period of the data 3 is 3s. The least common multiple of the data 1 release period, the data 2 release period and the data 3 release period is 3. The first subscription time of data 1, data 2, and data 3 is any time before the publication reference time. Firstly, the publishing terminal device determines that the publishing reference time is 0s according to the subscription time of the received first data. Secondly, the issuing side equipment calculates the subsequent 8 times of issuing time of the data 1, the data 2 and the data 3. Because the release periods of different data are different, the release time of the data 1 determined by the release terminal equipment is respectively 0s, 1s, 2s, 3s, 4s, 5s, 6s and 7s; the release time of the data 2 determined by the release terminal equipment is respectively 0s, 2s, 4s and 6s; the release time of the data 3 determined by the release end device is respectively 0s, 3s and 6s. It can be seen that at part of the publishing time, the publishing end device may publish multiple data packages together to the subscribing end device. For example, at the release time 0s or 6s, the release-side device may release data 1, data 2, and data 3 simultaneously; at the release time 2s or 4s, the release end device can release the data 1 and the data 2 simultaneously; at the release time 3s, the release-side device may release data 1 and data 3 simultaneously.
In some embodiments, when the subscriber-side device is one, the publisher-side device publishes the first full-volume package or the second reduced package to the subscriber-side device by unicast; or when the subscriber-end equipment is one, the publishing-end equipment publishes the first simplifying package or the second simplifying package to the subscriber-end equipment through unicast; or when the number of the subscriber-end devices is multiple, the publishing-end device publishes the first full package or the second simplified package to the plurality of the subscriber-end devices through multicast; or when the number of the subscriber-end devices is multiple, the publishing-end device publishes the first simplifying package or the second simplifying package to the plurality of the subscriber-end devices through multicast.
In some embodiments, the data type of the first data includes a string, integer, or floating point.
In some embodiments, the data meaning of the first data includes any one of: temperature, humidity, velocity, or methane concentration, etc.
It should be noted that, the execution order of the step S607 and the step S609 is not limited, and the step S607 may be executed first, and then the step S609 may be executed. Steps S607 and S609 may also be performed simultaneously. The execution order of the step S608 and the step S609 is not limited, and the step S608 may be executed first, and then the step S609 may be executed. Step S609 may be performed first, and then step S608 may be performed; steps S608 and S609 may also be performed simultaneously. The execution order of the above steps S603, S604, S605 and S606 is not limited. The execution sequence of step S606 may be performed at any time after step S601. The execution sequence of step S602 is not limited to the specific execution sequence of step S602 after step S601 and at any time before step S605.
The method for transmitting data provided by the embodiment of the application is characterized in that for the data of the first service with the unknown data format in advance of the subscribing terminal equipment, the data of the first service is published in the form of a first full packet when the publishing terminal equipment firstly publishes the data of the first service. Because the first full packet contains the data of the first service and the information of the data format for indicating the data of the first service, the subscriber terminal equipment can correctly analyze the data of the first service and acquire the meaning of the data of the first service. When the publishing end device publishes the data of the first service next time in the form of a first simplified packet, the subscribing end device can correctly analyze the data of the first service according to the field value in the first simplified packet and acquire the meaning of the data of the first service. For the data of the second service with a known data format in advance of the subscribing terminal equipment, when the publishing terminal equipment firstly publishes the data of the second service and the publishing terminal equipment next publishes the data of the second service, the subscribing terminal equipment can correctly analyze the data of the second service according to the field value in the second simplifying packet and acquire the meaning of the data of the second service. The method can simplify the interaction flow between the publishing end device and the subscribing end device while supporting the subscribing end device to correctly analyze the data with the unknown data format in advance, thereby saving the expenditure of the interaction signaling.
In addition, the publishing end device may determine the publishing reference time (the first publishing reference time) according to the receiving time of the first subscription message (the first subscription message). Therefore, for the data of a single service, no matter what time is subscribed when subscribing the terminal equipment, the fixed publishing time can be determined; for the data of a plurality of services, the distribution time of the data can be unified, so that the distribution time of the plurality of data is aligned as much as possible. The method can realize simultaneous transmission of multiple data as much as possible and improves transmission efficiency.
As can be seen from the foregoing description of the method 600, the time when the publishing end device first publishes the data of the first service and the data of the second service to the subscribing end device is uncertain, and the time when the data of the existing service is published is related to the time when the service is subscribed for first time. When a publisher device needs to publish multiple data or multiple data sets to a subscriber device, multiple data or multiple data sets cannot be packaged and sent because the publication time of each data or data set is different.
For example, the release period of the data 1 is 10s, the subscription time is 12:36:41, and the next release time of the data 1 is 12:36:51; the release period of the data 2 is 20s, the subscription time is 12:46:45, and the next release time of the data 2 is 12:37:05. It can be seen that, the release time of the data 1 is different from that of the data 2, so that the two data cannot be sent together in a packaged manner, and if one subscribing terminal device subscribes to the two data in sequence, the releasing terminal device needs to send the two data respectively. Therefore, in the prior art, alignment of single data publishing time is mainly focused, a publishing period is fixed for single data, and different subscribing terminal devices subscribe at different times, so that the publishing time of the data is different. How to align the distribution time of a plurality of data as much as possible is a further problem to be solved by the present application. In view of the above technical problem, a method 1000 for transmitting data as shown in fig. 10 is proposed without limiting whether a data format of a plurality of data or a plurality of data sets is known to a subscriber device. And determining a publishing reference time which is not influenced by the time when the subscribing terminal equipment receives the subscription message, so that the package and the publication of a plurality of data or a plurality of data sets are realized as much as possible, and the publication efficiency is improved. The method 1000 is described in detail below using a plurality of data as an example.
Fig. 10 is a schematic flow chart of another method 1000 for transmitting data according to an embodiment of the present application. The method can be applied to the scene shown in fig. 1, and the specific steps are as follows:
s1001, the publishing end device receives the third subscription message, and accordingly, the subscribing end device sends the third subscription message.
It should be appreciated that the publisher device receives a third subscription message from the subscriber device, the third subscription message for subscribing to a third service.
S1002, the publishing end device determines a second publishing reference time.
S1003, the publishing end device publishes the first data of the third service, and correspondingly, the subscribing end device receives the first data of the third service.
The steps are similar to steps S601, S606, S607, S608 and S609 in the method 600, and will not be repeated here.
In some embodiments, after the publisher device receives the third subscription message from the subscriber device, the publisher device receives a fourth subscription message from the subscriber device, the fourth subscription message for subscribing to a fourth service. The publishing terminal equipment publishes the data of the fourth service to the subscribing terminal equipment, the time of the publishing terminal equipment publishing the data of the fourth service is different from the second publishing reference time by M fourth publishing periods, the fourth publishing periods are the publishing periods of the fourth service, and M is an integer greater than or equal to 0.
In some embodiments, when the data format of the data of the third service is a data format unknown to the subscribing-end device, the publishing-end device publishes a third full-size packet to the subscribing-end device, the third full-size packet including the data of the third service and information indicating the data format of the data of the third service, the information indicating the data format of the data of the third service including information indicating the data type of the data of the third service and information indicating the data meaning of the data of the third service; or when the data format of the data of the third service is the data format unknown to the subscribing terminal equipment, the publishing terminal equipment publishes a third simplifying packet to the subscribing terminal equipment, wherein the third simplifying packet comprises the data of the third service; or when the data format of the data of the third service is the data format known by the subscriber-end equipment, the publishing-end equipment publishes the third simplifying package to the subscriber-end equipment.
In some embodiments, when the data format of the data of the fourth service is data of a data format unknown to the subscribing-end device, the publishing-end device publishes a fourth full-size packet to the subscribing-end device, the fourth full-size packet including the data of the fourth service and information indicating the data format of the data of the fourth service, the information indicating the data format of the data of the fourth service including information indicating the data type of the data of the fourth service and information indicating the data meaning of the data of the fourth service; or when the data format of the data of the fourth service is the data format unknown to the subscribing terminal equipment, the publishing terminal equipment publishes a fourth simplifying packet to the subscribing terminal equipment, wherein the fourth simplifying packet comprises the data of the fourth service; or when the data format of the data of the fourth service is the data format known by the subscriber-end equipment, the publishing-end equipment publishes the fourth simplifying package to the subscriber-end equipment.
In some embodiments, when the subscriber-end device is one, the publishing-end device publishes the data of the third service or the data of the fourth service to the subscriber-end device through unicast; or when the number of the subscriber-end devices is multiple, the publishing-end device publishes the data of the third service or the data of the fourth service to the multiple subscriber-end devices through multicast.
It should be appreciated that when only one subscriber-end device subscribes to multiple data, after the publisher-end device aligns the publication reference, the publisher-end device may publish the multiple data several in a single message in a unicast manner. When a plurality of pieces of data are subscribed by a plurality of pieces of subscribing terminal equipment, after the publishing terminal equipment is aligned to the publishing reference moment, the publishing terminal equipment can package a plurality of pieces of data in one message and publish the packaged data to the plurality of pieces of subscribing terminal equipment in a multicast mode.
In some embodiments, the information indicative of the data type of the data of the third service includes a string, integer or floating point; the data type of the fourth data includes a character string, integer or floating point, and information indicating the data type of the data of the fourth service is used to decode the fourth data.
In some embodiments, the information indicating the meaning of the data of the third service includes any one of: temperature, humidity, velocity, or methane concentration, etc.; the information indicating the data meaning of the data of the fourth service includes any one of: temperature, humidity, velocity, or methane concentration, etc.
It should be understood that in the embodiment of the present application, the first service, the second service, the third service, and the fourth service may be different services.
According to the method for transmitting data, the publishing terminal equipment can determine the publishing reference time according to the receiving time of the subscription message. Therefore, for single data, no matter what time is subscribed when subscribing the terminal equipment, the fixed publishing time can be determined; the distribution time of the data can be unified for a plurality of data, and the distribution time of the plurality of data can be aligned as much as possible. The method can realize simultaneous transmission of multiple data as much as possible and improves transmission efficiency.
Fig. 11 shows a schematic structural diagram of a communication apparatus 1100 according to an embodiment of the present application. The communication apparatus 1100 may be a device at the distribution end, a device in the distribution end, or a device that can be used in cooperation with the distribution end. In a possible implementation, the communications apparatus 1100 may include modules or units corresponding to one to perform the methods/operations/steps/actions performed by the publishing end device in the above method embodiments, where the units may be implemented by using hardware circuits, or by using software, or by using a combination of hardware circuits and software. In one possible implementation, the communication device 1100 includes: a processing unit 1110 and a transceiver unit 1120. It should be understood that the communication device shown in fig. 11 is only an example, and may include other units, or units similar in function to the respective units in fig. 11, or may not necessarily include all units in fig. 11.
It should be noted that, the processing unit in the embodiment of the present application may also be referred to as a processing module, and the transceiver unit may also be referred to as a transceiver module.
Fig. 12 shows a communication apparatus 1200 provided in an embodiment of the present application, where the communication apparatus 1200 may be a publisher device. The apparatus may include a processor 1210 and a transceiver 1230. The transceiver may include a transmitter and/or a receiver.
In some embodiments, the apparatus may further include a memory 1220, and the processor 1210, the transceiver 1230, and the memory 1220 communicate with each other through an internal connection path. The related functions performed by the processing unit 1110 in fig. 11 may be performed by the processor 1210, and the related functions performed by the transceiver unit 1120 may be performed by the processor 1210 controlling the transceiver 1230.
In some embodiments, processor 1210 may be a CPU, microprocessor, ASIC, special purpose processor, or one or more integrated circuits for performing the techniques of embodiments of the present application. In the alternative, a processor may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions). For example, a baseband processor, or a central processing unit. The baseband processor may be used to process communication protocols and communication data, and the central processor may be used to control a communication device (e.g., a network equipment, a terminal, or a chip, etc.), execute a software program, and process data of the software program.
In some embodiments, the processor 1210 may include one or more processors, including one or more CPUs, for example, where the processor is a CPU, the CPU may be a single-core CPU or a multi-core CPU.
The transceiver 1230 is configured to transmit and receive data and/or signals, and to receive data and/or signals. The transceiver may include a transmitter for transmitting data and/or signals and a receiver for receiving data and/or signals.
The memory 1220 includes, but is not limited to, random access memory (random access memory, RAM), read-only memory (ROM), erasable programmable memory (erasable programmable read only memory, EPROM), compact disc read-only memory (compact disc read-only memory, CD-ROM), and the memory 1520 for storing related instructions and data. The memory 1220 may be a separate device or integrated in the processor 1210.
In some embodiments, the communications apparatus 1200 can also include an output device and an input device. The output device(s) communicate with the processor 1210 and can display information in a variety of ways. For example, the output device may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a Cathode Ray Tube (CRT) display device, or a projector, etc. The input device(s) is in communication with the processor 1210 and may receive user input in a variety of ways. For example, the input device may be a book mouse, a keyboard, a touch screen device, a sensing device, or the like.
It will be appreciated that fig. 12 shows only a simplified design of a communication device. In practical applications, the apparatus may also include other necessary elements, including but not limited to any number of transceivers, processors, controllers, memories, etc., and all terminal devices capable of implementing the present application are within the scope of the present application.
In one possible design, the apparatus 1200 may be a chip, such as a communication chip, for example, that may be used in a distribution end device to implement the functions associated with the processor 1210 in the distribution end device. The chip can be a thread programmable gate array, an application specific integrated chip, a system chip, a central processing unit, a network processor, a digital signal processing circuit, a microcontroller which can realize related functions, and can also adopt a programmable controller or other integrated chips. The chip may optionally include one or more memories for storing computer programs or instructions which, when executed, cause the processor to perform the corresponding functions.
As shown in fig. 13, the embodiment of the present application further provides an apparatus 1300, which may be a communication apparatus or a chip in the communication apparatus, for implementing the function of the publishing end device in the method. The communication device includes:
At least one input-output interface 1310 and logic 1320. The input/output interface 1310 may be an input/output circuit, an input interface, an output interface, or the like. Logic 1320 may be a signal processor, chip, or other integrated circuit that may implement the methods of the present application.
Wherein at least one input-output interface 1310 is used for input or output of signals or data. Wherein the logic 1320 is configured to perform some or all of the steps of any of the methods provided by the embodiments of the present application.
The embodiment of the application also provides a device which can be a release end device or a logic circuit. The apparatus may be configured to perform the actions performed by the publisher device in the method embodiments described above.
The present application also provides a computer readable storage medium storing one or more programs or instructions which, when executed on a computer, cause the computer to perform the method of the above embodiments.
The embodiments of the present application also provide a computer program comprising a program or instructions which, when executed by a computer, enable the computer to perform the corresponding flow of the method of the embodiments described above.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
It should also be understood that the first, second, and various numerical numbers referred to herein are merely descriptive convenience and are not intended to limit the scope of embodiments of the present application.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (39)

1. A method of transmitting data, comprising:
the method comprises the steps that a publishing end device receives a first subscription message from a subscribing end device, wherein the first subscription message is used for subscribing a first service, the data format of data of the first service is unknown to the subscribing end device, and the subscribing end device comprises one or more devices;
the publishing end device publishes a first full package to the subscribing end device, wherein the first full package comprises first data of the first service and information for indicating a data format of the first data of the first service, and the information for indicating the data format of the first data of the first service comprises information for indicating a data type of the first data of the first service and information for indicating a data meaning of the first data of the first service.
2. The method according to claim 1, wherein the method further comprises:
the publishing end device determines a first simplified packet according to the first subscription message, wherein the first simplified packet comprises second data of the first service;
after the publishing end device publishes the first full-volume packet to the subscribing end device, the publishing end device publishes the first simplified packet to the subscribing end device, the time when the publishing end device publishes the first simplified packet is different from the time when the publishing end device publishes the first full-volume packet by N first publishing periods, the first publishing periods are publishing periods of the first service, and N is an integer greater than or equal to 1.
3. The method of claim 1 or 2, wherein the first subscription message includes an identification of the first service, the method further comprising:
and the publishing end device determines the first full package according to the identification of the first service in the first subscription message.
4. A method according to any one of claims 1 to 3, wherein the publishing end device publishes a first full package to the subscribing end device, comprising:
The publishing terminal equipment determines a first publishing reference moment according to the receiving moment of the first subscription message;
and the issuing terminal equipment issues the first full-quantity packet at the moment of the first issuing reference.
5. The method of claim 4, wherein after the publishing end device receives the first subscription message from the subscribing end device, the method further comprises:
the publishing terminal equipment receives a second subscription message from the subscribing terminal equipment, wherein the second subscription message is used for subscribing a second service, and the data format of the data of the second service is a data format known by the subscribing terminal equipment;
the publishing end device determines a second simplified packet according to the second subscription message, wherein the second simplified packet comprises data of the second service;
the publishing end device publishes the second simplified packet to the subscribing end device, the time of the publishing end device publishing the second simplified packet is different from the first publishing reference time by M second publishing periods, the second publishing periods are publishing periods of the second service, and M is an integer greater than or equal to 0.
6. The method according to any one of claims 1 to 5, wherein the publishing end device publishes a first full package to the subscribing end device, comprising:
When the number of the subscribing terminal devices is one, the publishing terminal device publishes the first full package to the subscribing terminal device through unicast; or alternatively
When the number of the subscriber-end devices is multiple, the publishing-end device publishes the first full package to the plurality of subscriber-end devices through multicast.
7. The method of claim 2, wherein the publishing end device publishes the first reduced package to the subscribing end device, comprising:
when the number of the subscribing terminal devices is one, the publishing terminal device publishes the first simplifying package to the subscribing terminal device through unicast; or alternatively
When the number of the subscriber-end devices is multiple, the publishing-end device publishes the first simplifying package to the subscriber-end devices through multicast.
8. The method of claim 5, wherein the publishing end device publishing the second reduced package to the subscribing end device comprises:
when the number of the subscribing terminal devices is one, the publishing terminal device publishes the second simplifying package to the subscribing terminal device through unicast; or alternatively
When the number of the subscriber-end devices is multiple, the publishing-end device publishes the second reduced package to the subscriber-end device through multicast.
9. The method according to any of claims 1 to 8, wherein the information indicating the data type of the first data of the first service comprises a string, integer or floating point.
10. A method of transmitting data, comprising:
the method comprises the steps that a subscribing terminal device sends a first subscription message to a publishing terminal device, wherein the first subscription message is used for subscribing a first service, the data format of data of the first service is unknown to the subscribing terminal device, and the subscribing terminal device comprises one or more devices;
the subscriber-side equipment receives a first full packet from the publisher-side equipment, wherein the first full packet comprises first data of the first service and information for indicating a data format of the first data of the first service, and the information for indicating the data format of the first data of the first service comprises information for indicating a data type of the first data of the first service and information for indicating a data meaning of the first data of the first service.
11. The method of claim 10, wherein after the subscriber-side device receives the first full package from the publisher-side device, the method further comprises:
The subscriber terminal equipment receives a first simplifying packet from the publishing terminal equipment, the first simplifying packet comprises second data of the first service, the time of the subscriber terminal equipment receiving the first simplifying packet is different from the time of the subscriber terminal equipment receiving the first full-quantity packet by N first publishing periods, the first publishing periods are publishing periods of the first service, and N is an integer greater than or equal to 1.
12. The method according to claim 10 or 11, wherein the first subscription message comprises an identification of the first service.
13. The method of any of claims 10 to 12, wherein the subscribing end device receives a first full package from the publishing end device, comprising:
the subscriber terminal equipment receives the first full package published by the publisher terminal equipment at the moment of the first publishing standard.
14. The method of claim 13, wherein after the subscriber-side device sends the first subscription message to the publisher-side device, the method further comprises:
the subscribing terminal device sends a second subscription message to the publishing terminal device, wherein the second subscription message is used for subscribing a second service, and the data format of the data of the second service is a data format known by the subscribing terminal device;
The subscribing terminal equipment receives a second simplified packet from the publishing terminal equipment, the second simplified packet comprises data of the second service, the time when the subscribing terminal equipment receives the second simplified packet is different from the first publishing reference time by M second publishing periods, the second publishing periods are publishing periods of the second service, and M is an integer greater than or equal to 0.
15. The method of any of claims 10 to 14, wherein the subscribing end device receives a first full package from the publishing end device, comprising:
when the number of the subscribing terminal devices is one, the subscribing terminal device receives the first full package published by the publishing terminal device through unicast; or alternatively
When the number of the subscriber-end devices is multiple, the subscriber-end devices receive the first full package published by the publishing-end devices through multicast.
16. The method of claim 11, wherein the subscriber-side device receiving the first reduced package from the publisher-side device comprises:
when the number of the subscribing terminal devices is one, the subscribing terminal device receives the first simplified packet which is published by the publishing terminal device through unicast; or alternatively
When the number of the subscriber-end devices is multiple, the subscriber-end devices receive the first simplified package published by the publishing-end devices through multicast.
17. The method of claim 14, wherein the subscriber-side device receiving a second reduced package from the publisher-side device comprises:
when the number of the subscribing terminal devices is one, the subscribing terminal device receives the second simplified packet which is published by the publishing terminal device through unicast; or alternatively
And when the number of the subscriber-end devices is multiple, the subscriber-end devices receive the second simplified package published by the publishing-end devices through multicast.
18. The method according to any of claims 1 to 17, wherein the information indicating the data type of the first data of the first service comprises a string, integer or floating point.
19. A method of transmitting data, comprising:
the method comprises the steps that a publishing end device receives a third subscription message from a subscribing end device, wherein the third subscription message is used for subscribing to a third service, and the subscribing end device comprises one or more devices;
the publishing terminal device determines a second publishing reference moment according to the receiving moment of the third subscription message;
And the publishing end equipment publishes the first data of the third service to the subscribing end equipment at the second publishing reference moment.
20. The method of claim 19, wherein after the publisher device receives a third subscription message from the subscriber device, the method further comprises:
the publishing terminal equipment receives a fourth subscription message from the subscribing terminal equipment, wherein the fourth subscription message is used for subscribing a fourth service;
the publishing terminal equipment publishes the data of the fourth service to the subscribing terminal equipment, the time of the publishing terminal equipment publishing the data of the fourth service is different from the second publishing reference time by M fourth publishing periods, the fourth publishing periods are the publishing periods of the fourth service, and M is an integer greater than or equal to 0.
21. The method according to claim 19 or 20, wherein the publishing end device publishes the first data of the third service to the subscribing end device at the second publishing reference time, comprising:
when the data format of the data of the third service is the data format unknown to the subscriber-end equipment, the publishing-end equipment publishes a third full-volume packet to the subscriber-end equipment at the second publishing reference moment, wherein the third full-volume packet comprises the first data of the third service and information for indicating the data format of the first data of the third service, and the information for indicating the data format of the first data of the third service comprises information for indicating the data type of the first data of the third service and information for indicating the data meaning of the first data of the third service; or alternatively
And when the data format of the data of the third service is the data format known by the subscriber-end equipment, the publishing-end equipment publishes the third simplifying packet to the subscriber-end equipment at the second publishing reference moment, wherein the third simplifying packet comprises the first data of the third service.
22. The method of claim 20, wherein the publishing end device publishing the data of the fourth service to the subscribing end device comprises:
when the data format of the data of the fourth service is the data format unknown to the subscriber-end equipment, the publishing-end equipment publishes a fourth full-volume packet to the subscriber-end equipment, wherein the fourth full-volume packet comprises the data of the fourth service and information for indicating the data format of the data of the fourth service, and the information for indicating the data format of the data of the fourth service comprises information for indicating the data type of the data of the fourth service and information for indicating the data meaning of a book of the fourth service; or alternatively
When the data format of the data of the fourth service is the data format unknown to the subscribing terminal device, the publishing terminal device publishes a fourth simplifying packet to the subscribing terminal device, wherein the fourth simplifying packet comprises the data of the fourth service; or alternatively
And when the data format of the data of the fourth service is the data format known by the subscriber-end equipment, the publishing-end equipment publishes the fourth simplifying packet to the subscriber-end equipment.
23. The method according to claim 19 or 20, wherein the publishing end device publishes the first data of the third service to the subscribing end device at the second publishing reference time, comprising:
when the number of the subscribing terminal devices is one, the publishing terminal device publishes the first data of the third service to the subscribing terminal device through unicast; or alternatively
When the number of the subscriber-end devices is multiple, the publishing-end device publishes the first data of the third service to the multiple subscriber-end devices through multicast.
24. The method of claim 20, wherein the publishing end device publishing the data of the fourth service to the subscribing end device comprises:
when the number of the subscribing terminal devices is one, the publishing terminal device publishes the data of the fourth service to the subscribing terminal device through unicast; or alternatively
When the number of the subscriber-end devices is multiple, the publishing-end device publishes the data of the fourth service to the multiple subscriber-end devices through multicast.
25. The method according to any of claims 19 to 24, wherein the information indicating the data type of the first data of the third service comprises a string, integer or floating point;
the information indicating the data type of the data of the fourth service includes a character string, integer or floating point.
26. A method of transmitting data, comprising:
the method comprises the steps that a subscribing terminal device sends a third subscription message to a publishing terminal device, wherein the third subscription message is used for subscribing a third service, and the subscribing terminal device comprises one or more devices;
and the subscriber terminal equipment receives the first data of the third service published by the publisher terminal equipment at the second publishing reference moment.
27. The method of claim 26, wherein after the subscriber-side device sends the third subscription message to the publisher-side device, the method further comprises:
the subscribing terminal device sends a fourth subscription message to the publishing terminal device, wherein the fourth subscription message is used for subscribing a fourth service;
the subscribing terminal equipment receives the data of the fourth service from the publishing terminal equipment, the time of the subscribing terminal equipment receiving the data of the fourth service is different from the second publishing reference time by M fourth publishing periods, the fourth publishing periods are the publishing periods of the fourth service, and M is an integer greater than or equal to 0.
28. The method according to claim 26 or 27, wherein the subscriber-side device receiving the first data of the third service published by the publisher-side device at a second publication reference time comprises:
when the data format of the data of the third service is the data format unknown to the subscriber-end equipment, the subscriber-end equipment receives a third full-quantity packet which is issued by the issue-end equipment at a second issue reference moment, wherein the third full-quantity packet comprises the first data of the third service and information for indicating the data format of the first data of the third service, and the information for indicating the data format of the first data of the third service comprises information for indicating the data type of the first data of the third service and information for indicating the data meaning of the first data of the third service; or alternatively
And when the data format of the data of the third service is the data format known by the subscribing terminal equipment, the subscribing terminal equipment receives a third simplifying packet which is issued by the issuing terminal equipment at a second issuing reference moment, wherein the third simplifying packet comprises the first data of the third service.
29. The method of claim 27, wherein the subscriber-side device receiving data from the fourth service of the publisher-side device comprises:
When the data format of the data of the fourth service is the data format unknown to the subscriber-side equipment, the subscriber-side equipment receives a fourth full-volume packet from the publisher-side equipment, wherein the fourth full-volume packet comprises the data of the fourth service and information for indicating the data format of the data of the fourth service, and the information for indicating the data format of the data of the fourth service comprises information for indicating the data type of the data of the fourth service and information for indicating the data meaning of a book of the fourth service; or alternatively
When the data format of the data of the fourth service is the data format unknown to the subscribing terminal device, the subscribing terminal device receives a fourth simplifying packet from the publishing terminal device, wherein the fourth simplifying packet comprises the data of the fourth service; or alternatively
And when the data format of the data of the fourth service is the data format known to the subscriber-end equipment, the subscriber-end equipment receives the fourth simplified packet from the publishing-end equipment.
30. The method according to claim 26 or 27, wherein the subscriber-side device receiving the first data of the third service published by the publisher-side device at a second publication reference time comprises:
When the number of the subscribing terminal devices is one, the subscribing terminal device receives first data of the third service which is published by the publishing terminal device through unicast; or alternatively
And when the number of the subscriber-end devices is multiple, the subscriber-end devices receive the first data of the third service published by the publishing-end devices through multicast.
31. The method of claim 27, wherein the subscriber-side device receiving data from the fourth service of the publisher-side device comprises:
when the number of the subscribing terminal devices is one, the subscribing terminal device receives the data of the fourth service published by the publishing terminal device through unicast; or alternatively
And when the number of the subscriber-end devices is multiple, the subscriber-end devices receive the data of the fourth service published by the publishing-end devices through multicast.
32. The method according to any of claims 26 to 31, wherein the information indicating the data type of the first data of the third service comprises a string, integer or floating point;
the information indicating the data type of the data of the fourth service includes a character string, integer or floating point.
33. An apparatus for transmitting data, comprising means for performing any one of claims 1 to 9 or performing the method of any one of claims 19 to 25.
34. An apparatus for transmitting data, comprising means for performing any of claims 10 to 18 or performing the method of any of claims 26 to 32.
35. A communication device, comprising: a processor coupled to a memory for storing a computer program, the processor for running the computer program to cause the communication device to perform the method of any one of claims 1 to 9, 19 to 25.
36. A communication device, comprising: a processor coupled with a memory for storing a computer program, the processor for running the computer program to cause the communication device to perform the method of any one of claims 10 to 18, 26 to 32.
37. A communication device according to claim 35 or 36, further comprising one or more of the memory and a transceiver for receiving signals and/or transmitting signals.
38. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a computer program or instructions which, when run on a computer, cause the method of any one of claims 1 to 9, 10 to 18, 19 to 25, 26 to 32 to be performed.
39. A computer program product comprising a computer program or instructions which, when run on a computer, cause the method of any one of claims 1 to 9, 10 to 18, 19 to 25, 26 to 32 to be performed.
CN202210601368.8A 2022-05-30 2022-05-30 Method and device for transmitting data Pending CN117201623A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210601368.8A CN117201623A (en) 2022-05-30 2022-05-30 Method and device for transmitting data
PCT/CN2023/096274 WO2023231892A1 (en) 2022-05-30 2023-05-25 Data transmission method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210601368.8A CN117201623A (en) 2022-05-30 2022-05-30 Method and device for transmitting data

Publications (1)

Publication Number Publication Date
CN117201623A true CN117201623A (en) 2023-12-08

Family

ID=88994760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210601368.8A Pending CN117201623A (en) 2022-05-30 2022-05-30 Method and device for transmitting data

Country Status (2)

Country Link
CN (1) CN117201623A (en)
WO (1) WO2023231892A1 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599895B (en) * 2008-06-04 2012-07-04 华为技术有限公司 Data processing method, wideband network gateway, strategy controller device and accessing node equipment
WO2017028061A1 (en) * 2015-08-14 2017-02-23 郭子明 Method for opening channel based on time
WO2017028062A1 (en) * 2015-08-14 2017-02-23 郭子明 Information prompting method for use when opening channel based on time
KR20170036634A (en) * 2015-09-23 2017-04-03 주식회사 케이티 Methods for providing subscription data in M2M system and Apparatuses thereof
CN109525625B (en) * 2017-09-20 2020-12-22 华为技术有限公司 Information subscription method and device
US10820236B2 (en) * 2018-02-27 2020-10-27 Verizon Patent And Licensing Inc. Method and system for carrier-initiated traffic tuning and communication of subscriber parameters
CN114598567A (en) * 2022-03-03 2022-06-07 深圳市元征科技股份有限公司 Communication method, apparatus and storage medium

Also Published As

Publication number Publication date
WO2023231892A1 (en) 2023-12-07

Similar Documents

Publication Publication Date Title
US9548869B2 (en) Systems and methods for implementing multicasting using personal area network “pan” wireless technology
CN106170969B (en) Context management
EP3861706B1 (en) Framework for dynamic brokerage and management of topics and data at the service layer
GB2468752A (en) Generating a list of discovered services available via a pan and establishing a connection
CN109996325B (en) Clock synchronization system and method of wireless sensor network
EP3592062B1 (en) Signal processing method and apparatus
TW202021405A (en) Data transmission method and device based on bluetooth broadcast and bluetooth device
CN109451853A (en) Indicate method and device, terminal and the base station of multi-service data multiplexing transmission
CN112449425B (en) Communication method and device
CN112422485B (en) Communication method and device of transmission control protocol
US20230044879A1 (en) Resource indication information transmission method, device, and system
CN117201623A (en) Method and device for transmitting data
JP6616184B2 (en) Data transmission method and apparatus
WO2022078183A1 (en) Method for determining transmission delay and electronic device
WO2022111478A1 (en) Communication method and apparatus, chip, storage medium, and program product
CN104038328A (en) Multi-screen interaction message transmission method, device and system
CN113556219B (en) Transmission method and related equipment for Multimedia Broadcast Multicast Service (MBMS)
CN112866897B (en) Positioning measurement method, terminal and network node
CN115884141A (en) Data transmission method based on wireless network Wi-Fi and electronic equipment
WO2023193250A1 (en) Communication method and communication apparatus
CN117255230B (en) Classification adjustment method, device and storage medium for transmission node
CN117216428B (en) Webpage resource request method, terminal equipment and computer readable storage medium
US20230319856A1 (en) Resource Processing Method, Apparatus, and Medium
US20210176821A1 (en) Information transmission method, apparatus, and system
WO2024061244A1 (en) Harq process identifier determining method and apparatus, device and storage medium

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