Light-weight wireless network asymmetric communication method, slave device and terminal

By receiving and verifying additional data content in beacon frames, the problem of lightweight and fast communication in the prior art without establishing a connection is solved, and the slave device is quickly communicated without connection is realized, and the user experience is improved.

CN119729700APending Publication Date: 2025-03-28SHENZHEN KONKA ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411966126.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art is difficult to perform lightweight and fast communication without establishing a wireless network connection, resulting in poor user experience.

Method used

By receiving beacon frames, all beacon frames read will be summarized at each preset time, and additional data content will be verified and extracted. The local device will be adjusted based on these data to achieve fast communication without connection.

Benefits of technology

It realizes that without establishing a traditional wireless network connection, the slave device can quickly communicate some data, meet the needs of fast and lightweight scenarios, and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729700A_ABST
    Figure CN119729700A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight wireless network asymmetric communication method, slave equipment and a terminal. The method comprises the following steps: receiving beacon frames, and summarizing all the read beacon frames every preset time to obtain a first target beacon frame; verifying the first target beacon frame, and if the verification is passed, extracting first additional data content in the first target beacon frame; and obtaining the first target data based on the plurality of first additional data contents, and adjusting local equipment based on the first target data. According to the asymmetric communication method for the lightweight wireless network, provided by the invention, the slave equipment can carry out lightweight rapid communication under the condition that no connection is established between the slave equipment and the master equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless network communications, and in particular to a lightweight wireless network asymmetric communication method, slave device and terminal. Background Art

[0002] In the prior art, with the continuous progress and development of network interconnection technology, people's demand for network connection and interactive functions is increasing. Traditional wireless network communications often rely on the 802.11 protocol to establish a connection, which is a cumbersome process: users must first search for available wireless networks, then select one to connect to, and then enter the correct password to successfully access. Not only that, users have to wait patiently for the connection process to complete. This series of steps is not only complicated, but in some cases it may also slow down the connection speed, and cannot meet the requirements of lightweight and fast communication without establishing a connection, which brings a poor user experience.

[0003] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0004] The present invention provides a lightweight wireless network asymmetric communication method, slave device and terminal, aiming to solve the problem that the prior art cannot perform lightweight and fast communication without establishing a connection.

[0005] A first aspect of the present invention provides a lightweight wireless network asymmetric communication method, comprising:

[0006] Receive beacon frames, and aggregate all read beacon frames at preset intervals to obtain a first target beacon frame;

[0007] Verifying the first target beacon frame, and if the verification passes, extracting first additional data content in the first target beacon frame;

[0008] The first target data is obtained based on the first additional data contents, and the local device is adjusted based on the first target data.

[0009] In one implementation, the beacon frame consists of an ID, data length, OUI, device identification, direction identification, level, sequence number, and additional data content, wherein the ID is 221 and the OUI is 00-FF-FF.

[0010] In one implementation, the verifying the first target beacon frame, and if the verification passes, extracting the first additional data content in the first target beacon frame, includes:

[0011] Extracting the sequence number and the direction identifier of the first target beacon frame;

[0012] Calculate a first check number based on the sequence number and the direction identifier and check the first target beacon frame based on the first check number;

[0013] If the check passes, the first additional data content corresponding to the first target beacon frame with the smallest level value is extracted.

[0014] In one implementation, after calculating the first check number based on the sequence number and the direction identifier, the method further includes:

[0015] Determine whether the first check number is in the sent sequence, if not, add 1 to the value corresponding to the level in the first target beacon frame, and resend the first target beacon frame after other values ​​remain unchanged;

[0016] Record the first check number in the sent sequence.

[0017] In one implementation, the method further includes:

[0018] When a signal is received that the second target data needs to be shared with the main device, a second target beacon frame is broadcast within a second preset range at a preset interval, each of the second target beacon frames is accompanied by different second additional data content, and multiple second additional data contents constitute the second target data, wherein the device direction in the first target beacon frame is the main device direction.

[0019] A second aspect of the present invention provides a slave device, comprising:

[0020] A sending module, configured to broadcast a second beacon frame to be sent to the master device within a second preset range at a preset interval, wherein the second beacon frame is a broadcast message that does not require a reply, wherein the second beacon frame consists of an ID, a data length, an OUI, a device identifier, a direction identifier, a level, a sequence number, and additional data content, wherein the ID is 221 and the OUI is 00-FF-FF;

