Network keep-alive method and device

By carrying the group identifier of the device in the heartbeat keep-alive broadcast message, the devices are kept alive based on the group they belong to, solving the problem of low load and low efficiency of the existing technology center's keep-alive broadcast message, and achieving the effect of efficiently maintaining multiple devices online.

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

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the target device logo carried in the heartbeat keep-alive broadcast message is large in length, resulting in a small load, which may cause the sending end to send multiple heartbeat keep-alive broadcast messages, which is not time-consuming and efficient, affecting the user experience.

Method used

By carrying the group identifier to which the device belongs in the heartbeat keep-alive broadcast message, the devices maintain the group based on the respective groups to which they belong, improving the efficiency of the heartbeat keep-alive broadcast message.

Benefits of technology

In a shorter time, a heartbeat keeps broadcast message can maintain multiple devices in the "network online" state, which is more efficient and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118368750B_ABST
    Figure CN118368750B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and device for keeping a network alive. The method includes: a first device receives a heartbeat keep-alive broadcast message from a second device, the heartbeat keep-alive broadcast message is used to indicate that the second device is in a network online state, and the heartbeat keep-alive broadcast message includes a first identifier, and the first identifier is used to indicate the group to which the second device belongs; the first device matches the first identifier and the second identifier to obtain a matching result, wherein the second identifier is used to indicate the group to which the first device belongs; and the heartbeat keep-alive broadcast message is processed according to the matching result. In the embodiment of the present application, the devices are kept alive based on the groups to which they belong. In this way, in a relatively short period of time, a heartbeat keep-alive broadcast message can maintain multiple devices in a "network online" state, which is highly efficient and thus helps to improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202210518197.2 and the original application date is May 2022

[0002] On the 13th, the name of the invention was “Networking Preservation Method and Device Thereof”, and all the contents of the original application were incorporated into this application by reference. Technical Field

[0003] The embodiments of the present application relate to the field of terminals, and more specifically, to a method and device for maintaining network aliveness. Background Art

[0004] After the connection is established between devices, a periodic heartbeat keep-alive broadcast message is usually initiated between the networked devices, and the target device identification field is filled in the advertising data (AD data) field area of ​​the heartbeat keep-alive broadcast message. In this way, the receiving end can determine whether to maintain the device in a "networked online" state through the target device identification in the heartbeat keep-alive broadcast message, and then determine whether to exchange information.

[0005] Currently, the target device identifier is relatively long, so the target device identifier carried by a heartbeat keep-alive broadcast message has a small payload. In a real network environment, a device is often networked with multiple devices. If the payload of the target device identifier carried in a heartbeat keep-alive broadcast message is too small, it may cause the sender to send multiple heartbeat keep-alive broadcast messages, making the process of maintaining the device in the "network online" state time-consuming and inefficient, which in turn leads to a poor user experience. Summary of the invention

[0006] The embodiment of the present application provides a method and device for network keep-alive. In the method for network keep-alive, a heartbeat keep-alive broadcast message can maintain multiple devices in a "network online" state in a relatively short period of time, which is highly efficient and helps to improve user experience.

[0007] In a first aspect, a system is provided, comprising a first device and a second device, wherein the second device is used to broadcast a first heartbeat keep-alive broadcast message, wherein the first heartbeat keep-alive broadcast message is used to indicate that the second device is in a networking online state, and the first heartbeat keep-alive broadcast message comprises a first identifier, wherein the first identifier is used to indicate a group to which the second device belongs; the first device is used to match the first identifier with the second identifier in response to receiving the first heartbeat keep-alive broadcast message to obtain a first matching result, wherein the second identifier is used to indicate the group to which the first device belongs; and the first device is further used to process the first heartbeat keep-alive broadcast message according to the first matching result.

[0008] In an embodiment of the present application, the second device carries the group to which the second device belongs in the first heartbeat keep-alive broadcast message, so that the first device can match the received first identifier indicating the group to which the second device belongs and the second identifier of the group to which the first device belongs, and process the received first heartbeat keep-alive broadcast message of the second device according to the first matching result. In other words, the devices are kept alive based on the groups to which they belong. In this way, in a relatively short period of time, a first heartbeat keep-alive broadcast message can maintain multiple devices in a "network online" state, which is highly efficient and thus helps to improve user experience. In combination with the first aspect, in some implementations of the first aspect, the first identifier is generated based on the authentication method between the second device and the third device, and the third device is a device in the group to which the second device belongs; and / or, the second identifier is generated based on the authentication method between the first device and the fourth device, and the fourth device is a device in the group to which the first device belongs.

[0009] In an embodiment of the present application, since the authentication method and the identifier used to indicate the group to which the device belongs (such as the first identifier or the second identifier) ​​have a one-to-one correspondence, the identifier used to indicate the group to which the device belongs can be compatible with various types of authentication methods between devices. In this way, when expanding the authentication method in the future, there is no need to modify the structure of TGID, and the first heartbeat keep-alive broadcast message has a higher scalability.

[0010] In combination with the first aspect, in certain implementations of the first aspect, the first identifier also includes a first identifier and / or a second identifier; wherein the first identifier is used to indicate whether a response to the first heartbeat keep-alive broadcast message is required; and the second identifier is used to indicate the authentication type between the second device and the third device.

[0011] By setting an identification bit in the first identifier to identify whether it is necessary to respond to the first heartbeat keep-alive broadcast message, the first device can determine whether to respond to the first heartbeat keep-alive broadcast message based on the first heartbeat keep-alive broadcast message, and then can respond to the first heartbeat keep-alive broadcast message on demand from the demand side (the second device), which can greatly reduce the bandwidth and power consumption load of the first device.

[0012] By setting an identification bit for identifying the authentication type corresponding to the trusted group identifier in the first identifier, the first device can determine the degree of protection of the privacy data of the user on the first device for the sender (second device) based on the first heartbeat keep-alive broadcast message.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the authentication type includes a same-account authentication type and a different-account authentication type.

[0014] If the authentication type corresponding to the identifier for identifying the authentication type included in the first identifier is an authentication method for the same account, then the receiving end (first device) can consider that the sending end (second device) and the receiving end (first device) are personal devices based on the first identifier, that is, the sending end (second device) and the receiving end (first device) are devices belonging to the same person. In this way, the receiving end (first device) can determine that: for the sending end (second device), the protection level of the user's privacy data on the receiving end (first device) is relatively low. Then, the receiving end (first device) can share the user's privacy data on the receiving end (first device) with the sending end (second device).

[0015] If the authentication type corresponding to the identifier for identifying the authentication type included in the first identifier is an authentication method for a different account, the receiving end (first device) can assume, based on the first identifier, that the sending end (second device) and the receiving end (first device) may not be personal devices, that is, the sending end (second device) and the receiving end (first device) may not be devices of the same person. In this way, the receiving end (first device) can determine that: for the sending end (second device), the privacy data of the user on the receiving end (first device) is more protected. Then, the receiving end (first device) may not share the privacy data of the user on the receiving end (first device) with the sending end (second device).

[0016] In combination with the first aspect, in certain implementations of the first aspect, the first device is further specifically used to: determine that the first matching result is a match, and maintain a networking state with the second device based on the first heartbeat keep-alive broadcast message.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the communication system also includes a fifth device, the fifth device being used to broadcast a second heartbeat keep-alive broadcast message, the second heartbeat keep-alive broadcast message being used to indicate that the fifth device is in a networking online state, the second heartbeat keep-alive broadcast message including a fifth identifier, the fifth identifier being used to indicate the group to which the fifth device belongs; the first device is also used to, in response to receiving the second heartbeat keep-alive broadcast message, match the fifth identifier with the second identifier to obtain a second matching result; the first device is also used to determine that the second matching result is a mismatch, and discard the second heartbeat keep-alive broadcast message.

[0018] In a second aspect, a method for network keep-alive is provided, the method comprising: a first device receives a first heartbeat keep-alive broadcast message from a second device, the first heartbeat keep-alive broadcast message is used to indicate that the second device is in a network online state, the first heartbeat keep-alive broadcast message includes a first identifier, the first identifier is used to indicate the group to which the second device belongs; the first device matches the first identifier with the second identifier to obtain a first matching result, wherein the second identifier is used to indicate the group to which the first device belongs; the first device processes the first heartbeat keep-alive broadcast message according to the first matching result.

[0019] In an embodiment of the present application, the first device matches the received first identifier for indicating the group to which the second device belongs, and the second identifier of the group to which the first device belongs, and processes the received first heartbeat keep-alive broadcast message of the second device according to the first matching result. In other words, the devices are kept alive based on the groups to which they belong. In this way, in a relatively short period of time, a first heartbeat keep-alive broadcast message can maintain multiple devices in a "network online" state, which is highly efficient and thus helps to improve the user experience.

[0020] In combination with the second aspect, in some implementations of the second aspect, the first identifier is generated based on an authentication method between the second device and a third device, and the third device is a device in the group to which the second device belongs.

[0021] In combination with the second aspect, in certain implementations of the second aspect, the first identifier also includes a first identifier and / or a second identifier; wherein the first identifier is used to indicate whether a response to the first heartbeat keep-alive broadcast message is required; and the second identifier is used to indicate the authentication type between the second device and the third device.

[0022] In combination with the second aspect, in certain implementations of the second aspect, the authentication type includes a same-account authentication type and a different-account authentication type.

[0023] In combination with the second aspect, in some implementations of the second aspect, the length of the first identifier is related to a scenario in which the first device is used.

[0024] In view of the different numbers of devices in different scenarios, the requirements for the maximum number of TGIDs, and the different sensitivities to power consumption and / or bandwidth, different lengths of the first identifier are set for different scenarios, so as to flexibly adapt to the needs of different scenarios.

[0025] For example, in industrial scenarios, most of the equipment is powered, so the equipment is less sensitive to power consumption and / or bandwidth, that is, the performance requirements for the first heartbeat keep-alive broadcast message in industrial scenarios are relatively low. However, the number of equipment in industrial scenarios is relatively large, and often a factory area has thousands to tens of thousands of equipment. Therefore, if there is no conflict in TGID, the higher the requirement for the maximum number of TGIDs in industrial scenarios, the longer the TGID can be set to increase the value of the maximum number of TGIDs.

[0026] In the home scenario, there are many non-powered devices, so the devices are more sensitive to power consumption and / or bandwidth, that is, the performance requirements for the first heartbeat keep-alive broadcast message 2 in the scenario are higher. However, the number of devices in the home scenario is relatively small, so when there is no conflict in TGID, the requirement for the maximum number of TGIDs in the home scenario may not be so high. At this time, the length of TGID can be set relatively small, increasing the number of TGIDs carried by the first heartbeat keep-alive broadcast message 2 in one broadcast, and reducing the power consumption and / or bandwidth of the device.

[0027] In combination with the second aspect, in certain implementations of the second aspect, the method also includes: the first device generates the fourth identifier based on an authentication method between the first device and a fourth device, and the fourth device is a device within the group to which the first device belongs; performing a hash calculation on the fourth identifier, and intercepting the last M bits as the second identifier.

[0028] It should be noted that the first device may generate the second identifier before receiving the first heartbeat keep-alive broadcast message; or, the first device may generate the second identifier after receiving the first heartbeat keep-alive broadcast message and before the first device matches the first identifier with the second identifier; or, the first device may generate the second identifier during the process of receiving the first heartbeat keep-alive broadcast message; the embodiments of the present application are not limited to this.

[0029] In combination with the second aspect, in certain implementations of the second aspect, the length of the first identifier is N bits, the length of the second identifier is M bits, and the first device matches the first identifier with the second identifier to obtain a first matching result, including: when N>M, the first device matches the value of the M bits after the first identifier with the value of the second identifier to obtain the first matching result; or, when N<M, the first device matches the value of the first identifier with the value of the N bits after the second identifier to obtain the first matching result.

[0030] It should be noted that when N>M, the value of the M bits after the first identifier can be understood as: the content obtained by cutting the M bits of the first identifier from the back to the front. The value of the second identifier can be understood as the content of the M bits of the second identifier.

[0031] When N<M, the value of the first identifier can be understood as the content of the N bits of the first identifier; the value of the N bits after the second identifier can be understood as: the content obtained by intercepting the N bits of the second identifier from the back to the front.

