Device communication method, communication system, and electronic device

By managing frame interaction and parsing device service information, the problem of poor discovery and communication capabilities between smart devices is solved, enabling effective communication even under network restrictions or device disconnection, thus improving the robustness of the system.

WO2026081884A1PCT designated stage Publication Date: 2026-04-23SHENZHEN OCEANWING SMART INNOVATIONS TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHENZHEN OCEANWING SMART INNOVATIONS TECHNOLOGY CO LTD
Filing Date
2025-09-30
Publication Date
2026-04-23

AI Technical Summary

Technical Problem

Existing smart devices have poor discovery and communication capabilities, especially when they cannot be discovered or communication is interrupted due to network restrictions, the system cannot maintain basic communication capabilities.

Method used

By sending request information through management frames, service capability information exchange between devices is realized, including parsing device service information and key negotiation, and two-way authentication is performed using preset algorithms to improve the discovery and communication capabilities between devices.

Benefits of technology

Even when network restrictions are in place or devices are disconnected, effective discovery and communication between devices can still be achieved, improving the system's robustness and discovery capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025125999_23042026_PF_FP_ABST
    Figure CN2025125999_23042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a device communication method applied to a first device, the method comprising: the first device sending request information to a second device via a management frame, such that the second device sends device service information to the first device, the device service information being used for representing service capability information of the second device; receiving the device service information; and the first device parsing the device service information to obtain the service capability information of the second device, and then communicating with the second device. The present application further discloses a communication system and an electronic device. The present application improves a discovery capability between devices.
Need to check novelty before this filing date? Find Prior Art

Description

Device communication methods, communication systems and electronic devices Technical Field

[0001] The embodiments disclosed in this application relate to the field of wireless communication technology, and more specifically, to a device communication method, a communication system, and an electronic device. Background Technology

[0002] Currently, the discovery and communication between smart devices can usually be achieved by using m DNS (multicast Domain Name System) combined with DNS-SD (Domain Name System Service Discovery) technology. However, due to technical limitations, the discovery capability between smart devices is poor, and there are even cases where smart devices cannot be discovered at all. Summary of the Invention

[0003] This application provides at least one device discovery method, electronic device, and storage medium to solve the above-mentioned problems.

[0004] According to embodiments of this application, this application proposes a device communication method, a communication system, and an electronic device to solve the above-mentioned problems.

[0005] The first aspect of this application discloses a device communication method applied to a first device. The method includes: the first device sending request information to a second device via a management frame, causing the second device to send device service information to the first device, the device service information representing the service capability information of the second device; receiving the device service information; the first device parsing the device service information to obtain the service capability information of the second device, and then communicating with the second device.

[0006] In some embodiments, in response to receiving the device service information, the first device generates an associated device list, the associated device list recording at least one of the second device's ID, channel information, and communication validity period.

[0007] In some embodiments, in response to the first device being in a disconnected state, the first device queries the associated device list to determine whether there is any record information for the second device; in response to the existence of record information for the second device and the record information for the second device not having expired, the first device communicates with the second device on the channel recorded in the record information.

[0008] In some embodiments, in response to the absence of record information in the second device, the first device sends the request information to the second device.

[0009] In some embodiments, in response to the second device's record information exceeding its validity period, the first device sends the request information to the second device.

[0010] In some embodiments, the first device sends request information to the second device via a management frame, including sending the management frame in a multi-channel broadcast or single-channel broadcast manner to send the request information.

[0011] In some embodiments, the request information is management frame corresponding data, wherein the request information includes device information of the first device and device information of the second device.

[0012] In some embodiments, the first device parsing the device service information further includes: the first device and the second device performing key negotiation; in response to the completion of the key negotiation, the first device and the second device performing two-way authentication using a preset algorithm.

[0013] A second aspect of this application discloses a device communication method applied to a second device. The method includes: the second device receiving request information sent by a first device; in response to the request information, the second device constructing device service information, the device service information representing service capability information of the second device; the second device sending the device service information to the first device via a management frame, so that the first device receives and parses the device service information and obtains the service capability information of the second device; in response to the first device obtaining the service capability information of the second device, the second device then communicates with the first device based on the service capability information.