[0021] The processing module is used to aggregate all the beacon frames read every preset time to obtain a first beacon frame, calculate the check number corresponding to the first beacon frame, and determine whether to read the additional data content in the first beacon frame based on the check number corresponding to the first beacon frame.

[0022] In one implementation, the determining whether to read the additional data content in the first beacon frame based on the check number corresponding to the first beacon frame includes:

[0023] determining whether the check number corresponding to the first beacon frame is in a sent sequence, and if so, not reading the additional data content in the first beacon frame;

[0024] If it is not in the sent sequence, read the direction identifier in the target first beacon frame. When the direction identifier in the target first beacon frame is the slave device direction, after reading the additional data in the target first beacon frame, add 1 to the level value of the target first beacon frame, broadcast the target first beacon frame and save the check number corresponding to the target first beacon frame in the sent sequence. The target first beacon frame is the first beacon frame that is consistent with the check number of the slave device and has the lowest level value.

[0025] In one implementation, after reading the direction identifier in the target first beacon frame, the method includes:

[0026] When the direction identifier in the target first beacon frame is the master device direction, the level value of the target first beacon frame is directly increased by 1, the target first beacon frame is broadcasted, and the check number corresponding to the target first beacon frame is saved in the sent sequence.

[0027] According to a third aspect of the present invention, a terminal is provided, wherein the terminal comprises: a memory, a processor, and a lightweight wireless network asymmetric communication program stored in the memory and executable on the processor, wherein the lightweight wireless network asymmetric communication program implements the steps of the lightweight wireless network asymmetric communication method as described above when executed by the processor.

[0028] A fourth aspect of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the lightweight wireless network asymmetric communication method described in any one of the above items.

[0029] Beneficial effects: Compared with the prior art, the present invention provides a lightweight wireless network asymmetric communication method, a slave device and a terminal. In the lightweight wireless network asymmetric communication method provided by the present invention, when the slave device has not established a network connection with the master device, by receiving a beacon frame, all the read beacon frames are summarized at a preset interval to obtain a first target beacon frame, and then the first target beacon frame is verified. If the verification is successful, the first additional data content in the first target beacon frame is extracted. Finally, the first target data is obtained based on multiple first additional data contents, and the local device is adjusted based on the first target data. The present invention provides users with a lightweight wireless network asymmetric communication method, which solves the problem that the prior art cannot perform lightweight and fast communication without establishing a connection, and provides a method in which the slave device can quickly communicate some data through 80.211 beacon frames without establishing a connection, meeting the needs of some fast and lightweight scenarios, and bringing a better experience to users. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A flowchart of an embodiment of a lightweight wireless network asymmetric communication method provided by the present invention;

[0031] Figure 2 A beacon frame structure diagram in an embodiment of a lightweight wireless network asymmetric communication method provided by the present invention;

[0032] Figure 3 A flow chart of master device communication in an embodiment of a lightweight wireless network asymmetric communication method provided by the present invention;

[0033] Figure 4 A flow chart of slave device communication in an embodiment of a lightweight wireless network asymmetric communication method provided by the present invention;

[0034] Figure 5 A structural principle diagram of a slave device provided by the present invention;

[0035] Figure 6 A schematic diagram of an operating environment of an embodiment of a terminal provided by the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0037] Embodiment 1

[0038] The lightweight wireless network asymmetric communication method provided in this embodiment may be executed by a terminal, and the terminal may be, but is not limited to, an intelligent computer, etc., and an intelligent computer is taken as an example for description below.

[0039] Specifically, Figure 1 As shown, the lightweight wireless network asymmetric communication method provided in this embodiment includes the steps of:

[0040] S100, receiving beacon frames, and aggregating all read beacon frames at preset time intervals to obtain a first target beacon frame.

[0041] Specifically, in this embodiment, an innovative fast communication method is proposed, which aims to achieve efficient transmission of a small amount of data between a master device and a slave device without establishing a traditional wireless network connection. The uniqueness of this method lies in the asymmetric design of its communication mechanism: the slave device is set to send data only to the master device, while the master device has the ability to broadcast data to all slave devices. Such a design greatly simplifies the communication process and reduces system resource consumption while meeting basic communication requirements.