[0032] In combination with the second aspect, in some implementations of the second aspect, 8≤N≤20, and / or, 8≤M≤20.

[0033] Usually, the length of the identifier used to indicate the group to which the device belongs is set between 8 bits and 20 bits to meet the needs of the scenario. In this way, a first heartbeat keep-alive broadcast message has a maximum of 7.5 bytes (60 bits) used to carry the target device identifier, so the number of TGIDs carried by a first heartbeat keep-alive broadcast message is 3 to 5. In this way, the number of target device identifiers carried by the first heartbeat keep-alive broadcast message is more than the number of existing target device identifiers (up to two), so a first heartbeat keep-alive broadcast message carries more target device identifiers, and the number of first heartbeat keep-alive broadcast messages sent by the sender is less. In this way, in a shorter period of time, a first heartbeat keep-alive broadcast message can maintain multiple devices in a "network online" state, which is more efficient and thus helps to improve user experience.

[0034] In combination with the second aspect, in certain implementations of the second aspect, the first heartbeat keep-alive broadcast message is processed based on the first matching result, including: if the first matching result is a mismatch, the first device discards the first heartbeat keep-alive broadcast message; or, if the first matching result is a match, the first device maintains the networking status with the second device based on the first heartbeat keep-alive broadcast message.

[0035] In combination with the second aspect, in certain implementations of the second aspect, the processing of the first heartbeat keep-alive broadcast message based on the first matching result includes: determining that the first matching result is a match, and the first device maintaining the networking status with the second device based on the first heartbeat keep-alive broadcast message.

[0036] In combination with the second aspect, in certain implementations of the second aspect, a first device receives a second heartbeat keep-alive broadcast message from a fifth device, the second heartbeat keep-alive broadcast message being used to indicate that the fifth device is in a networking online state, the second heartbeat keep-alive broadcast message comprising a fifth identifier being used to indicate the group to which the fifth device belongs; the first device matches the fifth identifier with the second identifier to obtain a second matching result; and upon determining that the second matching result is a mismatch, the first device discards the second heartbeat keep-alive broadcast message.

[0037] At this time, the fifth device can be understood as another second device, and the second device can be the second device described in certain embodiments of the second aspect above.

[0038] According to a third aspect, a method for keeping a network alive is provided, the method comprising: a second device generates a first heartbeat keep-alive broadcast message, the first heartbeat keep-alive broadcast message is used to indicate that the second device is in a networking online state, the first heartbeat keep-alive broadcast message comprises a first identifier, the first identifier is used to indicate the group to which the second device belongs; the second device broadcasts the first heartbeat keep-alive broadcast message.

[0039] In combination with the third aspect, in certain implementations of the third aspect, the first identifier also includes a first identifier and / or a second identifier; wherein the first identifier is used to indicate whether a response to the first heartbeat keep-alive broadcast message is required; and the second identifier is used to indicate the authentication type between the second device and the third device.

[0040] In combination with the third aspect, in certain implementations of the third aspect, the authentication type includes a same-account authentication type and a different-account authentication type.

[0041] In combination with the third aspect, in certain implementations of the third aspect, the length of the first identifier is related to a scenario in which the first device is used.

[0042] In combination with the third aspect, in certain implementations of the third aspect, the method also includes: generating a third identifier based on an authentication method between the second device and the third device, wherein the third device is a device within the group to which the second device belongs; performing a hash calculation on the third identifier, and intercepting the last N bits as the first identifier, where N is a positive integer.

[0043] In combination with the third aspect, in certain implementations of the third aspect, 8≤N≤20.

[0044] In combination with the third aspect, in certain implementations of the third aspect, before the second device broadcasts the first heartbeat keep-alive broadcast message, the method also includes: the second device determines that the performance of the second device meets the conditions for actively participating in keep-alive, or the second device determines that the application on the second device is in a running state.

[0045] In a fourth aspect, a device for keeping a network alive is provided, the device comprising: a transceiver unit, configured to receive a first heartbeat keep-alive broadcast message from a second device, the first heartbeat keep-alive broadcast message being used to indicate that the second device is in a network online state, the first heartbeat keep-alive broadcast message comprising a first identifier, the first identifier being used to indicate a group to which the second device belongs; a processing unit, configured to match the first identifier with the second identifier to obtain a first matching result, wherein the second identifier is used to indicate the group to which the device belongs; the processing unit is also configured to process the first heartbeat keep-alive broadcast message according to the first matching result.

[0046] In combination with the fourth aspect, in some implementations of the fourth aspect, the first identifier is generated based on an authentication method between the second device and a third device, and the third device is a device in the group to which the second device belongs.

[0047] In combination with the fourth aspect, in certain implementations of the fourth aspect, the first identifier also includes a first identifier and / or a second identifier; wherein the first identifier is used to indicate whether a response to the first heartbeat keep-alive broadcast message is required; and the second identifier is used to indicate the authentication type between the second device and the third device.

[0048] In combination with the fourth aspect, in certain implementations of the fourth aspect, the authentication type includes a same-account authentication type and a different-account authentication type.

[0049] In combination with the fourth aspect, in certain implementations of the fourth aspect, the length of the first identifier is related to a scenario in which the device is used.

[0050] In combination with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is also used to: generate the fourth identifier according to the authentication method between the device and a fourth device, and the fourth device is a device within the group to which the device belongs; perform a hash calculation on the fourth identifier, and intercept the last M bits as the second identifier.

[0051] In combination with the fourth aspect, in certain implementations of the fourth aspect, the length of the first identifier is N bits, the length of the second identifier is M bits, and the processing unit is also used to: when N>M, match the content indicated by the M bits after the first identifier with the second identifier to obtain the first matching result; or, when N<M, match the first identifier with the content indicated by the N bits after the second identifier to obtain the first matching result.

[0052] In combination with the fourth aspect, in some implementations of the fourth aspect, 8≤N≤20, and / or, 8≤M≤20.

[0053] In combination with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is further specifically used to: if the first matching result is a mismatch, discard the first heartbeat keep-alive broadcast message; or, if the first matching result is a match, maintain the networking status with the second device based on the first heartbeat keep-alive broadcast message.

[0054] In combination with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is further specifically used to: determine that the first matching result is a match, and maintain the networking status with the second device based on the first heartbeat keep-alive broadcast message.

[0055] In combination with the fourth aspect, in certain implementations of the fourth aspect, the transceiver unit is further used to receive a second heartbeat keep-alive broadcast message from a fifth device, the second heartbeat keep-alive broadcast message is used to indicate that the fifth device is in a networking online state, the second heartbeat keep-alive broadcast message includes a fifth identifier, and the fifth identifier is used to indicate the group to which the fifth device belongs; the processing unit is further used to match the fifth identifier with the second identifier to obtain a second matching result; the processing unit is further used to determine that the second matching result is a mismatch, and the first device discards the second heartbeat keep-alive broadcast message.

[0056] In the fifth aspect, a device for keeping a network alive is provided, including: a processing unit, used to generate a first heartbeat keep-alive broadcast message, the first heartbeat keep-alive broadcast message is used to indicate that the device is in a networking online state, the first heartbeat keep-alive broadcast message includes a first identifier, the first identifier is used to indicate the group to which the device belongs; a transceiver unit, used to broadcast the first heartbeat keep-alive broadcast message.

[0057] In combination with the fifth aspect, in certain implementations of the fifth aspect, the first identifier also includes a first identifier and / or a second identifier; wherein the first identifier is used to indicate whether a response to the first heartbeat keep-alive broadcast message is required; and the second identifier is used to indicate the authentication type between the device and the third device.

[0058] In combination with the fifth aspect, in certain implementations of the fifth aspect, the authentication type includes a same-account authentication type and a different-account authentication type.

[0059] In combination with the fifth aspect, in certain implementations of the fifth aspect, the length of the first identifier is related to the scenario in which the first device is used.

[0060] In combination with the fifth aspect, in certain implementations of the fifth aspect, the processing unit is also used to: generate a third identifier based on an authentication method between the device and a third device, where the third device is a device within the group to which the device belongs; perform a hash calculation on the third identifier, and intercept the last N bits as the first identifier, where N is a positive integer.

[0061] In combination with the fifth aspect, in certain implementations of the fifth aspect, 8≤N≤20.

[0062] In combination with the fifth aspect, in certain implementations of the fifth aspect, the processing unit is further used to: determine whether the performance of the device meets the active participation keep-alive condition, or determine that the application on the device is in a running state.

[0063] In a sixth aspect, a network keep-alive device is provided, comprising: one or more processors; a memory; and one or more computer programs. The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the network keep-alive device, the network keep-alive device performs the method in the second aspect or any possible implementation of the second aspect.

[0064] In a seventh aspect, a network keep-alive device is provided, comprising: one or more processors; a memory; and one or more computer programs. The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the network keep-alive device, the network keep-alive device performs the method in the third aspect or any possible implementation of the third aspect.

[0065] In an eighth aspect, a computer program product comprising instructions is provided, and when the computer program product is run on a first device, the first device executes the above-mentioned second aspect or the method described in the second aspect.

[0066] In a ninth aspect, a computer program product comprising instructions is provided, and when the computer program product is run on a second device, the second device executes the third aspect or the method described in the third aspect.

[0067] In a tenth aspect, a computer-readable storage medium is provided, which may be non-volatile and includes instructions, which, when executed on a first device, cause the first device to execute the second aspect or the method described in the second aspect.

[0068] In an eleventh aspect, a computer-readable storage medium is provided, which may be non-volatile and includes instructions, and when the instructions are executed on a second device, the second device executes the third aspect or the method described in the third aspect.

[0069] In the twelfth aspect, a chip is provided, comprising at least one processor and an interface circuit, wherein the interface circuit is used to provide program instructions or data to the at least one processor, and the at least one processor is used to execute the program instructions to implement the above-mentioned second aspect or the method described in the second aspect or to implement the above-mentioned third aspect or the method described in the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 Schematic diagram of the architecture of an industrial communication system applicable to an embodiment of the present application.

[0071] Figure 2 Schematic diagram of the architecture of an example of a non-industrial communication system applicable to an embodiment of the present application.

[0072] Figure 3 It is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application.

[0073] Figure 4 It is a software structure block diagram of a terminal device provided in an embodiment of the present application.

[0074] Figure 5 An example provided for the embodiment of this application Figure 2 The diagram shown is a schematic diagram of four heartbeat keep-alive broadcast messages sent by the mobile phone 201.

[0075] Figure 6 An example provided for the embodiment of this application Figure 2 The figure shows an example of a heartbeat keep-alive broadcast message sent by the mobile phone 201.

[0076] Figure 7 A schematic flowchart of a method for maintaining network aliveness provided in an embodiment of the present application.

[0077] Figure 8 A schematic diagram of a communication system provided in an embodiment of the present application.

[0078] Fig. 9 It is a schematic structural diagram of an example of a device provided in an embodiment of the present application.

[0079] Fig.10 It is a schematic structural diagram of another device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0081] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" or "multiple" refers to two or more than two.

[0082] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0083] In order to facilitate understanding of the embodiments of the present application, the terms involved in the embodiments of the present application are first briefly explained.

[0084] 1. Same account authentication: It is a device digital certificate derived from the same user account. The characteristic of this digital certificate is that if the device account is the same account, the digital certificates between the devices share a common public key. Conversely, if the devices belong to different accounts, the digital certificates between the devices cannot authenticate each other.

[0085] 2. Accountless authentication: The devices are authenticated based on a temporary personal identification number (PIN) or a random value known by both parties, and based on a symmetric key. Devices without the random value cannot be authenticated.

[0086] 3. Cross-account authentication: It is based on two devices using different accounts, and after being encrypted with asymmetric encryption algorithms based on different accounts, the two devices generate their own device certificates. After the accessed device is authorized by the user (it can be the password of the account, face recognition, fingerprint recognition, etc.), it exchanges each other's device certificates with the active access device, and the digital certificates between the two devices share a common public key. On the contrary, if the devices belong to different accounts, the digital certificates between the devices cannot authenticate each other. If the public key is shared between the devices, authentication can be passed, otherwise mutual authentication cannot be achieved.