[0014] In some embodiments, the device service information is management frame corresponding data, and the device service information includes at least one of the second device's IP information, service capabilities, and service ports.

[0015] In some embodiments, the second device sends the device service information to the first device via a management frame, including sending the management frame in a multi-channel broadcast or single-channel broadcast manner to send the device service information.

[0016] A third aspect of this application discloses a device communication method applied to a communication system, the communication system including a first device and a second device. The method includes: the first device sending a request message to the second device via a management frame; in response to the request message, the second device constructing device service information, the device service information representing the service capability information of the second device; the second device sending the device service information to the first device via a management frame; the first device receiving and parsing the device service information to obtain the service capability information of the second device, and then the first device and the second device communicating.

[0017] In some embodiments, in response to receiving the device service information, the first device generates an associated device list, the associated device list recording at least one of the second device's ID, channel information, and communication validity period.

[0018] In some embodiments, in response to the first device being in a disconnected state, the first device queries the associated device list to determine whether there is any record information for the second device; in response to the existence of record information for the second device and the record information for the second device not having expired, the first device communicates with the second device on the channel recorded in the record information.

[0019] In some embodiments, in response to the absence of record information in the second device, the first device sends the request information to the second device; or in response to the expiration of the record information in the second device, the first device sends the request information to the second device.

[0020] In some embodiments, the first device sends request information to the second device via a management frame, including sending the management frame in a multi-channel broadcast or single-channel broadcast manner to send the request information.

[0021] In some embodiments, the request information is management frame corresponding data, wherein the request information includes device information of the first device and device information of the second device.

[0022] In some embodiments, the first device parsing the device service information further includes: the first device and the second device performing key negotiation; in response to the completion of the key negotiation, the first device and the second device performing two-way authentication using a preset algorithm.

[0023] The fourth aspect of this application discloses a communication system, comprising at least: a first device for performing the device communication method as described in the first aspect; and a second device for performing the device communication method as described in the second aspect.

[0024] The fifth aspect of this application discloses an electronic device including a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the device communication methods described in the first, second, and third aspects.

[0025] The beneficial effects of this application are as follows: the first device sends a request information to the second device through a management frame, so that the second device sends device service information to the first device. The device service information is used to represent the service capability information of the second device. The first device receives and parses the device service information to obtain communication information that can be used to interact with the second device. Thus, even under network restrictions, the first device can still communicate and interact with the second device, thereby improving the device discovery capability. Attached Figure Description

[0026] The present application will be further described below with reference to the accompanying drawings and embodiments. In the drawings:

[0027] Figure 1 is a flowchart illustrating a device communication method according to an embodiment of this application;

[0028] Figure 2 is a schematic diagram of the data corresponding to the management frame in an embodiment of this application;

[0029] Figure 3 is a flowchart illustrating a device communication method according to another embodiment of this application;

[0030] Figure 4 is an interactive schematic diagram of a device communication method according to an embodiment of this application;

[0031] Figure 5 is an interactive schematic diagram of a device communication method according to another embodiment of this application;

[0032] Figure 6 is a flowchart illustrating a device communication method according to another embodiment of this application;

[0033] Figure 7 is a schematic diagram of the communication system according to an embodiment of this application;

[0034] Figure 8 is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0035] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0036] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, "many" in this application means two or more. Moreover, the term "at least one" in this application means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. Furthermore, the terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features.

[0037] When using mDNS (multicast Domain Name System) combined with DNS-SD (DNS Service Discovery) technology to achieve discovery between smart devices, it is subject to technical limitations, resulting in poor discovery capabilities between smart devices. For example, in order to improve network throughput performance (such as in office networks), the forwarding of multicast data is restricted in router systems, which will cause devices to be unable to discover each other; or, for communication devices that rely entirely on routers, when the router fails or loses power, the entire system will be unable to communicate.

[0038] Therefore, this application provides a device communication method, a communication system, and an electronic device.

[0039] To enable those skilled in the art to better understand the technical solution of this application, the technical solution of this application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0040] Please refer to Figure 1, which is a schematic flowchart of a device communication method according to an embodiment of this application. The method is applied to a first device, meaning it can be applied to electronic devices with computing or other functions, such as audio-visual equipment, lighting systems, curtain controls, air conditioning controls, security systems, digital cinema systems, audio-visual servers, media storage systems, and networked home appliances. It should be noted that if substantially the same result is achieved, the method of this application is not limited to the flow sequence shown in Figure 1.

