Group device state data synchronization method and device, equipment and storage medium

Through key negotiation, the session key and service-specific key pairs are derived, data leakage and insufficient security problems in group device status data synchronization are solved, and efficient device status data synchronization and communication security are achieved.

CN119071776APending Publication Date: 2024-12-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310641462.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the near-field multi-end interconnection scenario, when group equipment status data is synchronized, there are problems of data leakage and insufficient security, especially due to insufficient confidentiality and integrity protection of the soft bus transmission channel, the data may be tampered with or forged. And the data source cannot be verified, which affects the normal operation of business functions.

Method used

Use session key derived from key negotiation to synchronize device status data, generate service-specific key pairs, and derive new session keys at any time based on long-term service key pairs, ensuring the confidentiality and integrity of data transmission, and establishing services private communication channels between them to prevent illegal access and man-in-the-middle attacks.

Benefits of technology

It effectively improves the security of device communication and the confidentiality and integrity of data transmission, prevents data leakage and tampering, ensures the normal operation of business functions, and maintains secure communication even if there are security vulnerabilities in the near-field transmission protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071776A_ABST
    Figure CN119071776A_ABST
Patent Text Reader

Abstract

Disclosed in an embodiment of the present application are a group device state data synchronization method, apparatus and device, and a storage medium, when a first sender device and a receiver device in a device group need to perform communication of a first target service, the first sender device and the receiver device respectively generate a first key pair, the first sender device and the receiver device exchange respective first service public key and second service public key, and then derive a first session key based on the first service public key and the second service public key; the first sender device and the receiver device synchronize device state data of the first sender device based on the first session key. According to the embodiment of the invention, other services on the equipment can be prevented from illegally accessing the data transmitted between the equipment by the current service, the safety of equipment communication is improved, meanwhile, the session key derived by key negotiation is used for carrying out equipment state data synchronization, the confidentiality and integrity of data transmission can be improved, and the user experience is improved. And furthermore, equipment state data synchronization can be carried out on a new session key derived at any time based on a long-term service key pair, so that the safety of equipment state data synchronization is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, apparatus, device and storage medium for synchronizing group device status data. Background Art

[0002] In the scenario of near-field multi-terminal interconnection, group devices may synchronize certain device status data with each other. For example, the sender device (Sender, denoted as device S) synchronizes the factory preset device security level of the sender device to the receiver device (Receiver, denoted as device R) so that the sender device and the receiver device can perform the next business operation.

[0003] In the related technology, when the device status data between group devices is synchronized, the transmission channel between the sending device and the receiving device based on the soft bus (BUS) is a device-level channel. All services on the two devices may obtain the data transmitted between the devices. The data access scope is too large, which can easily cause data leakage between services. Summary of the invention

[0004] The present application provides a method, apparatus, device and storage medium for synchronizing group device status data, which can prevent other services on the device from illegally accessing data transmitted between devices by the current service, thereby improving the security of device communication. At the same time, the session key derived from key negotiation is used to synchronize device status data, which can improve the confidentiality and integrity of data transmission. New session keys can also be derived at any time based on long-term service key pairs to synchronize device status data, thereby further improving the security of device status data synchronization.

[0005] In a first aspect, the present application provides a method for synchronizing group device status data, which is applied to a receiving device in a device group, and the method includes:

[0006] When a first sending device and the receiving device in the device group need to communicate for a first target service, a first key pair is generated, where the first key pair is a key pair used by the receiving device for the first target service, the first key pair includes a first service public key, and the first sending device and the receiving device have established a network connection in advance;

[0007] Sending the first service public key to the first sending device;

[0008] receiving a second service public key sent by the first sending device, where the second service public key is a public key in a second key pair generated by the first sending device, and the second key pair is a key pair used by the first sending device for the first target service;

[0009] deriving a first session key based on the first service public key and the second service public key;

[0010] Receive device state data synchronized by the first sender device based on the first session key.

[0011] In a second aspect, the present application provides a method for synchronizing group device status data, which is applied to a first sending device in a device group, and the method includes:

[0012] When a receiving device in the device group and the first sending device need to communicate for a first target service, a second key pair is generated, where the second key pair is a key pair used by the first sending device for the first target service, the second key pair includes a second service public key, and the receiving device and the first sending device have established a network connection in advance;

[0013] Sending the second service public key to the receiving device;

[0014] receiving a first service public key sent by the receiving device, where the first service public key is a public key in a first key pair generated by the receiving device, and the first key pair is a key pair used by the receiving device for the first target service;

[0015] deriving a first session key based on the first service public key and the second service public key;

[0016] The device state data of the device itself is synchronized to the receiving device based on the first session key.

[0017] In a third aspect, the present application provides a device for synchronizing group device status data, which is applied to a receiving device in a device group, and the device includes:

[0018] A generating module, configured to generate a first key pair when a first sending device in a device group and the receiving device need to communicate for a first target service, wherein the first key pair is a key pair used by the receiving device for the first target service, the first key pair includes a first service public key, and the first sending device and the receiving device have established a network connection in advance;

[0019] A sending module, used to send the first service public key to the first sending device;

[0020] A first receiving module, configured to receive a second service public key sent by the first sending device, where the second service public key is a public key in a second key pair generated by the first sending device, and the second key pair is a key pair used by the first sending device for the first target service;

[0021] A derivation module, configured to derive a first session key based on the first service public key and the second service public key;

[0022] A second receiving module is configured to receive device status data synchronized by the first sending device based on the first session key.

[0023] In a fourth aspect, the present application provides a device for synchronizing group device status data, which is applied to a first sending device in a device group, and the device includes:

[0024] a generating module, configured to generate a second key pair when a receiving device in a device group and the first sending device need to communicate for a first target service, the second key pair being a key pair used by the first sending device for the first target service, the second key pair including a second service public key, and the receiving device and the first sending device having established a network connection in advance;

[0025] A sending module, used to send the second service public key to the receiving device;

[0026] A receiving module, configured to receive a first service public key sent by the receiving device, where the first service public key is a public key in a first key pair generated by the receiving device, where the first key pair is a key pair used by the receiving device for the first target service;

[0027] A derivation module, configured to derive a first session key based on the first service public key and the second service public key;

[0028] A synchronization module is used to synchronize its own device status data to the receiving device based on the first session key.

[0029] In a fifth aspect, the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps in the method for synchronizing group device status data as described in any one of the first aspect or the second aspect.

[0030] In a sixth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in the method for synchronizing group device status data as described in any one of the first aspect or the second aspect.

