Multi-device communication method, apparatus, user equipment, and machine-readable storage medium

By establishing a virtual link in the gateway device, the smart device is identified and data packets are processed using the content of data fields, which solves the problem of excessive identifier usage and improves communication efficiency and accuracy.

CN119854352BActive Publication Date: 2025-11-04ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411754106.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-11-04
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

When a host device communicates with multiple smart devices, the high proportion of identifiers in data packets results in a low proportion of effective information actually carried in the data packets, leading to low communication efficiency.

Method used

Gateway devices establish virtual links with multiple smart devices by sharing the same physical link. The data packets of each virtual link have the same format, but the data field content is different. The target virtual link is determined and processed by parsing the target data field content.

Benefits of technology

No additional identifiers need to be assigned to smart devices, which improves communication efficiency, avoids identifiers occupying too much data packet space, and improves the accuracy and efficiency of data packet processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854352B_ABST
    Figure CN119854352B_ABST
Patent Text Reader

Abstract

The specification provides a multi-device communication method, device, user equipment and machine readable storage medium, which is applied to a gateway device; the gateway device and a plurality of smart devices establish virtual links through sharing a same physical link; wherein, data packet formats of each virtual link are consistent; data field contents in the data packet formats of each virtual link are different; the method comprises: in response to receiving a data packet sent by any smart device in the plurality of smart devices, parsing target data field content corresponding to the any smart device from the data packet; determining a target virtual link corresponding to the data packet according to the target data field content; and processing the data packet according to a processing mode corresponding to the target virtual link. According to the embodiment, the communication efficiency of the multi-device can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of vehicles, and particularly relates to a multi-device communication method and device, user equipment and machine readable storage medium. BACKGROUND

[0002] In a network topology in which a host device communicates with multiple smart devices based on a same physical link, a gateway device carried by the host device usually allocates identifiers to the multiple smart devices and communicates by carrying the identifiers corresponding to the smart devices in data packets. Based on this, the gateway device can identify different smart devices based on the identifiers and process data packets sent by the smart devices.

[0003] Since the identifier occupies a high proportion in the data field of the data packet in the case of a large number of smart devices, the proportion of effective information actually carried by the data packet is not high, thereby resulting in low communication efficiency. SUMMARY

[0004] The present disclosure provides a multi-device communication method applied to a gateway device; the gateway device and multiple smart devices establish virtual links through sharing a same physical link; wherein the data packet formats of the virtual links are consistent; the data field contents in the data packet formats of the virtual links are different; and the method comprises:

[0005] In response to receiving a data packet sent by any smart device of the multiple smart devices, parsing target data field content corresponding to the any smart device from the data packet;

[0006] According to the target data field content, determining a target virtual link corresponding to the data packet;

[0007] According to a processing mode corresponding to the target virtual link, processing the data packet.

[0008] Optionally, parsing the target data field content corresponding to the any smart device from the data packet comprises:

[0009] Parsing the target data field content corresponding to the any smart device from at least one target field contained in the data field of the data packet; wherein the data field contents stored in the at least one target field contained in the data packets sent by different smart devices are different.

[0010] Optionally, according to the target data field content, determining a target virtual link corresponding to the data packet comprises:

[0011] match the target data field content with historical data field content in a data packet sent by each smart device last time received and stored, and determine a target virtual link corresponding to the data packet based on a matching result.

[0012] Optionally, the data field content includes a device model attribute; the target data field content further includes a latest message number; and the historical data field content further includes a historical message number.

[0013] Optionally, the matching the target data field content with historical data field content in a data packet sent by each smart device last time received and stored includes:

[0014] Optionally, the latest message number is decremented according to a preset rule, and the decremented message number and the device model attribute are matched with the device model attribute and the historical message number in the data packet sent by each smart device last time received and stored.

[0015] Optionally, the historical data field content further includes a start message number; the latest message number is obtained by incrementing the corresponding start message number according to a preset rule by the any smart device; and the start message numbers of the plurality of smart devices are different and are randomly generated by the plurality of smart devices respectively.

[0016] Optionally, before the virtual link is established with the any smart device, the method further includes:

[0017] In response to receiving an initialization request sent by the any smart device based on the physical link, parsing a target start message number and a target device model attribute corresponding to the any smart device from the initialization request.

[0018] Matching the target start message number and the target device model attribute with the device model attribute and the historical message number in the data packet sent by each smart device last time received and stored once, and matching the target start message number and the target device model attribute with the device model attribute and the start message number corresponding to each smart device stored twice.

[0019] If the once matching and the twice matching both fail, further establishing the virtual link with the any smart device based on the target start message number and the target device model attribute, and storing the target start message number and the target device model attribute corresponding to the any smart device.

[0020] Optionally, the method further includes:

[0021] If the matching result indicates a matching failure, sending a failure feedback information to the any smart device to indicate a data receiving failure.

[0022] Optionally, the method further comprises:

[0023] In response to receiving the reconstruction request sent by the any smart device based on the failure feedback information, parsing a new starting message number, an original starting message number and a target device model attribute corresponding to the any smart device from the reconstruction request;

[0024] Matching the new starting message number and the target device model attribute with the stored device model attribute and historical message number in the data packet sent by each smart device last received; or, secondly matching the new starting message number and the target device model attribute with the stored device model attribute and starting message number corresponding to each smart device;

[0025] If both the first matching and the second matching fail, further reconfiguring the virtual link between the any smart device based on the new starting message number and the target device model attribute.

[0026] Optionally, before reconfiguring the virtual link between the any smart device based on the new starting message number and the target device model attribute, the method further comprises:

[0027] Matching the original starting message number and the target device model attribute with the stored device model attribute and starting message number corresponding to each smart device;