[0041] In some possible implementations, this method can be implemented by the processor calling computer-readable instructions stored in memory, as shown in Figure 1. The method may include the following steps:

[0042] S11: The first device sends a request message to the second device through a management frame, so that the second device sends device service information to the first device. The device service information is used to represent the service capability information of the second device.

[0043] The first device sends a request message to the second device via a management frame. For example, the first device can initiate a management frame broadcast discovery request, or the first device can simultaneously initiate mDNS and a management frame broadcast discovery request.

[0044] The second device can be an electronic device that has not yet been networked with the first device, and there can be one or more second devices. For example, there is a first device A, which broadcasts a discovery request. After multiple second devices receive the request information sent by the first device A, for example, second device B determines that the request information is a request for itself, that is, second device B can be the target second device. Then, second device B sends device service information to the first device. The device service information is used to represent the service capability information of the second device. For example, the service capability information of the second device includes the available service capabilities, device IP, service port, and device ID information, etc. The service capabilities include TCP Server (Transmission Control Protocol Server), UDP Server (Open Systems Interconnection Server), HTTP Server (Hypertext Transfer Protocol Server), etc.

[0045] S12: Receive device service information.

[0046] After the second device sends device service information to the first device, the first device receives the device service information from the second device.

[0047] S13: The first device parses the device service information, obtains the service capability information of the second device, and then communicates with the second device.

[0048] The first device parses the device service information of the second device to obtain the service capability information of the second device, that is, to obtain the communication information that enables interaction with the second device. Thus, the first device can communicate with the second device and achieve interaction.

[0049] In this embodiment, the first device sends a request message to the second device, so that the second device sends device service information to the first device. The device service information is used to represent the service capability information of the second device. The first device receives and parses the device service information to obtain communication information that can be used to interact with the second device. This enables the first device to communicate and interact with the second device even under network restrictions, thereby improving the device discovery capability. The network restrictions include situations where the first device cannot discover the second device through mDNS technology.

[0050] In some embodiments, in response to receiving device service information, the first device generates an associated device list, which records at least one of the second device's ID, channel information, and communication validity period.

[0051] In response to receiving device service information from the second device, the first device parses the device service information of the second device to obtain the service capability information of the second device. Then, the first device records the ID, channel information, communication validity time and other information of the second device. Then, the first device generates an associated device list, that is, the associated device list can record the ID, channel information, communication validity time and other information of at least one second device.

[0052] In some embodiments, in response to the first device being in a disconnected state, the first device queries the list of associated devices to determine whether there is any record information for the second device; in response to the existence of record information for the second device and the fact that the record information for the second device has not expired, the first device and the second device communicate on the channel recorded in the record information.

[0053] The system determines whether the first device is disconnected. If the first device is disconnected, for example, if device A is disconnected from the hotspot (AP), device A checks the list of associated devices to see if there is a record for the second device. For example, device A determines the record for device B from the list of associated devices and checks if the record for device B has expired. If the record for device B exists and has not expired, device A can obtain the device service information of device B again, and then device A and device B can communicate on the channel recorded in the record information. The determination of whether the record information has expired can be understood as setting a timeout mechanism for the data link; that is, if no new interaction occurs between the devices within a specified time, the data link will automatically expire, and the network configuration process will end.

[0054] In this embodiment, in response to the first device being disconnected, the first device queries the list of associated devices to determine whether there is any record information for the second device. In response to the existence of record information for the second device and the fact that the record information for the second device has not expired, the first device and the second device communicate on the channel recorded in the record information. This enables the entire system to maintain basic communication capabilities even when the network (e.g., router) fails, thereby improving the robustness of the system.

[0055] Furthermore, in some embodiments, in response to the absence of record information on the second device, the first device sends a request message to the second device; or in response to the expiration of the record information on the second device, the first device sends a request message to the second device.