[0031] In the embodiments of the present application, a method, apparatus, device and storage medium for synchronizing group device status data are provided. Compared with the prior art in which a single key is used for various services, in the embodiments of the present application, when the first sending device and the receiving device are performing the first target service, a service-specific first key pair and a second key pair are generated for communication, that is, for each independent service, an independent long-term service key pair is generated, which can prevent other services on the two devices from illegally accessing the data transmitted between the current services, thereby improving the security of device communication. At the same time, based on the device status data synchronized between the devices, a separate first session key is derived using the first service public key and the second service public key to synchronize the device status data. On the one hand, the session key derived from the key negotiation is used to synchronize the device status data, and on the basis of the near-field transmission protocol communication between the devices, a communication channel between the services is established. Even if a security vulnerability occurs in the near-field transmission protocol, the service-level channel can still communicate securely, thereby improving the confidentiality and integrity of data transmission. On the other hand, according to business needs, a new session key can be derived at any time based on the long-term service key pair to further improve the security of device status data synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0033] Figure 1 It is a schematic diagram of the network architecture provided by the embodiment of the present application;

[0034] Figure 2 It is a flowchart of an embodiment of a method for synchronizing group device status data provided in an embodiment of the present application;

[0035] Figure 3 This is a flow chart of an embodiment of receiving device status data synchronized by a first sending device based on a first session key in an embodiment of the present application;

[0036] Figure 4 is a flowchart of an embodiment of determining whether the device status data of the first sending device exists in the currently recorded device status data in an embodiment of the present application;

[0037] Figure 5 is a flowchart of another embodiment of the method for synchronizing group device status data provided in an embodiment of the present application;

[0038] Figure 6is a flowchart of another embodiment of the method for synchronizing group device status data provided in an embodiment of the present application;

[0039] Figure 7 It is a schematic diagram of the structure of an embodiment of a device for synchronizing group device status data provided in an embodiment of the present application;

[0040] Figure 8 is a schematic structural diagram of another embodiment of the apparatus for synchronizing group device status data provided in an embodiment of the present application;

[0041] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0043] In the following description, the specific embodiments of the present application will be described with reference to the steps and symbols performed by one or more computers, unless otherwise specified. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and the computer execution referred to herein includes the operation of a computer processing unit by an electronic signal representing data in a structured form. This operation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.

[0044] The terms "module" or "unit" used herein may be considered as software objects executed on the computing system. The different components, modules, engines and services described herein may be considered as implementation objects on the computing system. The devices and methods described herein are preferably implemented in software, but may also be implemented in hardware, all within the scope of protection of this application.

[0045] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0046] In the near-field multi-terminal interconnection scenario, group devices may synchronize certain device status data with each other. For example, the sender device synchronizes the factory-set device security level of the sender device to the receiver device so that the sender device and the receiver device can perform the next business operation. Therefore, it is necessary to design a safe and effective group device status synchronization solution.

[0047] like Figure 1 As shown, it is a network architecture diagram of a device group in an embodiment of the present application. The modules involved in the device group are:

[0048] Sender device 100: a sender device of device status data, and device status data of the sender device itself. The specific content of the device status data is determined by actual business requirements.

[0049] Receiving device 200: a receiving device of device status data, receiving the device status data sent by a sending device.

[0050] Software BUS (BUS for short): It can be considered as a logical channel for connection and data transmission between the sender device and the receiver device (possibly one or more). Generally, a communication module is implemented on each device to complete the secure connection between devices based on the near field connection protocol (such as Bluetooth, WiFi, etc.).

[0051] In the related technology, the technical solution for synchronizing group device status data is as follows:

[0052] 1) In a device group, the soft buses of each device establish connections with each other based on the near field connection protocol, completing the establishment of a connection network between group devices.

[0053] 2) The soft bus on each device records and maintains the group device connection information. At the same time, the business module on the device can query the group device connection information maintained by the soft bus.

[0054] 3) A service module in the sender device obtains device status data in the sender device;

[0055] 4) The service module in the sender device sends the device status data of the sender device and the device identification information of the sender device to the soft bus module of the sender device;

[0056] 5) The soft bus module of the sending device sends the device status data and device identification information of the sending device to the soft bus modules of all receiving devices in the device group;

[0057] 6) The soft bus module of the receiving device sends the device status data and device identification information of the sending device to the service module responsible for processing the device status data in the receiving device;

[0058] 7) The service module of the receiving device records the device status data and device identification information received from the sending device.

[0059] After detailed analysis and research, the inventor found that the related technology has the following technical problems:

[0060] There is no association between the device status data and the identity of the corresponding sending device. The receiving device can only obtain the identity of the sending device through the soft bus, or the device identification of the sending device that passively receives the device status data, and determine that the data comes from a certain sending device, but it cannot verify and confirm that the device status data is sent from a legitimate and authentic business module on the sending device.

[0061] In the sending device, once the business module of the sending device itself is attacked by malicious code, or the malicious code disguises itself as the business module of the sending device to deceive the soft bus of the sending device, or the malicious code implements a man-in-the-middle attack (intercepting and replacing device status data) between the business module of the sending device and the soft bus of the sending device, the soft bus of the sending device may receive the data tampered with or forged by the attacker, and synchronize it to the soft bus of the receiving device, ultimately deceiving the business module of the receiving device and affecting the normal operation of the business functions of the business module of the receiving device.

[0062] Cross-end data transmission is based on the near-field connection protocol to protect the confidentiality and integrity of the transmitted data. If there is a security vulnerability in the near-field connection protocol, the transmitted data may be tampered with during transmission, or data leakage may occur. If the confidentiality and integrity protection mechanism of the near-field connection protocol is destroyed due to a protocol vulnerability, an attacker may implement a man-in-the-middle attack between the soft bus of the sender device and the soft bus of the receiver device, intercept and replace the device status data packet, and impersonate the business module identity of the receiver device. However, the business module and soft bus of the receiver device cannot verify whether the data comes from the legitimate business module of the sender device, and ultimately receive data tampered with or forged by the attacker, affecting the normal operation of the business functions of the business module of the receiver device.

[0063] The business module of the sender device and the business module of the receiver device cannot establish one-to-one private communication. The transmission channel between the sender device and the receiver device based on the soft bus is a device-level channel. All services on the two devices may obtain data transmitted between devices. The data access scope is too large, which may cause data leakage between services.

[0064] In view of the above problems, the inventors have discovered after long-term research and proposed a method, apparatus, device and storage medium for synchronizing group device status data provided in the embodiments of the present application.

[0065] The present application embodiment can be applied to Figure 1 In the network architecture diagram shown, those skilled in the art can understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer group devices as shown in, e.g. Figure 1 Only one receiving device is shown. It can be understood that the network architecture diagram may also include one or more other receiving devices connected to the sending device network, which is not specifically limited here.

[0066] Specifically, the receiving device and the sending device of the embodiment of the present application can both be electronic devices, wherein the electronic device can be a terminal or a server and other devices, wherein the terminal can be a mobile phone, a tablet computer, a laptop computer, a smart TV, a desktop computer, a wearable smart device, a personal computer (PC) and other devices. Among them, the server can be a single server, or a server cluster composed of multiple servers, or a cloud server composed of multiple servers. Among them, the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing).

[0067] It should be noted that the electronic device in the embodiment of the present application may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. That is, the sender device and the receiver device in the embodiment of the present application may be devices including receiving and transmitting hardware, so that they both act as sender devices in some services and as receiver devices in other services.