[0028] If the matching succeeds, replacing the starting message number in the matched device model attribute and starting message number with the new starting message number to reconfigure the virtual link between the any smart device;

[0029] If the matching fails, further reconfiguring the virtual link between the any smart device based on the new starting message number and the target device model attribute, and storing the new starting message number and the target device model attribute corresponding to the any smart device.

[0030] Optionally, the smart device is an Internet of Things device; and the device model attribute comprises a thing model attribute.

[0031] Optionally, the Internet of Things device comprises an Internet of Things device mounted in a vehicle; and the vehicle comprises a pickup vehicle.

[0032] The present disclosure also provides a multi-device communication apparatus applied to a gateway device; the gateway device and a plurality of smart devices establish virtual links through sharing a same physical link; wherein, data packet formats of each virtual link are consistent; data field contents in the data packet formats of each virtual link are different; and the apparatus comprises:

[0033] The analysis unit is configured to analyze target data field content corresponding to any of the plurality of smart devices from a data packet sent by the any of the plurality of smart devices in response to receiving the data packet.

[0034] The determination unit is configured to determine a target virtual link corresponding to the data packet according to the target data field content.

[0035] The processing unit is configured to process the data packet according to a processing mode corresponding to the target virtual link.

[0036] The present disclosure also provides a user device, which comprises a communication interface, a processor, a memory and a bus, the communication interface, the processor and the memory are connected to each other through the bus.

[0037] The memory stores machine readable instructions, and the processor executes the multi-device communication method by invoking the machine readable instructions.

[0038] The present disclosure also provides a machine readable storage medium, which stores machine readable instructions, and the machine readable instructions realize the multi-device communication method when invoked and executed by a processor.

[0039] The technical solutions provided by the present disclosure can at least have the following beneficial effects:

[0040] Through the above embodiments, the gateway device can establish virtual links with a plurality of smart devices through sharing the same physical link. Since the data packet formats of the virtual links are consistent and the data field contents in the data packet formats of the virtual links are different, the gateway device can analyze target data field content corresponding to any of the plurality of smart devices from a data packet sent by the any of the plurality of smart devices in response to receiving the data packet, and determine a target virtual link corresponding to the data packet according to the target data field content, so as to process the data packet according to a processing mode corresponding to the target virtual link. Based on this, the gateway device does not need to additionally allocate identifiers to the smart devices, which can avoid high identifier occupancy in the data packet, thereby improving the efficiency of communication. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 is a system architecture diagram of a multi-device communication method according to an exemplary embodiment.

[0042] Figure 2 is a flowchart of a multi-device communication method according to an exemplary embodiment.

[0043] Figure 3is a flow chart of a method for establishing a virtual link according to an exemplary embodiment.

[0044] Figure 4 is a hardware structure diagram of a user equipment in which a multi-device communication apparatus is located according to an exemplary embodiment.

[0045] Figure 5 is a block diagram of a multi-device communication apparatus according to an exemplary embodiment. DETAILED DESCRIPTION

[0046] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers are used to indicate the same or similar elements, unless otherwise represented. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0047] It should be noted that the steps of the corresponding method are not necessarily performed in the order shown and described in the present specification in other embodiments. In some other embodiments, the steps included in the method can be more or less than those described in the present specification. In addition, a single step described in the present specification can be divided into multiple steps for description in other embodiments, and multiple steps described in the present specification can be combined into a single step for description in other embodiments.

[0048] In view of this, the present disclosure aims to propose a multi-device communication method. The method identifies different smart devices based on the data field content contained in the existing data packet format, thereby avoiding a high proportion of identifiers in the data packet and improving the efficiency of communication.

[0049] In implementation, the method is applied to a gateway device; the gateway device can establish a virtual link with each of a plurality of smart devices through sharing the same physical link; wherein the data packet formats of the virtual links are consistent, and the data field contents in the data packet formats of the virtual links are different.

[0050] The gateway device can parse target data field content corresponding to any one of the plurality of smart devices from a data packet in response to receiving the data packet sent by the any one of the plurality of smart devices;

[0051] According to the target data field content, a target virtual link corresponding to the data packet is determined;

[0052] According to a processing mode corresponding to the target virtual link, the data packet is processed.

[0053] Through the above embodiments, the gateway device can establish virtual links between the plurality of smart devices by sharing the same physical link. Since the data packet formats of the respective virtual links are consistent, the data field contents in the data packet formats of the respective virtual links are different. Therefore, the gateway device can parse target data field contents corresponding to any one of the plurality of smart devices from a data packet sent by the any one of the plurality of smart devices, and can determine a target virtual link corresponding to the data packet according to the target data field contents, so as to process the data packet according to a processing manner corresponding to the target virtual link. Based on this, the gateway device does not need to additionally assign identifiers to the smart devices, which can avoid a high proportion of identifiers in the data packet, thereby improving the efficiency of communication.

[0054] The present disclosure will be described below through specific embodiments and in combination with specific application scenarios.

[0055] Please refer to Figure 1 , Figure 1 is a system architecture diagram of a multi-device communication method according to an exemplary embodiment. As shown in Figure 1 , the host device can be equipped with a gateway device, which can establish virtual links between a plurality of smart devices by sharing the same physical link. Exemplarily, the plurality of smart devices can include smart device_1, smart device_2, and smart device_3, the gateway device can establish a virtual link_1 with the smart device_1, the gateway device can establish a virtual link_2 with the smart device_2, and the gateway device can establish a virtual link_3 with the smart device_3. Wherein, the data packet formats of the respective virtual links are consistent, and the data field contents in the data packet formats of the respective virtual links are different.