[0056] In response to the first device being disconnected, for example, in response to the first device A disconnecting from the hotspot (AP), the first device A queries the list of associated devices to determine if there is any record information for the second device B. If there is no record information for the second device B, the first device A can initiate a management frame broadcast discovery request, or it can simultaneously initiate mDNS and initiate a management frame broadcast discovery request. If there is record information for the second device B, that is, the first device A determines the record information for the second device B from the list of associated devices and determines whether the record information for the second device B has expired. If the record information for the second device B has expired, the first device A can initiate a management frame broadcast discovery request again, or it can simultaneously initiate mDNS and initiate a management frame broadcast discovery request.

[0057] In this embodiment, in response to the absence of record information for the second device, the first device sends a request message to the second device, or in response to the expiration of record information for the second device, the first device sends a request message to the second device, so that the second device sends device service information to the first device. The device service information is used to represent the service capabilities of the second device. Furthermore, the first device receives and parses the device service information to obtain communication information that can interact with the second device, thereby enabling the first device to communicate and interact with the second device even under network restrictions, thus improving the device discovery capability.

[0058] In some embodiments, the first device sends request information to the second device via a management frame, including sending the management frame in a multi-channel broadcast or single-channel broadcast manner to send the request information.

[0059] The first device sends a request message to the second device via a management frame. For example, if the second device is not detected, the first device can broadcast the data corresponding to the management frame in a multi-channel manner, i.e., using channel polling. It sends data sequentially on local compliant channels according to the configured number of transmissions and reception times. After completing one channel, it switches back to the normal channel and notifies the hotspot to enter normal mode for data reception. This cycle repeats, meaning the communication device switches back and forth between its own operating channel and the channel on which the probe needs to be sent, enabling data transmission and reception on different channels. This can be understood as using time-division multiplexing of RF (Radio Frequency) to enable multi-channel communication. When the second device is detected, the first device can broadcast the data corresponding to the management frame in a single-channel manner, i.e., only sending it on the channel of the device requiring communication.

[0060] Before sending management frame data, for the first device (STA) already connected to the hotspot (AP), the first device first sends a command to the hotspot to enter sleep mode, informing the hotspot that the first device will enter sleep mode to receive / send data corresponding to the management frame. During this period, data sent to the first device is buffered by the hotspot and not transmitted to the first device. After completing link authentication, the first device sends a request to exit sleep mode and resume normal reception. If there is relevant data for the first device (STA data), the hotspot will send the data to the first device. For first devices not connected to the hotspot, the first device directly receives / sends the data corresponding to the management frame.

[0061] In some embodiments, the request information is data corresponding to a management frame, wherein the request information includes device information of the first device and device information of the second device.

[0062] The first device sends a request to the second device. For example, the first device initiates a management frame broadcast discovery request. The request information is the data corresponding to the management frame. That is, the first device carries its own information and the second device's information request through the vendor-specific information element of the management frame. The data corresponding to the management frame includes custom element ID data. For example, the first device reuses the management frame through the 802.11 protocol. 802.11 is a set of wireless local area network (WLAN) standards established by the IEEE (Institute of Electrical and Electronics Engineers). The first device reuses the management frame through the 802.11 protocol and adds preset data, such as custom element ID data, to initiate a secure link establishment request, as shown in Figure 2. Figure 2 is a schematic diagram of the framework of the data corresponding to the management frame in this embodiment of the application. The data corresponding to the management frame includes the MAC header address, element data, and FCS. A custom element ID data may include Element_ID, Length, and Value. The custom element ID data includes three types: HANDSHAKE Communication ID, used for secure link establishment; Endpoint to Endpoint Communication... The End-to-End Communication ID (ID) is used for point-to-point communication after a secure link is established; the Group Communication ID (ID) is used for multicast communication, with a maximum packet length of 255 bytes. For preset data, a fixed data format header is added to easily distinguish whether it is data from devices within the ecosystem. The data format header includes a specific prefix code, message sequence number, encryption method, protocol version, command words, etc. Understandably, device discovery is achieved through 802.11 protocol multiplexing.

[0063] In some embodiments, the first device parses device service information, which further includes: the first device and the second device performing key negotiation; in response to the completion of key negotiation, the first device and the second device perform two-way authentication using a preset algorithm.

[0064] For example, after the first device A receives and parses the service information of the second device B, the first device A and the second device B perform link authentication, that is, the first device A and the second device B perform key negotiation. In response to the completion of key negotiation, the first device A and the second device B perform two-way authentication using a preset algorithm, wherein the preset algorithm can be a custom challenge-response algorithm.