[0068] In addition, in the embodiment of the present application, a memory may also be included for storing data, such as separately storing device status data.

[0069] It should be noted that Figure 1 The network architecture diagram shown is only an example. The network architecture diagram and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of technology and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0070] The following describes it in detail with reference to specific embodiments.

[0071] In the embodiment of the present application, the description will first be made from the perspective of a synchronization device for group device status data, and the synchronization device for group device status data may be specifically integrated in a receiving device.

[0072] See also Figure 2 , Figure 2 The method for synchronizing group device status data provided by the embodiment of the present application includes the following steps 201 to 205:

[0073] 201. When a first sending device and a receiving device in a device group need to communicate for a first target service, a first key pair is generated.

[0074] The first key pair is a key pair used by the receiving device for the first target service, the first key pair includes a first service public key and a first service private key, and the first sending device and the receiving device have established a network connection in advance.

[0075] In the embodiment of the present application, for each device in the device group, the device initialization connection is first performed, which specifically includes the following steps:

[0076] 1) In the device group, the soft buses of each device establish connections with each other based on a near field connection protocol (e.g., Bluetooth, WiFi, etc.), completing the establishment of a network connection between group devices. That is, in this embodiment, the first sender device and the receiver device of the same device group have established a network connection in advance during the device initialization process.

[0077] 2) The soft bus on each device records and maintains the connection information of the group devices. At the same time, the business module on the device can query the connection information of the group devices maintained by the BUS.

[0078] In this embodiment, the first business private key in the first key pair is held by the key pair owner (receiving device) and cannot be published, and the first business public key is published by the key pair holder to others (such as the first sending device).

[0079] In the embodiment of the present application, the first key pair may be generated by an existing key algorithm, such as an RSA algorithm, etc., which is not specifically limited here.

[0080] It should be noted that in the embodiment of the present application, steps 201 to 205 can be executed by the business module corresponding to the first target business in the receiving device, and the business module corresponding to the first target business in the receiving device communicates with the business module corresponding to the first target business in the first sending device. The first sending device and the receiving device exchange data and instructions through their respective soft buses.

[0081] For example, when the service module (denoted as S_MODULE) in the receiving device (referred to as device S) needs to communicate with the service R_MODULE on the first sending device (referred to as device R), S_MODULE and R_MODULE respectively generate a key pair dedicated to this service, for example, the first service key corresponding to S_MODULE is denoted as S_pub_key, and the second service key corresponding to R_MODULE is denoted as R_pub_key).

[0082] 202. Send a first business public key to a first sending device.

[0083] Specifically, in an embodiment of the present application, a data transmission channel can be established in advance through the soft bus of the receiving device and the soft bus of the first sending device, and the first business public key can be sent to the first sending device through the data transmission channel.

[0084] 203. Receive a second business public key sent by the first sending device.

[0085] The second service public key is a public key in a second key pair generated by the first sender device, the second key pair is a key pair used by the first sender device for the first target service, and the second key pair also includes a second service private key.

[0086] Specifically, the method of receiving the second business public key sent by the first sending device may be: receiving the second business public key sent by the first sending device through a data transmission channel (between the soft bus of the receiving device and the soft bus of the first sending device).

[0087] It should be noted that, in this embodiment, the order of step 202 and step 203 is not limited, and step 203 may also be located before step 202, or be performed simultaneously with step 202.

[0088] 204. Derive a first session key based on the first service public key and the second service public key.

[0089] The first key pair and the second key pair may be keys with a longer usage time than the first session key.

[0090] For example, S_MODULE and R_MODULE complete key negotiation based on the public keys (first business public key and second business public key) exchanged securely, using the industry-standard key negotiation protocol, and derive the first session key (referred to as session_keys) for subsequent device status data synchronization.

[0091] In the embodiments of the present application, the key negotiation protocol can be flexibly selected, for example, the international standard SIGMA protocol, STS protocol, etc., and the selection of the protocol is flexible.

[0092] 205. Receive device status data synchronized by the first sending device based on the first session key.

[0093] In an embodiment of the present application, a method, apparatus, device and storage medium for synchronizing group device status data are provided. When a first sender device and a receiver device in a device group need to communicate for a first target service, the first sender device and the receiver device respectively generate a first key pair, the first sender device and the receiver device exchange their respective first service public keys and second service public keys, and then derive a first session key based on the first service public key and the second service public key; the first sender device and the receiver device synchronize the device status data of the first sender device based on the first session key. Compared with the prior art that uses a single key for various services, in the embodiment of the present application, the first sending device and the receiving device generate a service-specific first key pair and a second key pair for communication when performing the first target service, that is, for each independent service, an independent long-term service key pair is generated, which can prevent other services on the two devices from illegally accessing the data transmitted between the current services, thereby improving the security of device communication. At the same time, based on the device status data synchronized between devices, a separate first session key is derived using the first service public key and the second service public key to synchronize the device status data. On the one hand, the session key derived from the key negotiation is used to synchronize the device status data, and on the basis of the near-field transmission protocol communication between devices, a communication channel between services is established. Even if there is a security vulnerability in the near-field transmission protocol, the service-level channel can still communicate securely, which can improve the confidentiality and integrity of data transmission. On the other hand, according to business needs, a new session key can be derived at any time based on the long-term service key pair to further improve the security of device status data synchronization.

[0094] like Figure 3 As shown, in one implementation of the embodiment of the present application, receiving the device state data synchronized by the first sending device based on the first session key in step 205 may further include the following steps 301 to 304:

[0095] 301. Receive a first transmission data packet sent by a first sending device.

[0096] The first transmission data packet includes first device status data of the first sending device and a device identifier of the first sending device.

[0097] Specifically, for example, receiving the first transmission data packet sent by the first sending device may be: S_MODULE obtains the device status data S_data1 in the device S, S_MODULE uses the first session key session_keys to establish a secure channel based on BUS, that is, uses session_keys to encapsulate S_data1 and the device identification of the device S (denoted as S_ID), to form the first transmission data packet (denoted as S_package) transmitted in the secure channel, and sends the S_package to the soft bus module S_BUS of the device S, and sends the S_package to the soft bus module R_BUS of the receiving device in the device group through the S_BUS. At this time, the receiving device receives the first transmission data packet S_package sent by the first sending device.

[0098] It can be understood that the device identifier can be a unique identifier such as a hardware address (Media Access Control Address, MAC address) or a device ID. The device identifier is pre-set. Specifically, the device identifier can also include one or more information such as the device name, device type, device serial number, factory serial number or a specified field in the device model, where the specified field can indicate the device brand type.

[0099] 302. Based on the first session key, confirm whether the first transmission data packet is sent by a device that is trusted by the device.

[0100] 303. If the first transmission data packet is sent by a device that it trusts, parse the first transmission data packet based on the first session key to obtain the first device status data and the device identification of the first sending device.

[0101] 304. Record the device status data of the first sender device according to the first device status data and the device identification of the first sender device.

