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

By establishing a virtual link between the gateway device and multiple smart devices, the problem of low communication efficiency caused by high identifier proportion is solved, and more efficient packet processing and communication is achieved.

CN119854352AActive Publication Date: 2025-04-18ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the case of many smart devices, the identifier accounts for a high proportion of data packets, resulting in a low proportion of effective information, which in turn reduces communication efficiency.

Method used

By sharing the same physical link between the gateway device and multiple smart devices, virtual links are established separately. The packet format of each virtual link is the same but the data field content is different, so data packets for different smart devices are parsed and processed.

Benefits of technology

There is no need to allocate additional identifiers to smart devices, which avoids the problem of high identifier proportion, thereby improving communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854352A_ABST
    Figure CN119854352A_ABST
Patent Text Reader

Abstract

The invention provides a multi-device communication method and device, user equipment and a machine readable storage medium, which are applied to gateway equipment. Virtual links are respectively established between the gateway equipment and the plurality of intelligent equipment by sharing the 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; the method comprises the following steps: in response to a received data packet sent by any intelligent device in the plurality of intelligent devices, analyzing target data field content corresponding to the any intelligent 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 the processing mode corresponding to the target virtual link. According to the embodiment, the communication efficiency of multiple devices can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a multi-device communication method, apparatus, user equipment, and machine-readable storage medium. Background Art

[0002] In a network topology where a host device communicates with multiple smart devices based on the same physical link, a gateway device carried by the host device usually assigns identifiers to 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 the data packets sent by the smart devices.

[0003] Since there are many smart devices, the identifier accounts for a high proportion in the data field of the data packet, resulting in a low proportion of valid information actually carried in the data packet, which leads to low communication efficiency. Summary of the invention

[0004] The present disclosure provides a multi-device communication method, which is applied to a gateway device; the gateway device and multiple smart devices respectively establish virtual links by sharing the same physical link; wherein the data packet format of each virtual link is consistent; the data field content in the data packet format of each virtual link is different; the method comprises:

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

[0006] Determining a target virtual link corresponding to the data packet according to the target data field content;

[0007] The data packet is processed according to a processing method corresponding to the target virtual link.

[0008] Optionally, parsing the target data field content corresponding to any one of the smart devices from the data packet includes:

[0009] The target data field content corresponding to any one of the smart devices is parsed from at least one designated 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.

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

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

[0012] Optionally, the data field content includes device model attributes; the target data field content also includes the latest message number; the history data field content also includes the history message number;

[0013] Matching the target data field content with the stored historical data field content in the last received data packet sent by each smart device includes:

[0014] 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 received last time.

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

[0016] Optionally, before establishing a virtual link with any of the smart devices, the method further includes:

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

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

[0019] If both the first match and the second match fail, a virtual link is further established with 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.

[0020] Optionally, the method further includes:

[0021] If the matching result indicates a matching failure, a failure feedback message is sent to any of the smart devices to indicate a data reception failure.

[0022] Optionally, the method further includes:

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

[0024] Matching the new start message number and target device model attribute with the device model attribute and historical message number in the data packet sent by each smart device last received; or matching the new start message number and target device model attribute with the device model attribute and the start message number corresponding to each smart device stored for a second time;

[0025] If both the first match and the second match fail, the virtual link with any of the smart devices is reconfigured based on the new start message number and the target device model attribute.

[0026] Optionally, before reconfiguring the virtual link with any of the smart devices based on the new start message number and the target device model attribute, the method further includes:

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

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

[0029] If the matching fails, the virtual link with any of the smart devices is further 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 any of the smart devices are stored.

[0030] Optionally, the smart device is an Internet of Things device; and the device model attributes include object model attributes.

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

[0032] The present disclosure also provides a multi-device communication device, which is applied to a gateway device; the gateway device and multiple smart devices respectively establish virtual links by sharing the same physical link; wherein the data packet format of each virtual link is consistent; the data field content in the data packet format of each virtual link is different; the device comprises:

[0033] a parsing unit, configured to, in response to receiving a data packet sent by any smart device among the plurality of smart devices, parse the data packet to obtain target data field content corresponding to the any smart device;

[0034] a determination unit, configured to determine a target virtual link corresponding to the data packet according to the content of the target data field;

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

[0036] The present disclosure also provides 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;

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

[0038] The present disclosure also provides a machine-readable storage medium, wherein the machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the multi-device communication method is implemented.