[0056] Based on this, the gateway device can parse target data field contents corresponding to any one of the plurality of smart devices from a data packet sent by the any one of the plurality of smart devices; determine a target virtual link corresponding to the data packet according to the target data field contents; and process the data packet according to a processing manner corresponding to the target virtual link.

[0057] Wherein, the gateway device can parse target data field contents corresponding to any one of the plurality of smart devices from at least one target field contained in the data field of the data packet; wherein the data field contents stored in the at least one target field contained in the data packets sent by different smart devices are different.

[0058] The gateway device can match the target data field content with the historical data field content in the data packet sent by each smart device last time, and determine the target virtual link corresponding to the data packet based on the matching result.

[0059] The data field content can include a device model attribute, the target data field content can further include a latest message number, and the historical data field content can further include a historical message number.

[0060] The gateway device can decrease the latest message number according to a preset rule, and match the decreased message number and the device model attribute with the device model attribute and the historical message number in the data packet sent by each smart device last time.

[0061] The historical data field content can further include a starting message number, the latest message number can be obtained by any smart device based on the corresponding starting message number according to a preset rule, and the starting message numbers of the plurality of smart devices can be different and randomly generated by the plurality of smart devices respectively.

[0062] Before establishing a virtual link with any smart device, the gateway device can parse a target starting message number and a target device model attribute corresponding to any smart device from an initialization request sent by any smart device based on a physical link in response to receiving the initialization request, match the target starting message number and the target device model attribute with the device model attribute and the historical message number in the data packet sent by each smart device last time, and match the target starting message number and the target device model attribute with the device model attribute and the starting message number corresponding to each smart device, and if both the first matching and the second matching fail, further establish a virtual link with any smart device based on the target starting message number and the target device model attribute, and store the target starting message number and the target device model attribute corresponding to any smart device.

[0063] If the matching result indicates a matching failure, the gateway device can send failure feedback information to any smart device to indicate a data receiving failure.

[0064] The gateway device can parse the new starting message number, the original starting message number and the target device model attribute corresponding to any smart device from the reconstruction request in response to receiving the reconstruction request sent by any smart device based on the failure feedback information; match the new starting message number and the target device model attribute with the device model attribute and the historical message number in the data packet sent by each smart device last received and stored; or match the new starting message number and the target device model attribute with the device model attribute and the starting message number corresponding to each smart device stored; if both the first match and the second match fail, further reconfigure the virtual link between the gateway device and any smart device based on the new starting message number and the target device model attribute.

[0065] Before reconfiguring the virtual link between the gateway device and any smart device based on the new starting message number and the target device model attribute, the gateway device can match the original starting message number and the target device model attribute with the device model attribute and the starting message number corresponding to each smart device stored; if the match is successful, replace the starting message number in the matched device model attribute and starting message number with the new starting message number to reconfigure the virtual link between the gateway device and any smart device; if the match fails, further reconfigure the virtual link between the gateway device and any smart device based on the new starting message number and the target device model attribute, and store the new starting message number and the target device model attribute corresponding to any smart device.

[0066] The smart device can be an Internet of Things device; the device model attribute can include a physical model attribute.

[0067] The Internet of Things device can include an Internet of Things device mounted on a vehicle; the vehicle can include a pickup truck.

[0068] See Figure 2 , Figure 2 is a flowchart of a multi-device communication method according to an example embodiment.

[0069] The physical link refers to an actual connection between two or more devices in a communication network through a physical medium (such as a cable, an optical fiber, a wireless signal, etc.), which is the basis of data transmission and is responsible for carrying signal transmission, and is a physical channel for communication between devices in the network.

[0070] The virtual link refers to a logical link created on a physical link through virtual technology in a computer network or communication system. It does not directly depend on the actual connection between physical devices, but achieves virtual transmission of data through configuration and control of network devices. Virtual link is often used to provide flexible network topology, improve network efficiency, scalability and reliability.

[0071] In the present disclosure, the gateway device can establish a virtual link with each of the plurality of smart devices through sharing the same physical link.

[0072] As shown in Figure 2 Based on the established virtual link, the gateway device can perform the following steps:

[0073] In response to receiving a data packet sent by any of the plurality of smart devices, the gateway device can parse a target data field content corresponding to the any smart device from the data packet.

[0074] The gateway device can parse the data packet sent by any of the plurality of smart devices to obtain a target data field content corresponding to the any smart device.

[0075] For example, the plurality of smart devices can include smart device_1, smart device_2 and smart device_3. The gateway device can parse the data packet sent by smart device_1 to obtain a target data field content corresponding to smart device_1.

[0076] Since the data packet formats of the virtual links are consistent, but the data field contents in the data packet formats are different, the different smart devices can be identified based on the data field contents.

[0077] For example, the target data field content corresponding to smart device_1 can be data field content_1, and the target data field content corresponding to smart device_2 can be data field content_2. Since the data field content_1 and the data field content_2 are different, the smart device_1 or the smart device_2 can be identified based on the target data field content.

[0078] In an embodiment, the gateway device can parse a target data field content corresponding to any smart device from at least one target field included in the data field of the data packet; wherein the data field contents stored in the at least one target field included in the data packets sent by different smart devices are different.

[0079] The data field of the data packet can include a plurality of data fields. Since the data field contents stored in part of the plurality of data fields are different, the gateway device can parse at least one target field in the part of the plurality of data fields to obtain the field content of the at least one target field, so as to identify different smart devices based on the field content.

[0080] For example, the data fields of the data packet can include data field 1, data field 2 and data field 3, wherein the data field contents included in the data field 1 and / or the data field 2 of different data packets are different, and thus the gateway device can be pre-configured to parse the data field 1 and the data field 2 in the data packet to obtain the data field contents of the data field 1 and the data field 2.