[0065] Please refer to Figure 3, which is a flowchart illustrating a device communication method according to another embodiment of this application. This method is applied to a second device, meaning it can be applied to electronic devices with computing or other functions, such as audio-visual equipment, lighting systems, curtain controls, air conditioning controls, security systems, digital cinema systems, audio-visual servers, media player systems, and networked home appliances. It should be noted that if substantially the same result is achieved, the method of this application is not limited to the flow sequence shown in Figure 3.

[0066] In some possible implementations, this method can be implemented by the processor calling computer-readable instructions stored in memory, as shown in Figure 3. The method may include the following steps:

[0067] S31: The second device receives the request information sent by the first device.

[0068] The first device can be an electronic device that has not yet been networked with the second device. The second device receives the request information sent by the first device, such as the first device starting a management frame broadcast discovery request, or it can start mDNS and start a management frame broadcast discovery request at the same time. The second device B receives the discovery request.

[0069] S32: In response to the request information, the second device constructs device service information, which is used to represent the service capability information of the second device.

[0070] For example, after receiving the discovery request, the second device confirms that the request information is a request for itself. The second device then constructs device service information, which is used to represent the service capability information of the second device. For example, the service capability information of the second device includes the available service capabilities, device IP, service port, and device ID information, etc. The service capabilities include TCP Server (Transmission Control Protocol Server), UDP Server (Open Systems Interconnection Server), HTTP Server (Hypertext Transfer Protocol Server), etc.

[0071] S33: The second device sends device service information to the first device through a management frame, so that the first device can receive and parse the device service information and obtain the service capability information of the second device.

[0072] The second device sends its corresponding device service information to the first device. For example, the second device shares its own device service information through management frames. The sharing of management frames is implemented at the MAC (Medium Access Control) layer, so that the first device can receive and parse the device service information of the second device, thereby obtaining the service capability information of the second device and acquiring the communication information that can be used to interact with the second device.

[0073] S34: In response to the first device obtaining the service capability information of the second device, the second device then communicates with the first device based on the service capability information.

[0074] The first device parses the device service information of the second device to obtain the service capability information of the second device and acquires the communication information that enables interaction with the second device. Then, the second device can communicate with the first device based on the service capability information and achieve interaction. That is, the first device and the second device can communicate through the TCP / IP protocol (Transmission Control Protocol / Internet Protocol).

[0075] In this embodiment, the second device receives a request message sent by the first device. In response to the request message, the second device constructs device service information, which represents the service capability information of the second device. The second device sends the device service information to the first device so that the first device receives and parses the device service information and obtains the service capability information of the second device. In response to the first device obtaining the service capability information of the second device, the second device communicates with the first device based on the service capability information. This enables the first device to communicate and interact with the second device even under network restrictions, thereby improving the device discovery capability.

[0076] In some embodiments, the device service information is the data corresponding to the management frame, and the device service information includes at least one of the second device's IP information, service capabilities, and service port.

[0077] The device service information of the second device is the data corresponding to the management frame. That is, the second device sends out its device service data through the management frame. For example, the device service information includes the IP information, service capabilities, service ports and other information of the second device.

[0078] In some embodiments, the second device sends device service information to the first device via a management frame, including sending the management frame in a multi-channel broadcast or single-channel broadcast manner to send the device service information.

[0079] The second device sends device service information to the first device via management frames. For example, when the first device is not detected, the second device can broadcast the data corresponding to the management frame in a multi-channel manner, i.e., using channel polling, sending data sequentially on local compliant channels according to the configured number of transmissions and reception times. After completing one channel, it switches back to the normal channel and notifies the hotspot to enter normal mode for data reception. This cycle repeats, meaning the communication device switches back and forth between its own operating channel and the channel where probes need to be sent, enabling data transmission and reception on different channels. This can be understood as using time-division multiplexing of RF (Radio Frequency) to enable multi-channel communication. When the first device is detected, the second device can broadcast the data corresponding to the management frame in a single-channel manner, i.e., only sending it on the channel of the device requiring communication.