[0039] The technical solution provided by the present disclosure may at least include the following beneficial effects:

[0040] Through the above embodiments, the gateway device can establish virtual links with multiple smart devices by sharing the same physical link. Since 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. Therefore, when the gateway device receives a data packet sent by any smart device among multiple smart devices, it can parse the target data field content corresponding to the any smart device from the data packet, and can determine the target virtual link corresponding to the data packet according to the target data field content, so as to process the data packet according to the processing method corresponding to the target virtual link. Based on this, the gateway device no longer needs to allocate identifiers for smart devices, which can avoid the high proportion of identifiers in data packets, thereby improving the efficiency of communication. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 2 It is a flowchart of a multi-device communication method shown in an exemplary embodiment.

[0043] Figure 3The present invention is a flowchart of a method for establishing a virtual link according to an exemplary embodiment.

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

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

[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0047] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may 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 communication efficiency.

[0049] During implementation, the method is applied to a gateway device; the gateway device can establish virtual links with multiple smart devices by 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 may parse the target data field content corresponding to any smart device from the data packet in response to receiving the data packet sent by any smart device among the multiple smart devices;

[0051] Determining a target virtual link corresponding to the data packet according to the target data field content;

[0052] The data packet is processed according to a processing method corresponding to the target virtual link.

[0053] Through the above embodiments, the gateway device can establish virtual links with multiple smart devices by sharing the same physical link. Since 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. Therefore, when the gateway device receives a data packet sent by any smart device among multiple smart devices, it can parse the target data field content corresponding to the any smart device from the data packet, and can determine the target virtual link corresponding to the data packet according to the target data field content, so as to process the data packet according to the processing method corresponding to the target virtual link. Based on this, the gateway device no longer needs to allocate identifiers for smart devices, which can avoid the high proportion of identifiers in data packets, thereby improving the efficiency of communication.

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

[0055] See also Figure 1 , Figure 1 FIG. 1 is a system architecture diagram of a multi-device communication method according to an exemplary embodiment. Figure 1 As shown, the host device may be equipped with a gateway device, and the gateway device may establish virtual links between multiple smart devices by sharing the same physical link; illustratively, the multiple smart devices may include smart device_1, smart device_2, and smart device_3, and the gateway device may establish virtual link_1 with smart device_1, virtual link_2 with smart device_2, and virtual link_3 with smart device_3. The data packet formats of the various virtual links are consistent, and the data field contents in the data packet formats of the various virtual links are different.

[0056] Based on this, the gateway device can respond to receiving a data packet sent by any smart device among multiple smart devices, parse the target data field content corresponding to any smart device from the data packet; determine the target virtual link corresponding to the data packet based on the target data field content; and process the data packet according to the processing method corresponding to the target virtual link.

[0057] Among them, the gateway device can 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 at least one target field contained in the data packets sent by different smart devices is different.

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

[0059] The data field content may include device model attributes; the target data field content may also include the latest message number; the history data field content may also include the history message number;

[0060] The gateway device can decrement the latest message number according to a preset rule, and match the decremented message number and device model attributes with the device model attributes and historical message numbers in the last received data packet sent by each smart device.

[0061] Among them, the content of the historical data field can also include the starting message number; the latest message number can be obtained by any smart device based on the corresponding starting message number according to preset rules; the starting message numbers of multiple smart devices can be different and are randomly generated by multiple smart devices.

[0062] Among them, before establishing a virtual link with any smart device, the gateway device can, in response to receiving an initialization request sent by any smart device based on a physical link, parse out the target start message number and target device model attributes corresponding to any smart device from the initialization request; match the target start message number and target device model attributes with the device model attributes and historical message numbers in the stored data packets sent by each smart device last received; and perform a second match with the stored device model attributes and start message numbers corresponding to each smart device; if both the first match and the second match fail, further establish a virtual link with any smart device based on the target start message number and the target device model attributes, and store the target start message number and target device model attributes corresponding to any smart device.

[0063] If the matching result indicates a matching failure, the gateway device may send a failure feedback message to any smart device to indicate a data reception failure.

[0064] Among them, the gateway device can respond to receiving a reconstruction request sent by any smart device based on failure feedback information, parse out the new start message number, original start message number and target device model attributes corresponding to any smart device from the reconstruction request; match the new start message number and target device model attributes with the device model attributes and historical message numbers in the stored data packet sent by each smart device last received; or, perform a second match with the stored device model attributes and start message numbers corresponding to each smart device; if both the first match and the second match fail, further reconfigure the virtual link with any smart device based on the new start message number and the target device model attributes.