[0081] In this way, the gateway device can be configured to identify different smart devices according to the field contents of the specified data fields according to actual needs, thereby improving the flexibility of communication.

[0082] In step 204, a target virtual link corresponding to the data packet is determined according to the target data field content.

[0083] Since the target data field contents of different smart devices are different, and the virtual links are respectively established between the smart devices and the gateway device, the target link corresponding to the data packet can be determined according to the target data field content, thereby facilitating the processing of the data packet.

[0084] For example, the plurality of smart devices can include smart device 1, smart device 2 and smart device 3, the gateway device can establish a virtual link 1 with the smart device 1, the gateway device can establish a virtual link 2 with the smart device 2, and the gateway device can establish a virtual link 3 with the smart device 3. The gateway device receives the data packet sent by the smart device 1, parses the target data field content therefrom, and determines that the target virtual link corresponding to the data packet is the virtual link 1 according to the target data field content.

[0085] The specific determination method of the target virtual link can be set according to actual needs, which is not limited in the present disclosure.

[0086] In an embodiment shown, the gateway device can match the target data field content with the historical data field contents of the data packets sent by each smart device last time received and stored, and determine the target virtual link corresponding to the data packet based on the matching result.

[0087] The gateway device can process the data packet sent by each smart device every time it is received, and update the historical data field contents corresponding to each smart device stored.

[0088] For example, the gateway device can store a historical data field 1 corresponding to the smart device 1, and in the case that a data packet sent by the smart device 1 is received, the data packet can be processed, and the historical data field 1 can be replaced by a latest data field in the data packet according to the latest data field in the data packet.

[0089] It should be noted that the last time the gateway device receives the data packet sent by each smart device described in the disclosure includes the case that the gateway device successfully receives and processes the data packet sent by each smart device, and does not include the case that the gateway device receives but fails to process the data packet sent by each smart device.

[0090] In this way, the continuity of data transmission between each smart device can be improved.

[0091] The gateway device can match the parsed target data field content with the stored historical data field content in the last received data packet sent by each smart device, and can determine the virtual link indicated by the historical data field that matches successfully as the target virtual link.

[0092] For example, the gateway device can store a historical data field 1 corresponding to the smart device 1, a historical data field 2 corresponding to the smart device 2, and a historical data field 3 corresponding to the smart device 3. Based on this, the gateway device can match the parsed target data field content with the historical data field 1, the historical data field 2, and the historical data field 3, and if the target data field content matches the historical data field 3 successfully, the virtual link pointed by the historical data field 3 can be determined as the target virtual link.

[0093] In this way, different smart devices can be accurately identified, and the accuracy of identification can be improved.

[0094] The specific content of the data field content can be set according to actual needs, and the disclosure does not limit it. For example, the data field content can include a device model attribute and a message number.

[0095] In an embodiment shown, the data field content can include a device model attribute; the target data field content can further include a latest message number; the historical data field content can further include a historical message number; based on this, the gateway device can decrease the latest message number according to a preset rule, and match the decreased message number and the device model attribute with the stored device model attribute and historical message number in the last received data packet sent by each smart device.

[0096] The device model attribute can refer to attribute information used to describe characteristics, states, functions, etc. of the device. The message number can refer to the transmission number of the current data packet, and can be used to indicate the transmission order of the data packet.

[0097] Since the message number in different data packets transmitted by the same smart device is updated as the data packets are transmitted, the target data field content can include the latest message number, and the historical data field content can include the historical message number.

[0098] Based on this, when the gateway device receives a data packet, it can decrease the latest message number in the data packet according to a preset rule, and then match the device model attribute and the decreased message number with the device model attribute and the historical message number in the data packet sent by each smart device last time according to the stored device model attribute and historical message number, thereby improving the accuracy of the matching.

[0099] For example, the smart device_1 can send the gateway device data packet_1 and data packet_2, wherein the data field content of the data packet_1 can contain message number_1, and the data field content of the data packet_2 can contain message number_2. When the gateway device receives the data packet_2, it can indicate that the historical message number corresponding to the smart device_1 stored by the gateway device is message number_1. At this time, the message number_2 can be decreased according to a preset rule, and the decreased message number and the device model attribute can be matched with the stored device model attribute and message number_1, thereby enabling successful matching.

[0100] For another example, the preset rule can include decreasing by 1 each time, and the smart device_1 can send the gateway device data packet_1 and data packet_2, wherein the data field content of the data packet_1 can contain message number: 10, and the data field content of the data packet_2 can contain message number: 11. When the gateway device receives the data packet_2, it can indicate that the historical message number corresponding to the smart device_1 stored by the gateway device is 10. At this time, the message number: 11 can be decreased to 10 according to the preset rule, and the decreased message number: 10 and the device model attribute can be matched with the stored device model attribute and message number: 10.

[0101] In this way, the data packets sent by the same smart device can be received in turn according to the preset rule of the message number, thereby improving the continuity of data transmission.

[0102] The decreasing amplitude of the preset rule can be set according to actual needs, and the present disclosure does not limit this.

[0103] It should be noted that the gateway device can also store the device model attributes corresponding to each smart device and the historical message number after successfully receiving the data packet, so that in the case of receiving the same data packet sent by the same smart device, the same data packet received subsequently can be discarded directly, thereby saving computing resources without setting up a replay protection mechanism.

[0104] For example, smart device_1 can send multiple data packets_1 to the gateway device, where the data field content of the multiple data packets_1 can be data field content_1. When the gateway device successfully matches the data field content_1 of the first data packet_1 received with the stored data field content, it can update the stored data field content corresponding to smart device_1 based on the data field content_1. Based on this, the gateway device can discard other data packets_1 in the multiple data packets_1 when it receives them subsequently, thereby saving computing resources.