[0080] Before sending management frame data, for second devices (STAs) already connected to the hotspot (AP), the second device first sends a command to the hotspot to enter sleep mode, informing the hotspot that the second device will enter sleep mode to receive / send data corresponding to the management frame. During this period, data sent to the second device is buffered by the hotspot and not transmitted to the second device. After link authentication is completed, the second device sends a request to exit sleep mode and resume normal reception. If there is relevant data for the second device (STA data), the hotspot will send the data to the second device. For second devices not connected to the hotspot, the second device directly receives / sends the data corresponding to the management frame.

[0081] In some embodiments, when the local network system restricts multicast functionality, the device communication method of this application embodiment can improve the discovery capability between devices. For example, a first device A sends a request message to a second device B, as shown in FIG4. FIG4 is an interactive schematic diagram of a device communication method according to an embodiment of this application. The communication method described in this embodiment may include the following steps:

[0082] S41: First device A sends a request message to second device B.

[0083] For example, the first device A initiates a management frame broadcast discovery request, or it can initiate mDNS and a management frame broadcast discovery request simultaneously.

[0084] S42: Second device B constructs device service information.

[0085] The second device B constructs device service information. For example, the first device A broadcasts a discovery request. After multiple second devices receive the request information sent by the first device A, the second device B determines that the request information is a request for itself. The second device B receives the request information sent by the first device A and responds to the request information sent by the first device A. The second device B constructs device service information, which is used to represent the service capability information of the second device. For example, the service capability information of the second device includes the service capabilities that can be provided, the device IP, the service port, and the device ID information, etc.

[0086] S43: The second device B sends device service information to the first device A.

[0087] The second device B sends device service information to the first device A. For example, after the second device B constructs the device service information, the second device B sends the corresponding device service information to the first device A through a management frame.

[0088] S44: First device A parses device service information.

[0089] First device A receives and parses device service information. For example, by parsing the device service information of second device B, first device A obtains the device service capability information of second device B and acquires communication information that can be used to interact with second device B.

[0090] S45: First device A updates the list of associated devices.

[0091] First device A updates the list of associated devices. For example, first device A updates or adds device service information of second device B in the list of associated devices. The list of associated devices may record information such as the ID, channel information, and effective communication time of at least one second device.

[0092] S46: First device A interacts with second device B, such as interactive service business.

[0093] In some embodiments, when the router fails, the device communication method of this application embodiment can enable the entire system to still maintain basic communication capabilities. For example, when the router fails, the first device A interacts with the second device B, as shown in FIG5. FIG5 is an interactive schematic diagram of the device communication method of another embodiment of this application. The communication method described in this embodiment may include the following steps:

[0094] S51: First device A determines whether it is in a disconnected state.

[0095] Determine whether the first device A is in a disconnected state. For example, in response to the first device being in a disconnected state, such as the first device A being disconnected from the hotspot (AP), then execute step S52.

[0096] S52: First device A queries the list of associated devices to determine whether there is a record of the second device.

[0097] First device A queries the list of associated devices to see if there is a record of second device. For example, first device A determines the record of second device B from the list of associated devices and then executes step S53.

[0098] S53: First device A determines whether the recorded information has exceeded its validity period.

[0099] To determine whether the recorded information has exceeded its validity period, for example, the first device A determines the recorded information of the second device B from the list of associated devices and determines whether the recorded information of the second device B has exceeded its validity period. If the recorded information of the second device B has not exceeded its validity period, then step S54 is executed. Here, determining whether the recorded information has exceeded its validity period can be understood as setting a timeout mechanism for the data link. If no new interaction occurs between the devices within the specified time, the data link will automatically fail and the distribution network process will end.

[0100] S54: First device A performs link authentication with second device B.

[0101] If the record information of the second device B in the associated device list has not expired, the first device A and the second device B perform link authentication, that is, the first device A and the second device B negotiate a key, and in response to the completion of the key negotiation, the first device A and the second device B perform two-way authentication using a preset algorithm. For example, the second device B sends "KEY_EX_REQ" to the first device A; the first device A receives "KEY_EX_REQ" and sends "KEY_EX_ACK" to the second device B; the second device B receives "KEY_EX_ACK" and sends "AK_CLG_REQ" to the first device A; the first device A receives "AK_CLG_REQ" and sends "AK_CLG_ACK+REQ" to the second device B; the second device B receives "AK_CLG_ACK+REQ" and sends "AK_CLG_CONFIRM" to the first device A; the first device A receives "AK_CLG_CONFIRM" and sends "AK_COMPELET" to the second device B, thus completing the link authentication.