[0065] Among them, before reconfiguring the virtual link with any smart device based on the new start message number and target device model attributes, the gateway device can match the original start message number and target device model attributes with the stored device model attributes and start message numbers corresponding to each smart device; if the match is successful, the start message number in the successfully matched device model attributes and start message numbers is replaced with the new start message number to reconfigure the virtual link with any smart device; if the match fails, the virtual link with any smart device is further reconfigured based on the new start message number and target device model attributes, and the new start message number and target device model attributes corresponding to any smart device are stored.

[0066] Among them, the smart device may be an Internet of Things device; and the device model attribute may include a thing model attribute.

[0067] Among them, the Internet of Things device may include an Internet of Things device installed in a vehicle; the vehicle may include a pickup truck.

[0068] See also Figure 2 , Figure 2 It is a flowchart of a multi-device communication method shown in an exemplary embodiment.

[0069] Among them, the physical link refers to the actual connection between two or more devices in a communication network through physical media (such as cables, optical fibers, wireless signals, etc.). It is the basis of data transmission, responsible for carrying signal transmission, and is the physical channel for communication between devices in the network.

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

[0071] In the present disclosure, a gateway device can establish virtual links with multiple smart devices by sharing the same physical link.

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

[0073] Step 202: in response to receiving a data packet sent by any smart device among the multiple smart devices, parse the data packet to obtain target data field content corresponding to the any smart device.

[0074] When receiving a data packet sent by any smart device among the multiple smart devices, the gateway device may parse the data packet and obtain the target data field content corresponding to the smart device.

[0075] For example, the multiple smart devices may include smart device_1, smart device_2 and smart device_3. When the gateway device receives a data packet sent by smart device_1, it may parse the data packet and obtain the target data field content corresponding to the smart device_1.

[0076] Since the data packet formats of each virtual link are consistent, but the data field contents in the data packet formats are different, 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 may be data field content_1, and the target data field content corresponding to smart device_2 may be data field content_2. Since there is a difference between data field content_1 and data field content_2, smart device_1 or smart device_2 can be identified based on the target data field content.

[0078] In one embodiment shown, the gateway device can 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 at least one target field contained in the data packets sent by different smart devices is different.

[0079] Among them, the data field of the data packet may include multiple data fields. Since some data fields in the multiple data fields store different data field contents, the gateway device can parse at least one target field in the part of the data fields and obtain the field content of the at least one target field, thereby identifying different smart devices based on the field content.

[0080] For example, the data field of the data packet may include data field_1, data field_2 and data field_3, wherein the data field contents contained in data field_1 and / or data field_2 of different data packets are different. Therefore, the gateway device may be pre-specified to parse the data field_1 and data field_2 in the data packet to obtain the data field contents of the data field_1 and data field_2.

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

[0082] Step 204: Determine a target virtual link corresponding to the data packet according to the target data field content.

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

[0084] For example, the multiple smart devices may include smart device_1, smart device_2, and smart device_3, the gateway device may establish virtual link_1 with smart device_1, the gateway device may establish virtual link_2 with smart device_2, and the gateway device may establish virtual link_3 with smart device_3. The gateway device receives the data packet sent by smart device_1, and may parse the target data field content therefrom, and determine, based on the target data field content, that the target virtual link corresponding to the data packet is virtual link_1.

[0085] The specific method for determining the target virtual link can be set according to actual needs, and the present disclosure does not limit this.

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

[0087] The gateway device may process the data packet each time it receives the data packet sent by each smart device, and update the stored historical data field content corresponding to each smart device.

[0088] For example, the gateway device may store the historical data field _1 corresponding to the smart device _1. When receiving a data packet sent by the smart device _1, the gateway device may process the data packet and replace the historical data field _1 with the latest data field according to the latest data field in the data packet.

[0089] It should be noted that the data packets sent by each smart device last received and described in the present disclosure include the data packets sent by each smart device that the gateway device received and processed successfully last time, and do not include the data packets sent by each smart device that the gateway device received but failed to process last time.

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

[0091] The gateway device may 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 may determine the virtual link indicated by the successfully matched historical data field as the target virtual link.