[0105] The device type of the smart device can be set according to actual needs, which is not limited in the present disclosure. For example, the smart device can include an Internet of Things device, or other smart devices that can access the gateway device through the same physical link.

[0106] In one embodiment shown, the smart device can be an Internet of Things device; the device model attribute can include a physical model attribute.

[0107] Among them, the Internet of Things device refers to a smart device that can communicate and exchange data with other devices or systems through a network. These devices are usually equipped with sensors, actuators, processors and communication modules, and can sense environmental information in real time, process data, and interact with the cloud or other devices, and are usually used to realize automation, intelligent control and remote monitoring functions.

[0108] In the present disclosure, the gateway device can establish a virtual link with each of the multiple Internet of Things devices through the same physical link.

[0109] The specific type of the Internet of Things device can be set according to actual needs, which is not limited in the present disclosure. For example, the Internet of Things device can include a lifting platform, a lamp or a high cover.

[0110] Based on the smart device being an Internet of Things device, the device model attribute can include a physical model attribute, which is usually a data structure in an Internet of Things system that describes the characteristics, state, function, etc. of a device or object. It is usually used to represent the digital abstract model of the device, which helps the device to interact and communicate with other systems (such as cloud platforms or other devices) by defining the attributes, events, services, etc. of the device.

[0111] In an illustrated implementation, the IoT device can include an IoT device mounted in a vehicle; the vehicle can include a pickup truck.

[0112] For example, the vehicle can include a pickup truck, the IoT device can include an IoT device mounted in the pickup truck, the gateway device can be a gateway device mounted in an infotainment system of the pickup truck, and the infotainment system can control a plurality of IoT devices mounted in the vehicle based on the gateway device.

[0113] In an illustrated implementation, the historical data field content can further include a starting message number; the latest message number can be obtained by any smart device based on the corresponding starting message number and according to a preset rule; the starting message numbers of the plurality of smart devices are different and are randomly generated by the plurality of smart devices respectively.

[0114] The starting message number can be randomly generated by the smart device, so that the starting message numbers of different smart devices are different. Since in the subsequent communication process, the latest message number carried in the data packet sent by the smart device to the gateway device is obtained based on the starting message number and according to a preset rule, and the starting message numbers of different smart devices are different, the latest message numbers in the data packets of different smart devices are also different.

[0115] The increment amplitude of the preset rule can be set according to actual needs, which is not limited in the present disclosure.

[0116] For example, the preset rule can include an increment of 1 each time, the starting message number of the smart device can be 268, the smart device can increment the starting message number by 1 to obtain the latest message number 269 and can carry the latest message number 269 in the data packet to send the data packet to the gateway device.

[0117] In this way, the starting message numbers and the latest message numbers of different smart devices are different, so that data processing errors caused by the same message number are avoided, and the accuracy of data transmission is improved.

[0118] In an illustrated implementation, if the matching result indicates a matching failure, failure feedback information is sent to any of the smart devices to indicate a data receiving failure.

[0119] If the gateway device matches the target data field content with the historical data field content in the data packet sent by each smart device and stored in the last time and the matching fails, it indicates that the virtual link between the gateway device and the smart device is not established or the virtual link transmits the data packet with an error. Therefore, the gateway device can send failure feedback information to the smart device to indicate a data receiving failure.

[0120] In this way, the intelligent device can process based on the failure feedback information, thereby improving the success rate of data transmission.

[0121] At step 206, the data packet is processed according to the processing mode corresponding to the target virtual link.

[0122] Since different intelligent devices correspond to different processing modes, and different intelligent devices correspond to different virtual links, after determining the target data link corresponding to the data packet, the data packet can be processed according to the processing mode corresponding to the target virtual link, thereby improving the accuracy of data processing.

[0123] In an embodiment shown, the gateway device establishes a virtual link with any of the above-mentioned intelligent devices by the following method:

[0124] Please refer to Figure 3 , Figure 3 is a flowchart of a virtual link establishment method according to an exemplary embodiment.

[0125] As Figure 3 shown, the gateway device performs the following steps:

[0126] At step 302, in response to receiving an initialization request sent by any intelligent device based on a physical link, the target starting message number and the target device model attribute corresponding to any intelligent device are parsed from the initialization request.

[0127] Any intelligent device can send an initialization request to the gateway device based on the physical link to request the gateway device to establish a corresponding virtual link with the intelligent device based on the physical link.

[0128] In order to avoid repeated establishment or erroneous establishment of the virtual link, the gateway device can parse the target starting message number and the target device model attribute corresponding to any intelligent device from the initialization request sent by the intelligent device, so as to determine whether a virtual link has been established with the intelligent device or a conflict has occurred with the established virtual link.

[0129] At step 304, the target starting message number and the target device model attribute are matched with the device model attribute and the historical message number in the data packet sent by each intelligent device received last time, and are also matched with the device model attribute and the starting message number corresponding to each intelligent device.

[0130] The gateway device can match the target device model attribute and the target starting message number with the stored device model attribute and the historical message number in the data packet sent by each smart device last received; and match the stored device model attribute and the starting message number corresponding to each smart device.

[0131] If the first match is successful or the second match is successful, it can be indicated that establishing a virtual link based on the target device model attribute and the target starting message number with the gateway device will conflict with other virtual links already established between the gateway device and other smart devices, and therefore, a virtual link cannot be established between the gateway device and any smart device based on the target device model attribute and the target starting message number.

