Method and device for transmitting data

By using full packets in the publish subscription mode to transmit data in unknown data format and include data format information, the problem that the subscription device cannot parse unknown data format is solved, and multiple data are carried in one message is realized, reducing signaling overhead.

CN117201623BActive Publication Date: 2025-04-04HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210601368.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-04-04
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

In the publish subscription mode, the subscription device cannot correctly parse data in unknown data formats, and multiple data are difficult to bear in one message, resulting in large signaling overhead.

Method used

By transmitting data in the form of a full package when the publishing device first publishes data in an unknown data format, the subscriber device can correctly parse it. Subsequently, data is transmitted in the form of a simplified packet to reduce the amount of data transmission.

Benefits of technology

It realizes the correct analysis of unknown data formats by the subscription device, reduces the number of interactions between the subscription device and the publishing device, saves signaling overhead, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117201623B_ABST
    Figure CN117201623B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and device for transmitting data, the method comprising: a publishing end device receives a first subscription message from at least one subscribing end device, the first subscription message is used to subscribe to a first service, and the data format of the data of the first service is unknown to the subscribing end device; the publishing end device publishes a first full package to the subscribing end device, the first full package includes the data of the first service and information indicating the data format of the data of the first service. The method and device for transmitting data provided by the present application can transmit the data type and data meaning while transmitting the data, while saving the number of interactions, and the subscribing end device can also correctly parse the data, which can effectively improve the transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a method and device for transmitting data. Background Art

[0002] Publish and subscribe is a widely used data transmission mode. In the publish and subscribe scenario, when the subscriber and publisher interact with each other, the subscriber needs to know the data format of the data published by the publisher so that the subscriber can correctly parse the corresponding data. The data format is generally agreed upon in advance. The subscriber cannot correctly parse data whose data format is unknown to the subscriber. At the same time, due to the different subscription times and publishing cycles of different data, it is difficult to publish multiple data to the subscriber through one message.

[0003] Therefore, how the subscriber device can correctly parse data in unknown data formats and how to carry multiple data in one message as much as possible to further save signaling overhead are issues that need to be solved urgently. Summary of the invention

[0004] An embodiment of the present application provides a method for transmitting data, which can improve the efficiency of data transmission.

[0005] In a first aspect, a method for transmitting data is provided, comprising: a publishing-end device receives a first subscription message from a subscribing-end device, the first subscription message is used to subscribe to a first service, the data format of the data of the first service is a data format unknown to the subscribing-end device, and the subscribing-end device includes one or more devices; the publishing-end device publishes a first full package to the subscribing-end device, the first full package includes first data of the first service and information for indicating the data format of the first data of the first service, the information for indicating the data format of the first data of the first service includes information for indicating the data type of the first data of the first service and information for indicating the data meaning of the first data of the first service.

[0006] In an embodiment of the present application, the data format of the data of the first business is not known in advance by the subscriber device. Therefore, when the publisher device publishes the data of the first business for the first time, it is published in the form of a first full package. Because the first full package contains the data of the first business and information indicating the data format of the data of the first business, the subscriber device can correctly parse the data of the first business and obtain its meaning. This method transmits data and the corresponding data format at the same time, which can save the number of interactions between the subscriber device and the publisher device. By prescribing the above-mentioned type of full package in the standard in advance, the subscriber device can correctly parse the data and obtain its meaning when receiving the manufacturer's extended data.

[0007] In combination with the first aspect, in certain implementations of the first aspect, the publishing-end device determines a first simplified package based on the first subscription message, and the first simplified package includes the second data of the first business; after the publishing-end device publishes the first full package to the subscribing-end device, the publishing-end device publishes the first simplified package to the subscribing-end device, and the time when the publishing-end device publishes the first simplified package differs from the time when the publishing-end device publishes the first full package by N first publishing cycles, and the first publishing cycle is the publishing cycle of the first business, and N is an integer greater than or equal to 1.

[0008] In an embodiment of the present application, for data in an unknown data format of a subscribing device, a simplified package transmission method can be used at any publishing time after the publisher first publishes the data in the form of a full package, which can reduce the amount of data transmission.

[0009] In combination with the first aspect, in some implementations 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.

[0010] In an embodiment of the present application, the subscription message carries an identifier of the data to be subscribed by the subscriber device, so the publisher device can determine the data subscribed by the subscriber device based on the identifier of the data, so that the publisher device can further determine the method of publishing the data based on the subscriber message.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the publishing device publishes a first full package to the subscribing device, including: the publishing device determines a first publishing reference time based on the reception time of the first subscription message; the publishing device publishes the first full package at the first publishing reference time.

[0012] It should be understood that the publishing end device can determine the first publishing reference time according to the reception time of the first subscription message (e.g., the first subscription message). The first publishing reference time is the time when the data of the first service (the first data of the first service) is first published. Thereafter, any publishing time of the data of the first service (the second data of the first service) can be determined according to the first publishing reference time and the publishing cycle of the first service.

[0013] In combination with the first aspect, in certain implementations of the first aspect, after the publishing device receives the first subscription message from the subscribing device, the method also includes: the publishing device receives a second subscription message from the subscribing device, the second subscription message is used to subscribe to a second service, and the data format of the data of the second service is data in a data format known to the subscribing device; the publishing device determines a second simplified package based on the second subscription message, and the second simplified package includes the data of the second service; the publishing device publishes the second simplified package to the subscribing device, and the time when the publishing device publishes the second simplified package differs from the first publishing reference time by M second publishing cycles, the second publishing cycle is the publishing cycle of the second service, and M is an integer greater than or equal to 0.

[0014] It should be understood that the time when the publishing end device receives the second subscription message can be any time after receiving the first subscription message. When the publishing end device receives the second subscription message after the publishing end device publishes the first full package, the publishing end device can determine the publishing time of the second service (including the first publishing time of the data of the second service) according to the first publishing reference time and the publishing cycle of the second service. In this case, 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, 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 package, the publishing end device can determine the publishing time of the data of the second service (including the first publishing time of the data of the second service) according to the first publishing reference time and the publishing cycle of the second service. In this case, the first publishing time of the data of the second service can be the same as the first publishing time of the data of the first service (the first publishing reference time), that is, M is equal to 0. It can also be understood that the data of the first service and the data of the second service may not be published at the same time at the first publishing reference time.

[0015] In an embodiment of the present application, a publishing end device determines a first publishing reference time. When the publishing end device receives a subscription message of other data (such as a second subscription message) at any time after receiving the first subscription message, it can further determine the publishing time according to the first publishing reference time and the publishing cycle of the other data. In other words, the first publishing time of the other data can be aligned with any publishing time of the data of the first business (including the first publishing reference time). Since the publishing cycle of the data of each business may be different, the subsequent publishing times of multiple data can be aligned as much as possible. This method can realize the packaging and sending of multiple data, thereby improving the efficiency of publishing data.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the publishing device publishes a first full package to the subscribing device, including: when there is one subscribing device, the publishing device publishes the first full package to the subscribing device via unicast; or when there are multiple subscribing devices, the publishing device publishes the first full package to multiple subscribing devices via multicast.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the publishing device publishes the first simplified package to the subscribing device, including: when there is one subscribing device, the publishing device publishes the first simplified package to the subscribing device via unicast; or when there are multiple subscribing devices, the publishing device publishes the first simplified package to the subscribing device via multicast.

[0018] In combination with the first aspect, in certain implementations of the first aspect, the publishing device publishes the second simplified package to the subscribing device, including: when there is one subscribing device, the publishing device publishes the second simplified package to the subscribing device via unicast; or when there are multiple subscribing devices, the publishing device publishes the second simplified package to the subscribing device via multicast.

[0019] In the embodiment of the present application, the publishing end device can use unicast or multicast to send the data subscribed by the subscribing end device according to different numbers of subscribing end devices, which can further improve the transmission efficiency.

[0020] In combination with the first aspect, in some implementations of the first aspect, the information for indicating the data type of the first data of the first service includes a string, an integer, or a floating point.

[0021] In combination with the first aspect, in certain implementations of the first aspect, the information for indicating the data meaning of the first data of the first service includes any one of the following: humidity, temperature, methane concentration or temperature, etc.

[0022] In a second aspect, a method for transmitting data is provided, including: a subscriber-end device sends a first subscription message to a publisher-end device, the first subscription message is used to subscribe to a first service, the data format of the data of the first service is a data format unknown to the subscriber-end device, and the subscriber-end device includes one or more devices; the subscriber-end device receives a first full packet from the publisher-end device, the first full packet includes first data of the first service and information for indicating the data format of the first data of the first service, the information for indicating the data format of the first data of the first service includes information for indicating the data type of the first data of the first service and information for indicating the data meaning of the first data of the first service.

[0023] In combination with the second aspect, in certain implementations of the second aspect, after the subscriber-end device receives the first full package from the publisher-end device, the method also includes: the subscriber-end device receives a first simplified package from the publisher-end device, the first simplified package including second data of the first service, the time when the subscriber-end device receives the first simplified package differs from the time when the subscriber-end device receives the first full package by N first publishing cycles, the first publishing cycle being the publishing cycle of the first service, and N is an integer greater than or equal to 1.

[0024] In combination with the second aspect, in some implementations of the second aspect, the first subscription message includes an identifier of the first service.

[0025] In combination with the second aspect, in some implementations of the second aspect, the subscription-end device receives a first full package from the publishing-end device, including: the subscription-end device receives the first full package published by the publishing-end device at a first publishing reference time.