[0092] For example, the gateway device may store the historical data field_1 corresponding to the smart device_1, the historical data field_2 corresponding to the smart device_2, and the historical data field_3 corresponding to the smart device_3. Based on this, the gateway device may match the parsed target data field content with the historical data field_1, historical data field_2, and historical data field_3. If the target data field content successfully matches the historical data field_3, the virtual link pointed to by the historical data field_3 may be determined as the target virtual link.

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

[0094] The specific content of the data field can be set according to actual needs, and the present disclosure does not limit this. For example, the data field content can include device model attributes and message numbers.

[0095] In one embodiment shown, the data field content may include device model attributes; the target data field content may also include the latest message number; the historical data field content may also include the historical message number; based on this, the gateway device may decrement the latest message number according to a preset rule, and match the decremented message number and device model attributes with the device model attributes and historical message numbers in the stored data packets sent by each smart device at the last time.

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

[0097] As data packets are transmitted, message numbers in different data packets transmitted by the same smart device will also be updated. Therefore, the target data field content may include the latest message number, and the history data field content may include the history message number.

[0098] Based on this, when the gateway device receives a data packet, it can decrement the latest message number in the data packet according to the preset rules, and then match it with the device model attributes and historical message numbers in the stored data packets sent by each smart device last received based on the decremented message number and device model attributes, thereby improving the accuracy of the match.

[0099] For example, the smart device 1 may send data packet 1 and data packet 2 to the gateway device, wherein the data field content of data packet 1 may include message number 1, and the data field content of data packet 2 may include message number 2. When the gateway device receives data packet 2, it may indicate that the historical message number corresponding to the smart device 1 stored in the gateway device is message number 1. At this time, the message number 2 may be decremented according to the preset rule, and the decremented message number and device model attributes may be matched with the stored device model attributes and message number 1, so that the match is successful.

[0100] For another example, the preset rule may include decrementing by 1 each time, and the smart device 1 may send data packet 1 and data packet 2 to the gateway device, wherein the data field content of the data packet 1 may include the message number: 10, and the data field content of the data packet 2 may include the message number: 11. When the gateway device receives the data packet 2, it may indicate that the historical message number corresponding to the smart device 1 stored in the gateway device is 10. At this time, the message number: 11 may be decremented to: 10 according to the preset rule, and the decremented message number: 10 and the device model attribute are matched with the stored device model attribute and message number: 10.

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

[0102] The decreasing range 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 after successfully receiving a data packet, the gateway device can also store the device model attributes and historical message numbers corresponding to each smart device, so that when the same data packet sent by the same smart device is received, the subsequent received data packet can be directly discarded, thereby eliminating the need to set an anti-replay mechanism and saving computing resources.

[0104] For example, the smart device 1 may send multiple data packets 1 to the gateway device, wherein the data field content of the multiple data packets 1 may include data field content 1. When the gateway device successfully matches the data field content 1 of the first received data packet 1 with the stored data field content, the stored data field content corresponding to the smart device 1 may be updated based on the data field content 1. Based on this, when the gateway device subsequently receives other data packets 1 in the multiple data packets 1, the other data packets 1 may be directly discarded, thereby saving computing resources.

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

[0106] In one embodiment shown, the smart device may be an Internet of Things device; and the device model attributes may include object model attributes.

[0107] IoT devices refer to smart devices that can communicate and exchange data with other devices or systems through the Internet. These devices are usually equipped with sensors, actuators, processors and communication modules, which can sense environmental information in real time, process data, and interact with the cloud or other devices. They are usually used to achieve functions such as automation, intelligent control and remote monitoring.

[0108] In the present disclosure, a gateway device can establish virtual links with multiple IoT devices by sharing the same physical link.

[0109] The specific type of the IoT device can be set according to actual needs, and the present disclosure does not limit this. For example, the IoT device may include a lifting platform, a lamp, or a high cover.

[0110] As the smart device is an IoT device, the device model attribute may include object model attributes, which are usually data structures that describe the characteristics, status, functions, etc. of a device or object in the IoT system. It is usually used to represent the digital abstract model of the device, which helps the device interact and communicate with other systems (such as cloud platforms or other devices) by defining the device's attributes, events, services, etc.

[0111] In one embodiment shown, the IoT device may include an IoT device carried in a vehicle; the vehicle may include a pickup truck.

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