[0102] In this embodiment, the first session key is used to first confirm whether the first transmission data packet is sent by a trusted device, and then the first transmission data packet is parsed based on the first session key, and the device status data of the first sender device is recorded according to the first device status data and the device identification of the first sender device. In this embodiment, the device status data of the first sender device is recorded by the derived first session key, so that the transmission device status data and the sender device and the receiver device can be associated with each other through the first session key, thereby preventing potential attacks such as man-in-the-middle attacks and business identity spoofing, and improving data security.

[0103] In one embodiment of the present application, the first session key may include multiple subkeys. For example, the first session key includes a verification subkey and an encryption subkey. The verification subkey is used to verify the transmission data, and the encryption subkey is used to encrypt or parse the transmission data packet.

[0104] Specifically, when the first session key includes a verification subkey and an encryption subkey, confirming whether the first transmission data packet is sent by a device that it trusts based on the first session key in step 302 may further include: verifying whether the first transmission data packet is sent by a device that it trusts based on the verification subkey. At this time, parsing the first transmission data packet based on the first session key in step 303 to obtain the first device status data and the device identification of the first sending device may include: parsing the first transmission data packet based on the encryption subkey to obtain the first device status data and the device identification of the first sending device.

[0105] Specifically, for example, R_MODULE can verify S_package based on session_keys to confirm that it is sent from a trusted S_MODULE. R_MODULE can unpack S_package based on session_keys to obtain the first device status data and the device identifier {S_data1, S_ID} of the first sender device. R_MODULE can record the received {S_data1, S_ID}

[0106] In order to ensure that the recorded data is valid and non-repetitive and save storage space, in some implementations of the embodiments of the present application, if the receiving device has already recorded the device identification of the first sending device, the device status data currently received from the first sending device can be discarded; if the device identification of the first sending device is not recorded, the device status data currently received from the first sending device can be recorded.

[0107] Specifically, recording the device status data of the first sender device according to the first device status data and the device identification of the first sender device may further include: determining whether the device status data of the first sender device exists in the currently recorded device status data. If not, recording the first device status data and the device identification of the first sender device; if so, discarding the first device status data.

[0108] If the receiving device subsequently receives new status data of other devices, it can also determine whether the current receiving device has recorded the device identification of the sending device to determine whether the currently received device status data is recorded.

[0109] like Figure 4As shown, in some implementations of the embodiments of the present application, determining whether there is device status data of the first sender device in the currently recorded device status data may include the following steps 401 to 403:

[0110] 401. Obtain a device identification set of currently recorded device status data.

[0111] 402. Determine whether the device identification set includes the device identification of the first sender device.

[0112] Among them, determining whether the device identification set includes the device identification of the first sender device may include: comparing the device identification of the first sender device with each device identification in the device identification set respectively; if there is a device identification in the device identification set that is identical to the device identification of the first sender device, determining that the device identification of the first sender device is included in the device identification set.

[0113] Specifically, the device identifier that exists in the device identifier set and is identical to the device identifier of the first sender device may be: there is a device identifier in the device identifier set with the same value as the device identifier corresponding to the device identifier of the first sender device; the device identifier that exists in the device identifier set and is identical to the device identifier of the first sender device may also be: there is a device identifier in the device identifier set and the hash value of the device identifier of the first sender device is the same.

[0114] 403. If it is determined that the device identification set includes the device identification of the first sender device, it is determined that the device status data of the first sender device exists in the currently recorded device status data.

[0115] Specifically, for example, when R_MODULE receives new device status data and a new device identifier {S_data2, S_ID2}, it compares the value of the newly received new device identifier S_ID2 and the recorded S_ID; if they are equal, the recorded S_data1 is discarded and the newly received S_data2 and S_ID are recorded; if they are not equal, {S_data1, S_ID} and {S_data2, S_ID2} are recorded.

[0116] In some embodiments of the present application, in addition to receiving device status data sent by the first sending device, the receiving device can also receive device status data sent by other sending devices. If the receiving device receives device status data sent by other devices, it can also record it in the manner described in the above embodiments to improve the security of communication between devices in the device group.

[0117] Specifically, in some embodiments of the present application, the method for synchronizing group device status data in the embodiments of the present application may also include: receiving second device status data and a device identification of the second sending device sent by a second sending device in the receiving device group, the second sending device and the receiving device having established a network connection in advance; if it is determined that the device status data of the second sending device does not exist in the currently recorded device status data, then recording the second device status data and the device identification of the second sending device.

[0118] In the embodiment of the present application, the receiving device records the device status data and device identification of multiple devices, which can be recorded in the form of a data list. For example, R_MODULE receives new device status data, refreshes the record information of the same sender device, adds the record information of the new sender device, and forms a device status data list S_data_List, specifically {{S_data1, S_ID}, {S_data2, S_ID2}, ...}.

[0119] In some implementations of the embodiments of the present application, the current receiving device can also synchronize its own device status data to other devices in the device group as a "sender device" in another scenario of the device group. Figure 5 As shown, the method for synchronizing group device status data in the embodiment of the present application may also include the following steps 501 to 505:

[0120] 501. When a target device and a receiving device in a device group need to communicate for a second target service, a third key pair is generated.

[0121] The third key pair is a key pair used by the receiving device for the second target service, the third key pair includes a third service public key, and the target device and the receiving device have established a network connection in advance.

[0122] 502. Send the third business public key to the target device.

[0123] 503. Receive the fourth business public key sent by the target device.

[0124] The fourth service public key is a public key in a fourth key pair generated by the target device, and the fourth key pair is a key pair used by the target device for the second target service.

[0125] 504. Derive a second session key based on the third service public key and the fourth service public key.

[0126] 505. Synchronize its own device state data to the target device based on the second session key.

[0127] It should be noted that the specific implementation methods in steps 501 to 505 are the same as those in Figure 2The implementation process of steps 201 to 205 in the illustrated embodiment is similar, and specific reference may be made to steps 201 to 205 , which will not be described again here.

[0128] In this embodiment, the receiving device generates an independent long-term business key pair regardless of whether it is receiving device status data synchronized by other devices in the device group or synchronizing its own device status data to other devices in the device group. This can prevent other services on the two communicating devices from illegally accessing data transmitted between devices by the current service, thereby improving the security of device communication. At the same time, based on the device status data synchronized between devices, a separate session key is derived using the business key pair to synchronize the device status data. On the one hand, the session key derived from the key negotiation is used to synchronize the device status data, and a communication channel between services is established on the basis of the near-field transmission protocol communication between devices. Even if a security vulnerability occurs in the near-field transmission protocol, the service-level channel can still communicate securely, thereby improving the confidentiality and integrity of data transmission. On the other hand, according to business needs, a new session key can be derived at any time based on the long-term business key pair, thereby further improving the security of device status data synchronization, thereby ensuring that the receiving device can effectively ensure security when sending and receiving device status data.