[0087] 4. User Identification (UID) for the Same Account: It is used to indicate the UID corresponding to the same account. In other words, the UID corresponding to the same account is the same.

[0088] 5. Device identification (identify, ID): used to indicate the device.

[0089] To facilitate understanding of the embodiments of the present application, a communication system applicable to the method provided in the embodiments of the present application is first introduced.

[0090] Figure 1 Schematic diagram of an architecture of an industrial communication system 100 applicable to an embodiment of the present application.

[0091] For example, Figure 1 As shown, the industrial communication system 100 may include an industrial intranet, which is mainly used for networking industrial equipment in an industrial production environment. At least one core network device may be deployed in the industrial intranet, such as Figure 1 The core network device 110 shown in FIG.

[0092] like Figure 1 As shown, the industrial communication system 100 may further include at least one access network device 130 .

[0093] The embodiment of the present application does not limit the communication method between the access network device 130 and the core network device 110. For example, the access network device 130 can establish a wireless link with the core network device 110 through the gateway 120, or the access network device 130 can directly establish a wireless link with the core network device 110 to achieve communication between the access network device 130 and the core network device 110.

[0094] The industrial communication system 100 may also include at least one industrial device, such as Figure 1 Industrial equipment 108, industrial equipment 107 and industrial equipment 117 are shown in FIG.

[0095] The embodiments of the present application do not limit the type of industrial equipment. For example, the industrial equipment may include machine tools, mechanical equipment, instruments and meters, etc.

[0096] The embodiment of the present application does not limit the communication method between the industrial device and the access network device 130.

[0097] In some embodiments, the industrial device 108 may establish a wireless link with the access network device 130 through at least one intermediate device to achieve communication between the industrial device 108 and the access network device 130 .

[0098] In one example, if Figure 1 As shown, the industrial device 108 establishes a wireless link with the access network device 130 through the router 106 , the core router 105 and the firewall 104 .

[0099] The embodiment of the present application does not limit the communication method between the router 106 and the industrial device 108. For example, the industrial device 108 can communicate with the router 106 via a wireless fidelity (Wi-Fi) network.

[0100] In another example, Figure 1 As shown, the industrial device 107 establishes a wireless link with the access network device 130 through the core router 105 and the firewall 104 respectively.

[0101] The embodiment of the present application does not limit the communication method between the core router 105 and the industrial device 107. For example, the industrial device 107 can communicate with the core router 105 through a local area network (LAN).

[0102] In another example, Figure 1 As shown, the industrial device 112 establishes a wireless link with the access network device 130 through the core router 105 and the firewall 104 respectively.

[0103] The embodiment of the present application does not limit the communication method between the core router 105 and the industrial device 112. For example, the industrial device 112 can communicate with the core router 105 via a controller area network (CAN) bus, a 485 bus, a programmable logic controller (PLC), or a Zigbee technology.

[0104] In other embodiments, the industrial device may directly establish a wireless link with the access network device 130 to achieve communication between the industrial device and the access network device 130 .

[0105] Optionally, in some embodiments, the industrial communication system 100 may further include at least one data center 111, such as Figure 1 The data center 111 shown in FIG. For example, the function of the data center 111 is not limited to the sending, receiving, storing, and processing of data.

[0106] The embodiment of the present application does not limit the communication method between the data center 111 and the access network device 103.

[0107] For example, the data center 111 establishes a wireless link with the access network device 130 through the core router 105 and the firewall 104 respectively.

[0108] The embodiment of the present application does not limit the communication method between the core router 105 and the data center 111. For example, the data center 111 can communicate with the core router 105 via Ethernet.

[0109] Optionally, in some embodiments, the industrial communication system 100 may also include at least one non-industrial device (eg, a personal user device), such as Figure 1 The computer 110, tablet computer 109, mobile phone 113, and smart watch 114 are shown in FIG.

[0110] The embodiments of the present application do not limit the networking method of non-industrial equipment.

[0111] In some embodiments, the non-industrial device can be connected to an industrial intranet.

[0112] The embodiments of the present application do not limit the manner in which non-industrial equipment is connected to the industrial intranet.

[0113] In one example, the computer 110 and the tablet computer 109 can both establish a wireless link with the access network device 130 through the router 106 , the core router 105 , and the firewall 104 , so as to connect the computer 110 and the tablet computer 109 to the industrial intranet.

[0114] The embodiment of the present application does not limit the communication method between the computer 110 or the tablet computer 109 and the router 106. For example, the computer 110 or the tablet computer 109 can communicate with the router 106 via a Wi-Fi network.

[0115] In another example, the mobile phone 113 can directly establish a wireless link with the access network device 103 to achieve communication.

[0116] In other embodiments, the non-industrial device can be connected to an industrial extranet. For example, the mobile phone 113 can be connected to an industrial extranet. The embodiment of the present application does not limit the manner in which the non-industrial device is connected to the industrial extranet.

[0117] Optionally, in some embodiments, if the industrial communication system 100 includes at least two non-industrial devices, the at least two non-industrial devices may also communicate. The embodiment of the present application does not limit the communication method between the at least two non-industrial devices. For example, the at least two non-industrial devices may communicate via Bluetooth (BT) or Wi-Fi network.

[0118] In such Figure 1 In the industrial communication system 100 shown, the access network device 103 and the mobile phone 113 can constitute a communication system; the access network device 103 and the tablet computer 109 can also constitute a communication system; the access network device 103 and the computer 110 can also constitute a communication system. The mobile phone 113 and the smart watch 114 can also constitute a communication system.

[0119] It should be noted that Figure 1 The classification of industrial equipment and non-industrial equipment is based on whether it is used in industrial production. If some equipment is used to process work in industrial production, it can also be called industrial equipment. For example, if the computer 110 is used to process data in industrial production, then the computer 110 can also be called industrial equipment.

[0120] For example, Figure 1 The access network device shown can be any device with wireless transceiver function. The device includes but is not limited to: evolved NodeB (eNB or eNodeB), radio network controller (RNC), Node B (NB), base station controller (BSC), base transceiver station (BTS), home base station (e.g., home evolvedNodeB, or home Node B, HNB), base band unit (BBU), access point (AP) in Wi-Fi system, wireless relay node, wireless backhaul node, transmission point (TP) or transmission and reception point (TRP), etc., and can also be a gNB in ​​5G, such as NR, system, or a transmission point (TRP or TP), one or a group of antenna panels (including multiple antenna panels) of a base station in a 5G system, or a network node constituting a gNB or a transmission point, such as a base band unit (BBU) or a distributed unit (DU), etc.

[0121] In some deployments, the gNB may include a centralized unit (CU) and a DU. The gNB may also include a radio unit (RU). The CU implements some functions of the gNB, and the DU implements some functions of the gNB, for example, the CU implements the functions of the radio resource control (RRC) and packet data convergence protocol (PDCP) layers, and the DU implements the functions of the radio link control (RLC) layer, the media access control (MAC) layer, and the physical (PHY) layer. Since the information of the RRC layer will eventually become the information of the PHY layer, or be converted from the information of the PHY layer, therefore, under this architecture, high-level signaling, such as RRC layer signaling, can also be considered to be sent by the DU, or by the DU+CU. It can be understood that the access network device can be a CU node, a DU node, or a device including a CU node and a DU node. In addition, the CU can be divided into an access network device in the access network (radio access network, RAN), and the CU can also be divided into an access network device in the core network (core network, CN), which is not limited in this application.

[0122] It should also be understood that Figure 1The industrial equipment and / or non-industrial equipment may also be referred to as: terminal equipment or user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device. The terminal equipment in the embodiments of the present application may be a mobile phone, a tablet computer (pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the application scenarios.

[0123] In an embodiment of the present application, a terminal device or access network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. The application layer includes applications such as a browser, an address book, a word processing software, and an instant messaging software. In addition, the embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application, as long as it can communicate according to the method provided in the embodiment of the present application by running a program that records the code of the method provided in the embodiment of the present application, for example, the execution subject of the method provided in the embodiment of the present application can be a terminal device or an access network device, or a functional module in a terminal device or an access network device that can call and execute a program.

[0124] It should be noted that Figure 1 The various devices shown can also communicate with each other. Figure 1 The communication method between the various devices shown is not limited. In one example, Figure 1The non-industrial devices and / or industrial devices shown can communicate with each other through access network devices. In another example, Figure 1 The non-industrial devices and / or industrial devices shown can communicate directly with each other. Figure 1 The communication method of direct communication between the devices shown is not limited. In another example, Figure 1 The non-industrial equipment and / or industrial equipment can communicate directly with the access network equipment.

[0125] It should be noted that Figure 1 The industrial communication system 100 shown is only an example and should not be construed as limiting the present application. For example, the industrial communication system 100 may also include more or fewer devices.

[0126] Figure 2 It is a schematic diagram of the architecture of a non-industrial communication system 200 applicable to an embodiment of the present application.

[0127] The non-industrial communication system 200 may include at least one terminal device, such as Figure 2 The mobile phone 201, smart TV 202, tablet computer 203, computer 204, smart speaker 205, mobile phone 206 and smart watch 207 are shown. Among them, the mobile phone 201, smart TV 202 and tablet computer 203 can constitute a communication system. The mobile phone 201, computer 204 and smart speaker 205 can constitute a communication system. The mobile phone 201, mobile phone 206 and smart watch 207 can constitute a communication system.

[0128] It should be noted that the present application does not limit the type of terminal equipment included in the non-industrial communication system 200. The type of the terminal equipment can be as described above, and no specific examples are given here.

[0129] Figure 2 The various devices shown can also communicate with each other. Figure 2 The communication method between the various devices shown is not limited.

[0130] It should be noted that the embodiment of the present application can also be applied to another communication system, which includes Figure 1 The industrial communication system 100 and Figure 2 The non-industrial communication system 200 is shown. The industrial communication system 100 and the non-industrial communication system 200 can be found in the above description and will not be described in detail here.

[0131] Next, combine Figure 3 and Figure 4 The structure of the terminal device involved in the embodiments of the present application is introduced.

[0132] For example, Figure 3The structure diagram of the terminal device 900 is shown. The terminal device 900 may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, a battery 942, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a speaker 970A, a receiver 970B, a microphone 970C, an earphone interface 970D, a sensor module 980, a button 990, a motor 991, an indicator 992, a camera 993, a display screen 994, and a subscriber identification module (SIM) card interface 995, etc.

[0133] The embodiment of the present application does not limit the types of sensors included in the sensor module 980. For example, the sensor module 980 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor 1, etc.

[0134] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 900. In other embodiments of the present application, the terminal device 900 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0135] The processor 910 may include one or more processing units, for example, the processor 910 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0136] The controller may be the nerve center and command center of the terminal device 900. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0137] The processor 910 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. The memory may store instructions or data that the processor 910 has just used or cyclically used. If the processor 910 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 910, and thus improves the efficiency of the system.

[0138] In some embodiments, the processor 910 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0139] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 900. In other embodiments of the present application, the terminal device 900 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0140] The charging management module 940 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. The power management module 941 is used to connect the battery 942, the charging management module 940 and the processor 910. The power management module 941 receives input from the battery 942 and / or the charging management module 940, and provides power to the processor 910, the internal memory 921, the external memory, the display screen 994, the camera 993, and the wireless communication module 960. The power management module 941 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.

[0141] The wireless communication function of the terminal device 900 can be implemented through antenna 1, antenna 2, mobile communication module 950, wireless communication module 960, modem processor and baseband processor.

[0142] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 900 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0143] The mobile communication module 950 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 900. The mobile communication module 950 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 950 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 950 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 950 can be set in the processor 910. In some embodiments, at least some of the functional modules of the mobile communication module 950 can be set in the same device as at least some of the modules of the processor 910.

[0144] The wireless communication module 960 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal device 900. The wireless communication module 960 can be one or more devices integrating at least one communication processing module. The wireless communication module 960 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 910. The wireless communication module 960 can also receive the signal to be sent from the processor 910, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0145] In some embodiments, the antenna 1 of the terminal device 900 is coupled to the mobile communication module 950, and the antenna 2 is coupled to the wireless communication module 960, so that the terminal device 900 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0146] The terminal device 900 implements the display function through a GPU, a display screen 994, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 994 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 910 may include one or more GPUs, which execute program instructions to generate or change display information.