[0113] In one embodiment shown, the content of the historical data field may also include a starting message number; the above-mentioned latest message number can be obtained by any smart device based on the corresponding starting message number and incremented according to preset rules; the starting message numbers of multiple smart devices are different and are randomly generated by multiple smart devices.

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

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

[0116] For example, the preset rule may include increasing by 1 each time. The starting message number of the smart device may be 268. The smart device may increase the starting message number by 1 to obtain the latest message number 269 and may carry the latest message number 269 in a 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 can be different, thereby avoiding data processing errors caused by the same message numbers and improving the accuracy of data transmission.

[0118] In one embodiment shown, if the matching result indicates a matching failure, a failure feedback message is sent to any of the above-mentioned smart devices to indicate a data reception failure.

[0119] If the gateway device matches the target data field content with the historical data field content in the stored data packet sent by each smart device last received and the match fails, it indicates that the virtual link between the gateway device and the smart device has not been established or an error has occurred in the transmission of the data packet on the virtual link. Therefore, the gateway device can send failure feedback information to the smart device to indicate that data reception failed.

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

[0121] Step 206: Process the data packet according to a processing method corresponding to the target virtual link.

[0122] Since different smart devices correspond to different processing methods, and different smart 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 method corresponding to the target virtual link, thereby improving the accuracy of data processing.

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

[0124] See also Figure 3 , Figure 3 The present invention is a flowchart of a method for establishing a virtual link according to an exemplary embodiment.

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

[0126] Step 302: In response to receiving an initialization request sent by any smart device based on a physical link, a target start message number and a target device model attribute corresponding to any smart device are parsed from the initialization request.

[0127] Among them, any smart 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 smart device based on the physical link.

[0128] In order to avoid repeated or incorrect establishment of virtual links, the gateway device can, upon receiving an initialization request sent by any smart device, parse the target start message number and target device model attributes corresponding to any smart device from the initialization request, so as to determine whether a virtual link has been established with any smart device, or whether a conflict occurs with an already established virtual link.

[0129] Step 304, match the target start message number and target device model attributes with the device model attributes and historical message numbers in the data packets sent by each smart device last received; and match them with the stored device model attributes and start message numbers corresponding to each smart device for a second time.

[0130] The gateway device can match the target start message number and target device model attributes once with the device model attributes and historical message numbers in the data packets sent by each smart device that were last received; and perform a second match with the stored device model attributes and start message numbers corresponding to each smart device.

[0131] If the first match is successful or the second match is successful, it can be indicated that the virtual link established with the gateway device based on the target device model attribute and the target start message number will conflict with other virtual links that have been established between the gateway device and other smart devices. Therefore, it is impossible to establish a virtual link with any smart device based on the target device model attribute and the target start message number.

[0132] For example, the device model attributes and message numbers corresponding to each smart device that the gateway device can store may include: 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 target device model attribute with the device model attributes and historical message numbers in the stored data packets sent by each smart device last received. If the target device model attribute and target starting message number are device model attribute_2 and 251, the match can be successful.

[0133] Step 306: If both the first match and the second match fail, a virtual link is further established with 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 any smart device are stored.

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

[0135] Based on this, a virtual link can be established with any smart device based on the target start message number and the target device model attributes, and the target start message number and the target device model attributes corresponding to any smart device can be stored to facilitate data matching when the data packet sent by any smart device is subsequently received, thereby determining the virtual link corresponding to any smart device.

[0136] In one embodiment shown, the gateway device can respond to receiving a reconstruction request sent by any smart device based on failure feedback information, parse out the new start message number, original start message number and target device model attributes corresponding to any smart device from the reconstruction request; match the new start message number and target device model attributes with the device model attributes and historical message numbers in the stored data packet sent by each smart device last received; or, perform a second match with the stored device model attributes and start message numbers corresponding to each smart device; if both the first match and the second match fail, further reconfigure the virtual link with any smart device based on the new start message number and the target device model attributes.

[0137] During communication based on the established virtual link, the gateway device may send failure feedback information to any smart device to indicate data reception failure, and any smart device may receive the failure feedback information and send a reconstruction request to the gateway device to request to re-establish the virtual link with the gateway device.

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

[0139] For example, if the first match is successful or the second match is successful, it may indicate that establishing a new virtual link based on the new start message number and the target device model attributes will conflict with the already established virtual link. Therefore, it is impossible to establish a new virtual link with any smart device based on the new start message number and the target device model attributes.

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