[0026] In combination with the second aspect, in certain implementations of the second aspect, after the subscriber-end device sends a first subscription message to the publisher-end device, the method also includes: the subscriber-end device sends a second subscription message to the publisher-end device, the second subscription message is used to subscribe to a second service, and the data format of the data of the second service is a data format known to the subscriber-end device; the subscriber-end device receives a second simplified package from the publisher-end device, the second simplified package includes the data of the second service, the time when the subscriber-end device receives the second simplified package differs from the first publishing reference time by M second publishing cycles, the second publishing cycle is the publishing cycle of the second service, and M is an integer greater than or equal to 0.

[0027] In combination with the second aspect, in certain implementations of the second aspect, the subscriber device receives a first full packet from the publisher device, including: when there is one subscriber device, the subscriber device receives the first full packet published by the publisher device via unicast; or when there are multiple subscriber devices, the subscriber device receives the first full packet published by the publisher device via multicast.

[0028] In combination with the second aspect, in certain implementations of the second aspect, the subscriber device receives the first simplified package from the publisher device, including: when there is one subscriber device, the subscriber device receives the first simplified package published by the publisher device via unicast; or when there are multiple subscriber devices, the subscriber device receives the first simplified package published by the publisher device via multicast.

[0029] In combination with the second aspect, in certain implementations of the second aspect, the subscriber device receives the second simplified package from the publisher device, including: when there is one subscriber device, the subscriber device receives the second simplified package published by the publisher device via unicast; or when there are multiple subscriber devices, the subscriber device receives the second simplified package published by the publisher device via multicast.

[0030] In combination with the second aspect, in some implementations of the second aspect, the information for indicating the data type of the first data of the first service includes a string, an integer, or a floating point.

[0031] In combination with the second aspect, in certain implementations of the second aspect, the information used to indicate the data meaning of the first data of the first service includes any one of the following: humidity, temperature, methane concentration or temperature, etc.

[0032] According to a third aspect, a method for transmitting data is provided, including: a publishing device receives a third subscription message from a subscribing device, the third subscription message is used to subscribe to a third service, and the subscribing device includes one or more devices; the publishing device determines a second publishing reference time according to the time when the third subscription message is received; and the publishing device publishes the first data of the third service to the subscribing device at the second publishing reference time.

[0033] In the embodiment of the present application, the publishing end device can determine the publishing reference time (the second publishing reference time) according to the time of receiving the first subscription message (the third subscription message), and obtain the accurate time of data publishing. When the publishing end device needs to publish multiple data later, it can determine the publishing time of multiple data respectively based on the publishing reference time, so that multiple data can be packaged and sent as much as possible, thereby improving data transmission efficiency.

[0034] In combination with the third aspect, in certain implementations of the third aspect, after the publishing-end device receives the third subscription message from the subscribing-end device, the method also includes: the publishing-end device receives a fourth subscription message from the subscribing-end device, and the fourth subscription message is used to subscribe to a fourth service; the publishing-end device publishes the data of the fourth service to the subscribing-end device, and the time when the publishing-end device publishes the data of the fourth service differs from the second publishing reference time by M fourth publishing cycles, the fourth publishing cycle is the publishing cycle of the fourth service, and M is an integer greater than or equal to 0.

[0035] In the embodiment of the present application, the publishing end device can determine the publishing reference time according to the time when the subscription message is received. Therefore, for a single data, no matter when the subscriber end device subscribes, a fixed publishing time can be determined; for multiple data, the publishing time of the data can also be unified, and the publishing time of multiple data can be aligned as much as possible. This method can also realize the simultaneous transmission of multiple data as much as possible, thereby improving the transmission efficiency.

[0036] In combination with the third aspect, in certain implementations of the third aspect, the publishing-end device publishes the 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 a data format unknown to the subscribing-end device, the publishing-end device publishes a third full package to the subscribing-end device at the second publishing reference time, the third full package including the first data of the third service and information indicating the data format of the first data of the third service, the information indicating the data format of the first data of the third service including information indicating the data type of the first data of the third service and information 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 a data format known to the subscribing-end device, the publishing-end device publishes the third simplified package to the subscribing-end device at the second publishing reference time, the third simplified package including the first data of the third service.

[0037] In combination with the third aspect, in certain implementations of the third aspect, the publishing-end device publishes the data of the fourth business to the subscribing-end device, including: when the data format of the data of the fourth business is a data format unknown to the subscribing-end device, the publishing-end device publishes a fourth full package to the subscribing-end device, the fourth full package including the data of the fourth business and information for indicating the data format of the data of the fourth business, the information for indicating the data format of the data of the fourth business including information for indicating the data type of the data of the fourth business and information for indicating the data meaning of the book of the fourth business; or when the data format of the data of the fourth business is a data format unknown to the subscribing-end device, the publishing-end device publishes a fourth simplified package to the subscribing-end device, the fourth simplified package including the data of the fourth business; or when the data format of the data of the fourth business is a data format known to the subscribing-end device, the publishing-end device publishes the fourth simplified package to the subscribing-end device.

[0038] In the embodiment of the present application, when the publishing end device publishes data in an unknown data format for the first time, the data needs to be published in the form of a full package, and the data can be published in the form of a simplified package at any subsequent publishing time; when the publishing end device publishes data in a known data format for the subscribing end device, the data can be published in the form of a simplified package. This can ensure that the subscribing end device correctly parses the data while minimizing the amount of data transmitted.

[0039] In combination with the third aspect, in certain implementation methods of the third aspect, the publishing device publishes the first data of the third service to the subscribing device at the second publishing reference time, including: when there is one subscribing device, the publishing device publishes the first data of the third service to the subscribing device via unicast; or when there are multiple subscribing devices, the publishing device publishes the first data of the third service to multiple subscribing devices via multicast.

[0040] In combination with the third aspect, in certain implementations of the third aspect, the publishing device publishes the data of the fourth service to the subscribing device, including: when there is one subscribing device, the publishing device publishes the data of the fourth service to the subscribing device via unicast; or when there are multiple subscribing devices, the publishing device publishes the data of the fourth service to multiple subscribing devices via multicast.

[0041] In the embodiment of the present application, the publishing end device can use unicast or multicast to send the data subscribed by the subscribing end device according to different numbers of subscribing end devices, which can further improve the transmission efficiency.

[0042] In combination with the third aspect, in certain implementations of the third aspect, the information used to indicate the data type of the first data of the third business includes a string, an integer, or a floating point; the information used to indicate the data type of the data of the fourth business includes a string, an integer, or a floating point.

[0043] In combination with the third aspect, in certain implementations of the third aspect, the data meaning information of the first data of the third business includes any one of the following: humidity, temperature, speed or methane concentration, etc.; or the data meaning information of the data of the fourth business includes any one of the following: humidity, temperature, speed or methane concentration, etc.

[0044] In a fourth aspect, a method for transmitting data is provided, comprising: a subscribing device sends a third subscription message to a publishing device, the third subscription message is used to subscribe to a third service, the subscribing device includes one or more devices; the subscribing device receives the first data of the third service published by the publishing device at a second publishing reference time.

[0045] In combination with the fourth aspect, in certain implementations of the fourth aspect, after the subscribing device sends a third subscription message to the publishing device, the method also includes: the subscribing device sends a fourth subscription message to the publishing device, and the fourth subscription message is used to subscribe to a fourth service; the subscribing device receives data of the fourth service from the publishing device, and the time when the subscribing device receives the data of the fourth service differs from the second publishing reference time by M fourth publishing cycles, the fourth publishing cycle is the publishing cycle of the fourth service, and M is an integer greater than or equal to 0.

[0046] In combination with the fourth aspect, in certain implementations of the fourth aspect, the subscription-end device receives the first data of the third service published by the publishing-end device at the second publishing reference time, including: when the data format of the data of the third service is a data format unknown to the subscription-end device, the subscription-end device receives the third full package published by the publishing-end device at the second publishing reference time, the third full package including the first data of the third service and information for indicating the data format of the first data of the third service, the information for indicating the data format of the first data of the third service including 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 a data format known to the subscription-end device, the subscription-end device receives the third simplified package published by the publishing-end device at the second publishing reference time, the third simplified package including the first data of the third service.

[0047] In combination with the fourth aspect, in certain implementations of the fourth aspect, the subscriber-end device receives the data of the fourth service from the publisher-end device, including: when the data format of the data of the fourth service is a data format unknown to the subscriber-end device, the subscriber-end device receives a fourth full packet from the publisher-end device, the fourth full packet including the data of the fourth service and information for indicating the data format of the data of the fourth service, the information for indicating the data format of the data of the fourth service including information for indicating the data type of the data of the fourth service and information for indicating the meaning of the data of the fourth service; or when the data format of the data of the fourth service is a data format unknown to the subscriber-end device, the subscriber-end device receives a fourth simplified packet from the publisher-end device, the fourth simplified packet including 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 simplified packet from the publisher-end device.

[0048] In combination with the fourth aspect, in certain implementations of the fourth aspect, the subscription-end device receives the first data of the third service published by the publishing-end device at the second publishing reference time, including: when there is one subscription-end device, the subscription-end device receives the first data of the third service published by the publishing-end device via unicast; or when there are multiple subscription-end devices, the subscription-end device receives the first data of the third service published by the publishing-end device via multicast.