[0132] For example, the gateway device can store the device model attribute and the message number corresponding to each smart device, including: device model attribute_1, starting message number_1: 123, and historical message number_1: 127, device model attribute_2, starting message number_2: 246, and historical message number_2: 251, device model attribute_3, starting message number_3: 666, and historical message number_3: 689; based on this, the gateway device can match the target starting message number and the target device model attribute with the stored device model attribute and the historical message number in the data packet sent by each smart device last received, and if the target device model attribute and the target starting message number are device model attribute_2 and 251, the first match can be successful.

[0133] Step 306, if the first match and the second match both fail, further establishing a virtual link based on the target starting message number and the target device model attribute with any smart device, and storing the target starting message number and the target device model attribute corresponding to any smart device.

[0134] If the first match and the second match both fail, it can be indicated that establishing a virtual link based on the target device model attribute and the target starting message number will not conflict with other virtual links already established.

[0135] Based on this, a virtual link can be established based on the target starting message number and the target device model attribute with the any smart device, and the target starting message number and the target device model attribute corresponding to the any smart device are stored, so as to facilitate data matching when receiving the data packet sent by the any smart device in the future, thereby determining the virtual link corresponding to the any smart device.

[0136] In an embodiment shown, the gateway device can parse, from the reconfiguration request sent by any smart device based on the failure feedback information, a new starting message number, an original starting message number and a target device model attribute corresponding to any smart device, match the new starting message number and the target device model attribute with the device model attribute and the historical message number in the data packet sent by each smart device last time received and stored, or match the new starting message number and the target device model attribute with the device model attribute and the starting message number corresponding to each smart device and stored, and reconfigure the virtual link with any smart device based on the new starting message number and the target device model attribute if both the first match and the second match fail.

[0137] In the process of communication based on the established virtual link, the gateway device can send failure feedback information to any smart device to indicate a failure in data reception, and any smart device can receive the failure feedback information and send a reconfiguration request to the gateway device to request reestablishment of a virtual link with the gateway device.

[0138] Based on this, the gateway device can parse, from the reconfiguration request sent by any smart device based on the failure feedback information, a new starting message number, an original starting message number and a target device model attribute corresponding to any smart device, so as to determine whether the new virtual link established based on the new starting message number and the target device model attribute conflicts with the already established virtual link based on the parsed new starting message number and the target device model attribute.

[0139] For example, if the first match succeeds or the second match succeeds, it can be indicated that the new virtual link established based on the new starting message number and the target device model attribute conflicts with the already established virtual link, and therefore, the new virtual link cannot be established between the gateway device and any smart device based on the new starting message number and the target device model attribute.

[0140] In this way, the virtual link can be reconfigured with any smart device, thereby improving the success rate of data transmission.

[0141] In an embodiment shown, before reconfiguring the virtual link with any smart device based on the new starting message number and the target device model attribute, the gateway device can match the original starting message number and the target device model attribute with the stored device model attributes and starting message numbers corresponding to each smart device; if the matching is successful, replace the starting message number in the matched device model attribute and starting message number with the new starting message number to reconfigure the virtual link with any smart device; if the matching is unsuccessful, further reconfigure the virtual link with any smart device based on the new starting message number and the target device model attribute, and store the new starting message number and the target device model attribute corresponding to any smart device.

[0142] To avoid repeated establishment of the virtual link, the gateway device can determine whether the virtual link already established between the gateway device and any smart device is available before reconfiguring the virtual link with any smart device based on the new starting message number and the target device model attribute.

[0143] For example, the original starting message number and the target device model attribute can be matched with the stored device model attributes and starting message numbers corresponding to each smart device; if the matching is successful, it can be indicated that the virtual link already established between the gateway device and any smart device is still available, thus the starting message number in the matched device model attribute and starting message number can be replaced with the new starting message number, so that a new virtual link does not need to be established again; if the matching is unsuccessful, it can be indicated that the virtual link already established between the gateway device and any smart device is disconnected or unavailable, at this time, the virtual link with any smart device can be further reconfigured based on the new starting message number and the target device model attribute, and the new starting message number and the target device model attribute corresponding to any smart device can be stored.

[0144] In this way, the efficiency of virtual link reconstruction can be improved.

[0145] Corresponding to the embodiments of the multi-device communication method, the present specification also provides an embodiment of a multi-device communication device.

[0146] Please refer to Figure 4 , Figure 4Fig. 1 is a hardware structure diagram of a user equipment in which a multi-device communication apparatus shown in an exemplary embodiment is located. At the hardware level, the equipment includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and can also include other hardware required by services. One or more embodiments of the present specification can be implemented in a software manner, such as reading a corresponding computer program from the non-volatile memory 410 into the memory 408 by the processor 402 and then running. Of course, in addition to the software implementation, one or more embodiments of the present specification do not exclude other implementation manners, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or a logic device.

[0147] Fig. 2 is a block diagram of a multi-device communication apparatus shown in an exemplary embodiment. The multi-device communication apparatus can be applied to the user equipment shown in Fig. 1 to implement the technical solutions of the present specification. Wherein, the apparatus can be applied to a gateway device; the gateway device and a plurality of smart devices establish virtual links through sharing the same physical link respectively; wherein, the data packet formats of each virtual link are consistent; the data field contents in the data packet formats of each virtual link are different; the apparatus can include: Figure 5 Figure 5 Fig. 3 is a flowchart of a method for processing a data packet in a multi-device communication apparatus shown in an exemplary embodiment. The method can be applied to the user equipment shown in Fig. 1 to implement the technical solutions of the present specification. Wherein, the method can include: Figure 4

[0148] analyzing, in response to receiving a data packet sent by any smart device in the plurality of smart devices, a target data field content corresponding to the any smart device from the data packet;

[0149] determining, according to the target data field content, a target virtual link corresponding to the data packet;