[0042] To achieve this goal, in this embodiment, the beacon frame in the 802.11 protocol is cleverly used as a carrier for data transmission. Under the 802.11 standard protocol framework, beacon frames play a vital role. They are sent regularly by access points (APs) or certain specific devices to announce the existence of the network and provide network configuration information. It is worth noting that the beacon frame is scalable and allows multiple fields to be attached to meet different needs. This feature is used in this embodiment to create a custom field by defining a specific field ID and OUI (Organizational Unique Identifier).

[0043] Specifically, in this embodiment, the field ID is set to 221, which is a field ID reserved for manufacturer-defined purposes in the 802.11 protocol. At the same time, in order to clearly identify the communication field defined in the present invention, the OUI is also specified as 00-FF-FF. This combination not only ensures the uniqueness of the communication field, but also facilitates the receiving end to quickly identify and parse the communication data.

[0044] In actual applications, the slave device will encapsulate the data to be sent to the master device in a custom field and transmit the data by sending a beacon frame containing the field. The master device obtains the data sent by the slave device by scanning the beacon frames in the surrounding environment and parsing the custom fields therein. At the same time, when the master device needs to broadcast data to the slave device, it will embed the corresponding data in its own beacon frame. After scanning the beacon frame of the master device, all slave devices can extract the required information from it.

[0045] This method not only avoids the cost of establishing complex wireless network connections, but also significantly improves the efficiency and flexibility of data transmission. Especially in scenarios where resources are limited or the network environment is complex and changeable, it shows great application potential and value. By making full use of the beacon frame mechanism of the 802.11 protocol, a simple, efficient, reliable and fast communication method can be successfully implemented, providing new ideas and technical support for the development of the Internet of Things, smart home and other fields.

[0046] Specifically, refer to Figure 2 In this embodiment, the beacon frame consists of an ID, data length, OUI, device identification, direction identification, level, sequence number and additional data content, wherein the ID is 221 and the OUI is 00-FF-FF.

[0047] Specifically, in this embodiment, a specific custom field is defined in the 802.11 beacon frame to achieve fast communication between the master device and the slave device. The structure of the custom field is as follows: Figure 3As shown, it includes ID, data length, OUI, device identification, direction identification, level, serial number and additional data.

[0048] Specifically, the ID is a field ID, which is fixed to 221 and is used to identify that this is a special communication field defined by this embodiment. This ID value is reserved for manufacturer-defined purposes in the 802.11 protocol, so it can be used safely without conflicting with standard fields.

[0049] The data length is a 1-byte data length field immediately following the field ID, which indicates the number of bytes of all data from the beginning of this field to the end of the data content. The value range of this field is 0-255, which is sufficient to cover all subsequent fields defined in this embodiment and the data content itself. It should be noted that since the length of the data content field is variable, the data length field is crucial for the receiving end to correctly parse the entire custom field.

[0050] The OUI is a 3-byte Organization Unique Identifier (OUI) field, and its fixed value is 00-FF-FF. This OUI value not only identifies the communication protocol provided in this embodiment, but also ensures the distinction from other possible custom fields.

[0051] The device identification is followed by a 6-byte device identification field, which contains the MAC address of the sending device. This field is very important for the receiving end because it can be used to identify the device sending data.

[0052] The direction identifier is a 1-byte direction identifier field following the device identifier, which has two optional values: 0 indicates the master device direction, that is, the data is sent from the slave device to the master device; 1 indicates the slave device direction, that is, the data is sent from the master device to the slave device. This field enables the receiving end to distinguish the flow direction of the data and make corresponding processing.

[0053] The level is the next 1-byte level field, which indicates the level of the data packet. The value range of this field is 0-255, and can be flexibly set according to the actual application scenario. For example, in a communication with a higher priority, a smaller level value can be used to ensure that the data can be processed faster.

[0054] The sequence number is a 2-byte sequence number field immediately following the level field, which is used to identify the sequence number of the communication data. The receiving end can use this sequence number to calculate and generate a check number to perform communication verification. The value range of this field is 0-65535, which is sufficient to meet the needs of most application scenarios.