[0102] S55: Second device B sends decrypted data.

[0103] S56: First device A decrypts the data.

[0104] S57: The first device A interacts with the second device B, such as through interactive service business.

[0105] Please refer to Figure 6, which is a schematic flowchart of a device communication method according to another embodiment of this application, applied to a communication system including the first device and the second device described above. It should be noted that if substantially the same result is achieved, the method of this application is not limited to the flow order shown in Figure 6.

[0106] In some possible implementations, this method can be implemented by the processor calling computer-readable instructions stored in memory, as shown in Figure 6. The method may include the following steps:

[0107] S61: The first device sends a request message to the second device via a management frame.

[0108] The first device sends a request message to the second device via a management frame. For example, the first device can initiate a management frame broadcast discovery request, or it can simultaneously initiate mDNS and the management frame broadcast discovery request. The second device can be an electronic device that has not yet been network-configured with the first device, and there can be one or more second devices.

[0109] S62: In response to the request information, the second device constructs device service information, which is used to represent the service capability information of the second device.

[0110] After receiving the request information, the second device confirms that the request information is a request for itself, and then the second device constructs device service information, which is used to represent the service capability information of the second device.

[0111] S63: The second device sends device service information to the first device through a management frame.

[0112] The second device sends its corresponding device service information to the first device, for example, the second device shares its own device service information through a management frame.

[0113] S64: The first device receives and parses the device service information to obtain the service capability information of the second device, and then the first device communicates with the second device.

[0114] The first device receives and parses the device service information of the second device to obtain the service capability information of the second device and acquire the communication information that enables interaction with the second device. Then, the first device can communicate with the second device based on the service capability information to achieve interaction.

[0115] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0116] Please refer to Figure 7, which is a schematic diagram of the communication system according to an embodiment of this application. The communication system 70 includes a first device 71 and a second device 72. The first device 71 is used to execute the device communication method described above, that is, the first device 71 sends a request message to the second device 72 so that the second device 72 sends device service information to the first device 71. The device service information is used to represent the service capability information of the second device. Upon receiving the device service information, the first device 71 parses the device service information to obtain the service capability information of the second device 72 so as to communicate with the second device 72. The second device 72 is used to execute the device communication method described above, that is, the second device 72 receives the request message sent by the first device 71. In response to the request message, the second device 72 constructs device service information, which is used to represent the service capability information of the second device. The second device 72 sends the device service information to the first device 71 so that the first device 71 receives and parses the device service information and obtains the service capability information of the second device 72. In response to the first device 71 obtaining the service capability information of the second device 72, the second device 72 then communicates with the first device 71 based on the service capability information.

[0117] Please refer to Figure 8, which is a schematic diagram of the structure of an electronic device according to an embodiment of this application. The electronic device 80 includes a memory 81 and a processor 82 coupled to each other. The processor 82 is used to execute program instructions stored in the memory 81 to implement the steps of the device communication method embodiment described above. In a specific implementation scenario, the electronic device 80 may include, but is not limited to, a microcomputer or a server.

[0118] Specifically, processor 82 controls itself and memory 81 to implement the steps of the above-described device communication method embodiment. Processor 82 may also be called a CPU (Central Processing Unit), and may be an integrated circuit chip with signal processing capabilities. Processor 82 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 82 may be implemented using integrated circuit chips.

[0119] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0120] In the several embodiments provided in this application, it should be understood that the disclosed methods and related devices can be implemented in other ways. For example, the related device implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication disconnection shown or discussed may be indirect coupling or communication disconnection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0121] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0122] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0123] Those skilled in the art will readily recognize that numerous modifications and variations can be made to the apparatus and method while maintaining the teachings of this application. Therefore, the above disclosure should be considered limited only by the scope of the appended claims.

Claims

1. A device communication method characterized by, Applied to a first device, the method includes: The first device sends a request message to the second device via a management frame, so that the second device sends device service information to the first device, the device service information being used to represent the service capability information of the second device; Receive the device service information; The first device parses the device service information to obtain the service capability information of the second device, and then communicates with the second device.