[0049] In combination with the fourth aspect, in certain implementations of the fourth aspect, the subscriber-end device receives data of the fourth service from the publisher-end device, including: when there is one subscriber-end device, the subscriber-end device receives data of the fourth service published by the publisher-end device via unicast; or when there are multiple subscriber-end devices, the subscriber-end device receives data of the fourth service published by the publisher-end device via multicast.

[0050] In combination with the fourth aspect, in certain implementations of the fourth aspect, the information used to indicate the data type of the first data of the third business includes a string, an integer, or a floating point; the information used to indicate the data type of the data of the fourth business includes a string, an integer, or a floating point.

[0051] In combination with the fourth aspect, in certain implementations of the fourth aspect, the information used to indicate the data meaning of the data of the third business includes any one of the following: humidity, temperature, speed or methane concentration, etc.; or the information used to indicate the data meaning of the data of the fourth business includes any one of the following: humidity, temperature, speed or methane concentration, etc.

[0052] In a fifth aspect, a device for transmitting data is provided, including a transceiver unit for receiving a first subscription message from a subscriber-end device, the first subscription message being used to subscribe to a first service, the data format of the data of the first service being a data format unknown to the subscriber-end device, and the subscriber-end device including one or more devices; the transceiver unit is also used to publish a first full package to the subscriber-end device, the first full package including the first data of the first service and information indicating the 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 the data type of the first data of the first service and information indicating the data meaning of the first data of the first service.

[0053] In combination with the fifth aspect, in certain implementations of the fifth aspect, the device also includes a processing unit, and the method also includes: the processing unit is used to determine a first simplified package based on the first subscription message, and the first simplified package includes the second data of the first service; the transceiver unit is also used to publish the first simplified package to the subscriber device after publishing the first full package to the subscriber device, and the time of publishing the first simplified package differs from the time of publishing the first full package by N first publishing cycles, and the first publishing cycle is the publishing cycle of the first service, and N is an integer greater than or equal to 1.

[0054] In combination with the fifth aspect, in certain implementations of the fifth aspect, the first subscription message includes an identifier of the first service, and the method further includes: the processing unit is also used to determine the first full package based on the identifier of the first service in the first subscription message.

[0055] In combination with the fifth aspect, in certain implementations of the fifth aspect, the processing unit is also used for the device to determine a first publishing reference time based on the reception time of the first subscription message; the transceiver unit is specifically used to publish the first full package at the first publishing reference time.

[0056] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver unit is further used to receive a second subscription message from the subscriber-end device, where the second subscription message is used to subscribe to a second service, and the data format of the second service is a data format known to the subscriber-end device; the processing unit is further used to determine a second simplified package based on the second subscription message, where the second simplified package includes data of the second service; the transceiver unit is further used to publish the second simplified package to the subscriber-end device, and the time for publishing the second simplified package differs from the first publishing reference time by M second publishing cycles, where the second publishing cycle is the publishing cycle of the second service, and M is an integer greater than or equal to 0.

[0057] In combination with the fifth aspect, in certain implementations of the fifth aspect, the receiving unit is specifically used to publish the first full package to the subscriber-end device via unicast when there is one subscriber-end device; or the receiving unit is specifically used to publish the first full package to multiple subscriber-end devices via multicast when there are multiple subscriber-end devices.

[0058] In combination with the fifth aspect, in certain implementations of the fifth aspect, the receiving unit is specifically used to publish the first simplified package to the subscriber device via unicast when there is one subscriber device; or the receiving unit is specifically used to publish the first simplified package to the subscriber device via multicast when there are multiple subscriber devices.

[0059] In combination with the fifth aspect, in certain implementations of the fifth aspect, the receiving unit is specifically used to publish the second simplified package to the subscriber device via unicast when there is one subscriber device; or the receiving unit is specifically used to publish the second simplified package to the subscriber device via multicast when there are multiple subscriber devices.

[0060] In combination with the fifth aspect, in certain implementations of the fifth aspect, the information for indicating the data type of the first data of the first business includes a string, an integer, or a floating point.

[0061] In combination with the fifth aspect, in certain implementations of the fifth aspect, the information used to indicate the data meaning of the first data of the first service includes any one of the following: humidity, temperature, methane concentration or temperature, etc.

[0062] In a sixth aspect, a device for transmitting data is provided, comprising: a transceiver unit, used to send a first subscription message to a publishing end device, the first subscription message is used to subscribe to a first service, the data format of the data of the first service is a data format unknown to the device, and the device comprises one or more; the transceiver unit is also used to receive a first full packet from the publishing end device, the first full packet includes the first data of the first service and information for indicating the data format of the first data of the first service, the information for indicating the data format of the first data of the first service includes information for indicating the data type of the first data of the first service and information for indicating the data meaning of the first data of the first service.

[0063] In combination with the sixth aspect, in certain implementations of the sixth aspect, the transceiver unit is also used to receive a first simplified packet from the publishing end device, the first simplified packet including the second data of the first service, and the time of receiving the first simplified packet differs from the time of receiving the first full packet by N first publishing cycles, the first publishing cycle being the publishing cycle of the first service, and N is an integer greater than or equal to 1.

[0064] In combination with the sixth aspect, in certain implementations of the sixth aspect, the first subscription message includes an identifier of the first service.

[0065] In combination with the sixth aspect, in certain implementations of the sixth aspect, the transceiver unit is specifically used to receive the first full packet published by the publishing end device at the first publishing reference time.

[0066] In combination with the sixth aspect, in certain implementations of the sixth aspect, the transceiver unit is further used 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 the data format of the data of the second service is a data format known to the device; the transceiver unit is also used to receive a second simplified package from the publishing end device, where the second simplified package includes the data of the second service, and the time of receiving the second simplified package differs from the first publishing reference time by M second publishing cycles, where the second publishing cycle is the publishing cycle of the second service, and M is an integer greater than or equal to 0.

[0067] In combination with the sixth aspect, in certain implementations of the sixth aspect, the transceiver unit is specifically used to receive the first full packet published by the publishing end device through unicast when there is only one device; or the transceiver unit is specifically used to receive the first full packet published by the publishing end device through multicast when there are multiple devices.

[0068] In combination with the sixth aspect, in certain implementations of the sixth aspect, the transceiver unit is specifically used to receive the first simplified packet published by the publishing end device via unicast when there is one device; or the transceiver unit is specifically used to receive the first simplified packet published by the publishing end device via multicast when there are multiple devices.

[0069] In combination with the sixth aspect, in certain implementations of the sixth aspect, the transceiver unit is specifically used to receive the second simplified packet published by the publishing end device via unicast when there is one device; or the transceiver unit is specifically used to receive the second simplified packet published by the publishing end device via multicast when there are multiple devices.

[0070] In combination with the sixth aspect, in certain implementations of the sixth aspect, the information used to indicate the data type of the first data of the first business includes a string, an integer, or a floating point.

[0071] In combination with the sixth aspect, in certain implementations of the sixth aspect, the information used to indicate the data meaning of the first data of the first service includes any one of the following: humidity, temperature, methane concentration or temperature, etc.

[0072] In the seventh aspect, a device for transmitting data is provided, including: a transceiver unit, used to receive a third subscription message from a subscription-end device, the third subscription message is used to subscribe to a third service, and the subscription-end device includes one or more devices; a determination unit, used to determine a second publishing reference time according to the reception time of the third subscription message; the transceiver unit is also used to publish the first data of the third service to the subscription-end device at the second publishing reference time.

[0073] In combination with the seventh aspect, in certain implementations of the seventh aspect, the transceiver unit is further used to receive a fourth subscription message from the subscription-end device, where the fourth subscription message is used to subscribe to a fourth service; the transceiver unit is further used to publish data of the fourth service to the subscription-end device, and the time for publishing the data of the fourth service differs from the second publishing reference time by M fourth publishing cycles, where the fourth publishing cycle is the publishing cycle of the fourth service, and M is an integer greater than or equal to 0.

[0074] In combination with the seventh aspect, in certain implementations of the seventh aspect, the transceiver unit is specifically used to publish a third full package to the subscriber-end device at the second publishing reference time when the data format of the data of the third service is a data format unknown to the subscriber-end device, and the third full package includes 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 includes 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 the transceiver unit is specifically used to publish the third simplified package to the subscriber-end device at the second publishing reference time when the data format of the data of the third service is a data format known to the subscriber-end device, and the third simplified package includes the first data of the third service.

[0075] In combination with the seventh aspect, in certain implementations of the seventh aspect, the transceiver unit is specifically used to publish a fourth full package to the subscriber-end device when the data format of the data of the fourth service is a data format unknown to the subscriber-end device, the fourth full package including the data of the fourth service and information for indicating the data format of the data of the fourth service, the information for indicating the data format of the data of the fourth service including information for indicating the data type of the data of the fourth service and information for indicating the data meaning of the book of the fourth service; or the transceiver unit is specifically used to publish a fourth simplified package to the subscriber-end device when the data format of the data of the fourth service is a data format unknown to the subscriber-end device, the fourth simplified package including the data of the fourth service; or the transceiver unit is specifically used to publish the fourth simplified package to the subscriber-end device when the data format of the fourth data is a data format known to the subscriber-end device.

[0076] In combination with the seventh aspect, in certain implementation methods of the seventh aspect, the transceiver unit is specifically used to publish the first data of the third service to the subscriber-end device via unicast when there is one subscriber-end device; or the transceiver unit is specifically used to publish the first data of the third service to multiple subscriber-end devices via multicast when there are multiple subscriber-end devices.