[0055] The data content is the last data content field, which contains the data content to be communicated. The length of this field is variable, but the maximum single data is 240 bytes. This allows us to flexibly transmit data packets of different sizes according to actual needs.

[0056] It can be seen that in this embodiment, by defining such a structured custom field, a method for fast communication in an 802.11 beacon frame is implemented. This method is not only simple and efficient, but also highly flexible and scalable, and can meet the needs of various application scenarios.

[0057] In this embodiment, the calculation rules of the check number are also given. Specifically, the check number = device identification mod 65535 + 65536 + serial number. It can be seen that the calculation of the check number is based on two key fields: the device identification and the serial number. The device identification is the MAC address of the sending device, and the serial number is the unique identification of the communication data. These two fields together determine the value of the check number.

[0058] For example, when the device identifier is 0B:DA:4F:AE:01:0B, it is actually a hexadecimal number 0BDA4FAE010B, which is converted to binary as 13032267579659. The modulo 65535 is 25864, and the serial number is 32768. Therefore, the check number = 25864+65536+32768 = 124168.

[0059] After defining the calculation rules of the check number, lightweight wireless network asymmetric communication can be performed based on the defined beacon frame format and the calculation rules of the check number.

[0060] Specifically, in this embodiment, the master device may broadcast data to all slave devices, or the slave device may send data to the master device.

[0061] When the master device receives a signal that requires sharing first target data, the master device broadcasts a first target beacon frame within a first preset range at a preset time interval, each of the first target beacon frames is accompanied by different first additional data content, and multiple first additional data contents constitute the first target data, wherein the direction identifier in the first target beacon frame is the slave device direction.

[0062] Specifically, when the master device needs to send the first target data to a slave device, it broadcasts the first target beacon frame within the first preset range at every preset time interval, and each of the first target beacon frames is accompanied by different first additional data content, and multiple first additional data contents constitute the first target data.

[0063] The master device is responsible for broadcasting a plurality of the first target beacon frames within the target range to split the first target data and send them to a slave device. These beacon frames comply with the 802.11 standard protocol and contain necessary network configuration and status information.

[0064] In the multiple first target beacon frames sent, the master device will attach specific additional data, which are sent according to the structure of the above beacon frames.

[0065] Specifically, when the master device sends a beacon frame, it uses its own MAC address as the value of the device identification field. This MAC address is unique and is used to identify the device sending data.

[0066] Since the master device sends data to the slave device, the value of the direction identification field will be set to the slave device direction. In this embodiment, the value 1 is used to represent the slave device direction.

[0067] The value of the Level field is set to 0, indicating that this is a normal level data packet with no special priority or urgency.

[0068] Then, the master device will fill the data to be sent to the slave device in the data content field. The length of this field is variable, but the single data does not exceed 240 bytes at most.

[0069] Finally, the initial value of the sequence number is set to 0. Each time the master device sends a new beacon frame, the sequence number is increased by 1 to ensure that each data packet has a unique identifier.

[0070] Specifically, refer to Figure 3 and Figure 4 , each time the master device sends the first target beacon frame, it increases the value of the sequence number field by 1. This sequence number is used to track and verify the transmission order and integrity of the data. If the receiving end finds a jump or absence in the sequence number, it may indicate that an error or loss occurred during the data transmission process.

[0071] Specifically, when the master device needs to send data, it will first check whether the preset time of the transmission interval has been reached. If the transmission interval has been reached, the master device will prepare a new beacon frame and fill in the above-mentioned additional data field. Then, the master device will send this beacon frame to the network and wait for the slave device to receive and process it. In this embodiment, the preset time is 100ms.

[0072] Specifically, refer to Figure 3 and Figure 4, the slave device will continue to receive beacon frames. When the master device sends data to the slave device, the slave device can receive beacon frames within the receiving range and summarize all the beacon frames it receives every 100 milliseconds (ms). This means that in each summary cycle, the slave device will collect and store all the received beacon frames for subsequent processing.

[0073] In the aggregated beacon frame, the slave device extracts important information such as the device identification, direction identification, level, sequence number, and data content in each of the first target beacon frames. Then, a check number is calculated based on the sequence number and direction identification of each of the first target beacon frames. The calculation method of this check number should be consistent with the calculation method used by the master device when sending data.