[0141] In one embodiment shown, before reconfiguring the virtual link with any smart device based on the new start message number and target device model attributes, the gateway device may match the original start message number and target device model attributes with the stored device model attributes and start message numbers corresponding to each smart device; if the match is successful, the start message number in the successfully matched device model attributes and start message numbers is replaced with the new start message number to reconfigure the virtual link with any smart device; if the match fails, the virtual link with any smart device is further reconfigured based on the new start message number and target device model attributes, and the new start message number and target device model attributes corresponding to any smart device are stored.

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

[0143] For example, the original starting message number and target device model attributes can be matched with the stored device model attributes and starting message numbers corresponding to each smart device; if the match is successful, it can indicate that the virtual link established between the gateway device and any smart device is still available, so the starting message number in the successfully matched device model attributes and starting message number can be replaced with a new starting message number, thereby eliminating the need to re-establish a new virtual link; if the match fails, it can indicate that the virtual link established between the gateway device and any smart device is disconnected or unavailable, at which point the virtual link with any smart device can be further reconfigured based on the new starting message number and target device model attributes, and the new starting message number and target device model attributes 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 embodiment of the multi-device communication method, this specification also provides an embodiment of a multi-device communication apparatus.

[0146] See also Figure 4 , Figure 4This is a hardware structure diagram of a user device where a multi-device communication device is located, which is shown in an exemplary embodiment. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0147] See also Figure 5 , Figure 5 is a block diagram of a multi-device communication apparatus shown in an exemplary embodiment. The multi-device communication apparatus can be applied to Figure 4 In the user equipment shown, the technical solution of this specification is implemented. The device can be applied to a gateway device; the gateway device and multiple smart devices establish virtual links respectively by sharing the same physical link; the data packet format of each virtual link is consistent; the data field content in the data packet format of each virtual link is different; the device may include:

[0148] The parsing unit 502 is configured to, in response to receiving a data packet sent by any smart device among the multiple smart devices, parse the data packet to obtain target data field content corresponding to the any smart device;

[0149] A determination unit 504, configured to determine a target virtual link corresponding to the data packet according to the target data field content;

[0150] The processing unit 506 is configured to process the data packet according to a processing method corresponding to the target virtual link.

[0151] In this embodiment, the parsing unit 502 may be specifically used for:

[0152] The target data field content corresponding to any one of the smart devices is parsed from at least one designated 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.

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

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

[0155] In this embodiment, the data field content may include device model attributes; the target data field content may also include the latest message number; the history data field content may also include the history message number;

[0156] The determination unit 504 may be specifically used for:

[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 the device model attribute and the historical message number in the data packet sent by each smart device received last time.

[0158] In this embodiment, the content of the above-mentioned historical data field may also include a starting message number; the above-mentioned latest message number may be obtained by any of the above-mentioned smart devices based on the corresponding starting message number and incremented according to preset rules; the starting message numbers of the above-mentioned multiple smart devices may be different and are randomly generated by the above-mentioned multiple smart devices respectively.

[0159] In this embodiment, the above-mentioned device may include an initialization unit, which is used to:

[0160] Before establishing a virtual link with any of the smart devices, in response to receiving an initialization request sent by any of the smart devices based on the physical link, parsing the target start message number and target device model attribute corresponding to any of the smart devices from the initialization request;

[0161] Matching the above target start message number and target device model attribute with the device model attribute and historical message number in the data packet sent by each smart device last received; and matching it with the stored device model attribute and start message number corresponding to each smart device;

[0162] If both the first and second matches 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 attribute, and the target start message number and the target device model attribute corresponding to any of the smart devices are stored.

[0163] In this embodiment, the above device may further include an indication unit, which is used to:

[0164] If the above matching result indicates that the matching fails, a failure feedback message is sent to any of the above smart devices to indicate that the data reception fails.

[0165] In this embodiment, the above device may further include 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 the reconstruction request to obtain a new start message number, an original start message number and a target device model attribute corresponding to any of the smart devices;

[0167] Match the new start message number and target device model attribute with the device model attribute and historical message number in the data packet sent by each smart device last received; or match them twice with the stored device model attribute and start message number corresponding to each smart device;

[0168] If both the first match and the second match fail, the virtual link with any of the smart devices is reconfigured based on the new start message number and the target device model attribute.

[0169] In this embodiment, the above device may further include a replacement unit, which is used to:

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

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

[0172] If the above matching fails, further based on the above new start message number and target device model attributes, reconfigure the virtual link with any of the above smart devices, and store the new start message number and target device model attributes corresponding to any of the above smart devices.

[0173] In this embodiment, the above-mentioned smart device may be an Internet of Things device; and the above-mentioned device model attributes may include object model attributes.

[0174] In this embodiment, the above-mentioned Internet of Things device may include an Internet of Things device installed in a vehicle; the above-mentioned vehicle may include a pickup truck.

[0175] The implementation process of the functions and effects of each unit in the device is specifically described in the implementation process of the corresponding steps in the method, which will not be repeated here.

[0176] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

[0177] The systems, devices, modules or units described in the embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of 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 email transceiver, 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 (CPU), input / output interfaces, network interfaces, and memory.

[0179] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0180] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be 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 disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0181] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0182] The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0183] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0184] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0185] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