[0077] In combination with the seventh aspect, in certain implementation methods of the seventh aspect, the transceiver unit is specifically used to publish the data of the fourth service to the subscriber-end device via unicast when there is one subscriber-end device; or the transceiver unit is specifically used to publish the data of the fourth service to multiple subscriber-end devices via multicast when there are multiple subscriber-end devices.

[0078] In combination with the seventh aspect, in certain implementations of the seventh aspect, the information used to indicate the data type of the first data of the third business includes a string, an integer, or a floating point; the information used to indicate the data type of the data of the fourth business includes a string, an integer, or a floating point.

[0079] In combination with the seventh aspect, in certain implementations of the seventh aspect, the data meaning information of the first data of the third business includes any one of the following: humidity, temperature, speed or methane concentration, etc.; or the data meaning information of the data of the fourth business includes any one of the following: humidity, temperature, speed or methane concentration, etc.

[0080] In the eighth aspect, a device for transmitting data is provided, including: a transceiver unit, used to send a third subscription message to a publishing end device, the third subscription message is used to subscribe to a third service, and the device includes one or more; the transceiver unit is also used to receive the first data of the third service published by the publishing end device at a second publishing reference time.

[0081] In combination with the eighth aspect, in certain implementations of the eighth aspect, the transceiver unit is further used to send a fourth subscription message to the publishing end device, and the fourth subscription message is used to subscribe to a fourth service; the transceiver unit is also used to receive data of the fourth service from the publishing end device, and the time of receiving the data of the fourth service differs from the second publishing reference time by M fourth publishing cycles, and the fourth publishing cycle is the publishing cycle of the fourth service, and M is an integer greater than or equal to 0.

[0082] In combination with the eighth aspect, in certain implementations of the eighth aspect, the transceiver unit is specifically used to receive a third full packet published by the publishing end device at the second publishing reference time when the data format of the data of the third service is a data format unknown to the device, the third full packet including the first data of the third service and information for indicating the data format of the first data of the third service, the information for indicating the data format of the first data of the third service including 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 the transceiver unit is specifically used to receive a third simplified packet published by the publishing end device at the second publishing reference time when the data format of the data of the third service is a data format known to the device, the third simplified packet including the first data of the third service.

[0083] In combination with the eighth aspect, in certain implementations of the eighth aspect, the transceiver unit is specifically used to receive a fourth full packet from the publishing end device when the data format of the data of the fourth service is a data format unknown to the device, the fourth full packet including the data of the fourth service and information for indicating the data format of the data of the fourth service, the information for indicating the data format of the data of the fourth service including information for indicating the data type of the data of the fourth service and information for indicating the data meaning of the book of the fourth service; or the transceiver unit is specifically used to receive a fourth simplified packet from the publishing end device when the data format of the data of the fourth service is a data format unknown to the device, the fourth simplified packet including the data of the fourth service; or the transceiver unit is specifically used to receive the fourth simplified packet from the publishing end device when the data format of the data of the fourth service is a data format known to the device.

[0084] In combination with the eighth aspect, in certain implementations of the eighth aspect, the transceiver unit is specifically used to receive the first data of the third service published by the publishing end device via unicast when there is one device; or the transceiver unit is specifically used to receive the first data of the third service published by the publishing end device via multicast when there are multiple devices.

[0085] In combination with the eighth aspect, in certain implementations of the eighth aspect, the transceiver unit is specifically used to receive the data of the fourth service published by the publishing end device through unicast when the device is one; or the transceiver unit is specifically used to receive the data of the fourth service published by the publishing end device through multicast when the device is multiple.

[0086] In combination with the eighth aspect, in certain implementations of the eighth aspect, the information used to indicate the data type of the first data of the third business includes a string, an integer, or a floating point; the information used to indicate the data type of the data of the fourth business includes a string, an integer, or a floating point.

[0087] In combination with the eighth aspect, in certain implementations of the eighth aspect, the information used to indicate the data meaning of the data of the third business includes any one of the following: humidity, temperature, speed or methane concentration, etc.; or the information used to indicate the data meaning of the data of the fourth business includes any one of the following: humidity, temperature, speed or methane concentration, etc.

[0088] In a ninth aspect, a communication device is provided, comprising: a processor coupled to a memory, the memory being used to store a computer program, the processor being used to run the computer program, so that the communication device executes the method as in the first aspect above and any possible implementation thereof, or, executes the method as in the second aspect above and any possible implementation thereof, or, executes the method as in the third aspect above and any possible implementation thereof, or, executes the method as in the fourth aspect above and any possible implementation thereof.

[0089] In the tenth aspect, a computer-readable storage medium is provided, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the method in the first aspect and any possible implementation thereof is executed, or the method in the second aspect and any possible implementation thereof is executed, or the method in the third aspect and any possible implementation thereof is executed, or the method in the fourth aspect and any possible implementation thereof is executed.

[0090] In the eleventh aspect, a computer program product is provided, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the method in the first aspect and any possible implementation thereof is executed, or the method in the second aspect and any possible implementation thereof is executed, or the method in the third aspect and any possible implementation thereof is executed, or the method in the fourth aspect and any possible implementation thereof is executed.

[0091] In the twelfth aspect, a computer program is provided, which, when running on a computer, causes the method in the first aspect and any possible implementation thereof to be executed, or causes the method in the second aspect and any possible implementation thereof to be executed, or causes the method in the third aspect and any possible implementation thereof to be executed, or causes the method in the fourth aspect and any possible implementation thereof to be executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] Figure 1 This is a schematic diagram of a publish-subscribe system provided in an embodiment of the present application.

[0093] Figure 2 It is a schematic diagram of a publish-subscribe scenario provided in an embodiment of the present application.

[0094] Figure 3 It is a schematic flow chart of a method for transmitting data provided in an embodiment of the present application.

[0095] Figure 4This is a schematic diagram of the full packet field information provided in an embodiment of the present application.

[0096] Figure 5 It is a schematic diagram of the full package provided in the embodiment of the present application.

[0097] Figure 6 It is a schematic flow chart of another method for transmitting data provided in an embodiment of the present application.

[0098] Figure 7 It is a schematic diagram of a simplified package provided in an embodiment of the present application.

[0099] Figure 8 It is a schematic diagram of a method for transmitting data in a publish-subscribe mode provided in an embodiment of the present application.

[0100] Fig. 9 This is a schematic diagram of data release time alignment provided in an embodiment of the present application.

[0101] Fig.10 It is a schematic flow chart of another method for transmitting data provided in an embodiment of the present application.

[0102] Fig.11 It is an exemplary structural diagram of a communication device according to an embodiment of the present application.

[0103] Fig.12 It is an exemplary structural diagram of a communication device according to another embodiment of the present application.

[0104] Fig.13 This is a schematic structural diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0105] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0106] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD) system, fifth generation (5G) system or new radio (NR), or communication systems evolved after 5G (for example, 6G communication system) or Ethernet system, etc. This application is not limited to this.

[0107] The terminal device in the embodiment of the present application may be a device for realizing a wireless communication function, such as a terminal or a chip that can be used in a terminal, etc. Among them, the terminal device may refer to a user equipment (UE), an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent or a user device. The terminal device may also be a wireless terminal in industrial control, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc. Alternatively, the terminal may be a terminal in a vehicle-to-everything (V2X) network (such as a vehicle-to-everything device), a terminal in a device-to-device communication, or a terminal in a machine-to-machine (M2M) communication, a terminal device in a 5G network, a terminal device in a communication system that evolves after 5G, or a terminal device in a public land mobile communication network (PLMN) that evolves in the future, etc., and the embodiment of the present application does not limit this.

[0108] In the embodiment provided in the present application, the publishing end device may be a publisher, and the subscribing end device may be a subscriber. The publishing end device and the subscribing end device may be applied to Figure 1 The publish-subscribe system shown in the figure implements message interaction. The publish-subscribe system is a middleware system in which participants (participating devices) in a distributed system interact in a publish-subscribe manner. In the publish-subscribe system, the information exchanged between the producer and consumer of information is called an event. Among them, the producer of information is called a publisher, and the consumer of information is called a subscriber. Both the publisher and the subscriber can be called clients.

[0109] Figure 2 A schematic diagram of a publish-subscribe scenario is shown. When a publisher device and a subscriber device are exchanging data, the subscriber device is usually aware of the data format of the data published by the publisher. When the subscriber device receives the published data, the subscriber device can correctly parse the data and determine the correct meaning of the data. For example, the data format of the data can be pre-set in the standard, for example Figure 2However, for data that is not written into the data format in the standard, the subscriber device is unknown to the data format of such data. Therefore, after receiving such data published by the publisher device, the subscriber device cannot correctly parse and understand the meaning of such data. For example, Figure 2 The data in the extended data set 3. The data format of which is unknown in advance to the subscriber device may be data extended by the manufacturer, which is not recorded in the standard. In addition, the publisher 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 of dividing the data sets is not limited.