[0129] In the embodiment of the present application, in addition to the sending device synchronizing device status data with the receiving device, the receiving device can also actively query the sending device for its device status data. Specifically, the synchronization method of group device status data in the embodiment of the present application can also include: obtaining a device status data query request for a target device identifier; determining whether the target device identifier is included in the device identifier set of the currently recorded device status data; if included, obtaining the device status data corresponding to the target device identifier; if not included, requesting the device status data from the device corresponding to the target device identifier.

[0130] When the receiving device actively queries the sending device for its device status data, the receiving device may or may not have established a connection with the sending device. In the embodiments of the present application, different processing schemes can be used for different scenarios to improve the query efficiency. Specifically, the step of requesting device status data from the device corresponding to the target device identifier may further include: if the device corresponding to the target device identifier has established a connection with the receiving device, sending a query request to the device corresponding to the target device identifier, the query request is used to query the device status data corresponding to the target device identifier; receiving the device status data sent by the device corresponding to the target device identifier.

[0131] For example, when R_MODULE needs the status information of a target device in the group (recorded as S_ID3 device), it queries S_data_List for the device status data of S_ID3 device; if S_data_List has recorded S_ID3, R_MODULE obtains the corresponding recorded data. If S_ID3 is not recorded, R_MODULE sends a request to R_BUS, and R_BUS initiates a query request to S_ID3 device; if S_ID3 device does not establish a connection with R, R_BUS reports an error to R_MODULE and terminates the query process.

[0132] If the S_ID3 device has established a connection with R, the S_BUS of the device S_ID3 receives the query request from R_BUS and sends the request to S_MODULE; S_MODULE synchronizes the device status data to the device R.

[0133] In the above embodiment, the method for synchronizing group device status data is described from the perspective of a receiving device. The following embodiment describes the method for synchronizing group device status data from the perspective of a first sending device.

[0134] In this embodiment, the description will be made from the perspective of a synchronization device for group device status data, and the synchronization device for group device status data may be specifically integrated in the first sending device.

[0135] See also Figure 6 , Figure 6 This is a flow chart of another embodiment of a method for synchronizing group device status data in an embodiment of the present application. The method for synchronizing group device status data may specifically include the following steps 601 to 605:

[0136] 601. When a receiving device and a first sending device in a device group need to communicate for a first target service, a second key pair is generated.

[0137] The second key pair is a key pair used by the first sender device for the first target service, the second key pair includes a second service public key, and the receiver device and the first sender device have established a network connection in advance.

[0138] It should be noted that in the embodiment of the present application, steps 601 to 605 can be executed by the business module corresponding to the first target business in the receiving device, and the business module corresponding to the first target business in the receiving device communicates with the business module corresponding to the first target business in the first sending device. The first sending device and the receiving device exchange data and instructions through their respective soft buses.

[0139] For example, when the service module (denoted as S_MODULE) in the receiving device (referred to as device S) needs to communicate with the service R_MODULE on the first sending device (referred to as device R), S_MODULE and R_MODULE respectively generate a key pair dedicated to this service, for example, the first service key corresponding to S_MODULE is denoted as S_pub_key, and the second service key corresponding to R_MODULE is denoted as R_pub_key).

[0140] 602. Send the second business public key to the recipient device.

[0141] Specifically, in the embodiment of the present application, a data transmission channel can be established in advance through the soft bus of the receiving device and the soft bus of the first sending device, and the second business public key can be sent to the receiving device through the data transmission channel.

[0142] 603. Receive the first business public key sent by the receiving device.

[0143] The first service public key is a public key in a first key pair generated by the receiving device, and the first key pair is a key pair used by the receiving device for the first target service.

[0144] Specifically, the first service public key sent by the receiving device may be received in a manner that the receiving device sends the first service public key through a data transmission channel (between a soft bus of the receiving device and a soft bus of the first sending device).

[0145] 604. Derive a first session key based on the first service public key and the second service public key.

[0146] The first key pair and the second key pair may be keys with a longer usage time than the first session key.

[0147] For example, S_MODULE and R_MODULE complete key negotiation based on the public keys (first business public key and second business public key) that are initialized for secure exchange, using industry-standard key negotiation protocols (such as SIGMA protocol, STS protocol, etc.), and derive the first session key (referred to as session_keys) for subsequent device status data synchronization.

[0148] 605. Synchronize its own device state data to the recipient device based on the first session key.

[0149] In an embodiment of the present application, when the first sending device and the receiving device are performing the first target service, they generate a service-specific first key pair and a second key pair for communication, that is, for each independent service, an independent long-term service key pair is generated, which can prevent other services on the two devices from illegally accessing the data transmitted between the devices of the current service, thereby improving the security of device communication. At the same time, based on the device status data synchronized between devices, a separate first session key is derived using the first service public key and the second service public key to synchronize the device status data. On the one hand, the session key derived from the key negotiation is used to synchronize the device status data, and on the basis of the near-field transmission protocol communication between devices, a communication channel between services is established. Even if a security vulnerability occurs in the near-field transmission protocol, the service-level channel can still communicate securely, thereby improving the confidentiality and integrity of data transmission. On the other hand, according to business needs, a new session key can be derived at any time based on the long-term service key pair to further improve the security of device status data synchronization.

[0150] In some embodiments of the present application, synchronizing its own device status data to the receiving device based on the first session key in step 605 may further include: obtaining its own second device status data; based on the first session key, encapsulating the second device status data and the device identification of the first sending device to obtain a second transmission data packet; and sending the second transmission data packet to the receiving device.

[0151] For example, S_MODULE obtains device status data S_data1 in device S, and S_MODULE uses the first session key session_keys to establish a secure channel based on BUS, that is, uses session_keys to encapsulate S_data1 and the device identification of device S (denoted as S_ID) to form a first transmission data packet (denoted as S_package) transmitted in the secure channel, and sends S_package to the soft bus module S_BUS of device S, and sends S_package to the soft bus module R_BUS of the receiving device in the device group through S_BUS. At this time, the receiving device receives the first transmission data packet S_package sent by the first sending device.

[0152] It should be noted that the first sending device is the communication peer device of the receiving device. Some specific implementation details of the synchronization method of group device status data on the first sending device side can refer to the specific implementation details of the synchronization method of group device status data on the receiving device side, and will not be repeated here.

[0153] The following describes the method for synchronizing group device status data in an embodiment of the present application in conjunction with a specific application scenario.

[0154] In a specific scenario embodiment, the sending device is denoted as device S, the receiving device is denoted as device R, the service module in device S (denoted as S_MODULE), the service module on device R is denoted as R_MODULE, the second service public key corresponding to S_MODULE is denoted as S_pub_key, the first service public key corresponding to R_MODULE is denoted as R_pub_key, the device status data in device S is denoted as S_data1, the device identifier of device S is denoted as S_ID, the soft bus of the receiving device is denoted as R_BUS, the soft bus of the sending device is denoted as S_BUS, and the session key derived from the receiving device and the sending device is denoted as session_keys.

[0155] In this specific scenario embodiment, the method for synchronizing group device status data may specifically include the following steps:

[0156] First, initialize the connection for the devices in the device group, including:

[0157] 1) In the device group, the BUS of each device is connected to each other based on the near field connection protocol (such as Bluetooth, WiFi, etc.), completing the establishment of the connection network between the group devices.

[0158] 2) The BUS on each device records and maintains the group device connection information. At the same time, the business module on the device can query the group device connection information maintained by the BUS.

[0159] Secondly, complete the secure exchange of the S_MODULE and R_MODULE initialization business public keys, including:

[0160] 3) When the service module (denoted as S_MODULE) in device S needs to communicate with the service R_MODULE on device R, S_MODULE and R_MODULE respectively generate a long-term key pair dedicated to this service;

[0161] 4) S_MODULE and R_MODULE exchange each other's business long-term public keys through the data transmission channel established by BUS (S_MODULE's long-term public key is recorded as S_pub_key, and R_MODULE's long-term public key is recorded as R_pub_key). After user confirmation, the initialization of business public key security exchange is completed.

[0162] 5) S_MODULE and R_MODULE securely store the long-term public key of the peer service (access control, anti-tampering), which serves as the credential and trust anchor for subsequent verification of the peer service identity;

[0163] Then, the key negotiation between device S and device R is completed, the session key required for subsequent secure communication is derived, and the device state data of device S is synchronized to device R, which specifically includes:

[0164] 6) S_MODULE and R_MODULE use industry-standard key negotiation protocols (such as SIGMA protocol, STS protocol, etc.) based on the public key that is initialized for secure exchange to complete key negotiation, derive session keys (referred to as session_keys), and store them securely.

[0165] 7) S_MODULE obtains device status data S_data1 in device S;

[0166] 8) S_MODULE uses session_keys to establish a secure channel based on BUS, that is, it uses session_keys to encapsulate S_data1 and S's device identification information (recorded as S_ID) to form a data packet transmitted in the secure channel (recorded as S_package), and sends S_package to S's soft bus module S_BUS.

[0167] 9) S_BUS sends S_package to the soft bus module R_BUS of all receiving devices in the device group

[0168] 10) R_BUS sends S_package to the business module in R responsible for processing S_data1 (denoted as R_MODULE)

[0169] In some implementations of this embodiment, the device may also record and maintain the received group device status, which specifically includes the following steps:

[0170] 11) R_MODULE verifies S_package based on session_keys to confirm that it is sent from a trusted S_MODULE;

[0171] 12) R_MODULE unpacks S_package based on session_keys and obtains {S_data1, S_ID};

[0172] 13) R_MODULE records the received {S_data1, S_ID};

[0173] 14) When R_MODULE receives new device status data {S_data2, S_ID2}, it compares the value of the newly received S_ID2 with the recorded S_ID;

[0174] If they are equal, discard the recorded S_data1 and record the newly received S_data2 and S_ID;

[0175] If they are not equal, record {S_data1, S_ID}, {S_data2, S_ID2}.

[0176] 15) If R_MODULE receives new device status data subsequently, the recording and maintenance operations of R_BUS are the same as step 6) above, refreshing the record information of the same sender device, adding the record of the new sender device, and forming a device status data list S_data_List in the form of {{S_data1, S_ID}, {S_data2, S_ID2}, ...}.

[0177] In some implementations of this embodiment, the device R may also actively query the soft bus for status information of the device S, which specifically includes the following steps:

[0178] 16) When R_MODULE needs the status information of a device (recorded as S_ID3) in the group, it queries whether there is device status data of S_ID3 in S_data_List;

[0179] If S_data_List has recorded S_ID3, R_MODULE obtains the data of the corresponding record.

[0180] If S_ID3 is not recorded, R_MODULE sends a request to R_BUS, and R_BUS initiates a query request to the S_ID3 device.

[0181] 17) If the S_ID3 device fails to establish a connection with R, R_BUS reports an error to R_MODULE and terminates the process.

[0182] If the S_ID3 device has established a connection with R, the S_BUS of the device S_ID3 receives the query request from R_BUS and sends the request to S_MODULE;

[0183] 18) S_MODULE synchronizes the device status data to device R according to [Device S synchronizes the device status data to device R].

[0184] The embodiment of the present application uses a business-specific long-term key pair (long-term relative to the session key) to initialize the secure exchange of the business public key, and serves as the basis for deriving the session key through key negotiation. It can establish an association between the transmitted data and the business S_MODULE and R_MODULE, prevent potential attacks such as man-in-the-middle attacks and business identity spoofing, and improve the security of the solution.

[0185] In the embodiment of the present application, the service modules S_MODULE and R_MODULE perform initial public key exchange and key negotiation based on the service-specific long-term key pair, so as to establish a one-to-one private and trusted channel between the services, prevent other services on the device from illegally accessing the transmission data between the services S_MODULE and R_MODULE, and improve the protection level of data privacy.

[0186] In this application, services S_MODULE and R_MODULE use session keys derived from key negotiation to establish communication channels between services based on the near-field transmission protocol. Even if security vulnerabilities occur in the near-field transmission protocol, the service-level channel can still communicate securely, thereby improving the confidentiality and integrity of data transmission.

[0187] In order to facilitate better implementation of the synchronization method of group device status data provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the synchronization method of group device status data. The meanings of the terms are the same as those in the synchronization method of group device status data, and the specific implementation details can refer to the description in the method embodiment.

[0188] See also Figure 7 , Figure 7 A schematic diagram of the structure of a synchronization device for group device status data provided in an embodiment of the present application, which is applied to a receiving device in a device group, wherein the synchronization device 700 for group device status data may include a generation module 701, a sending module 702, a first receiving module 703, a derivation module 704, and a second receiving module 705, wherein:

[0189] A generating module 701 is used to generate a first key pair when a first sending device and a receiving device in a device group need to communicate for a first target service. The first key pair is a key pair used by the receiving device for the first target service. The first key pair includes a first service public key. The first sending device and the receiving device have established a network connection in advance.

[0190] The sending module 702 is used to send a first service public key to a first sending device;

[0191] A first receiving module 703 is configured to receive a second service public key sent by a first sending device, where the second service public key is a public key in a second key pair generated by the first sending device, and the second key pair is a key pair used by the first sending device for a first target service;

[0192] A derivation module 704, configured to derive a first session key based on the first service public key and the second service public key;

[0193] The second receiving module 705 is configured to receive device status data synchronized by the first sending device based on the first session key.

[0194] In an embodiment of the present application, when the first sending device and the receiving device are performing the first target service, they generate a service-specific first key pair and a second key pair for communication, that is, for each independent service, an independent long-term service key pair is generated, which can prevent other services on the two devices from illegally accessing the data transmitted between the devices of the current service, thereby improving the security of device communication. At the same time, based on the device status data synchronized between devices, a separate first session key is derived using the first service public key and the second service public key to synchronize the device status data. On the one hand, the session key derived from the key negotiation is used to synchronize the device status data, and on the basis of the near-field transmission protocol communication between devices, a communication channel between services is established. Even if a security vulnerability occurs in the near-field transmission protocol, the service-level channel can still communicate securely, thereby improving the confidentiality and integrity of data transmission. On the other hand, according to business needs, a new session key can be derived at any time based on the long-term service key pair to further improve the security of device status data synchronization.