[0150] processing, according to a processing manner corresponding to the target virtual link, the data packet.

[0151] In the embodiment, the analyzing unit 502 can be specifically used for:

[0152] analyzing a target data field content corresponding to the any smart device from at least one target field contained in the data field of the data packet; wherein, the data field contents stored in the at least one target field contained in the data packets sent by different smart devices are different.

[0153] In the embodiment, the determining unit 504 can be specifically used for:

[0154] ​​The target data field content is matched with historical data field content in a data packet sent by each smart device last received and stored, and a target virtual link corresponding to the data packet is determined based on a matching result.

[0155] In the embodiment, the data field content can include a device model attribute, the target data field content can include a latest message number, and the historical data field content can include a historical message number.

[0156] The determination unit 504 can be specifically configured to:

[0157] The latest message number is decremented according to a preset rule, and the decremented message number and the device model attribute are matched with a device model attribute and a historical message number in a data packet sent by each smart device last received and stored.

[0158] In the embodiment, the historical data field content can include a start message number, the latest message number can be obtained by incrementing a corresponding start message number according to a preset rule by any smart device, and the start message numbers of the plurality of smart devices can be different and randomly generated by the plurality of smart devices respectively.

[0159] In the embodiment, the apparatus can include an initialization unit configured to:

[0160] Before a virtual link is established with any smart device, a target start message number and a target device model attribute corresponding to the any smart device are parsed from an initialization request sent by the any smart device based on the physical link in response to receiving the initialization request.

[0161] The target start message number and the target device model attribute are matched with a device model attribute and a historical message number in a data packet sent by each smart device last received and stored once, and matched with a device model attribute and a start message number corresponding to each smart device stored twice.

[0162] If the once matching and the twice matching both fail, a virtual link is further established with the any smart device based on the target start message number and the target device model attribute, and the target start message number and the target device model attribute corresponding to the any smart device are stored.

[0163] In the embodiment, the apparatus can further include an indication unit configured to:

[0164] If the matching result indicates a matching failure, failure feedback information is sent to the any smart device to indicate a data receiving failure.

[0165] In the embodiment, the apparatus can further comprise a configuration unit configured to:

[0166] In response to receiving a reconstruction request sent by any of the smart devices based on the failure feedback information, parsing a new starting message number, an original starting message number and a target device model attribute corresponding to any of the smart devices from the reconstruction request;

[0167] matching the new starting message number and the target device model attribute with the stored device model attribute and historical message number in the data packet sent by each smart device last received, or performing secondary matching with the stored device model attribute and starting message number corresponding to each smart device;

[0168] if the primary matching and the secondary matching both fail, further reconfiguring the virtual link between any of the smart devices based on the new starting message number and the target device model attribute.

[0169] In the embodiment, the apparatus can further comprise a replacement unit configured to:

[0170] Before reconfiguring the virtual link between any of the smart devices based on the new starting message number and the target device model attribute, matching the original starting message number and the target device model attribute with the stored device model attribute and starting message number corresponding to each smart device;

[0171] if the matching is successful, replacing the starting message number in the matched device model attribute and starting message number with the new starting message number to reconfigure the virtual link between any of the smart devices;

[0172] if the matching fails, further reconfiguring the virtual link between any of the smart devices based on the new starting message number and the target device model attribute, and storing the new starting message number and the target device model attribute corresponding to any of the smart devices.

[0173] In the embodiment, the smart device can be an Internet of Things device; and the device model attribute can comprise a thing model attribute.

[0174] In the embodiment, the Internet of Things device can comprise an Internet of Things device mounted in a vehicle; and the vehicle can comprise a pickup vehicle.

[0175] The functions and effects of each unit in the apparatus are achieved in the implementation process of the corresponding steps in the method, which will not be described here.

[0176] For apparatus embodiments, since they basically correspond to the method embodiments, relevant parts are explained by referring to the parts of the method embodiments. The apparatus embodiments described above are only illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purposes of the schemes of the present specification according to actual needs. Those skilled in the art can understand and implement it without creative effort.

[0177] The systems, apparatuses, modules or units illustrated by the embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an e-mail device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0178] In a typical configuration, a computer includes one or more processors (CPUs), input / output interfaces, network interfaces, and memories.

[0179] The memory can include non-persistent memory in computer readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or Flash memory. The memory is an example of computer readable media.

[0180] The computer readable media includes non-transitory and transitory, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic disks storage, quantum memory, graphene-based storage media, or other magnetic storage devices, or any other non-transitory medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory computer readable media, such as modulated data signals and carrier waves.

[0181] It is also to be noted that the terms "comprising", "including", and "having" or variations thereof herein, are intended to be open-ended terms that specify the presence of the stated elements but do not preclude the presence of additional elements. It is also to be noted that the term "if' as used herein, is intended to mean "when" or "if the condition is met" and therefore indicates that the events will occur if - but not necessarily guaranteed to occur.

[0182] The particular embodiments described are described for the purpose of illustrating the present disclosure and are not intended to limit the scope of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, an act or step can be performed in a different order from the described ordering or the described ordering can be performed concurrently. Furthermore, described processes can not require the particular sequence of acts or steps described, nor necessarily be limited to any sequence of acts or steps. In some embodiments, multitasking and parallel processing can be advantageous.

[0183] The terminology used in this description is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments described in this document. As used in this document, the singular forms "a," "an," and "the" include plural references unless the context clearly dictates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this document, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0184] It will be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are used only to distinguish one piece of information from another, but do not imply a limitation on the scope of one or more embodiments described in this document. For example, a first information can also be termed a second information, and similarly, a second information can also be termed a first information, without departing from the scope of one or more embodiments described in this document. The word "if' as used herein means "when" or "if the condition is met" or "in response to the determination" depending on the context.