2. The method according to claim 1, characterized in that, In response to receiving the device service information, the first device generates an associated device list, which records at least one of the second device's ID, channel information, and communication validity period.

3. The method of claim 2, wherein, Also includes: In response to the first device being in a disconnected state, the first device queries the associated device list to determine whether there is any record information for the second device; In response to the existence of the second device's recorded information and the second device's recorded information not having expired, the first device and the second device communicate on the channel recorded in the recorded information.

4. The method of claim 3, wherein, Further includes: In response to the absence of record information for the second device, the first device sends the request information to the second device.

5. The method of claim 3, wherein, Further includes: In response to the second device's record information exceeding its validity period, the first device sends the request information to the second device.

6. The method of claim 1, wherein, The first device sends a request message to the second device via a management frame, including: The management frame is sent in a multi-channel broadcast or single-channel broadcast manner to send the request information.

7. The method of claim 1, wherein, The request information is management frame corresponding data, wherein the request information includes device information of the first device and device information of the second device.

8. The method of claim 1, wherein, The first device parses the device service information, further including: The first device and the second device perform key negotiation; In response to the completion of the key negotiation, the first device and the second device perform two-way authentication using a preset algorithm.

9. A device communication method, comprising: Applied to a second device, the method includes: The second device receives the request information sent by the first device; In response to the request information, the second device constructs device service information, which is used to represent the service capability information of the second device; The second device sends the device service information to the first device through a management frame, so that the first device can receive and parse the device service information and obtain the service capability information of the second device; In response to the first device obtaining the service capability information of the second device, the second device then communicates with the first device based on the service capability information.

10. The method of claim 9, wherein, The device service information is the data corresponding to the management frame, and the device service information includes at least one of the following: the IP information, service capabilities, and service port of the second device.

11. The method of claim 9, wherein, The second device sends the device service information to the first device via a management frame, including: The management frame is sent in a multi-channel broadcast or single-channel broadcast manner to send the device service information.

12. A device communication method, comprising: Applied to a communication system, the communication system including a first device and a second device, the method includes: The first device sends a request message to the second device via a management frame; In response to the request information, the second device constructs device service information, which is used to represent the service capability information of the second device; The second device sends the device service information to the first device via a management frame; The first device receives and parses the device service information to obtain the service capability information of the second device, and then the first device communicates with the second device.

13. The method according to claim 12, characterized in that, In response to receiving the device service information, the first device generates an associated device list, which records at least one of the second device's ID, channel information, and communication validity period.

14. The method according to claim 13, characterized in that, In response to the first device being in a disconnected state, the first device queries the associated device list to determine whether there is any record information for the second device; In response to the existence of the second device's recorded information and the second device's recorded information not having expired, the first device and the second device communicate on the channel recorded in the recorded information.

15. The method of claim 14, wherein, Further includes: In response to the absence of record information in the second device, the first device sends the request information to the second device; or In response to the second device's record information exceeding its validity period, the first device sends the request information to the second device.

16. The method of claim 12, wherein, The first device sends a request message to the second device via a management frame, including: The management frame is sent in a multi-channel broadcast or single-channel broadcast manner to send the request information.

17. The method of claim 12, wherein, The request information is management frame corresponding data, wherein the request information includes device information of the first device and device information of the second device.

18. The method of claim 12, wherein, The first device parses the device service information, further including: The first device and the second device perform key negotiation; In response to the completion of the key negotiation, the first device and the second device perform two-way authentication using a preset algorithm.

19. A communication system, characterized by At least including: A first device is configured to perform the device communication method as described in any one of claims 1 to 8; The second device is used to perform the device communication method as described in any one of claims 9 to 11.

20. An electronic device, comprising: It includes a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the device communication method according to any one of claims 1 to 18.

Citation Information

Patent Citations

  • Method and equipment for obtaining user equipment capability

    CN101557381A

  • Methods for connection capability exchang

    CN107925860A

  • Equipment discovery method and device, equipment and storage medium

    CN114885319A

  • Method and apparatus for service discovery in wi-fi direct network

    US20110149806A1

  • Device capability discovery method and p2p device

    US20220353665A1