[0147] The display screen 994 is used to display images, videos, etc. The display screen 994 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 900 may include 1 or N display screens 994, where N is a positive integer greater than 1.

[0148] The terminal device 900 can realize the shooting function through an ISP, a camera 993, a video codec, a GPU, a display screen 994, and an application processor.

[0149] The ISP is used to process the data fed back by the camera 993. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 993.

[0150] The camera 993 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 900 may include 1 or N cameras 993, where N is a positive integer greater than 1.

[0151] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 900 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0152] Video codecs are used to compress or decompress digital videos. The terminal device 900 may support one or more video codecs. Thus, the terminal device 900 may play or record videos in various coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0153] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 900 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0154] The external memory interface 920 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 900. The external memory card communicates with the processor 910 through the external memory interface 920 to implement a data storage function.

[0155] The internal memory 921 can be used to store computer executable program codes, which include instructions. The processor 910 executes various functional applications and data processing of the terminal device 900 by running the instructions stored in the internal memory 921. The internal memory 921 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, at least one App required for a function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device 900 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 921 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0156] The terminal device 900 can implement audio functions such as music playing and recording through the audio module 970, the speaker 970A, the receiver 970B, the microphone 970C, the earphone interface 970D, and the application processor.

[0157] The audio module 970 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 970 can also be used to encode and decode audio signals. In some embodiments, the audio module 970 can be arranged in the processor 910, or some functional modules of the audio module 970 can be arranged in the processor 910.

[0158] The speaker 970A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 900 can listen to music or listen to a hands-free call through the speaker 970A.

[0159] The receiver 970B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 900 receives a call or voice message, the voice can be received by placing the receiver 970B close to the ear.

[0160] Microphone 970C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 970C to input the sound signal into the microphone 970C. The terminal device 900 can be provided with at least one microphone 970C. In other embodiments, the terminal device 900 can be provided with two microphones 970C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 900 can also be provided with three, four or more microphones 970C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0161] The earphone interface 970D is used to connect a wired earphone and can be the USB interface 930 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0162] The key 990 includes a power button, a volume button, etc. The key 990 may be a mechanical key or a touch key. The terminal device 900 may receive key input and generate key signal input related to user settings and function control of the terminal device 900.

[0163] Motor 991 can generate vibration prompts. Motor 991 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0164] Indicator 992 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0165] The SIM card interface 995 is used to connect the SIM card. The SIM card can be connected to and separated from the terminal device 900 by inserting it into the SIM card interface 995 or pulling it out from the SIM card interface 995. The terminal device 900 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 995 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 995 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 995 can also be compatible with different types of SIM cards. The SIM card interface 995 can also be compatible with external memory cards. The terminal device 900 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the terminal device 900 uses an embedded SIM (embedded-SIM, eSIM) card, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 900 and cannot be separated from the terminal device 900.

[0166] It should be understood that the phone card in the embodiments of the present application includes but is not limited to a SIM card, an eSIM card, a universal subscriber identity module (USIM), a universal integrated circuit card (UICC), and the like.

[0167] The software system of the terminal device 900 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structure of the terminal device 900 is exemplified.

[0168] Figure 4 900 of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. The system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system library, and kernel layer. The application layer can include a series of application packages.

[0169] like Figure 4 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0170] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0171] like Figure 4 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0172] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0173] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0174] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0175] The phone manager is used to provide communication functions of the terminal device 900, such as management of call status (including connection, disconnection, etc.).

[0176] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0177] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc.

[0178] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0179] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0180] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0181] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0182] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0183] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0184] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0185] A 2D graphics engine is a drawing engine for 2D drawings.

[0186] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0187] It should be understood that the technical solutions in the embodiments of the present application can be used for etc. system.

[0188] Whether Figure 1 The communication system 100 shown is also Figure 2 In the communication system 200 shown, each device in the communication system needs to establish a connection with each other before communicating.

[0189] Optionally, in some embodiments, after the devices establish a connection, the devices may need to authenticate each other. The embodiment of the present application does not limit the authentication method between the devices.

[0190] Here, Figure 2 Taking the communication system shown as an example, the authentication method between various devices is described by way of example. It should be understood that the example description should not limit the present application.

[0191] In one example, various devices can be authenticated using the same account.

[0192] For example, Figure 2 As shown, in the communication system composed of mobile phone 201, smart TV 202 and tablet computer 203, if account 1 is logged in to mobile phone 201, smart TV 202 and tablet computer 203, then mobile phone 201, smart TV 202 and tablet computer 203 can authenticate each other by logging in to the same account 1. If the authentication between mobile phone 201, smart TV 202 and tablet computer 203 is successful, mobile phone 201, smart TV 202 and tablet computer 203 form a group.

[0193] In another example, devices may authenticate each other without an account.

[0194] For example, Figure 2 As shown in FIG. 1 , in the communication system formed by mobile phone 201 and computer 204, if mobile phone 201 is logged into account 1 and computer 204 is not logged into an account, then mobile phone 201 and computer 204 can authenticate each other through the first PIN code. At this time, it can be considered that the authentication between mobile phone 201 and computer 204 is performed without an account. If the authentication between mobile phone 201 and computer 204 is successful, mobile phone 201 and computer 204 form a group. For another example, Figure 2 As shown, in the communication system composed of mobile phone 201 and smart speaker 205, if mobile phone 201 is logged into account 1, and no account is logged into smart speaker 205, then mobile phone 201 and smart speaker 205 can be authenticated by the second PIN code. At this time, it can be considered that the authentication between mobile phone 201 and smart speaker 205 is performed in a non-account manner. If the authentication between mobile phone 201 and smart speaker 205 is successful, mobile phone 201 and smart speaker 205 form a group.

[0195] In another example, devices may be authenticated across accounts.

[0196] For example, Figure 2 As shown, in the communication system composed of mobile phone 201, mobile phone 206 and smart watch 207, if mobile phone 201 logs in account 1, mobile phone 206 logs in account 2, and smart watch 207 logs in account 2, and account 1 and account 2 are two accounts bound to each other, then mobile phone 201 and mobile phone 206 can authenticate each other through the two bound accounts, and mobile phone 201 and smart watch 207 can also authenticate each other through the two bound accounts. If mobile phone 201 passes authentication with mobile phone 206 and smart watch 207 respectively, mobile phone 201 and mobile phone 206 form a group, and mobile phone 201 and smart watch 207 form a group.

[0197] After each device completes authentication, it can be considered that the devices that have completed mutual authentication are called trusted devices or that a trusted relationship exists between the devices that have completed mutual authentication.

[0198] In some embodiments, after each device completes authentication, the devices may exchange information (eg, device name, address, type, etc.) with each other.

[0199] For the convenience of description, the process of establishing a connection between devices, the process of authentication, and the process of exchanging information between each other are collectively referred to as a networking process.

[0200] After each device is networked, it is necessary to maintain a set of device status perception capabilities, that is, a device needs to be able to perceive the online (offline) or offline (online) status of the device in its network. Currently, based on different types of device authentication, the device can perceive the device status between devices that have been authenticated and fully networked through heartbeat keep-alive broadcast messages. The specific process is as follows:

[0201] First, the sender carries the target device ID in the heartbeat keep-alive broadcast message, and periodically sends the heartbeat keep-alive broadcast message to maintain the device in a "network online" state. For example, the heartbeat keep-alive broadcast message can sense the device status in the communication system by waking up the device by turning off the screen, sensing the device going online, and so on, so as to support distributed services to always sense the status of devices in the network.

[0202] Then, after receiving the heartbeat keep-alive broadcast message sent by the sender, the receiver will match the target device identifier carried in the heartbeat keep-alive broadcast message with the identifier of the receiver. If the target device identifier matches the identifier of the receiver, the receiver can further process the heartbeat keep-alive broadcast message. For example, if the receiver determines that it has not networked with the sender, the receiver can first network with the sender and then maintain the device networking online. If the receiver has networked with the sender, the receiver directly maintains the device networking online. If the target device identifier does not match the identifier of the receiver, it is considered that there is no relationship between the sender and the receiver. At this time, the heartbeat keep-alive broadcast message can be discarded to avoid mutual disturbance or abnormal wake-up between irrelevant devices.

[0203] The heartbeat keep-alive broadcast message can have a maximum of 7.5 bytes of AD data field area to fill in the target device (i.e., the device receiving the broadcast message) identification field. One way is to fill in the same account user identification field in the AD data field area, and the UID field occupies 2 bytes. Another way is to fill in the device ID field in the AD data field area, and the device ID field occupies 5.5 bytes. Since the heartbeat keep-alive broadcast message can have a maximum of 7.5 bytes of AD data field area to fill in the target device identification field, then, a maximum of one UID field and one device ID field can be filled in the AD data field area in a heartbeat keep-alive broadcast message at the same time. Among them, the UID in the UID field and the device ID in the device ID field can be called characteristic values.

[0204] In a real network environment, a device may be in multiple groups. If the target device identifier carried in a heartbeat keep-alive broadcast message is too small, the sender may send multiple heartbeat keep-alive broadcast messages, making the process of maintaining the device in a "network online" state time-consuming and inefficient, resulting in a poor user experience.

[0205] For example, as above Figure 2 As described above, mobile phone 201, smart TV 202 and tablet computer 203 form a group (referred to as Group 1), mobile phone 201 and computer 204 form a group (referred to as Group 2), mobile phone 201 and smart speaker 205 form a group (referred to as Group 3), mobile phone 201 and mobile phone 206 form a group (referred to as Group 4), and mobile phone 201 and smart watch 207 form a group (referred to as Group 5). It can be seen that mobile phone 201 is in 5 groups, and the 5 groups include 1 group (Group 1) authenticated by the same account and 4 groups (Group 2, Group 3, Group 4 and Group 5) authenticated by different accounts.

[0206] At this time, if the mobile phone 201 wants to send a heartbeat keep-alive broadcast message, the mobile phone 201 needs to send at least 4 heartbeat keep-alive broadcast messages.

[0207] Figure 5 for Figure 2 The diagram shown is a schematic diagram of four heartbeat keep-alive broadcast messages sent by the mobile phone 201.

[0208] According to the above description, a heartbeat keep-alive broadcast message can carry at most one UID and one device ID at a time. Therefore, a heartbeat keep-alive broadcast message sent by the mobile phone 201 can carry at most one UID and one device ID.

[0209] For example, Figure 5As shown, the mobile phone 201 sends a heartbeat keep-alive broadcast message 301 in the first round, and the target device identification field filled in the AD data field area of ​​the heartbeat keep-alive broadcast message 301 is UID-1 and ID-1. Among them, UID-1 is the UID corresponding to the account 1 mentioned above, and ID-1 is the ID corresponding to the computer 204 mentioned above. In this way, the mobile phone 201 can not only maintain the devices (smart TV 202 and tablet computer 203) in the group 1 to which the mobile phone 201 belongs in a "network online" state through the heartbeat keep-alive broadcast message 301, but also maintain the devices (computer 204) in the group 2 to which the mobile phone 201 belongs in a "network online" state.

[0210] Since mobile phone 210 is only in one group (group 1) with the same account authentication, mobile phone 201 will not carry UID in subsequent heartbeat keep-alive broadcast messages, but only carry device ID. In addition, according to the above description, a heartbeat keep-alive broadcast message can carry at most one ID.

[0211] The mobile phone 201 sends a second round of heartbeat keep-alive broadcast message 302, and the target device identification field filled in the AD data field area of ​​the heartbeat keep-alive broadcast message 302 is ID-2. Among them, ID-2 is the ID corresponding to the smart speaker 205 mentioned above. In this way, the mobile phone 201 can maintain the devices (smart speakers 205) in the group 3 to which the mobile phone 201 belongs in a "network online" state through the heartbeat keep-alive broadcast message 302.