[0110] There are three methods in the prior art for the situation where the subscriber device subscribes to data in an unknown data format. First, after the publisher device expands the data in the unknown data format, the subscriber device also expands synchronously to ensure that the subscriber device can correctly parse the data. This method requires synchronous modification of the subscriber device, but the subscriber device and the publisher may not be implemented by the same manufacturer. Not being the same manufacturer makes the above synchronous expansion difficult. Second, a data format query process between the subscriber device and the publisher device is added to the standard. When the subscriber device subscribes to the extended data, it needs to first query the data format of the extended data. This method increases the number of interactions. Third, an interaction is added to the standard. When the publisher device publishes the extended data, it first transmits the data format and then transmits the data. This method increases the number of interactions. In summary, the existing methods cannot solve the problem of the subscriber device correctly parsing the unknown data format data under the original number of interactions or the relatively simple implementation. Therefore, in order to enable the extended data to be correctly parsed by the subscriber device, the present application provides a method for transmitting data. In the scenario of publishing and subscribing, by improving the data transmission process, the subscriber device can correctly and conveniently parse the extended data.

[0111] Figure 3 FIG. 3 is a schematic flow chart of a method 300 for transmitting data provided in an embodiment of the present application. The method can be applied to Figure 1 In the scenario shown, the specific steps are as follows:

[0112] S301, a publishing end device receives a first subscription message, and correspondingly, a subscribing end device sends a first subscription message.

[0113] It should be understood that the first subscription message is used to subscribe to the first service, and the data format of the data of the first service is a data format unknown to the subscription end device. The data of the first service may also be a data set. It can also be understood that the data of the first service is not pre-defined in the standard and is data extended by the manufacturer.

[0114] S302, the publishing end device publishes the first full package, and correspondingly, the subscribing end device receives the first full package.

[0115] 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 package includes the first data of the first service and information for indicating the 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 includes information for indicating the first data type of the first service and information for indicating the data meaning of the first data of the first service. A full package is a way of data transmission.

[0116] For ease of understanding, Figure 4 A schematic diagram of field information in a full packet is shown. Specifically, the field information in the full packet includes field type, field value, and field meaning. Figure 5 A schematic diagram of a full package is shown. When there are multiple data, it can be presented as a data set. A data set can be a field list, which is composed of multiple fields. Among them, the field type and field meaning are auxiliary information, which are used to help parse the field and obtain the meaning corresponding to the field value. For example, Figure 5 The field value is the first data of the first business, the field type is information used to indicate the data type of the first data of the first business, and the field meaning is information used to indicate the data meaning of the first data of the first business.

[0117] Specifically, the field type can indicate the type corresponding to the field value, such as string, integer or floating point, which can be used to correctly parse the field value; the field meaning can indicate the attribute of the communication device corresponding to the field value, such as the field value represents humidity, temperature, speed or methane concentration, which can be used to obtain the meaning corresponding to the field value. It can be understood that the above two types of information are used to indicate the data format. The above two types of field information can be used to correctly parse the data and obtain the data meaning.

[0118] 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.

[0119] In the method for transmitting data provided in an embodiment of the present application, the data format of the data of the first business is not known in advance by the subscriber device. Therefore, when the publisher device publishes the data of the first business (the first data of the first business) for the first time, it is published in the form of a first full package. Because the first full package contains information for indicating the data format, the subscriber device can correctly parse the data and obtain its meaning. This method transmits data and the corresponding data format at the same time, which can save the number of interactions between the subscriber device and the publisher device. By prescribing the above-mentioned type of full package in the standard in advance, the subscriber device can correctly parse the data and obtain its meaning when receiving the manufacturer's extended data.

[0120] Figure 6 FIG. 6 is a schematic flow chart of another method 600 for transmitting data provided in an embodiment of the present application. The method can be applied to Figure 1 In the scenario shown, the specific steps are as follows:

[0121] S601, a publishing end device receives a first subscription message, and correspondingly, a subscribing end device sends a first subscription message.

[0122] It should be understood that the first subscription message is used to subscribe to the first service, and the data format of the data of the first service is a data format unknown to the subscription-end device.

[0123] S602: The publishing end device receives a second subscription message, and correspondingly, the subscribing end device sends a second subscription message.

[0124] It should be understood that the second subscription message is used to subscribe to the second service, and the data format of the second service data is a data format known to the subscription end device. It can also be understood that the data of the second service is pre-defined in the standard.

[0125] S603: The publisher determines the first full package.

[0126] In some embodiments, the first subscription message includes an identifier of the first service, and the publishing end device can determine the first full package according to the identifier of the first service in the first subscription message.

[0127] S604: The publishing end device determines a first simplified package.

[0128] It should be understood that the first simplified package includes the second data of the first business. If the data format of the data is unknown to the subscriber device, the publisher device can publish it in the form of a full package when publishing the data for the first time. The full package contains field values, field types and field meanings. The above three types of information can be transmitted to the subscriber device at the same time through the full package, and no additional multiple interactions will be generated. However, the data of the business subscribed by the subscriber device is usually continuously published, and the time interval for publication is the publication cycle of the corresponding business. The publisher device can use the simplified package transmission method at any publishing time after the business is first published in the form of a full package to reduce the amount of data transmission. In other words, full packages and simplified packages can be transmitted alternately, and when the data format changes or there is a new subscription, the full package needs to be transmitted.

[0129] It should be understood that the first data in the embodiment of the present application refers to the data released for the first time by a certain service, and the second data refers to the data released at any release time after the certain service is first released.

[0130] For ease of understanding, Figure 7 A schematic diagram of a simplified package is shown. The simplified package only carries field values. When a subscriber device subscribes to data in a known data format, a publisher device can publish a simplified package that only carries field values, and the subscriber device can correctly parse the data and learn the meaning of the data.

[0131] S605: The publishing end device determines a second simplified package.

[0132] In some embodiments, the publishing end device determines the second simplified package according to an identifier of the data of the second service in the second subscription message.

[0133] It should be understood that the second simplified packet is similar to the first simplified 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 the full packet containing information for indicating the data format of the data of the second service. The second simplified packet only includes the data of the second service, and does not include information for indicating the data format of the data of the second service.

[0134] Furthermore, 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 first subscribed. Therefore, the publishing end device can perform the following steps to determine the publishing reference time.

[0135] S604: The publishing end device determines a first publishing reference time.

[0136] It should be understood that the publishing end device determines the first publishing reference time according to the time when the first subscription message is received. After receiving the first subscription message (first subscription message), the publishing end device can determine the first publishing reference time according to the time when the subscription message is received. The publishing reference time and the subscription time have the following numerical relationship:

[0137] Publishing base time = subscription time + random value

[0138] For ease of understanding, the following example illustrates how the publishing end device determines the first publishing reference time. For example, the random value can be a random number within 0-10 seconds. The subscription time of the data of the first service is 12:36:41. If 4 seconds are added to the subscription time, the first publishing reference time is 12:36:45.

[0139] S607, the publishing end device publishes the first full package, and correspondingly, the subscribing end device receives the first full package.

[0140] S608, the publishing end device publishes the first simplified package, and correspondingly, the subscribing end device receives the first simplified package.

[0141] It should be understood that after the publishing end device publishes the first full package to the subscribing end device, the publishing end device publishes the first simplified package to the subscribing end device. The time when the publishing end publishes the first simplified package differs from the time when the first full package is published by N first publishing cycles, and the first publishing cycle is the publishing cycle of the first service, where N is an integer greater than or equal to 1. In other words, at any publishing time after the first publishing time of the data of the first service (the first data of the first service), the publishing end device can publish the first simplified package to the subscribing end device. Among them, the difference between any publishing time of the data of the first service is N publishing cycles of the first service.

[0142] S609, the publishing end device publishes the second simplified package, and correspondingly, the subscribing end device receives the second simplified package.

[0143] It should be understood that the publishing end device publishes the second simplified package to the subscribing end device at the first publishing moment of the data of the second service. The second simplified package only includes the data of the second service, and does not include information for indicating the data format of the data of the second service. At any subsequent publishing moment of the data of the second service, the publishing end device publishes the second simplified package to the subscribing end device. Among them, there is a difference of N second publishing cycles between any publishing moments of the data of the second service, and the second publishing cycle is the publishing cycle of the second service. That is to say, when the data subscribed by the subscribing end device is data in a known data format, in order to reduce the amount of transmission each time, the data can be published in the form of a simplified package at any publishing moment of the data.

[0144] 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.

[0145] For ease of understanding Figure 8 The following is a schematic diagram of a method for transmitting data in a publish-subscribe mode provided in an embodiment of the present application. Figure 8 A publishing device and a subscribing device are shown in the figure, and the publishing device includes data set 1, data set 2, extended data set 3 and extended data set 4. Among them, data set 1 and data set 2 are data whose data formats are known in advance by the subscribing device (such as the data of the second service mentioned above); extended data set 3 and extended data set 4 are data whose data formats are unknown in advance by the subscribing device (such as the data of the first service mentioned above). When the subscribing device subscribes to data set 1 or data set 2, the publishing device publishes data set 1 or data set 2 to the subscribing device in the corresponding data set publishing cycle in the form of a simplified package. When the subscribing device subscribes to extended data set 3 or extended data set 4, the publishing device publishes the corresponding data set in the form of a full package at the first publishing time of the corresponding extended data, and the publishing device publishes the corresponding data set in the form of a simplified package at the publishing time after the corresponding extended data.

[0146] In some embodiments, the publishing device publishes a second simplified package to the subscribing device. The time when the publishing device publishes the second simplified package differs from the first publishing reference time by M second publishing cycles. The second publishing cycle is the publishing cycle of the second service, and M is an integer greater than or equal to 0.

[0147] It should be understood that after the publishing end device determines the first publishing reference time, the publishing end device will first publish the first data of the first service at the first publishing reference time, that is, publish the first full package at the first publishing reference time. The data publishing time of the second service needs to be determined according to the following expression:

[0148] Release time = release base time + release cycle × M

[0149] Wherein, M is an integer greater than or equal to 0. For a certain data, no matter when the subscriber device subscribes, according to the above expression, the time when the data is published each time can be determined, and it can be seen that the time when the data is published each time is independent of the subscription time. Exemplarily, when the first publishing time of the data of the second business is the same as the first publishing time of the data of the first business (the first publishing reference time), the publishing end device publishes the first full package and the second simplified package at the first publishing reference time. When the first publishing time of the data of the second business is the same as a subsequent publishing time of the data of the first business, the publishing end device publishes the first simplified package and the second simplified package at the publishing time. When a subsequent publishing time of the data of the second business is the same as a subsequent publishing time of the data of the first business, the publishing end device simultaneously publishes the first simplified package and the second simplified package at the publishing time.

[0150] For ease of understanding, the following is an example of how the publishing end device publishes data after determining the first publishing reference time.

[0151] Exemplary, in the first case: the publishing end device receives the first subscription message at 12:09:55, and determines that the first publishing reference time is 12:10:00. Then the publishing end device first publishes the data of the first service (the first data of the first service) at 12:10:00. Since the cycle of the first service is 10s, the next publishing time 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. Since the first publishing reference time has been determined to be 12:10:00, the publishing end device first publishes the data of the second service at 12:10:00. Since the cycle of the second service is 5s, the next publishing time of the data of the second service is 12:10:05. In this case, the publishing end device first publishes the data of the first service and the data of the second service at the first publishing reference time 12:10:00.

[0152] The second case: the publishing end device receives the first subscription message at 12:09:55 and determines that the first publishing reference time is 12:10:00. The publishing end device first publishes the data of the first service (the first data of the first service) at 12:10:00. Since the cycle of the first service is 10s, the next publishing time 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. Since the first publishing reference time has been determined to be 12:10:00, the publishing end device first publishes the data of the second service at 12:10:05. Since the cycle of the second service is 5s, the next publishing time of the data of the second service is 12:10:10. In this case, the publishing end device only publishes the data of the first service at the first publishing reference time, and may publish the data of the first service and the data of the second service at the subsequent publishing time 12:10:10.

[0153] For ease of understanding, Fig. 9 The diagram of data publishing time alignment in the first case above is shown. The data that the publishing end device needs to publish includes data 1, data 2 and data 3. Whether the data format of the above data is known in advance by the subscribing end device is not limited. Among them, the publishing period of data 1 is 1s, the publishing period of data 2 is 2s, and the publishing period of data 3 is 3s. Among them, the least common multiple of the publishing period of data 1, the publishing period of data 2 and the publishing period of data 3 is 3. The first subscription time of data 1, data 2 and data 3 is any time before the publishing reference time. First, the publishing end device determines the publishing reference time as 0s according to the subscription time of the first data received. Secondly, the publishing end device calculates the subsequent 8 publishing times of data 1, data 2 and data 3. Since the publishing periods of different data are different, the publishing time of data 1 determined by the publishing end device is 0s, 1s, 2s, 3s, 4s, 5s, 6s and 7s respectively; the publishing time of data 2 determined by the publishing end device is 0s, 2s, 4s and 6s respectively; the publishing time of data 3 determined by the publishing end device is 0s, 3s and 6s respectively. It can be seen that at some publishing times, the publishing device can package multiple data and publish them to the subscribing device. For example, at the publishing time 0s or 6s, the publishing device can publish data 1, data 2, and data 3 at the same time; at the publishing time 2s or 4s, the publishing device can publish data 1 and data 2 at the same time; at the publishing time 3s, the publishing device can publish data 1 and data 3 at the same time.

[0154] In some embodiments, when there is one subscriber device, the publisher device publishes the first full package or the second simplified package to the subscriber device via unicast; or when there is one subscriber device, the publisher device publishes the first simplified package or the second simplified package to the subscriber device via unicast; or when there are multiple subscriber devices, the publisher device publishes the first full package or the second simplified package to multiple subscriber devices via multicast; or when there are multiple subscriber devices, the publisher device publishes the first simplified package or the second simplified package to multiple subscriber devices via multicast.

[0155] In some embodiments, the data type of the first data includes a string, an integer, or a floating point.

[0156] In some embodiments, the data meaning of the first data includes any one of the following: temperature, humidity, speed, or methane concentration, etc.

[0157] It should be noted that the execution order of the above steps S607 and S609 is not limited. Step S607 may be executed first, and then step S609; or steps S607 and S609 may be executed simultaneously. The execution order of the above steps S608 and S609 is not limited. Step S608 may be executed first, and then step S609; step S609 may be executed first, and then step S608; or steps S608 and S609 may be executed simultaneously. The execution order of the above steps S603, S604, S605 and S606 is not limited. The execution order of the above step S606 can be any time after step S601. The execution order of the above step S602 can be any time after step S601 and before step S605. The specific execution order of step S602 is not limited.

[0158] The method for transmitting data provided by the embodiment of the present application is to publish the data of the first service whose data format is unknown in advance to the subscriber-end device in the form of the first full package when the publisher-end device publishes the data of the first service for the first time. Because the first full package contains the data of the first service and the information indicating the data format of the data of the first service, the subscriber-end device can correctly parse the data of the first service and obtain its meaning. When the publisher-end device publishes the data of the first service next time, it publishes it in the form of the first simplified package, and the subscriber-end device can correctly parse the data of the first service and obtain its meaning according to the field value in the first simplified package. For the data of the second service whose data format is known in advance to the subscriber-end device, when the publisher-end device publishes the data of the second service for the first time, and when the publisher-end device publishes the data of the second service next time, it publishes it in the form of the second simplified package, and the subscriber-end device can correctly parse the data of the second service and obtain its meaning according to the field value in the second simplified package. While supporting the subscriber-end device to correctly parse the data of the unknown data format in advance, the method can simplify the interaction process between the publisher-end device and the subscriber-end device, thereby saving the overhead of the interaction signaling.

[0159] In addition, the publishing end device can also determine the publishing reference time (first publishing reference time) according to the reception time of the first subscription message (first subscription message). Therefore, for the data of a single service, no matter when the subscriber device subscribes, a fixed publishing time can be determined; for the data of multiple services, the publishing time of the data can also be unified, and the publishing time of multiple data can be aligned as much as possible. This method can also realize the simultaneous transmission of multiple data as much as possible, thereby improving the transmission efficiency.

[0160] As can be seen from the above description of 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 data publishing time of the existing service is related to the time when the service is first subscribed. When the publishing end device needs to publish multiple data or multiple data sets to a certain subscribing end device, the multiple data or multiple data sets cannot be packaged and sent because the publishing time of each data or data set is different.

[0161] Exemplarily, the publishing cycle of data 1 is 10s, the subscription time is 12:36:41, and the next publishing time of data 1 is 12:36:51; the publishing cycle of data 2 is 20s, the subscription time is 12:46:45, and the next publishing time of data 2 is 12:37:05. It can be seen that the publishing times of data 1 and data 2 are different, which means that the two data cannot be packaged and sent together. If a subscriber device subscribes to these two data successively, the publisher device needs to send these two data separately. Therefore, the prior art mainly focuses on the alignment of the publishing time of a single data. For a single data, the publishing cycle is fixed, and different subscriber devices have different subscription times, resulting in different data publishing times. How to align the publishing times of multiple data as much as possible is a problem that needs to be further solved in this application. In response to the above technical problems, without limiting whether the data formats of multiple data or multiple data sets are known to the subscriber device, it is proposed as follows: Fig.10 The method 1000 for transmitting data shown in the figure determines a publishing reference time that is not affected by the time when the subscription end device receives the subscription message, so as to realize the packaging and publishing of multiple data or multiple data sets as much as possible, thereby improving the publishing efficiency. The method 1000 is described in detail below using multiple data as an example.

[0162] Fig.10 FIG. 1 is a schematic flow chart of another method 1000 for transmitting data proposed in an embodiment of the present application. The method can be applied to Figure 1 In the scenario shown, the specific steps are as follows:

[0163] S1001, a publishing end device receives a third subscription message, and correspondingly, a subscribing end device sends a third subscription message.

[0164] It should be understood that the publishing device receives the third subscription message from the subscribing device, and the third subscription message is used to subscribe to the third service.

[0165] S1002: The publishing end device determines a second publishing reference time.

[0166] 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.

[0167] The above steps are similar to steps S601, S606, S607, S608 and S609 in the above method 600, and are not described again here.

[0168] In some embodiments, after the publishing end device receives the third subscription message from the subscribing end device, the publishing end device receives a fourth subscription message from the subscribing end device, and the fourth subscription message is used to subscribe to a fourth service. The publishing end device publishes data of the fourth service to the subscribing end device, and the time when the publishing end device publishes the data of the fourth service differs from the second publishing reference time by M fourth publishing cycles, and the fourth publishing cycle is the publishing cycle of the fourth service, and M is an integer greater than or equal to 0.

[0169] In some embodiments, when the data format of the data of the third service is a data format unknown to the subscriber device, the publishing device publishes a third full package to the subscriber device, where the third full package includes the data of the third service and information for indicating the data format of the data of the third service, where the information for indicating the data format of the data of the third service includes information for indicating the data type of the data of the third service and information for indicating the data meaning of the data of the third service; or when the data format of the data of the third service is a data format unknown to the subscriber device, the publishing device publishes a third simplified package to the subscriber device, where the third simplified package includes the data of the third service; or when the data format of the data of the third service is a data format known to the subscriber device, the publishing device publishes the third simplified package to the subscriber device.