[0074] S200: Verify the first target beacon frame, and if the verification passes, extract the first additional data content in the first target beacon frame.

[0075] The verifying the first target beacon frame, and if the verification passes, extracting the first additional data content in the first target beacon frame, includes:

[0076] Extracting the sequence number and the direction identifier of the first target beacon frame;

[0077] Calculate a first check number based on the sequence number and the direction identifier and check the first target beacon frame based on the first check number;

[0078] If the check passes, the first additional data content corresponding to the first target beacon frame with the smallest level value is extracted.

[0079] After the first check number is calculated based on the sequence number and the direction identifier, the method further includes:

[0080] Determine whether the first check number is in the sent sequence, if not, add 1 to the value corresponding to the level in the first target beacon frame, and resend the first target beacon frame after other values ​​remain unchanged;

[0081] Record the first check number in the sent sequence.

[0082] S300: Obtain the first target data based on the first additional data contents, and adjust the local device based on the first target data.

[0083] Specifically, after receiving the first target beacon frame, the slave device verifies whether the calculated check number matches the check number provided in the additional data. If the check numbers are consistent, it means that no error occurred during the data transmission process.

[0084] Among the multiple additional data (which may include additional data in beacon frames from other slave devices), the slave device will search for the additional data content corresponding to the first target beacon frame with the smallest level value. In this embodiment, the smaller the level value, the higher the priority of the data.

[0085] If there are multiple additional data with the same level value, the slave device will further select based on other criteria (such as timestamp, device identification, etc.).

[0086] Furthermore, the slave device checks whether the check number of the first target data with the smallest level value has been recorded in its sent sequence. The sent sequence is a list used by the slave device to track which check numbers it has sent.

[0087] If the check number already exists in the sent sequence, it means that the slave device has processed this data packet before and does not need to send it again.

[0088] If the check number is not in the sent sequence, the slave device will modify the level value of the selected additional data to n+1 (n is the level of the additional data with the smallest current level value), and other values ​​remain unchanged.

[0089] The slave device then reassembles a new beacon frame and embeds the modified additional data into it.

[0090] Finally, the slave device will send this new beacon frame into the network so that the master or other slave devices can receive and process it.

[0091] After resending the beacon frame, the slave device will add the check number of the newly sent beacon frame to its sent sequence for subsequent checking and avoiding duplicate transmission.

[0092] At the same time, the slave device will read the data content part of the selected additional data, which is the actual data sent by the master device to the slave device.

[0093] The slave device can process or store the data as needed.

[0094] By following these processing procedures and rules, the slave device can efficiently receive, check and resend beacon frames and maintain a stable communication connection with the master device or other slave devices. At the same time, the slave device can also ensure the integrity and correctness of the data and avoid data duplication and loss.

[0095] That is to say, after receiving the beacon frame, each slave device will forward it. In this way, if the master device wants to send it to the slave devices outside the first preset range, that is, the range that the master device can broadcast, it can be forwarded through the slave devices within the range, so that the target slave device can receive the data information sent by the master device.

[0096] Furthermore, in this embodiment, the lightweight wireless network asymmetric communication method further includes:

[0097] When a signal is received that the second target data needs to be shared with the main device, a second target beacon frame is broadcast within a second preset range at a preset interval, each of the second target beacon frames is accompanied by different second additional data content, and multiple second additional data contents constitute the second target data, wherein the device direction in the first target beacon frame is the main device direction.

[0098] Specifically, when the slave device receives a signal that the second target data needs to be shared with the master device, it starts broadcasting the second target beacon frame within the second preset range at a preset interval. These beacon frames do not contain all data in one go, but each beacon frame is accompanied by different second additional data content. The combination of these additional data contents constitutes the complete second target data. Furthermore, the second target beacon frame has a device direction identifier, indicating that these beacon frames are sent in the direction of the master device.

[0099] Specifically, when the slave device sends new beacon frame data, it must follow a 100 millisecond (ms) transmission interval. This means that after each beacon frame is sent, the slave device must wait for at least 100 ms before sending the next new beacon frame. Such a transmission interval ensures the stability of network communication and avoids conflicts and loss of data packets. In other words, the slave device will accurately control this transmission interval according to the internal clock or timer to ensure accurate data transmission.