[0212] The mobile phone 201 sends the heartbeat keep-alive broadcast message 303 for the third round. The target device identification field filled in the AD data field area of ​​the heartbeat keep-alive broadcast message 303 is ID-3. Among them, ID-3 is the ID corresponding to the mobile phone 206 mentioned above. In this way, the mobile phone 201 can maintain the device (mobile phone 206) in the group 4 to which the mobile phone 201 belongs in a "network online" state through the heartbeat keep-alive broadcast message 303.

[0213] The mobile phone 201 sends the heartbeat keep-alive broadcast message 304 for the fourth time, and the target device identification field filled in the AD data field area of ​​the heartbeat keep-alive broadcast message 304 is ID-4. Among them, ID-4 is the ID corresponding to the smart watch 207 mentioned above. In this way, the mobile phone 201 can maintain the devices (smart watch 207) in the group 5 to which the mobile phone 201 belongs in a "network online" state through the heartbeat keep-alive broadcast message 304.

[0214] It should be noted that the above Figure 5 The sequence of the four heartbeat keep-alive broadcast messages sent by the mobile phone 201 in four rounds and the four heartbeat keep-alive broadcast messages are only examples and should not constitute a limitation to the present application.

[0215] In order to further shorten the time of maintaining multiple devices in a "networked online" state and improve the efficiency of maintaining multiple devices in a "networked online" state, the present application provides a new heartbeat keep-alive broadcast message structure. The identifier carried by the new heartbeat keep-alive broadcast message indicates the group to which the device belongs, so that multiple devices can be maintained in a "networked online" state based on the groups to which they belong, thereby helping to improve user experience.

[0216] For the convenience of description, the heartbeat keep-alive broadcast message mentioned above is recorded as heartbeat keep-alive broadcast message 1, and the new heartbeat keep-alive broadcast message is recorded as heartbeat keep-alive broadcast message 2.

[0217] The structure of the heartbeat keep-alive broadcast message 2 provided in the embodiment of the present application is first introduced in detail below.

[0218] The heartbeat keep-alive broadcast message 2 includes a first identifier, and the first identifier is used to indicate the group to which the device belongs.

[0219] The embodiment of the present application does not limit the name of the first identifier, and all identifiers used to indicate the group to which the device belongs can be considered as the first identifier. It should be understood that the following description is based on the example that the first identifier is a trusted group ID (TGID), which should not constitute a limitation on the embodiment of the present application.

[0220] The TGID is generated based on the authentication method between devices. The embodiment of the present application does not limit the authentication method between devices, and its specific examples are as described above, which will not be repeated here.

[0221] Specifically, in one example, the group ID may be generated based on the authentication method between devices, and then the group ID is hashed and the last M bits are intercepted as the final TGID.

[0222] The embodiment of the present application does not limit the specific value of M. It can be set according to actual needs. For how to set M according to actual needs, please refer to the description below, which will not be repeated here.

[0223] It should be noted that there is a one-to-one correspondence between the authentication method and the TGID, that is, the same authentication method corresponds to one TGID. It should be understood that the same authentication method not only refers to the same type of authentication method, but also refers to the same authentication process.

[0224] For example, Figure 2As shown, the mobile phone 201, smart TV 202 and tablet computer 203 are authenticated by the same account, so the mobile phone 201, smart TV 202 and tablet computer 203 belong to the same group. After the group ID is hashed, the 8 (in this case, if M=8) bits obtained are 00000001, and 00000001 is the TGID corresponding to the group to which the mobile phone 201, smart TV 202 and tablet computer 203 belong.

[0225] For example, Figure 2 As shown, the mobile phone 201 and the computer 204 are authenticated by the first PIN code, so the mobile phone 201 and the computer 204 belong to the same group. After the group ID is hashed, the 8 (in this case, if M=8) bits obtained are 00000010, and 00000010 is the TGID corresponding to the group to which the mobile phone 201 and the computer 204 belong.

[0226] For example, Figure 2 As shown, the mobile phone 201 and the smart speaker 205 are authenticated by the second PIN code, so the mobile phone 201 and the smart speaker 205 belong to the same group. After the group ID is hashed, the 8 (in this case, if M=8) bits obtained are 00000011, and 00000011 is the TGID corresponding to the group to which the mobile phone 201 and the smart speaker 205 belong.

[0227] For example, Figure 2 As shown, mobile phone 201, mobile phone 206 and smart watch 207 are authenticated through cross-accounts (account 1 and account 2), so mobile phone 201, mobile phone 206 and smart watch 207 belong to a group. After the group ID is hashed, the 8 (in this case, if M=8) bits obtained are 00000100, and 00000100 is the TGID corresponding to the group to which mobile phone 201, mobile phone 206 and smart watch 207 belong.

[0228] It should be noted that the above 00000001, 00000010, 00000011 and 00000100 are all examples of TGID in binary form, which should not limit the embodiments of the present application. For example, the TGID can be represented not only in the form of pure numbers, but also in the form of a string.

[0229] It can be seen that in the embodiment of network keep-alive based on heartbeat keep-alive broadcast message 1, the mobile phone 201 can maintain the devices in the group to which the mobile phone 201 belongs in the "network online" state through 1 UID and 4 device IDs. In the embodiment of network keep-alive based on heartbeat keep-alive broadcast message 2, the mobile phone 201 can maintain the devices in the group to which the mobile phone 201 belongs in the "network online" state through 4 TGIDs.

[0230] In addition, in the embodiment of network preservation based on the heartbeat keep-alive broadcast message 1, since the same account UID or device ID is strongly coupled with the current authentication type, it does not meet the diversity of trusted types between devices well, and it does not have scalability, which leads to the need to modify the characteristic value structure of the keep-alive broadcast at the same time when the authentication type is expanded in the future. For example, in addition to supporting same account authentication and point-to-point accountless authentication between two devices, cross-account authentication is also supported, and cross-account sharing authentication may be supported in the future. Since the scope of preservation needs to cover devices of different trusted authentication types, the current format cannot meet the needs of future communication system service evolution. In the embodiment of network preservation based on the heartbeat keep-alive broadcast message 2, since the authentication method and TGID have a one-to-one correspondence, the TGID identifier can be compatible with various types of authentication methods between devices, so that when the authentication method is expanded in the future, there is no need to modify the structure of TGID, and the scalability of the heartbeat keep-alive broadcast message is high.

[0231] Optionally, in an example, the TGID may also include an identification bit for identifying whether a response to the heartbeat keep-alive broadcast message is required.

[0232] The embodiment of the present application does not limit the length of the identification bit used to identify whether it is necessary to respond to the heartbeat keep-alive broadcast message. For example, the identification bit used to identify whether it is necessary to respond to the heartbeat keep-alive broadcast message can be 1 bit.

[0233] The embodiment of the present application does not limit how the identification bit used to identify whether it is necessary to respond to the heartbeat keep-alive broadcast message identifies the need to respond to the heartbeat keep-alive broadcast message, and how it identifies the need not to respond to the heartbeat keep-alive broadcast message. For example, the identification bit used to identify whether it is necessary to respond to the heartbeat keep-alive broadcast message identifies the need to respond to the heartbeat keep-alive broadcast message through "1" and identifies the need to respond to the heartbeat keep-alive broadcast message through "0".

[0234] Optionally, in one example, the TGID may also include an identification bit for identifying the authentication type.

[0235] The embodiment of the present application does not limit the length of the identifier used to identify the authentication type. For example, the length used to identify the authentication type can be 1 bit.

[0236] The embodiment of the present application does not limit the classification included in the TGID for identifying the authentication type.

[0237] In an example, the classification of the authentication method corresponding to the identifier for identifying the authentication type included in the TGID may have a one-to-one correspondence with the authentication methods described above.

[0238] For example, the identification bit used to identify the authentication type uses "0" to identify the authentication type through the same account, uses "1" to identify the authentication type through cross-account authentication, uses "2" to identify the authentication type through a PIN code, uses "3" to identify the authentication type through cross-account authentication, and so on.

[0239] In another example, the authentication method corresponding to the identifier for identifying the authentication type included in the TGID can be divided into two categories according to whether it is the same account authentication method, one is the same account authentication type, and the other is the different account authentication type.

[0240] For example, the identification bit for identifying the authentication type identifies the authentication type for the same account through "1" and identifies the authentication type for different accounts through "0".

[0241] It should be noted that the "0", "1" and "2" mentioned above are all examples of identification bits used to identify the authentication type, and should not constitute a limitation to the embodiments of the present application. The embodiments of the present application do not limit the method used to identify the authentication type.

[0242] It should be understood that any method that is not authenticated by the same account is called a non-same-account authentication type. For example, cross-account authentication, PIN code or random value authentication methods known by both parties can all be considered non-same-account authentication types.

[0243] Since there is a trust relationship between the devices that complete the authentication with each other, the degree of the trust relationship between the sending end and the receiving end can be determined by the identifier used to identify the authentication type.

[0244] The embodiments of the present application do not limit the classification of the degree of trust relationship between the sender and the receiver.

[0245] In one example, the degree of trust relationship and authentication method between the sender and the receiver may be one-to-one.

[0246] Exemplarily, the degree of trust between the sender and the receiver corresponding to different authentication methods can be preset. For example, it can be preset that the degree of trust corresponding to the same account authentication method, the cross-account authentication method, the PIN code or the random value authentication method known by both parties decreases in sequence.

[0247] In another example, the degree of trust relationship and authentication method between the sender and the receiver may be many-to-one.

[0248] Exemplarily, it can be preset that the degree of trust relationship between the sender and the receiver corresponding to the authentication method of the same account is high, and the degree of trust relationship between the sender and the receiver corresponding to the authentication method of different accounts is medium-low.

[0249] Through the degree of trust between the sender and the receiver, the receiver can determine: for the sender, the degree of protection of the privacy data of the user on the receiver. Among them, the degree of trust between the sender and the receiver is inversely proportional to the degree of protection of the privacy data of the user on the receiver. In other words, the higher the degree of trust between the sender and the receiver, the lower the degree of protection of the privacy data of the user on the receiver for the sender, that is, the receiver can share the privacy data of the user on the receiver with the sender.

[0250] For example, if the identifier for identifying the authentication type included in the TGID identifies the authentication method of the same account, it can be considered that the sender and the receiver are personal devices, that is, the sender and the receiver are devices of the same person. The receiver can then determine that: for the sender, the protection level of the user's privacy data on the receiver is low. Then, the receiver can share the user's privacy data on the receiver with the sender.

[0251] For another example, if the identifier used to identify the authentication type included in the TGID identifies an authentication method that is not the same account, it can be considered that the sender and the receiver may not be personal devices, that is, the sender and the receiver may not be devices of the same person. The receiver can then determine that: for the sender, the privacy data of the user on the receiver is more protected. Then, the receiver may not share the privacy data of the user on the receiver with the sender.

[0252] Optionally, in one example, the user can search on the device for each group to which the device belongs and the group members in each group.

[0253] The embodiment of the present application does not limit the way in which a user searches for each group to which the device belongs and the group members in each group on the device. For example, the user can call up a control center interface, which can display each group to which the device belongs and the group members in each group.

[0254] The embodiment of the present application does not limit the form in which the group members in the group to which the device belongs are presented on the device. For example, the group members in the group to which the device belongs can be presented on the device in the form of device names.

[0255] Optionally, in an example, the user may also search on the device for authentication methods or authentication types between the device and group members in each group to which the device belongs.

[0256] The embodiment of the present application does not limit the way in which a user searches for the various groups to which the device belongs and the authentication methods or authentication types between group members in each group on the device. For example, a user can call up a control center interface, which can display the various groups to which the device belongs and the authentication methods or authentication types between group members in each group.

[0257] The embodiment of the present application does not limit the form in which the authentication method or authentication type between group members within the group to which the device belongs is presented on the device.

[0258] The embodiment of the present application does not limit the arrangement order of the group ID intercepted in the TGID, the identification bit used to identify whether it is necessary to respond to the heartbeat keep-alive broadcast message, and the identification bit used to identify the authentication type in the TGID. For example, in the TGID, the intercepted group ID, the identification bit used to identify whether it is necessary to respond to the heartbeat keep-alive broadcast message, and the identification bit used to identify the authentication type can be arranged in the following order: the identification bit used to identify whether it is necessary to respond to the heartbeat keep-alive broadcast message, the identification bit used to identify the authentication type, and the intercepted group ID.