[0170] In some embodiments, when the data format of the data of the fourth service is a data format unknown to the subscriber device, the publishing device publishes a fourth full package to the subscriber device, the fourth full package including the data of the fourth service and information for indicating the data format of the data of the fourth service, the information for indicating the data format of the data of the fourth service including information for indicating the data type of the data of the fourth service and information for indicating the data meaning of the data of the fourth service; or when the data format of the data of the fourth service is a data format unknown to the subscriber device, the publishing device publishes a fourth simplified package to the subscriber device, the fourth simplified package including 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 device, the publishing device publishes the fourth simplified package to the subscriber device.

[0171] In some embodiments, when there is one subscriber device, the publisher device publishes the data of the third service or the fourth service to the subscriber device via unicast; or when there are multiple subscriber devices, the publisher device publishes the data of the third service or the fourth service to multiple subscriber devices via multicast.

[0172] It should be understood that when only one subscriber device subscribes to multiple data, after the publisher device aligns the publishing reference time, the publisher device can package the multiple data in one message and publish it to the subscriber device in a unicast manner. When multiple subscriber devices subscribe to multiple data, after the publisher device aligns the publishing reference time, the publisher device can package the multiple data in one message and publish it to the multiple subscriber devices in a multicast manner.

[0173] In some embodiments, the information indicating the data type of the data of the third service includes a string, an integer or a floating point; the data type of the fourth data includes a string, an integer or a floating point, and the information indicating the data type of the data of the fourth service is used to decode the fourth data.

[0174] In some embodiments, the information used to indicate the data meaning of the third business data includes any one of the following: temperature, humidity, speed or methane concentration, etc.; the information used to indicate the data meaning of the fourth business data includes any one of the following: temperature, humidity, speed or methane concentration, etc.

[0175] 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.

[0176] The method for transmitting data provided by the present application can determine the publishing reference time according to the time when the subscription message is received by the publishing end device. Therefore, for a single data, no matter when the subscription end device subscribes, a fixed publishing time can be determined; for multiple data, the publishing time of the data can also be unified, and the publishing time of multiple data can be aligned as much as possible. This method can also realize the simultaneous transmission of multiple data as much as possible, thereby improving transmission efficiency.

[0177] Fig.11 A schematic diagram of the structure of a communication device 1100 of an embodiment of the present application is shown. The communication device 1100 may be a publishing end device, or a device in a publishing end device, or a device that can be used in combination with a publishing end device. In one possible implementation, the communication device 1100 may include a module or unit that corresponds one-to-one to the method / operation / step / action performed by the publishing end device in the above method embodiment. The unit may be a hardware circuit, or software, or a combination of a hardware circuit 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 Fig.11 The communication device shown is only an example, and may also include other units or include Fig.11 The units in the same function are not necessarily included. Fig.11 All units in .

[0178] 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.

[0179] Fig.12 The communication device 1200 provided in the embodiment of the present application is shown, and the communication device 1200 may be a publishing end device. The device may include a processor 1210 and a transceiver 1230. The transceiver may include a transmitter and / or a receiver.

[0180] In some embodiments, the apparatus may further include a memory 1220, and the processor 1210, the transceiver 1230 and the memory 1220 are interconnected via an internal connection path. Fig.11 The related functions implemented by the processing unit 1110 can be implemented by the processor 1210, and the related functions implemented by the transceiver unit 1120 can be implemented by the processor 1210 controlling the transceiver 1230.

[0181] In some embodiments, the processor 1210 may be a CPU, a microprocessor, an ASIC, a dedicated processor, or one or more integrated circuits for executing the technical solutions of the embodiments of the present application. Alternatively, the processor may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions). For example, it may be a baseband processor or a central processing unit. The baseband processor may be used to process communication protocols and communication data, and the central processing unit may be used to control communication devices (e.g., network devices, terminals, or chips, etc.), execute software programs, and process data of software programs.

[0182] In some embodiments, the processor 1210 may include one or more processors, for example, one or more CPUs. When the processor is a CPU, the CPU may be a single-core CPU or a multi-core CPU.

[0183] The transceiver 1230 is used to send and receive data and / or signals, and receive data and / or signals. The transceiver may include a transmitter and a receiver, the transmitter is used to send data and / or signals, and the receiver is used to receive data and / or signals.

[0184] The memory 1220 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable readonly memory (EPROM), and compact disc read-only memory (CD-ROM). The memory 1520 is used to store related instructions and data. The memory 1220 can be a separate device or integrated in the processor 1210.

[0185] In some embodiments, the communication device 1200 may further include an output device and an input device. The output device communicates with the processor 1210 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 1210 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0186] Understandably, Fig.12 Only a simplified design of the communication device is shown. In practical applications, the device may also include other necessary components, including but not limited to any number of transceivers, processors, controllers, memories, etc., and all terminal devices that can implement the present application are within the protection scope of the present application.

[0187] In a possible design, the device 1200 may be a chip, for example, a communication chip that can be used in a publishing terminal device, and is used to implement the relevant functions of the processor 1210 in the publishing terminal device. The chip may be a thread programmable gate array, a dedicated integrated chip, a system chip, a central processing unit, a network processor, a digital signal processing circuit, a microcontroller, and a programmable controller or other integrated chip for implementing the relevant functions. The chip may optionally include one or more memories for storing computer programs or instructions, and when the program or instruction is executed, the processor implements the corresponding function.

[0188] like Fig.13 As shown, the embodiment of the present application further provides a device 1300, which can be used to implement the function of the publishing terminal device in the above method. The device 1300 can be a communication device or a chip in a communication device. The communication device includes:

[0189] At least one input / output interface 1310 and a logic circuit 1320. The input / output interface 1310 may be an input / output circuit, an input interface, an output interface, etc. The logic circuit 1320 may be a signal processor, a chip, or other integrated circuit that can implement the method of the present application.

[0190] The at least one input / output interface 1310 is used for inputting or outputting signals or data. The logic circuit 1320 is used for executing part or all of the steps of any method provided in the embodiments of the present application.

[0191] The embodiment of the present application also provides a device, which can be a publishing end device or a logic circuit. The device can be used to execute the actions executed by the publishing end device in the above method embodiment.

[0192] The embodiment of the present application also proposes a computer-readable storage medium, which stores one or more programs or instructions. When the program or instruction is executed on a computer, the computer executes the method of the above embodiment.

[0193] The embodiment of the present application further proposes a computer program, which includes a program or instructions. When the computer program or instructions are executed by a computer, the computer can execute the corresponding process of the method of the above embodiment.

[0194] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0195] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0196] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0197] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0198] It should also be understood that the first, second and various numerical numbers involved in this document are only distinguished for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0199] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0200] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.

[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0202] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0203] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for transmitting data, characterized in that: include: The publishing end device receives a first subscription message from the subscribing end device, where the first subscription message is used to subscribe to a first service, where the data format of the first service data is a data format unknown to the subscribing end device, and the subscribing end device includes one or more devices; The publishing device publishes a first full package to the subscribing device, wherein the first full package includes first data of the first service and information for indicating the 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 includes information for indicating the data type of the first data of the first service and information for indicating the data meaning of the first data of the first service.

2. The method according to claim 1, characterized in that: The method further comprises: The publishing end device determines a first simplified package according to the first subscription message, where the first simplified package includes second data of the first service; After the publishing-end device publishes the first full package to the subscribing-end device, the publishing-end device publishes the first simplified package to the subscribing-end device. The time when the publishing-end device publishes the first simplified package differs from the time when the publishing-end device publishes the first full package by N first publishing cycles, where the first publishing cycle is the publishing cycle of the first service, and N is an integer greater than or equal to 1.

3. The method according to claim 1 or 2, characterized in that: The first subscription message includes an identifier of the first service, and the method further includes: The publishing end device determines the first full package according to the identifier of the first service in the first subscription message.

4. The method according to claim 1 or 2, characterized in that: The publishing end device publishes a first full package to the subscribing end device, including: The publishing end device determines a first publishing reference time according to a receiving time of the first subscription message; The publishing end device publishes the first full package at the first publishing reference time.

5. The method according to claim 4, characterized in that After the publishing end device receives the first subscription message from the subscribing end device, the method further includes: The publishing end device receives a second subscription message from the subscribing end device, where the second subscription message is used to subscribe to a second service, and the data format of the data of the second service is a data format known to the subscribing end device; The publishing end device determines a second simplified package according to the second subscription message, where the second simplified package includes data of the second service; The publishing device publishes the second simplified package to the subscribing device. The time when the publishing device publishes the second simplified package differs from the first publishing reference time by M second publishing cycles. The second publishing cycle is the publishing cycle 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, 2 and 5, characterized in that: The publishing end device publishes a first full package to the subscribing end device, including: When there is only one subscriber device, the publisher device publishes the first full packet to the subscriber device via unicast; or When there are multiple subscriber devices, the publisher device publishes the first full package to the multiple subscriber devices via multicast.

7. The method according to claim 2, characterized in that The publishing end device publishes the first simplified package to the subscribing end device, including: When there is only one subscriber device, the publisher device publishes the first simplified packet to the subscriber device via unicast; or When there are multiple subscriber devices, the publisher device publishes the first simplified package to the subscriber devices via multicast.