[0100] When the slave device needs to send data to the master device, it constructs multiple second target beacon frames based on the second data and fills them with necessary data. The data includes:

[0101] Device identification: The slave device will fill its own MAC address as the device identification into the second target beacon frame so that the master device can identify the sender of the data.

[0102] Direction flag: Since data is sent from the slave device to the master device, the direction flag will be set to the master device direction. This helps the master device distinguish whether the data is sent to itself or to other devices.

[0103] Level: The value of the level field is initialized to 0, indicating that this is a normal level packet. In subsequent processing, this level value may be adjusted as needed.

[0104] Data content: The slave device will fill in the data content field with the data that needs to be sent to the master device. This data can be various types of information, such as sensor readings, status updates, etc.

[0105] Sequence Number: The initial sequence number value is set to 0. Each time a new secondary target beacon frame is sent from the device, the sequence number is incremented by 1 to ensure that each data packet has a unique identity.

[0106] At the same time, the master device aggregates all beacon frames read every preset time to obtain the second target beacon frame, extracts the second additional data content, obtains the second target data based on multiple second additional data contents, and adjusts the local device based on the second target data.

[0107] The master device aggregates all the read beacon frames every preset time to obtain the second target beacon frame, and extracts the second additional data content, including:

[0108] Verify the direction identifier of the second target beacon frame, and when the direction identifier is the master device direction, calculate a second check number corresponding to the second target signal frame, and when the second check number is not in the received sequence, extract the second additional data content corresponding to the second target signal frame and adjust the local device based on the second additional data content;

[0109] The second check number is recorded in the received sequence.

[0110] Specifically, the master device reads and summarizes all received second target beacon frames at preset intervals, and these beacon frames contain different second additional data contents.

[0111] The master device will first check the direction identifier of the second target beacon frame to ensure that they are indeed sent in the direction of the master device.

[0112] For each valid second target beacon frame, the master device calculates a corresponding second check number, which is used to identify whether the second target beacon frame has been received to avoid repeated processing.

[0113] The master device maintains a received sequence for recording the check numbers of the processed second target beacon frames. If the check number of the current beacon frame is not in the received sequence, it means that this is a new beacon frame that has not been processed.

[0114] For the new second target beacon frame, the master device extracts the second additional data content therein and uses the data to make necessary adjustments to the local device.

[0115] After processing one of the second target beacon frames, the master device records the check number of the second target beacon frame into the received sequence so that repeated beacon frames can be identified and skipped later.

[0116] In this way, the slave device can effectively broadcast a large amount of data in batches to the master device, and the master device can ensure that each data fragment is uniquely received and processed, and finally combined into the complete second target data, and make appropriate adjustments to the local device based on the second target data.

[0117] Based on the above solution, the following application examples can be realized:

[0118] Assume that there are 4 devices A, B, C, and D, where A is the master device and the others are slave devices. Due to the influence of the placement distance, A, B, and C can receive packets from each other, and B, C, and D can receive packets from each other. The broadcast process of the master device A is as follows:

[0119] Device A sends a beacon frame with the additional data described in 2-2, where the device identifier is its own MAC address (to facilitate check number calculation, the MAC address is 00:00:00:00:00:01), the direction identifier is set to the slave device direction, the level is 0, the data content is filled with the data to be sent, and the sequence number is 0.

[0120] At this time, B can receive the beacon frame sent by A, calculate its check number as 65537, and the level is 0, because there is no level with a smaller value, and the check number 65537 is not in the sending sequence, so the level is changed to 1, other data remains unchanged, resend the beacon frame, and record the check number 65537 in the sending sequence. At the same time, read the data content and give it to the upper layer.

[0121] At this time, C can receive beacon frames sent by A and B. The check number sent by A is 65537 and the level is 0, and the check number sent by B is also 65537 and the level is 1. Because the check numbers are the same, the beacon frame with the smaller level is taken, so the beacon frame sent by A is used. Change the level to 1, keep other data unchanged, resend the beacon frame, and record the check number 65537 in the sending sequence. At the same time, read the data content and give it to the upper layer.

[0122] At this time, D can receive the beacon frames sent by B and C. The check numbers of the additional data corresponding to their beacon frames are 65537, and the levels are 1. Therefore, any one of them, such as the beacon frame sent by B, is modified to 2, and other data remain unchanged. The beacon frame is resent and the sequence number 1 is recorded in the sending sequence. At the same time, the data content is read and used by the upper layer.