[0259] According to the above description of the structure of the heartbeat keep-alive broadcast message 2, since the number of digits M intercepted after the hash calculation of the group ID in the heartbeat keep-alive broadcast message 2 is uncertain, the length of the TGID is also uncertain.

[0260] In order to further avoid conflicts in TGIDs, that is, to further avoid different groups to which devices belong corresponding to the same TGID, M may be set according to different scenarios.

[0261] In one example, the length of TGID can be set according to the sensitivity of different scenarios to TGID conflicts. For example, in an application scenario with a small number of devices, when TGID does not conflict, it can be considered that the application scenario has a low requirement for the maximum number of TGIDs. In this case, M can be set to a smaller value; in an application scenario with a large number of devices, when TGID does not conflict, it can be considered that the application scenario has a high requirement for the maximum number of TGIDs. In this case, M can be set to a larger value. In other words, the value of M and the maximum number of TGIDs can be set to be positively correlated.

[0262] For example, the relationship between the number of TGIDs K and M can refer to the calculation formula (1) of the conflict rate, as follows:

[0263]

[0264] The collision rate formula can be understood as: when the probability of hash collision of at most K TGIDs is 0, the relationship between K and M is satisfied. In this way, according to the collision rate calculation formula and the scenario, the length of the corresponding TGID can be set.

[0265] It should be noted that the M in the above calculation formula for the conflict rate represents the number of bits. If the TGID length is expressed in bits, the number of bits M and the bit value N satisfy the formula (2): M = 2 N .

[0266] Optionally, in some embodiments, different TGID strategies (parameters corresponding to TGID) may be set for different scenarios. The TGID level, TGID length, and maximum TGID number values ​​corresponding to different TGID strategies are also different, so that the number of TGIDs included in each heartbeat keep-alive broadcast message is also different.

[0267] The maximum number of TGIDs may be understood as the probability of a TGID conflict being zero when the number of TGIDs is less than the maximum number of TGIDs.

[0268] The embodiment of the present application does not limit the number of TGID strategies.

[0269] Table 1 and Table 2 show the TGID strategies corresponding to the two application scenarios. It should be understood that Table 1 and Table 2 are only examples and should not limit the embodiments of the present application.

[0270] The TGID length (expressed in bits as an example) and the value of the maximum TGID data shown in Tables 1 and 2 are obtained according to the formulas (1) and (2) described above. It should be noted that in the embodiment of the present application, the value of M and the maximum TGID number only needs to satisfy a positive correlation, and does not necessarily need to be set to satisfy the formula (1) described above.

[0271] The number of TGIDs included in each heartbeat keep-alive broadcast message shown in Table 1 and Table 2 can be obtained by rounding the ratio of the size of the TGID field that can be filled in the heartbeat keep-alive broadcast message 2 to the length of a TGID. It should be noted that Tables 1 and 2 both take the size of the TGID field that can be filled in the heartbeat keep-alive broadcast message 2 as 7.5 bytes (60 bits) as an example, which should not constitute a limitation to the present application.

[0272] It should be noted that the number of TGIDs included in each heartbeat keep-alive broadcast message shown in Table 1 and Table 2 is described according to the maximum number of TGIDs included in one heartbeat keep-alive broadcast message.

[0273] Among them, Table 1 shows the TGID strategies corresponding to 2 application scenarios, and Table 1 is described by taking the example that TGID does not include the identification bit for identifying whether it is necessary to respond to the heartbeat keep-alive broadcast message and the identification bit for identifying the authentication type. Table 2 shows the TGID strategies corresponding to 3 application scenarios, and Table 2 is described by taking the example that TGID also includes the identification bit for identifying whether it is necessary to respond to the heartbeat keep-alive broadcast message and the identification bit for identifying the authentication type. The precision involved in Tables 1 and 2 refers to: when there is no conflict in TGID, the application scenario's requirement for the maximum number of TGIDs; when there is no conflict in TGID, the higher the precision, the higher the application scenario's requirement for the maximum number of TGIDs. Performance refers to the number of TGIDs carried at one time in the heartbeat keep-alive broadcast message 2 by the application scenario. The higher the performance, the more TGIDs are carried at one time in the heartbeat keep-alive broadcast message 2.

[0274] Table 1

[0275]

[0276]

[0277] Table 2

[0278]

[0279] According to Table 1 and Table 2, different TGID strategies are set for different application scenarios, with the requirements for the maximum number of TGIDs and the number (performance) of TGIDs carried in a heartbeat keep-alive broadcast message 2 when there is no conflict between TGIDs, so as to flexibly adapt to the needs of different scenarios.

[0280] For example, in industrial scenarios, most of them are powered devices, so the devices are less sensitive to power consumption and / or bandwidth, that is, the performance requirements for the heartbeat keep-alive broadcast message 2 in industrial scenarios are relatively low. However, the number of devices in industrial scenarios is relatively large, and often there are thousands to tens of thousands of devices in a factory. Therefore, in the case of no TGID conflict, the higher the requirement for the maximum number of TGIDs in industrial scenarios, that is, the higher the requirement for the accuracy of TGIDs, the TGID strategy corresponding to HALP can be adopted to increase the length of TGID, thereby increasing the value of the maximum number of TGIDs.

[0281] For home scenarios, there are many non-powered devices, so the devices are more sensitive to power consumption and / or bandwidth, that is, the performance requirements for the heartbeat keep-alive broadcast message 2 in the scenario are higher. However, the number of devices in the home scenario is relatively small. Therefore, when there is no conflict in TGID, the requirement for the maximum number of TGIDs in the home scenario may not be so high, that is, the accuracy requirement for TGID can be slightly lower. At this time, the default TGID strategy corresponding to MAMP or LAHP can be adopted to reduce the length of TGID, thereby increasing the value of the maximum number of TGIDs. Furthermore, the number of TGIDs carried by the heartbeat keep-alive broadcast message 2 in one broadcast is increased, and the power consumption and / or bandwidth of the device are reduced.

[0282] It should be noted that the high precision and low precision described in Table 1 are relative concepts. For example, the precision greater than the first threshold can be called high precision, and the precision less than or equal to the first threshold can be called low precision. The first threshold can be set according to actual conditions, and the embodiments of the present application do not limit this.

[0283] Similarly, the high performance and low performance described in Table 1 are also relative concepts. For example, performance greater than the second threshold can be called high performance, and performance less than or equal to the second threshold can be called low performance. The second threshold can be set according to actual conditions, and the embodiments of the present application are not limited to this.

[0284] Similarly, the high precision, medium precision and low precision described in Table 2 are also relative concepts. For example, the precision greater than the third threshold can be called high precision; the precision greater than the fourth threshold and less than or equal to the third threshold can be called medium precision; the precision less than or equal to the fourth threshold can be called low precision. The third threshold and / or the fourth threshold can be set according to actual conditions, and the embodiments of the present application do not limit this.

[0285] Similarly, high performance, medium performance, and low performance in Table 2 are also relative concepts. For example, performance greater than the fifth threshold can be called high performance; performance greater than the sixth threshold and less than or equal to the fifth threshold can be called medium performance; and performance less than or equal to the sixth threshold can be called low performance. The fifth threshold and / or the sixth threshold can be set according to actual conditions, and the embodiments of the present application do not limit this.

[0286] Optionally, in an example, the user may set a TGID policy corresponding to the device as required.

[0287] Exemplarily, setting the TGID policy corresponding to the device may include: modifying the TGID policy configured for the device or configuring the TGID policy corresponding to the device.

[0288] The embodiment of the present application does not limit the way in which the user sets the TGID policy corresponding to the device. For example, the user can set the TGID policy corresponding to the device through voice or interaction with the display screen.

[0289] It should be noted that the embodiments of the present application do not limit the TGID strategy adopted by the device.

[0290] In one example, different TGID strategies may be used in the same scenario. In this case, the length of the TGID carried in the heartbeat keep-alive broadcast message 2 sent by the sender and the length of the TGID of the receiver itself may be inconsistent. For details on the handling method of this situation, please refer to the relevant description in S530 below, which will not be described here for the time being.

[0291] In another example, different TGID strategies may be used in different scenarios, so as to avoid the problem that the length of the TGID carried in the heartbeat keep-alive broadcast message 2 sent by the sender is inconsistent with the length of the TGID of the receiver itself.

[0292] For example, in Bluetooth 4.0, the length of TGID is usually set between 8 bits and 20 bits to meet the needs of the scenario. In this way, a heartbeat keep-alive broadcast message has a maximum of 7.5 bytes (60 bits) used to carry the target device identifier, so the number of TGIDs carried by a heartbeat keep-alive broadcast message is 3 to 5. In this way, the number of target device identifiers carried by a heartbeat keep-alive broadcast message is more than the number of existing target device identifiers (up to two). Therefore, a heartbeat keep-alive broadcast message carries more target device identifiers, and the number of heartbeat keep-alive broadcast messages sent by the sender is less. In this way, in a shorter period of time, a heartbeat keep-alive broadcast message can maintain multiple devices in a "networked online" state, which is more efficient and helps to improve the user experience.

[0293] It should be noted that in Bluetooth 5.0 or the User Datagram Protocol (UDP), the length of TGID can be larger than the length of TGID set in Bluetooth 4.0, and its specific value can be determined according to the upper limit of the size of the data field in the Bluetooth 5.0 or UDP protocol, which is not limited in the embodiments of the present application.

[0294] Figure 6 An example provided for the embodiment of this application Figure 2The example diagram of the heartbeat keep-alive broadcast message sent by the mobile phone 201 is shown. Among them, TGID1 is the TGID corresponding to the group to which the mobile phone 201, smart TV 202 and tablet 203 belong, TGID2 is the TGID corresponding to the group to which the mobile phone 201, computer 204 and smart speaker 205 belong, TGID3 is the TGID corresponding to the group to which the mobile phone 201 and smart speaker 205 belong, and TGID4 is the TGID corresponding to the group to which the mobile phone 201, mobile phone 206 and smart watch 207 belong. Among them, the length of TGID is 8 bits.

[0295] Based on the structure of the heartbeat keep-alive broadcast message 2, multiple devices are maintained in the "network online" state. In this way, the devices are kept alive based on the groups they belong to. In this way, in a relatively short period of time, one heartbeat keep-alive broadcast message can maintain multiple devices in the "network online" state, which is highly efficient and helps to improve the user experience.

[0296] The following is a detailed description of the network maintenance method provided in the embodiment of the present application.

[0297] The network keeping alive method is applied to a communication system including a first device and a second device. The embodiment of the present application does not limit the number of the second device and / or the first device.

[0298] The embodiment of the present application does not limit the type of the second device and / or the first device. For example, the second device and / or the first device may be Figure 1 Any one of the industrial equipment or non-industrial equipment described above. For another example, the second equipment and / or the first equipment may be Figure 2 Any terminal device described in .

[0299] Figure 7 A schematic flowchart of a method 500 for maintaining network aliveness provided in an embodiment of the present application.

[0300] For example, Figure 7 As shown, the method for keeping the network alive includes:

[0301] S510: The second device generates a heartbeat keep-alive broadcast message.

[0302] The heartbeat keep-alive broadcast message is used to indicate that the second device is in a networking online state. The heartbeat keep-alive broadcast message includes a first identifier. That is, the structure of the heartbeat keep-alive broadcast message is the structure of the heartbeat keep-alive broadcast message 2 described above.

[0303] It should be noted that the second device being in a networked online state can be understood as the second device being in a trusted group, and the second device and at least one device in the trusted group have been networked with each other.

[0304] Regarding the heartbeat keep-alive broadcast message in S510, you can refer to the description of the heartbeat keep-alive broadcast message 2 above, for example, how the heartbeat keep-alive broadcast message 2 is generated, the first identifier carried by the heartbeat keep-alive broadcast message 2 is used not only to indicate that the second device is in a networked online state and the first identifier, but also which identification bits the first identifier may include (for example, an identification bit used to identify whether a response to the heartbeat keep-alive broadcast message is required and / or an identification bit used to identify the authentication type corresponding to the trusted group identifier), relevant descriptions of each identification bit, and the setting of the length of the first identifier (selection of the first identification strategy) and other related descriptions, which are not repeated here.