8. The method according to claim 5, characterized in that The publishing end device publishes the second simplified package to the subscribing end device, including: When there is only one subscriber device, the publisher device publishes the second simplified packet to the subscriber device via unicast; or When there are multiple subscriber devices, the publisher device publishes the second simplified package to the subscriber devices via multicast.

9. The method according to any one of claims 1, 2, 5, 7 and 8, characterized in that: The information indicating the data type of the first data of the first service includes a string, an integer or a floating point.

10. A method for transmitting data, characterized in that: include: The subscriber device sends a first subscription message to the publisher device, where the first subscription message is used to subscribe to a first service, where the data format of the first service is unknown to the subscriber device, and the subscriber device includes one or more devices; The subscriber device receives a first full packet from the publisher device, the first full 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 a 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.

11. The method according to claim 10, characterized in that After the subscriber device receives the first full packet from the publisher device, the method further includes: The subscriber device receives a first simplified package from the publisher device, where the first simplified package includes second data of the first service. The time when the subscriber device receives the first simplified package differs from the time when the subscriber device receives the first full package by N first publishing cycles, where the first publishing cycle is the publishing cycle of the first service, and N is an integer greater than or equal to 1.

12. The method according to claim 10 or 11, characterized in that: The first subscription message includes an identifier of the first service.

13. The method according to claim 10 or 11, characterized in that: The subscriber device receives a first full packet from the publisher device, including: The subscribing device receives the first full package published by the publishing device at the first publishing reference time.

14. The method according to claim 13, characterized in that After the subscriber device sends the first subscription message to the publisher device, the method further includes: The subscriber device sends a second subscription message to the publisher device, where the second subscription message is used to subscribe to a second service, and the data format of the data of the second service is a data format known to the subscriber device; The subscriber device receives a second simplified packet from the publisher device, where the second simplified packet includes data of the second service. The time when the subscriber device receives the second simplified packet differs from the first publishing reference time by M second publishing cycles, where the second publishing cycle is a publishing cycle of the second service, and M is an integer greater than or equal to 0.

15. The method according to any one of claims 10, 11 and 14, characterized in that: The subscriber device receives a first full packet from the publisher device, including: When there is only one subscriber device, the subscriber device receives the first full packet published by the publisher device via unicast; or When there are multiple subscriber devices, the subscriber device receives the first full packet published by the publisher device through multicast.

16. The method according to claim 11, characterized in that The subscriber device receives a first simplified packet from the publisher device, including: When there is only one subscriber device, the subscriber device receives the first simplified packet published by the publisher device via unicast; or When there are multiple subscriber devices, the subscriber device receives the first simplified packet published by the publisher device through multicast.

17. The method according to claim 14, characterized in that The subscriber device receives a second simplified packet from the publisher device, including: When there is only one subscriber device, the subscriber device receives the second simplified packet published by the publisher device via unicast; or When there are multiple subscriber devices, the subscriber device receives the second simplified packet published by the publisher device through multicast.

18. The method according to any one of claims 10, 11, 14, 16 and 17, characterized in that: The information indicating the data type of the first data of the first service includes a string, an integer or a floating point.

19. A method for transmitting data, characterized in that: include: The publishing end device receives a third subscription message from the subscribing end device, where the third subscription message is used to subscribe to a third service, and the subscribing end device includes one or more devices; The publishing end device determines the second publishing reference time according to the reception time of the third subscription message; The publishing end device publishes the first data of the third service to the subscribing end device at the second publishing reference time; The publishing end device publishes the 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 a data format unknown to the subscriber device, the publisher device publishes a third full package to the subscriber device at the second publishing reference time, the third full package including the first data of the third service and information indicating the data format of the first data of the third service, the information indicating the data format of the first data of the third service including information indicating the data type of the first data of the third service and information 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 a data format known to the subscriber device, the publisher device publishes a third simplified package to the subscriber device at the second publishing reference time, wherein the third simplified package includes the first data of the third service; After the publishing end device receives the third subscription message from the subscribing end device, the method further includes: The publishing end device receives a fourth subscription message from the subscribing end device, where the fourth subscription message is used to subscribe to a fourth service; The publishing end device publishes the data of the fourth service to the subscribing end device. The time when the publishing end device publishes the data of the fourth service differs from the second publishing reference time by M fourth publishing cycles. The fourth publishing cycle is the publishing cycle of the fourth service, and M is an integer greater than or equal to 0.

20. The method according to claim 19, characterized in that The publishing end device publishes the data of the fourth service to the subscribing end device, including: When the data format of the data of the fourth service is a data format unknown to the subscriber device, the publisher device publishes a fourth full package to the subscriber device, the fourth full package 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 a data format unknown to the subscriber device, the publisher device publishes a fourth simplified package to the subscriber device, the fourth simplified package including 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 device, the publisher device publishes the fourth simplified package to the subscriber device.

21. The method according to claim 19, characterized in that The publishing end device publishes the first data of the third service to the subscribing end device at the second publishing reference time, including: When there is only one subscriber device, the publisher device publishes the first data of the third service to the subscriber device via unicast; or When there are multiple subscriber devices, the publisher device publishes the first data of the third service to the multiple subscriber devices through multicast.

22. The method according to claim 19, characterized in that The publishing end device publishes the data of the fourth service to the subscribing end device, including: When there is only one subscriber device, the publisher device publishes the data of the fourth service to the subscriber device via unicast; or When there are multiple subscriber devices, the publisher device publishes the data of the fourth service to the multiple subscriber devices through multicast.

23. The method according to any one of claims 19 to 22, characterized in that The information for indicating the data type of the first data of the third service includes a string, an integer or a floating point; The information indicating the data type of the data of the fourth service includes a string, an integer, or a floating point.

24. A method for transmitting data, characterized in that: include: The subscriber device sends a third subscription message to the publisher device, where the third subscription message is used to subscribe to a third service, and the subscriber device includes one or more devices; The subscribing end device receives the first data of the third service published by the publishing end device at the second publishing reference time; The receiving, by the subscription end device, of the first data of the third service published by the publishing end device at the second publishing reference time includes: When the data format of the data of the third service is a data format unknown to the subscriber device, the subscriber device receives a third full packet published by the publisher device at the second publishing reference time, the third full packet includes the first data of the third service and information for indicating the data format of the first data of the third service, the information for indicating the data format of the first data of the third service includes 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 a data format known to the subscriber device, the subscriber device receives a third simplified packet published by the publisher device at the second publishing reference time, wherein the third simplified packet includes the first data of the third service; After the subscriber device sends the third subscription message to the publisher device, the method further includes: The subscribing end device sends a fourth subscription message to the publishing end device, where the fourth subscription message is used to subscribe to a fourth service; The subscription-end device receives data of the fourth service from the publishing-end device. The time when the subscription-end device receives the data of the fourth service differs from the second publishing reference time by M fourth publishing cycles. The fourth publishing cycle is the publishing cycle of the fourth service, and M is an integer greater than or equal to 0.

25. The method according to claim 24, characterized in that The subscriber device receives the data of the fourth service from the publisher device, including: When the data format of the data of the fourth service is a data format unknown to the subscriber device, the subscriber device receives a fourth full packet from the publisher device, the fourth full 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 a data format unknown to the subscriber device, the subscriber device receives a fourth simplified packet from the publisher device, the fourth simplified packet including 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 device, the subscriber device receives the fourth simplified packet from the publisher device.

26. The method according to claim 24, characterized in that The receiving, by the subscription end device, of the first data of the third service published by the publishing end device at the second publishing reference time, comprises: When there is one subscriber device, the subscriber device receives the first data of the third service published by the publisher device via unicast; or When there are multiple subscriber devices, the subscriber device receives the first data of the third service published by the publisher device through multicast.

27. The method according to claim 24, characterized in that The subscriber device receives the data of the fourth service from the publisher device, including: When there is one subscriber device, the subscriber device receives data of the fourth service published by the publisher device via unicast; or When there are multiple subscriber devices, the subscriber device receives the data of the fourth service published by the publisher device through multicast.

28. The method according to any one of claims 24 to 27, characterized in that The information for indicating the data type of the first data of the third service includes a string, an integer or a floating point; The information indicating the data type of the data of the fourth service includes a string, an integer, or a floating point.

29. A device for transmitting data, characterized in that: Comprising modules for executing any one of claims 1 to 9 or executing the method of any one of claims 19 to 23.

30. A device for transmitting data, characterized in that: Comprising means for performing any one of claims 10 to 18 or performing a method as claimed in any one of claims 24 to 28.

31. A communication device, characterized in that: include: A processor coupled to a memory, the memory being used to store a computer program, the processor being used to run the computer program so that the communication device performs the method according to any one of claims 1 to 9 and 19 to 23.

32. A communication device, characterized in that: include: A processor coupled to a memory, the memory being used to store a computer program, the processor being used to run the computer program so that the communication device performs the method according to any one of claims 10 to 18 and 24 to 28.

33. The communication device according to claim 31 or 32, characterized in that: The communication device further includes one or more of the memory and a transceiver, wherein the transceiver is configured to receive signals and / or send signals.

34. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program or instructions, which, when executed on a computer, causes the method of any one of claims 1 to 9, 10 to 18, 19 to 23, 24 to 28 to be executed.

35. A computer program product, characterized in that The computer program product comprises a computer program or instructions, which, when executed on a computer, causes the method of any one of claims 1 to 9, 10 to 18, 19 to 23, 24 to 28 to be performed.

Citation Information

Patent Citations

  • Method for opening channel based on time

    WO2017028061A1