[0195] In some embodiments of the present application, the second receiving module 705 is specifically used to: receive a first transmission data packet sent by the first sending device, the first transmission data packet including first device status data of the first sending device and a device identification of the first sending device; based on the first session key, confirm whether the first transmission data packet is sent by a device trusted by itself; if the first transmission data packet is sent by a device trusted by itself, based on the first session key, parse the first transmission data packet to obtain the first device status data and the device identification of the first sending device; and record the device status data of the first sending device according to the first device status data and the device identification of the first sending device.

[0196] In some embodiments of the present application, the first session key includes a check subkey and an encryption subkey;

[0197] The second receiving module 705 is specifically used to: verify whether the first transmission data packet is from a device that it trusts based on the verification subkey, and parse the first transmission data packet based on the encryption subkey to obtain the first device status data and the device identification of the first sending device.

[0198] In some embodiments of the present application, the second receiving module 705 is specifically used to: determine whether the device status data of the first sending device exists in the currently recorded device status data; if not, record the first device status data and the device identification of the first sending device; if so, discard the first device status data.

[0199] In some embodiments of the present application, the second receiving module is specifically used to: obtain a set of device identifications of currently recorded device status data; determine whether the device identification set includes the device identification of the first sending device; and if so, determine that the device status data of the first sending device exists in the currently recorded device status data.

[0200] In some embodiments of the present application, the device further includes a recording module, and the recording module is used to:

[0201] Receive second device status data and a device identification of the second sending device sent by a second sending device in the device group, where the second sending device and the receiving device have established a network connection in advance; if it is determined that the device status data of the second sending device does not exist in the currently recorded device status data, record the second device status data and the device identification of the second sending device.

[0202] In some embodiments of the present application, the device further includes a synchronization module, and the synchronization module is used to:

[0203] When the target device in the device group and the receiving device need to communicate for the second target service, a third key pair is generated, the third key pair is the key pair used by the receiving device for the second target service, the third key pair includes a third service public key, and the target device and the receiving device have established a network connection in advance; the third service public key is sent to the target device; a fourth service public key is received from the target device, the fourth service public key is the public key in the fourth key pair generated by the target device, and the fourth key pair is the key pair used by the target device for the second target service; a second session key is derived based on the third service public key and the fourth service public key; and the device status data of the device itself is synchronized to the target device based on the second session key.

[0204] In some embodiments of the present application, the device further includes a query module, and the query module is used to:

[0205] Obtain a device status data query request for a target device identifier; determine whether the target device identifier is included in the device identifier set for which device status data is currently recorded; if included, obtain the device status data corresponding to the target device identifier; if not included, request device status data from the device corresponding to the target device identifier.

[0206] In some embodiments of the present application, the query module is specifically used to: if the device corresponding to the target device identifier has established a connection with the receiving device, send a query request to the device corresponding to the target device identifier, and the query request is used to query the device status data corresponding to the target device identifier; and receive the device status data sent by the device corresponding to the target device identifier.

[0207] In the above embodiments, the apparatus for synchronizing group device status data is described from the perspective of a receiving device. The following embodiments describe the apparatus for synchronizing group device status data from the perspective of a first sending device.

[0208] See also Figure 8 , Figure 8 A schematic diagram of a structure of a synchronization device for group device status data provided in an embodiment of the present application, which is applied to a first sending device in a device group, wherein the synchronization device 800 for group device status data may include a generation module 801, a sending module 802, a receiving module 803, a derivation module 804 and a synchronization module 805, wherein:

[0209] A generating module 801 is used to generate a second key pair when a receiving device in a device group and the first sending device need to communicate for a first target service, the second key pair being a key pair used by the first sending device for the first target service, the second key pair including a second service public key, and the receiving device and the first sending device have established a network connection in advance;

[0210] A sending module 802 is used to send the second service public key to the receiving device;

[0211] A receiving module 803 is configured to receive a first service public key sent by the receiving device, where the first service public key is a public key in a first key pair generated by the receiving device, and the first key pair is a key pair used by the receiving device for the first target service;

[0212] A derivation module 804, configured to derive a first session key based on the first service public key and the second service public key;

[0213] The synchronization module 805 is used to synchronize its own device state data to the receiving device based on the first session key.

[0214] In an embodiment of the present application, when the first sending device and the receiving device are performing the first target service, they generate a service-specific first key pair and a second key pair for communication, that is, for each independent service, an independent long-term service key pair is generated, which can prevent other services on the two devices from illegally accessing the data transmitted between the devices of the current service, thereby improving the security of device communication. At the same time, based on the device status data synchronized between devices, a separate first session key is derived using the first service public key and the second service public key to synchronize the device status data. On the one hand, the session key derived from the key negotiation is used to synchronize the device status data, and on the basis of the near-field transmission protocol communication between devices, a communication channel between services is established. Even if a security vulnerability occurs in the near-field transmission protocol, the service-level channel can still communicate securely, thereby improving the confidentiality and integrity of data transmission. On the other hand, according to business needs, a new session key can be derived at any time based on the long-term service key pair to further improve the security of device status data synchronization.

[0215] In some embodiments of the present application, the synchronization module is specifically used to: obtain its own second device status data; based on the first session key, encapsulate the second device status data and the device identification of the first sending device to obtain a second transmission data packet; and send the second transmission data packet to the receiving device.

[0216] The present application also provides an electronic device, such as Fig. 9 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0217] The electronic device may include components such as a processor 901 with one or more processing cores, a memory 902 with one or more computer-readable storage media, a power supply 903, and an input unit 904. Those skilled in the art will appreciate that Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0218] The processor 901 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 902 and calling data stored in the memory 902, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 901 may include one or more processing cores; preferably, the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operation storage medium, user interface and application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 901.

[0219] The memory 902 can be used to store software programs and modules. The processor 901 executes various functional applications and data processing by running the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating storage medium, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 902 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, or other volatile solid-state storage devices. Accordingly, the memory 902 may also include a memory controller to provide the processor 901 with access to the memory 902.

[0220] The electronic device also includes a power supply 903 for supplying power to various components. Preferably, the power supply 903 can be logically connected to the processor 901 through a power management storage medium, so as to manage charging, discharging, and power consumption management through the power management storage medium. The power supply 903 can also include any components such as one or more DC or AC power supplies, recharge storage media, power failure detection circuits, power converters or inverters, and power status indicators.

[0221] The electronic device may further include an input unit 904, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0222] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 901 in the electronic device will load the executable files corresponding to the processes of one or more applications into the memory 902 according to the following instructions, and the processor 901 will run the applications stored in the memory 902, thereby implementing the steps in the above-mentioned group device status data synchronization method embodiment.

[0223] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0224] To this end, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded by a processor to execute the steps in any one of the group device status data synchronization methods provided in the embodiments of the present application.