[0305] The first identifier is generated based on an authentication method between the second device and a third device, wherein the third device is a device in the group to which the second device belongs.

[0306] In one example, the first identifier is generated by the second device. Specifically, the second device first generates a third identifier according to the authentication method between the second device and the third device; then, performs a hash calculation on the third identifier and intercepts the last N bits as the first identifier.

[0307] In this example, after the second device and the third device are authenticated, the second device generates the first identifier. At this time, the step of the second device generating the first identifier can be performed before S510 or during the execution of S510, which is not limited in this embodiment of the present application.

[0308] In another example, the first identifier is generated by a third device. Specifically, first, the third device generates a third identifier according to the authentication method between the third device and the second device; second, the third identifier is hashed and the last N bits are intercepted as the first identifier. Finally, the third device sends the first identifier to the second device.

[0309] In this example, after the third device and the second device are authenticated, the third device generates a first identifier and sends the first identifier to the second device. At this time, the step of the third device generating the first identifier and sending the first identifier to the second device may be performed before S510 or during the execution of S510, which is not limited in the present embodiment of the application.

[0310] It should be noted that the third device may include the second device or may not include the second device, and this embodiment of the present application does not limit this.

[0311] S520, the second device broadcasts a heartbeat keep-alive broadcast message. Correspondingly, the first device receives the heartbeat keep-alive broadcast message sent by the second device.

[0312] The embodiment of the present application does not limit the manner in which the second device sends the heartbeat keep-alive broadcast message. For example, the second device may send the heartbeat keep-alive broadcast message in the form of broadcast.

[0313] Optionally, in some embodiments, the device can also flexibly adjust the device keep-alive mode according to the performance of the device, that is, whether the device actively participates in keep-alive or not. In this way, it is truly based on the demand side and on-demand keep-alive can eliminate the bandwidth and load impact caused by a large number of invalid device-level keep-alive heartbeats, that is, significantly reduce the bandwidth and power consumption load.

[0314] For example, when the performance of the device meets the active participation keep-alive condition, the device actively participates in keep-alive by default, that is, the device actively sends a heartbeat keep-alive broadcast message by default. When the performance of the device does not meet the active participation keep-alive condition, the device does not actively participate in keep-alive by default, that is, the device does not actively send a heartbeat keep-alive broadcast message by default.

[0315] Thus, in this embodiment, before S520, the second device needs to determine that the performance of the second device meets the active participation keep-alive condition.

[0316] The embodiment of the present application does not limit the active participation keep-alive condition. For example, the active participation keep-alive condition includes at least one of the following: the power of the device is greater than or equal to the first preset value, the device is a normal power device, and the bandwidth network rate of the device is greater than or equal to the second preset value.

[0317] The embodiment of the present application does not limit the specific values ​​of the first preset value and / or the second preset value, which can be set according to actual circumstances.

[0318] It should be noted that the normally powered device can be understood as a device that is always powered on.

[0319] Optionally, in some embodiments, the device can also flexibly adjust the device keep-alive period according to the service time of the business, that is, the period during which the device actively participates in keep-alive is the service time of the business. In this way, it is truly based on the demand side and on-demand keep-alive can eliminate the bandwidth and load impact caused by a large number of invalid device-level keep-alive heartbeats, that is, significantly reduce the bandwidth and power consumption load.

[0320] It should be noted that in the embodiment of the present application, regardless of whether the device is currently in a scenario of not participating in active keep-alive or in a scenario of participating in active keep-alive, the device can flexibly adjust the device keep-alive period according to the service time of the business.

[0321] It should be understood that the services mentioned above can be understood as applications on a device, and the time served by the services can be understood as the running time of the applications.

[0322] For example, if the service monitors the device to go online or offline, the device management service initiates a heartbeat keep-alive broadcast message, and when the service unregisters the monitoring device to go online or offline, the device management service stops the heartbeat keep-alive broadcast message. In other words, when the application is in the running state, the device management service initiates the heartbeat keep-alive broadcast message, and when the application is in the closed state, the device management service stops sending the heartbeat keep-alive broadcast message.

[0323] Thus, in this embodiment, before S520, the second device needs to determine that the application on the second device is in a running state.

[0324] Optionally, in some embodiments, the second device may also periodically send a heartbeat keep-alive broadcast message. The embodiment of the present application does not limit the period of the second device sending the heartbeat keep-alive broadcast message, which may be set according to actual conditions.

[0325] S530: The first device matches the first identifier with the second identifier to obtain a matching result, wherein the second identifier is used to indicate the group to which the first device belongs.

[0326] The second identifier is generated based on an authentication method between the first device and a fourth device, wherein the fourth device is a device in the group to which the first device belongs.

[0327] In one example, the second identifier is generated by the first device. Specifically, the first device first generates the fourth identifier according to the authentication method between the first device and the fourth device; then, the fourth identifier is hashed and the last N bits are intercepted as the second identifier.

[0328] In this example, after the first device and the fourth device are authenticated, the first device generates the second identifier. At this time, the step of the first device generating the second identifier can be performed before S520, or after S520, or simultaneously with S520, and the implementation of the present application embodiment is not limited to this.

[0329] In another example, the second identifier is generated by the fourth device. Specifically, first, the fourth device generates the fourth identifier according to the authentication method between the fourth device and the first device; second, the fourth identifier is hashed and the last N bits are intercepted as the second identifier. Finally, the fourth device sends the second identifier to the first device.

[0330] In this example, after the fourth device and the first device are authenticated, the fourth device generates a second identifier and sends the second identifier to the first device. At this time, the step of the fourth device generating the second identifier and sending the second identifier to the first device may be performed before S520, after S520, or simultaneously with S520, and this embodiment of the application is not limited thereto.

[0331] It should be noted that the fourth device may include the second device or may not include the second device, and this embodiment of the present application does not limit this.

[0332] The embodiment of the present application does not limit the algorithm for matching the first identifier with the second identifier.

[0333] In one example, if the length of the first identifier is consistent with the length of the second identifier, the first device may use an existing matching algorithm to match the first identifier with the second identifier, which will not be described in detail here.

[0334] In another example, if the length of the first identifier is inconsistent with the length of the second identifier, the first device can match the first identifier with the second identifier using a backward matching algorithm according to the minimum length, where the minimum length can be understood as the minimum length between the length of the first identifier and the length of the second identifier.

[0335] Specifically, if the length of the first identifier is N bits and the length of the second identifier is M bits, when N>M, the first device matches the value of the M bits after the first identifier with the value of the second identifier to obtain a matching result. When N<M, the first device matches the value of the N bits after the first identifier with the value of the second identifier to obtain a matching result.

[0336] It should be noted that when N>M, the value of the M bits after the first identifier can be understood as: the content obtained by cutting the M bits of the first identifier from the back to the front. The value of the second identifier can be understood as the content of the M bits of the second identifier.

[0337] When N<M, the value of the first identifier can be understood as the content of the N bits of the first identifier; the value of the N bits after the second identifier can be understood as: the content obtained by intercepting the N bits of the second identifier from the back to the front.

[0338] For example, if the length of the first identifier is 15 bits and the length of the second identifier is 10 bits, the first device can match the second identifier according to the content obtained according to the last 10 bits of the first identifier.

[0339] The matching results include a match and a mismatch, wherein a match can be understood as the first identifier and the second identifier being the same, and a mismatch can be understood as the first identifier and the second identifier being different.

[0340] It should be noted that if a device switches from a first authentication method to a second authentication method with another device, the device and the other device will save two first identifiers, one of which is generated based on the first authentication method, and the other is generated based on the second authentication method. At this time, as long as there is a first identifier on the receiving end that matches the first identifier sent by the receiving and sending end, it can be considered a match.

[0341] S540: The first device processes the heartbeat keep-alive broadcast message according to the matching result.

[0342] If the first identifier and the second identifier do not match, that is, the matching result is mismatch, the heartbeat keep-alive broadcast message is discarded.

[0343] If the first identifier and the second identifier match, that is, the matching result is a match, the first device maintains the networking state between the first device and the second device.

[0344] In one example, if the first device determines that the first device and the second device have been networked, the first device and the second device can exchange information with each other, for example, the first device sends information related to the first device to the second device and / or the first device receives information related to the second device sent from the second device, thereby maintaining the networking state between the first device and the second device.

[0345] In another example, if the first device determines that the first device and the second device are not networked, the first device and the second device need to be networked first to maintain the networking state between the first device and the second device.

[0346] In this example, after the first device and the second device form a network, the first device and the second device may also exchange information with each other.

[0347] It should be noted that the method 500 described above is described by taking the number of the second device as one as an example. If the number of the second devices is multiple, the multiple second devices all execute the steps described in the method 500 described above.

[0348] Combination of the above Figures 5 to 7 , describes in detail the network keep-alive method provided by this application, and the following is combined with Figure 8 , a communication system is provided in detail in an embodiment of the present application.

[0349] Figure 8 A schematic diagram of a communication system provided in an embodiment of the present application.

[0350] For example, Figure 8 As shown, the communication system includes a device 610 and a device 620 .

[0351] The present embodiment of the present application does not limit the type of the device 610 and / or the device 620. For example, the device 610 and / or the device 620 may be the device described above. Figure 1 Any of the industrial devices or non-industrial devices described above. For another example, the device 610 and / or the device 620 may be any of the industrial devices or non-industrial devices described above. Figure 2For example, the device 610 may be any of the terminal devices described above. Figure 7 The second device described in the above description, the device 620 may be Figure 7 The first device described in.

[0352] It should be noted that the embodiment of the present application does not limit the number of devices 610 and / or devices 620. Figure 8 The communication system includes two devices as an example for description, which should not be construed as limiting the present application. It should be understood that the communication system may also include more devices, which is not limited in the present application embodiment.

[0353] like Figure 8 As shown, the device 610 and the device 620 both include a device management interface, a networking module, a device authentication module (e.g., hichain), a soft bus, a sensor hub module, and a properties unit. The device management interface includes a device status unit; the networking module includes a device keep-alive strategy unit, the soft bus includes a networking unit and a transmission unit; the device authentication module includes a group management unit; and the sensor hub module includes a sensor hub unit.

[0354] It should be noted that Figure 8 The modules included in the device 610 and the device 620 shown in the figure are only examples, and they may also include other modules, which are not limited in the embodiment of the present application. And, Figure 8 The units included in the various modules of the device 610 and the device 620 shown in the figure are only examples, and they may also include other units, which is not limited in the embodiments of the present application.

[0355] Next, combine Figure 8 The communication system shown in the figure describes in detail the method for network keeping alive provided in the embodiment of the present application, wherein the device 610 is taken as an example to perform active network keeping alive.

[0356] based on Figure 8 In the communication system shown, the method for keeping the network alive includes:

[0357] In the first step, the networking unit of the device 610 starts a keep-alive heartbeat and sends the TGID to the device 620 in a heartbeat keep-alive broadcast message.

[0358] For the description of TGID, please refer to the above description and will not be repeated here.

[0359] Optionally, in one example, before the first step, the device 610 needs to determine whether to start network keep-alive. Specifically, the device keep-alive policy unit of the device 610 reads the local keep-alive configuration from the performance unit of the device 610, and determines whether to start network keep-alive according to the configuration.

[0360] The local keep-alive configuration may be understood as a local network keep-alive strategy of the device 610. For example, the network keep-alive strategy may include: the structure of the heartbeat keep-alive broadcast message described above, the device keep-alive method described above (active participation in keep-alive or not active participation in keep-alive), and / or the device keep-alive period described above.

[0361] Exemplarily, the step of the device 610 determining whether to start network keep-alive may be performed after the device 610 is powered on.

[0362] Optionally, in one example, before the first step, the device 610 may further calculate the TGID described in the first step.

[0363] Specifically, first, the device keep-alive policy unit of device 610 queries the trusted group of device 610 from the group management unit of device 610. Secondly, the device keep-alive policy unit of device 610 transmits the trusted group read in the second step to the networking unit of device 610. Finally, the networking unit of device 610 calculates the TGID according to the trusted group.