[0123] In summary, this embodiment provides a lightweight wireless network asymmetric communication method. When the slave device has not established a network connection with the master device, by receiving beacon frames, all beacon frames read are aggregated at preset intervals to obtain a first target beacon frame, and then the first target beacon frame is verified. If the verification passes, the first additional data content in the first target beacon frame is extracted. Finally, the first target data is obtained based on multiple first additional data contents, and the local device is adjusted based on the first target data. This embodiment provides users with a lightweight wireless network asymmetric communication method, which solves the problem that the prior art cannot perform lightweight and fast communication without establishing a connection, and provides a method in which the slave device can quickly communicate some data through 80.211 beacon frames without establishing a connection, meeting the needs of some fast and lightweight scenarios, and bringing a better experience to users.

[0124] It should be understood that, although the various steps in the flowcharts given in the accompanying drawings of the present invention are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of the steps in the present invention is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps of the present invention may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0125] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by signaling related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0126] Embodiment 2

[0127] Based on the above embodiment, the present invention further provides a slave device, whose functional module diagram is as shown in Figure 5 As shown, the communication process is as follows Figure 4 As shown, the slave device includes:

[0128] A sending module, configured to broadcast a second beacon frame to be sent to the master device within a second preset range at a preset interval, wherein the second beacon frame is a broadcast message that does not require a reply, wherein the second beacon frame consists of an ID, a data length, an OUI, a device identifier, a direction identifier, a level, a sequence number, and additional data content, wherein the ID is 221 and the OUI is 00-FF-FF;

[0129] The processing module is used to aggregate all the beacon frames read every preset time to obtain a first beacon frame, calculate the check number corresponding to the first beacon frame, and determine whether to read the additional data content in the first beacon frame based on the check number corresponding to the first beacon frame.

[0130] The step of determining whether to read the additional data content in the first beacon frame based on the check number corresponding to the first beacon frame includes:

[0131] determining whether the check number corresponding to the first beacon frame is in a sent sequence, and if so, not reading the additional data content in the first beacon frame;

[0132] If it is not in the sent sequence, read the direction identifier in the target first beacon frame. When the direction identifier in the target first beacon frame is the slave device direction, after reading the additional data in the target first beacon frame, add 1 to the level value of the target first beacon frame, broadcast the target first beacon frame and save the check number corresponding to the target first beacon frame in the sent sequence. The target first beacon frame is the first beacon frame that is consistent with the check number of the slave device and has the lowest level value.

[0133] Wherein, after reading the direction identifier in the target first beacon frame, it includes:

[0134] When the direction identifier in the target first beacon frame is the master device direction, the level value of the target first beacon frame is directly increased by 1, the target first beacon frame is broadcasted, and the check number corresponding to the target first beacon frame is saved in the sent sequence.

[0135] Embodiment 4

[0136] like Figure 6 As shown, based on the above lightweight wireless network asymmetric communication method, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 6 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0137] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a lightweight wireless network asymmetric communication program 40 is stored on the memory 20, and the lightweight wireless network asymmetric communication program 40 can be executed by the processor 10, thereby realizing the lightweight wireless network asymmetric communication method in the present application.

[0138] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the lightweight wireless network asymmetric communication method.

[0139] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.

[0140] In one embodiment, when the processor 10 executes the lightweight wireless network asymmetric communication program 40 in the memory 20, the following steps are implemented:

[0141] When the master device receives a signal that needs to share the first target data, the master device broadcasts a first target beacon frame within a first preset range at a preset interval, each of the first target beacon frames is accompanied by different first additional data content, and a plurality of the first additional data contents constitute the first target data, wherein the direction identifier in the first target beacon frame is the slave device direction;

[0142] The slave device aggregates all beacon frames read every preset time to obtain the first target beacon frame, extracts the first additional data content, obtains the first target data based on multiple first additional data contents, and adjusts the local device based on the first target data.

[0143] When the slave device receives a signal that needs to share the second target data with the master device, the slave device broadcasts a second target beacon frame within a second preset range at a preset interval, each of the second target beacon frames is accompanied by different second additional data content, and a plurality of the second additional data contents constitute the second target data, wherein the device direction in the first target beacon frame is the master device direction;