[0225] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0226] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0227] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the group device status data synchronization methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the group device status data synchronization methods provided in the embodiments of the present application can be achieved. For details, please refer to the previous embodiments and will not be repeated here.

[0228] The above is a detailed introduction to a method, apparatus, device and storage medium for synchronizing group device status data provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for synchronizing group device status data, characterized in that: Applied to a receiving device in a device group, the method comprises: When a first sending device and the receiving device in the device group need to communicate for a first target service, a first key pair is generated, where the first key pair is a key pair used by the receiving device for the first target service, the first key pair includes a first service public key, and the first sending device and the receiving device have established a network connection in advance; Sending the first service public key to the first sending device; receiving a second service public key sent by the first sending device, where the second service public key is a public key in a second key pair generated by the first sending device, and the second key pair is a key pair used by the first sending device for the first target service; deriving a first session key based on the first service public key and the second service public key; Receive device state data synchronized by the first sender device based on the first session key.

2. The method for synchronizing group device status data according to claim 1, characterized in that: The receiving, based on the first session key, device state data synchronized by the first sender device comprises: receiving a first transmission data packet sent by the first sending device, wherein the first transmission data packet includes first device status data of the first sending device and a device identifier of the first sending device; Based on the first session key, confirm whether the first transmission data packet is sent by a device that is trusted by itself; If the first transmission data packet is sent by a device that it trusts, the first transmission data packet is parsed based on the first session key to obtain the first device status data and the device identification of the first sending device; The device status data of the first sender device is recorded according to the first device status data and the device identification of the first sender device.

3. The method for synchronizing group device status data according to claim 2, characterized in that: The first session key includes a verification subkey and an encryption subkey; The confirming, based on the first session key, whether the first transmission data packet is sent by a device that is trusted by the user includes: Based on the verification subkey, verify whether the first transmission data packet is from a device that it trusts; The step of parsing the first transmission data packet based on the first session key to obtain the first device status data and the device identification of the first sending device includes: Based on the encryption subkey, the first transmission data packet is parsed to obtain first device status data and a device identification of the first sending device.

4. The method for synchronizing group device status data according to claim 2, characterized in that: The recording the device status data of the first sender device according to the first device status data and the device identification of the first sender device includes: Determine whether the device status data of the first sender device exists in the currently recorded device status data; If not, recording the first device status data and the device identification of the first sender device; If so, discard the first device status data.

5. The method for synchronizing group device status data according to claim 4, characterized in that: The determining whether the device status data of the first sending device exists in the currently recorded device status data includes: Get the device identification set of the currently recorded device status data; Determining whether the device identification set includes the device identification of the first sending device; If so, it is determined that the device status data of the first sending device exists in the currently recorded device status data.

6. The method for synchronizing group device status data according to any one of claims 1 to 5, characterized in that: The method further comprises: Receiving second device status data and a device identifier of the second sending device sent by a second sending device in the device group, wherein the second sending device and the receiving device have established a network connection in advance; If it is determined that the device status data of the second sender device does not exist in the currently recorded device status data, the second device status data and the device identification of the second sender device are recorded.

7. The method for synchronizing group device status data according to any one of claims 1 to 5, characterized in that: The method further comprises: When the target device in the device group and the receiving device need to communicate for a second target service, a third key pair is generated, the third key pair is a key pair used by the receiving device for the second target service, the third key pair includes a third service public key, and the target device and the receiving device have established a network connection in advance; Sending the third service public key to the target device; receiving a fourth service public key sent by the target device, where the fourth service public key is a public key in a fourth key pair generated by the target device, and the fourth key pair is a key pair used by the target device for the second target service; deriving a second session key based on the third service public key and the fourth service public key; The device state data of the device itself is synchronized to the target device based on the second session key.

8. The method for synchronizing group device status data according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtain a device status data query request for a target device identifier; Determine whether the target device identifier is included in the device identifier set of the currently recorded device status data; If included, obtaining device status data corresponding to the target device identifier; If not included, request device status data from the device corresponding to the target device identifier.

9. The method for synchronizing group device status data according to claim 8, characterized in that: The requesting device status data from the device corresponding to the target device identifier includes: If the device corresponding to the target device identifier has established a connection with the receiving device, sending a query request to the device corresponding to the target device identifier, wherein the query request is used to query the device status data corresponding to the target device identifier; Receive device status data sent by a device corresponding to the target device identifier.

10. A method for synchronizing group device status data, characterized in that: Applied to a first sending device in a device group, the method comprises: When a receiving device in the device group and the first sending device need to communicate for a first target service, a second key pair is generated, where the second key pair is a key pair used by the first sending device for the first target service, the second key pair includes a second service public key, and the receiving device and the first sending device have established a network connection in advance; Sending the second service public key to the receiving device; receiving a first service public key sent by the receiving device, where the first service public key is a public key in a first key pair generated by the receiving device, and the first key pair is a key pair used by the receiving device for the first target service; deriving a first session key based on the first service public key and the second service public key; The device state data of the device itself is synchronized to the receiving device based on the first session key.

11. The method for synchronizing group device status data according to claim 10, characterized in that: The synchronizing the device status data of the device to the receiving device based on the first session key includes: Obtaining the second device status data of the self; Based on the first session key, encapsulate the second device state data and the device identification of the first sending device to obtain a second transmission data packet; The second transmission data packet is sent to the receiving device.

12. A device for synchronizing group device status data, characterized in that: Applied to a receiving device in a device group, the apparatus comprises: A generating module, configured to generate a first key pair when a first sending device in a device group and the receiving device need to communicate for a first target service, wherein the first key pair is a key pair used by the receiving device for the first target service, the first key pair includes a first service public key, and the first sending device and the receiving device have established a network connection in advance; A sending module, used to send the first service public key to the first sending device; A first receiving module, configured to receive a second service public key sent by the first sending device, where the second service public key is a public key in a second key pair generated by the first sending device, and the second key pair is a key pair used by the first sending device for the first target service; A derivation module, configured to derive a first session key based on the first service public key and the second service public key; A second receiving module is configured to receive device status data synchronized by the first sending device based on the first session key.

13. A device for synchronizing group device status data, characterized in that: Applied to a first sending device in a device group, the apparatus comprises: a generating module, configured to generate a second key pair when a receiving device in a device group and the first sending device need to communicate for a first target service, the second key pair being a key pair used by the first sending device for the first target service, the second key pair including a second service public key, and the receiving device and the first sending device having established a network connection in advance; A sending module, used to send the second service public key to the receiving device; A receiving module, configured to receive a first service public key sent by the receiving device, where the first service public key is a public key in a first key pair generated by the receiving device, where the first key pair is a key pair used by the receiving device for the first target service; A derivation module, configured to derive a first session key based on the first service public key and the second service public key; A synchronization module is used to synchronize its own device status data to the receiving device based on the first session key.

14. An electronic device, characterized in that: It comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps in the method for synchronizing group device status data as described in any one of claims 1 to 11.

15. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the method for synchronizing group device status data as claimed in any one of claims 1 to 11.