[0364] The embodiment of the present application does not limit the manner in which the device 610 sends the heartbeat keep-alive broadcast message to the device 620. In one example, the networking unit of the device 610 may first send the heartbeat keep-alive broadcast message to the sensor hub unit of the device 610. Then, the sensor hub unit of the device 610 sends the heartbeat keep-alive broadcast message to the sensor hub unit of the device 620.

[0365] In the second step, the device 620 matches the TGID in the heartbeat keep-alive broadcast message with the TGID of the device 620 to obtain a matching result.

[0366] In an example, the sensor hub unit of the device 620 may read the TGID of the device 620 from the TGID policy module of the device 620, and match the TGID in the heartbeat keep-alive broadcast message with the TGID of the device 620 to obtain a matching result.

[0367] The third step is to process the heartbeat keep-alive broadcast message based on the matching results.

[0368] In one example, when the matching result is a match, the sensor hub unit of device 620 may report the heartbeat keep-alive broadcast message to the networking unit of device 620. After receiving the heartbeat keep-alive broadcast message, the networking unit of device 620 sends information for triggering keep-alive networking to the device management interface of device 620, and then the device management interface of device 620 triggers the keep-alive networking of device 620.

[0369] In another example, when the matching result is no match, the sensor hub unit of the device 620 may discard the heartbeat keep-alive broadcast message.

[0370] Exemplarily, the device 620 may further include a network keep-alive module, and the device 620 performs network keep-alive through the network keep-alive module.

[0371] Optionally, in one example, only for devices with a trusted relationship (authenticated devices) + devices with the same account (authentication-free devices), after authentication is completed, the networking is called to trigger the dual-end networking online.

[0372] Optionally, in one example, after receiving the heartbeat keep-alive broadcast message, the networking unit of the device 620 may further perform: the networking unit of the device 620 may report the device online to the device management interface. The device management interface may also report the device online callback.

[0373] Optionally, the device 610 may further include a device information management module, which monitors online events and performs data synchronization between devices.

[0374] Optionally, the device status unit of the device 610 monitors the synchronization completion event of the device information management module, and sends a ready status notification to the reporting device management interface.

[0375] Next, combine Fig. 9 and Fig.10 , describe in detail the device provided in the embodiments of the present application.

[0376] Fig. 9 A schematic structural diagram of an example of a network keep-alive device 700 provided in an embodiment of the present application.

[0377] For example, Fig. 9 As shown, the network keep-alive device 700 includes a transceiver unit 710 and a processing unit 720 .

[0378] In an achievable manner, the network keeping alive device 700 may be the first device described in the method 500 above or the first device described in the method 500 above. Figure 8 Device 610 as described in.

[0379] Specifically, the transceiver unit 710 is used to receive a heartbeat keep-alive broadcast message from a second device, wherein the heartbeat keep-alive broadcast message is used to indicate that the second device is in a networking online state, and the heartbeat keep-alive broadcast message includes a first identifier, and the first identifier is used to indicate the group to which the second device belongs. The processing unit 720 is used to match the first identifier with the second identifier to obtain a matching result, wherein the second identifier is used to indicate the group to which the device 700 belongs; the processing unit 720 is also used to process the heartbeat keep-alive broadcast message according to the matching result.

[0380] In another achievable manner, the network keeping alive device 700 may be the second device described in the method 500 above or the second device described in the method 500 above. Figure 8 Device 620 as described in.

[0381] Specifically, the processing unit 720 is used to generate a heartbeat keep-alive broadcast message, wherein the heartbeat keep-alive broadcast message is used to indicate that the device 700 is in a networked online state, and the heartbeat keep-alive broadcast message includes a first identifier, and the first identifier is used to indicate the group to which the device 700 belongs; the transceiver unit 710 is used to broadcast the heartbeat keep-alive broadcast message.

[0382] Fig.10 A schematic structural diagram of a network keep-alive device 800 provided in an embodiment of the present application is shown.

[0383] like Fig.10 As shown, the network keeping alive device 800 includes: one or more processors 810, one or more memories 820, and the one or more memories 820 store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors 810, the network keeping alive device 800 performs the technical solution in the above embodiment.

[0384] The embodiment of the present application provides a communication system, including a first device and a second device, which is used to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above method-related embodiments, and will not be repeated here.

[0385] The embodiment of the present application provides a computer program product, when the computer program product is run on a first device, the first device executes the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above method-related embodiments, and will not be repeated here.

[0386] The embodiment of the present application provides a computer program product, when the computer program product is run on a second device, the second device executes the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above method-related embodiments, and will not be repeated here.

[0387] The embodiment of the present application provides a readable storage medium, the readable storage medium contains instructions, when the instructions are executed on a first device, the first device executes the technical solution of the above embodiment. The implementation principle and technical effect are similar, and will not be repeated here.

[0388] The embodiment of the present application provides a readable storage medium, the readable storage medium contains instructions, when the instructions are executed on a second device, the second device executes the technical solution of the above embodiment. The implementation principle and technical effect are similar, and will not be repeated here.

[0389] The embodiment of the present application provides a chip, the chip is used to execute instructions, when the chip is running, the technical solution in the above embodiment is executed. The implementation principle and technical effect are similar, and will not be repeated here.

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

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

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

[0393] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

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

[0395] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

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

Claims

1. A system, characterized in that: The system includes a first device and a second device, wherein the first device and the second device are communicatively connected, wherein: The second device broadcasts a first heartbeat keep-alive broadcast message, where the first heartbeat keep-alive broadcast message is used to indicate that the second device is in a networking online state, where the second device being in the networking online state means that the second device and at least one device have been networked, and the first heartbeat keep-alive broadcast message includes a first identifier, where the first identifier is used to indicate a group to which the second device belongs, and the first identifier is generated based on an authentication method between devices; In response to receiving the first heartbeat keep-alive broadcast message, the first device matches the first identifier with a second identifier to obtain a first matching result, wherein the second identifier is used to indicate the group to which the first device belongs; The first device processes the first heartbeat keep-alive broadcast message according to the first matching result.

2. The system according to claim 1, characterized in that The authentication method and the identifier used to indicate the group to which the device belongs have a one-to-one correspondence.

3. The system according to claim 1, characterized in that The first identifier is generated based on an authentication method between the second device and a third device, and the third device is a device in the group to which the second device belongs; and / or, The second identifier is generated based on an authentication method between the first device and a fourth device, and the fourth device is a device in the group to which the first device belongs.

4. The system according to claim 1 or 2, characterized in that: The first device is further specifically used for: Determine that the first matching result is a match, and maintain the networking status with the second device according to the first heartbeat keep-alive broadcast message.

5. The system according to any one of claims 1 to 3, characterized in that The system further comprises a fifth device, The fifth device is used to broadcast a second heartbeat keep-alive broadcast message, where the second heartbeat keep-alive broadcast message is used to indicate that the fifth device is in a networking online state, and the second heartbeat keep-alive broadcast message includes a fifth identifier, where the fifth identifier is used to indicate the group to which the fifth device belongs; The first device is further configured to, in response to receiving the second heartbeat keep-alive broadcast message, match the fifth identifier with the second identifier to obtain a second matching result; The first device is further configured to determine that the second matching result is a mismatch and discard the second heartbeat keep-alive broadcast message.

6. A method for keeping a network alive, characterized in that: The method comprises: The first device receives a first heartbeat keep-alive broadcast message from a second device, where the first heartbeat keep-alive broadcast message is used to indicate that the second device is in a networking online state, where the second device being in the networking online state means that the second device and at least one device have been networked, and the first heartbeat keep-alive broadcast message includes a first identifier, where the first identifier is used to indicate a group to which the second device belongs, and the first identifier is generated based on an authentication method between devices; The first device matches the first identifier with the second identifier to obtain a first matching result, wherein the second identifier is used to indicate the group to which the first device belongs; The first device processes the first heartbeat keep-alive broadcast message according to the first matching result.

7. The method according to claim 6, characterized in that The authentication method and the identifier used to indicate the group to which the device belongs have a one-to-one correspondence.

8. The method according to claim 6, characterized in that The first identifier is generated based on an authentication method between the second device and a third device, and the third device is a device in the group to which the second device belongs.

9. The method according to claim 6, characterized in that The first identifier also includes a first identifier and / or a second identifier; wherein, The first flag is used to indicate whether it is necessary to respond to the first heartbeat keep-alive broadcast message; The second identification bit is used to indicate the authentication type between the second device and the third device.

10. The method according to claim 9, characterized in that The authentication type includes a same-account authentication type and a different-account authentication type.

11. The method according to any one of claims 6 to 10, characterized in that The length of the first identifier is related to the scenario in which the first device is used.

12. The method according to any one of claims 6 to 10, characterized in that The method further comprises: The first device generates a fourth identifier according to an authentication method between the first device and a fourth device, where the fourth device is a device in the group to which the first device belongs; Perform a hash calculation on the fourth identifier and extract the last M bits as the second identifier.

13. The method according to any one of claims 6 to 10, characterized in that The length of the first identifier is N bits, the length of the second identifier is M bits, and the first device matches the first identifier with the second identifier to obtain a first matching result, including: When N>M, the first device matches the value of the M bits after the first identifier with the value of the second identifier to obtain the first matching result.

14. The method according to claim 13, characterized in that 8≤N≤20, and / or, 8≤M≤20.

15. The method according to any one of claims 6 to 10, characterized in that The processing of the first heartbeat keep-alive broadcast message according to the first matching result includes: It is determined that the first matching result is a match, and the first device maintains a networking state with the second device according to the first heartbeat keep-alive broadcast message.

16. The method according to any one of claims 6 to 10, characterized in that The first device receives a second heartbeat keep-alive broadcast message from a fifth device, where the second heartbeat keep-alive broadcast message is used to indicate that the fifth device is in a networking online state, and the second heartbeat keep-alive broadcast message includes a fifth identifier, where the fifth identifier is used to indicate a group to which the fifth device belongs; The first device matches the fifth identifier with the second identifier to obtain a second matching result; Determine that the second matching result is a mismatch, and the first device discards the second heartbeat keep-alive broadcast message.

17. A method for keeping a network alive, characterized in that: The method comprises: The second device generates a heartbeat keep-alive broadcast message, where the heartbeat keep-alive broadcast message is used to indicate that the second device is in a networking online state, where the second device being in the networking online state means that the second device and at least one device have been networked, and the heartbeat keep-alive broadcast message includes a first identifier, where the first identifier is used to indicate a group to which the second device belongs, and the first identifier is generated based on an authentication method between devices; The second device broadcasts the heartbeat keep-alive broadcast message.

18. The method according to claim 17, characterized in that The authentication method and the identifier used to indicate the group to which the device belongs have a one-to-one correspondence.

19. The method according to claim 17, characterized in that The first identifier also includes a first identifier and / or a second identifier; wherein, The first flag is used to indicate whether it is necessary to respond to the heartbeat keep-alive broadcast message; The second identification bit is used to indicate the authentication type between the second device and the third device.

20. The method according to claim 19, characterized in that The authentication type includes a same-account authentication type and a different-account authentication type.

21. The method according to any one of claims 17 to 20, characterized in that The length of the first identifier is related to the scenario in which the second device is used.

22. The method according to any one of claims 17 to 20, characterized in that The method further comprises: Generate a third identifier according to an authentication method between the second device and a third device, where the third device is a device in the group to which the second device belongs; A hash calculation is performed on the third identifier, and the last N bits are truncated as the first identifier, where N is a positive integer.

23. The method according to claim 22, characterized in that 8≤N≤20。 24. The method according to any one of claims 17 to 20, characterized in that Before the second device broadcasts the heartbeat keep-alive broadcast message, the method further includes: The second device determines that the performance of the second device meets the active participation keep-alive condition, or the second device determines that the application on the second device is in a running state.

25. A network keep-alive device, characterized in that: include: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, cause the apparatus to perform the method as described in any one of claims 6 to 24.

26. A computer storage medium, characterized in that The method comprises computer instructions, which, when executed on a first device, cause the first device to execute the method according to any one of claims 6 to 24.

Citation Information

Patent Citations

  • Group-header based method to organize local peer group of vehicles for inter-vehicle communication

    CN101253699A