[0185] The foregoing description of one or more embodiments has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit one or more embodiments described in this document to the precise form disclosed. Modifications, adaptations, and variations are possible in light of the scope of one or more embodiments described in this document. It is intended that the scope of one or more embodiments described in this document be limited only by the claims.

[0186] The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are information and data authorized by the user or authorized by all parties, and the collection, use and processing of the related data need to comply with the relevant laws, regulations and standards of the country and region, and provide corresponding operation entrances for the user to choose authorization or refusal.

Claims

1. A multi-device communication method, characterized in that, The method is applied to gateway devices; the gateway device establishes virtual links with multiple smart devices by sharing the same physical link; wherein the data packet format of each virtual link is consistent; and the data field content of the data packet format of each virtual link is different; the method includes: In response to receiving a data packet sent by any of the plurality of smart devices, the target data field content corresponding to any of the smart devices is parsed from the data packet; Based on the content of the target data field, the target virtual link corresponding to the data packet is determined; wherein, the content of the data field includes device model attributes, and the content of the target data field also includes the latest message number; The data packet is processed according to the processing method corresponding to the target virtual link.

2. The method according to claim 1, characterized in that, Parsing the target data field content corresponding to any of the smart devices from the data packet includes: Parse the target data field content corresponding to any smart device from at least one specified target field contained in the data field of the data packet; wherein the data field content stored in the at least one target field contained in the data packets sent by different smart devices is different.

3. The method according to claim 1, characterized in that, Based on the content of the target data field, the target virtual link corresponding to the data packet is determined, including: The target data field content is matched with the historical data field content in the data packets previously received from various smart devices, and the target virtual link corresponding to the data packet is determined based on the matching result.

4. The method according to claim 3, characterized in that, The historical data field also includes historical message numbers; Matching the target data field content with the historical data field content from the previously received data packets sent by various smart devices, including: The latest message number is decremented according to a preset rule, and the decremented message number and the device model attribute are matched with the device model attributes and historical message numbers in the data packets sent by each smart device in the last received data.

5. The method according to claim 4, characterized in that, The historical data field also includes the starting message number; the latest message number is obtained by any smart device by incrementing the corresponding starting message number according to a preset rule; the starting message numbers of the multiple smart devices are different and are randomly generated by the multiple smart devices respectively.

6. The method according to claim 5, characterized in that, Before establishing a virtual link with any of the smart devices, the method further includes: In response to receiving an initialization request sent by any of the smart devices based on the physical link, the target start message number and target device model attributes corresponding to any of the smart devices are parsed from the initialization request; The target starting message number and target device model attribute are matched once with the device model attribute and historical message number in the data packets sent by each smart device in the last received data packet; and a second match is performed with the device model attribute and starting message number corresponding to each smart device in the storage. If both the first and second matching fail, a virtual link is further established with any of the smart devices based on the target start message number and the target device model attributes, and the target start message number and target device model attributes corresponding to any of the smart devices are stored.

7. The method according to claim 3, characterized in that, The method further includes: If the matching result indicates a matching failure, a failure feedback message is sent to either of the smart devices to indicate that data reception failed.

8. The method according to claim 7, characterized in that, The method further includes: In response to receiving a reconstruction request sent by any of the smart devices based on the failure feedback information, the new starting message number, the original starting message number, and the target device model attribute corresponding to any of the smart devices are parsed from the reconstruction request; The new starting message number and target device model attribute are matched once with the device model attributes and historical message numbers in the data packets sent by each smart device in the last received data packet; or, a second matching is performed with the device model attributes and starting message numbers corresponding to each smart device in the storage. If both the first and second matching fail, the virtual link with any of the smart devices is reconfigured based on the new starting message number and the target device model attributes.

9. The method according to claim 8, characterized in that, Before reconfiguring the virtual link with any of the smart devices based on the new starting message number and target device model attributes, the method further includes: The original starting message number and target device model attribute are matched with the stored device model attributes and starting message numbers corresponding to each smart device. If the match is successful, the starting message number in the matching device model attribute and starting message number is replaced with the new starting message number to reconfigure the virtual link with any of the smart devices; If the matching fails, the virtual link between the device and the smart device is reconfigured based on the new start message number and the target device model attribute, and the new start message number and the target device model attribute corresponding to the smart device are stored.

10. The method according to claim 2, characterized in that, The smart device is an Internet of Things (IoT) device; the device model attributes include object model attributes.

11. The method according to claim 10, characterized in that, The IoT devices include IoT devices mounted in vehicles; the vehicles include pickup trucks.

12. A multi-device communication apparatus, applied to a gateway device; The gateway device establishes virtual links with multiple smart devices by sharing the same physical link; wherein, The data packet format is consistent across all virtual links; The data field content in the data packet format of each virtual link is different; the device includes: The parsing unit is configured to, in response to receiving a data packet sent by any one of the plurality of smart devices, parse the target data field content corresponding to any one of the smart devices from the data packet; The determining unit is configured to determine the target virtual link corresponding to the data packet based on the content of the target data field; wherein the content of the data field includes device model attributes, and the content of the target data field also includes the latest message number; The processing unit is used to process the data packet according to the processing method corresponding to the target virtual link.

13. A user equipment, comprising a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the multi-device communication method according to any one of claims 1 to 10 by invoking the machine-readable instructions.

14. A machine-readable storage medium storing machine-readable instructions, which, when invoked and executed by a processor, implement the multi-device communication method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Communication method, device and gateway

    CN114172929A

  • Full-link monitoring method and system for intelligently measuring complex service scene

    CN117914758A