[0186] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

Claims

1. A multi-device communication method, characterized in that: Applied to a gateway device; the gateway device and multiple smart devices establish virtual links respectively by sharing the 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; the method comprises: In response to receiving a data packet sent by any smart device among the multiple smart devices, parsing the data packet to obtain target data field content corresponding to the any smart device; Determining a target virtual link corresponding to the data packet according to the target data field content; The data packet is processed according to a 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 one of the smart devices from the data packet includes: The target data field content corresponding to any one of the smart devices is parsed from at least one designated 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 Determining a target virtual link corresponding to the data packet according to the target data field content includes: The target data field content is matched with the historical data field content in the data packet sent by each smart device that is stored last time, 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 data field content includes the device model attributes; the target data field content also includes the latest message number; the history data field content also includes the history message number; Matching the target data field content with the stored historical data field content in the last received data packet sent by each smart device includes: 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 received last time.

5. The method according to claim 4, characterized in that The content of the historical data field also includes a starting message number; the latest message number is obtained by incrementing the corresponding starting message number of any smart device 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 one of the smart devices based on the physical link, parsing the target start message number and target device model attribute corresponding to any one of the smart devices from the initialization request; Matching the target start message number and target device model attribute with the device model attribute and historical message number in the data packet sent by each smart device last received; and matching the target start message number and target device model attribute with the device model attribute and the historical message number stored corresponding to each smart device; If both the first match and the second match fail, a virtual link is further established with 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.

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

8. The method according to claim 7, characterized in that The method further comprises: In response to receiving a reconstruction request sent by any smart device based on the failure feedback information, parsing a new start message number, an original start message number and a target device model attribute corresponding to any smart device from the reconstruction request; Matching the new start message number and target device model attribute with the device model attribute and historical message number in the data packet sent by each smart device last received; or matching the new start message number and target device model attribute with the device model attribute and the start message number corresponding to each smart device stored for a second time; If both the first match and the second match fail, the virtual link with any of the smart devices is reconfigured based on the new start message number and the target device model attribute.

9. The method according to claim 8, characterized in that Before reconfiguring the virtual link with any one of the smart devices based on the new start message number and the target device model attribute, the method further includes: Matching the original start message number and target device model attribute with the stored device model attribute and start message number corresponding to each smart device; If the matching is successful, replacing the starting message number in the successfully matched device model attribute and the starting message number with the new starting message number to reconfigure the virtual link with any one of the smart devices; If the matching fails, the virtual link with any of the smart devices is further 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 any of the smart devices are stored.

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

11. The method according to claim 10, characterized in that The Internet of Things device includes an Internet of Things device installed in a vehicle; the vehicle includes a pickup truck.

12. A multi-device communication device, applied to a gateway device; The gateway device and multiple smart devices establish virtual links by sharing the same physical link; wherein, The data packet format of each virtual link is consistent; The data field contents in the data packet formats of the virtual links are different; the device comprises: a parsing unit, configured to, in response to receiving a data packet sent by any smart device among the plurality of smart devices, parse the data packet to obtain target data field content corresponding to the any smart device; a determination unit, configured to determine a target virtual link corresponding to the data packet according to the content of the target data field; The processing unit is used to process the data packet according to a 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 calling the machine-readable instructions.

14. A machine-readable storage medium, wherein the machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the multi-device communication method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Hardware based network simulation system and method

    CN104954166A

  • Multi-link data transmission method and apparatus

    CN105656747A

  • Network detection method and platform and computer readable storage medium

    CN113055238A

  • Communication method, device and gateway

    CN114172929A

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

    CN117914758A