[0144] The master device aggregates all beacon frames read every preset time to obtain the second target beacon frame, extracts the second additional data content, obtains the second target data based on multiple second additional data contents, and adjusts the local device based on the second target data.

[0145] Embodiment 5

[0146] The present invention also provides a storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of the lightweight wireless network asymmetric communication method described in the above embodiment.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A lightweight wireless network asymmetric communication method, characterized in that: include: Receive beacon frames, and aggregate all read beacon frames at preset intervals to obtain a first target beacon frame; Verifying the first target beacon frame, and if the verification passes, extracting first additional data content in the first target beacon frame; The first target data is obtained based on the first additional data contents, and the local device is adjusted based on the first target data.

2. The lightweight wireless network asymmetric communication method according to claim 1, characterized in that: The beacon frame consists of an ID, data length, OUI, device identification, direction identification, level, sequence number and additional data content, wherein the ID is 221 and the OUI is 00-FF-FF.

3. The lightweight wireless network asymmetric communication method according to claim 2, characterized in that: The verifying the first target beacon frame, and if the verification passes, extracting the first additional data content in the first target beacon frame, includes: Extracting the sequence number and the direction identifier of the first target beacon frame; Calculate a first check number based on the sequence number and the direction identifier and check the first target beacon frame based on the first check number; If the check passes, the first additional data content corresponding to the first target beacon frame with the smallest level value is extracted.

4. The lightweight wireless network asymmetric communication method according to claim 3, characterized in that: After the first check number is calculated based on the sequence number and the direction identifier, the method further includes: Determine whether the first check number is in the sent sequence, if not, add 1 to the value corresponding to the level in the first target beacon frame, and resend the first target beacon frame after other values ​​remain unchanged; Record the first check number in the sent sequence.

5. The lightweight wireless network asymmetric communication method according to claim 1, characterized in that: Also includes: When a signal is received that the second target data needs to be shared with the main device, a second target beacon frame is broadcast within a second preset range at a preset interval, each of the second target beacon frames is accompanied by different second additional data content, and multiple second additional data contents constitute the second target data, wherein the device direction in the first target beacon frame is the main device direction.

6. A slave device, characterized in that: The slave device comprises: A sending module, configured to broadcast a second beacon frame to be sent to the master device within a second preset range at a preset interval, wherein the second beacon frame is a broadcast message that does not require a reply, wherein the second beacon frame consists of an ID, a data length, an OUI, a device identifier, a direction identifier, a level, a sequence number, and additional data content, wherein the ID is 221 and the OUI is 00-FF-FF; The processing module is used to aggregate all the beacon frames read every preset time to obtain a first beacon frame, calculate the check number corresponding to the first beacon frame, and determine whether to read the additional data content in the first beacon frame based on the check number corresponding to the first beacon frame.

7. The slave device according to claim 6, characterized in that: The determining whether to read the additional data content in the first beacon frame based on the check number corresponding to the first beacon frame includes: determining whether the check number corresponding to the first beacon frame is in a sent sequence, and if so, not reading the additional data content in the first beacon frame; If it is not in the sent sequence, read the direction identifier in the target first beacon frame. When the direction identifier in the target first beacon frame is the slave device direction, after reading the additional data in the target first beacon frame, add 1 to the level value of the target first beacon frame, broadcast the target first beacon frame and save the check number corresponding to the target first beacon frame in the sent sequence. The target first beacon frame is the first beacon frame that is consistent with the check number of the slave device and has the lowest level value.

8. The slave device according to claim 7, characterized in that: After reading the direction identifier in the target first beacon frame, the method includes: When the direction identifier in the target first beacon frame is the master device direction, the level value of the target first beacon frame is directly increased by 1, the target first beacon frame is broadcasted, and the check number corresponding to the target first beacon frame is saved in the sent sequence.

9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a lightweight wireless network asymmetric communication program stored in the memory and executable on the processor. When the lightweight wireless network asymmetric communication program is executed by the processor, the steps of the lightweight wireless network asymmetric communication method according to any one of claims 1 to 5 are implemented.

10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the lightweight wireless network asymmetric communication method as described in any one of claims 1-5.