CN107222848B - WiFi frame encoding method, transmitting end, storage medium and wireless access equipment - Google Patents

WiFi frame encoding method, transmitting end, storage medium and wireless access equipment Download PDF

Info

Publication number
CN107222848B
CN107222848B CN201710557237.3A CN201710557237A CN107222848B CN 107222848 B CN107222848 B CN 107222848B CN 201710557237 A CN201710557237 A CN 201710557237A CN 107222848 B CN107222848 B CN 107222848B
Authority
CN
China
Prior art keywords
wifi
group
frame
wifi frame
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710557237.3A
Other languages
Chinese (zh)
Other versions
CN107222848A (en
Inventor
罗伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN201710557237.3A priority Critical patent/CN107222848B/en
Publication of CN107222848A publication Critical patent/CN107222848A/en
Application granted granted Critical
Publication of CN107222848B publication Critical patent/CN107222848B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0057Block codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a coding method of a WiFi frame, a sending end, a storage medium and wireless access equipment, which are used for solving the problem of disorder caused by packet loss in WiFi broadcasting. The method provided by the invention comprises the following steps: sequentially coding data to be transmitted in a binary format into each WiFi frame, wherein in each WiFi frame, y designated bits are used for coding the data to be transmitted, and x designated bits are used for coding a serial number in a group; grouping the WiFi frames according to the sequence of the data to be transmitted, wherein each k WiFi frames are used as 1 group to obtain each group; respectively allocating unique group sequence numbers to the groups according to the grouping sequence, and when in transmission, each group sequence number is transmitted as an independent WiFi frame; and transmitting the group sequence numbers corresponding to the groups and the groups to the transmitting end according to the grouping sequence for WiFi broadcasting, wherein each group sequence number is transmitted adjacent to the group corresponding to the group sequence number during WiFi broadcasting.

Description

WiFi frame encoding method, transmitting end, storage medium and wireless access equipment
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a WiFi frame encoding method, a transmitting end, a storage medium, and a wireless access device.
background
SmartConfig is a generic term of technology, and can continuously receive WiFi frames of air for analysis under the condition that a WiFi device does not establish a communication link of any nature, and analyze data of a transmitting end. The SmartConfig technology is widely applied to network access of intelligent equipment. It can carry data in two ways of multicast MAC and WiFi frame length.
The WiFi broadcast packet is encoded by using the WiFi frame length, and the WiFi broadcast packet always works at a low speed, so that all WiFi equipment can be used. However, the method is limited by the length of the WiFi frame, the number of available encoding bits is small, and when data is transmitted, the problem of disorder is easily caused by packet loss, so that the receiving end cannot receive correct data.
therefore, how to solve the problem of disorder caused by packet loss when the WiFi frame length is used for coding and carrying data becomes a technical problem to be solved urgently by those skilled in the art.
Disclosure of Invention
the embodiment of the invention provides a WiFi frame coding method, a sending end, a storage medium and wireless access equipment, which can solve the problem of disorder caused by packet loss in WiFi broadcasting.
in a first aspect, a method for encoding a WiFi frame is provided, including:
Sequentially coding data to be transmitted in a binary format into each WiFi frame, wherein in each WiFi frame, y designated bits are used for coding the data to be transmitted, and x designated bits are used for coding a serial number in a group; k different in-group serial numbers are provided, k is less than or equal to 2^ x, and the in-group serial numbers are sequentially distributed to all the WiFi frames according to the sequence of encoding the data to be transmitted to all the WiFi frames; the data to be transmitted comprises a data check value and an effective data length;
grouping the WiFi frames according to the sequence of the data to be transmitted, wherein each k WiFi frames are used as 1 group to obtain each group;
Respectively allocating unique group sequence numbers to the groups according to the grouping order, and when in transmission, each group sequence number is transmitted as an independent WiFi frame;
And transmitting the group sequence numbers corresponding to the groups and the groups to the transmitting end according to the grouping sequence for WiFi broadcasting, wherein each group sequence number is transmitted adjacent to the group corresponding to the group sequence number during WiFi broadcasting.
In a second aspect, an apparatus for encoding a WiFi frame is provided, including:
The data coding module is used for coding data to be transmitted in a binary format into each WiFi frame in sequence, in each WiFi frame, y designated bits are used for coding the data to be transmitted, and x designated bits are used for coding the serial number in the group; k different in-group serial numbers are provided, k is less than or equal to 2^ x, and the in-group serial numbers are sequentially distributed to all the WiFi frames according to the sequence of encoding the data to be transmitted to all the WiFi frames; the data to be transmitted comprises a data check value and an effective data length;
the frame grouping module is used for grouping the WiFi frames according to the sequence of the data to be transmitted, and each k WiFi frames are used as 1 group to obtain each group;
The group sequence number distribution module is used for respectively distributing unique group sequence numbers for the groups according to the grouping sequence, and each group sequence number is used as an independent WiFi frame to be sent when the group sequence number is sent;
and the sending module is used for sending the group sequence numbers corresponding to the groups and the groups to the sending end according to the grouping sequence for WiFi broadcasting, and each group sequence number is sent adjacent to the group corresponding to the group sequence number during WiFi broadcasting.
in a third aspect, a wireless access device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned WiFi frame encoding method when executing the computer program.
in a fourth aspect, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described method for encoding WiFi frames.
In a fifth aspect, a method for decoding a WiFi frame is provided, including:
A receiving end receives each WiFi frame broadcasted by a WiFi of a sending end; wherein the respective WiFi frames comprise respective first WiFi frames and respective second WiFi frames; each first WiFi frame is used for bearing data to be transmitted of the WiFi broadcast and a respective group serial number, and each second WiFi frame is used for bearing the group serial number of a group in which the second WiFi frame is located;
if any first WiFi frame in the first WiFi frames is received and a second WiFi frame adjacent to the first WiFi frame is not received, the receiving end determines a group serial number of a group where the first WiFi frame is located according to the group serial number of the first WiFi frame, the group serial number of the previous first WiFi frame and the group serial number of the previous second WiFi frame; the previous first WiFi frame is a first WiFi frame recently received by the receiving end before receiving any first WiFi frame, and the previous second WiFi frame is a second WiFi frame recently received by the receiving end before receiving any first WiFi frame;
the receiving end analyzes each first WiFi frame and each second WiFi frame adjacent to each first WiFi frame to obtain an intra-group serial number of each first WiFi frame and a group serial number of a group in which the first WiFi frame is located;
The receiving end calculates the global sequence number of each first WiFi frame according to the group sequence number of each first WiFi frame and the group sequence number of the group in which the receiving end is located, and the global sequence number is used for representing the global sequence of each first WiFi frame in the WiFi broadcast;
the receiving end analyzes each first WiFi frame according to the global serial number of each first WiFi frame to obtain the data to be transmitted;
The receiving end verifies the data to be transmitted according to the data check value and the effective data length in the data to be transmitted;
and if the verification is passed, the receiving end determines to obtain the complete data to be transmitted.
In a sixth aspect, an apparatus for decoding a WiFi frame is provided, including:
The frame receiving module is used for receiving each WiFi frame broadcasted by the WiFi of the sending end; wherein the respective WiFi frames comprise respective first WiFi frames and respective second WiFi frames; each first WiFi frame is used for bearing data to be transmitted of the WiFi broadcast and a respective group serial number, and each second WiFi frame is used for bearing the group serial number of a group in which the second WiFi frame is located;
A serial number determining module, configured to determine, if the frame receiving module receives any first WiFi frame in the first WiFi frames and does not receive a second WiFi frame adjacent to the any first WiFi frame, a group serial number of a group in which the any first WiFi frame is located according to an intra-group serial number of the any first WiFi frame, an intra-group serial number of a previous first WiFi frame, and a group serial number of a previous second WiFi frame; the previous first WiFi frame is a first WiFi frame recently received by the frame receiving module before any first WiFi frame is received, and the previous second WiFi frame is a second WiFi frame recently received by the frame receiving module before any first WiFi frame is received;
The frame analysis module is used for analyzing each first WiFi frame and each second WiFi frame adjacent to each first WiFi frame to obtain an intra-group serial number of each first WiFi frame and a group serial number of a group in which the first WiFi frame is located;
The global sequence calculation module is used for calculating a global sequence number of each first WiFi frame according to the group sequence number of each first WiFi frame and the group sequence number of the group in which the first WiFi frame is positioned, and the global sequence number is used for representing the global sequence of each first WiFi frame in the WiFi broadcast;
The data analysis module is used for analyzing each first WiFi frame according to the global serial number of each first WiFi frame to obtain the data to be transmitted;
The data verification module is used for verifying the data to be transmitted according to the data verification value and the effective data length in the data to be transmitted;
And the receiving completion determining module is used for determining to obtain the complete data to be transmitted if the data verification module passes the verification.
in a seventh aspect, a terminal device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned WiFi frame decoding method when executing the computer program.
in an eighth aspect, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described method for decoding WiFi frames.
According to the technical scheme, the embodiment of the invention has the following advantages:
In the embodiment of the invention, firstly, data to be transmitted in binary format is sequentially coded into each WiFi frame, in each WiFi frame, y designated bits are used for coding the data to be transmitted, and x designated bits are used for coding the serial number in the group; k different in-group serial numbers are provided, k is less than or equal to 2^ x, and the in-group serial numbers are sequentially distributed to all the WiFi frames according to the sequence of encoding the data to be transmitted to all the WiFi frames; the data to be transmitted comprises a data check value and an effective data length; then, grouping each WiFi frame according to the sequence of the data to be transmitted, wherein each k WiFi frames are used as 1 group to obtain each group; secondly, respectively allocating unique group sequence numbers to the groups according to the grouping sequence, and when the groups are sent, sending each group sequence number as an independent WiFi frame; and finally, the group sequence numbers corresponding to the groups and the groups are delivered to the sending end according to the grouping sequence for WiFi broadcasting, and each group sequence number is sent adjacent to the group corresponding to the group sequence number during WiFi broadcasting. Thus, the data to be transmitted is encoded into the WiFi frame, and simultaneously the group serial number corresponding to the WiFi frame is also encoded, and, after grouping the obtained WiFi frames, assigning corresponding group sequence numbers to the groups, distinguishing the sequence among the groups through the group sequence numbers, and the sequence of the WiFi frames is distinguished by the sequence numbers in each group in the interior of each group, so that the receiving end receives the WiFi frames broadcasted by the WiFi, since one WiFi frame contains both the data to be transmitted and the serial number in the group, and also can receive the serial number of the group adjacent to the WiFi frame corresponding to the group, with the help of the data check value and the valid data length, even if the packet loss phenomenon occurs, the receiving end can restore the sequence of the data to be transmitted borne in the WiFi frames according to the group sequence number and the sequence number in the group, and the problem of disorder caused by packet loss is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
fig. 1 is a flowchart illustrating an embodiment of a WiFi frame encoding method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an embodiment of a method for decoding a WiFi frame according to an embodiment of the present invention;
Fig. 3 is a block diagram of an embodiment of an apparatus for encoding WiFi frames according to an embodiment of the present invention;
Fig. 4 is a schematic diagram of a wireless access device according to an embodiment of the present invention;
Fig. 5 is a block diagram of an embodiment of a device for decoding WiFi frames in an embodiment of the present invention;
fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a WiFi frame coding method, a sending end, a storage medium and wireless access equipment, which are used for solving the problem of disorder caused by packet loss in WiFi broadcasting.
in order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of a method for encoding a WiFi frame in an embodiment of the present invention includes:
101. Sequentially coding data to be transmitted in a binary format into each WiFi frame, wherein in each WiFi frame, y designated bits are used for coding the data to be transmitted, and x designated bits are used for coding a serial number in a group; k different in-group serial numbers are provided, k is less than or equal to 2^ x, and the in-group serial numbers are sequentially distributed to all the WiFi frames according to the sequence of encoding the data to be transmitted to all the WiFi frames; the data to be transmitted comprises a data check value and an effective data length;
102. Grouping the WiFi frames according to the sequence of the data to be transmitted, wherein each k WiFi frames are used as 1 group to obtain each group;
103. respectively allocating unique group sequence numbers to the groups according to the grouping order, and when in transmission, each group sequence number is transmitted as an independent WiFi frame;
104. And transmitting the group sequence numbers corresponding to the groups and the groups to the transmitting end according to the grouping sequence for WiFi broadcasting, wherein each group sequence number is transmitted adjacent to the group corresponding to the group sequence number during WiFi broadcasting.
in the embodiment, the WiFi frame length is used for coding, and special coding is performed on ASCII data, so that 1 WiFi frame contains both to-be-transmitted data and an intra-group serial number, and during WiFi broadcasting, the group serial numbers corresponding to all groups are sent adjacently, so that the receiving end can calculate the global serial number of each WiFi frame according to the received group serial number and the intra-group serial number, the sequence of the to-be-transmitted data borne by the WiFi broadcasting is restored, and the problem of disorder caused by packet loss is solved.
For the above step 101, before encoding, if the data to be transmitted is not in binary format, the data to be transmitted may be converted into binary format data, such as ASCII code format.
in WiFi broadcasting, the length of a WiFi frame is limited, for example, for a general wireless access device, its MTU (Maximum Transmission Unit) is generally slightly larger than 1024, that is, the frame length of a WiFi frame is 10 bits. When encoding data to be transmitted into a WiFi frame, the value of x + y is required to be less than or equal to the number of bits that can be encoded in one WiFi frame, and the number of bits that can be encoded in one WiFi frame is determined by the MTU of the WiFi broadcast of the wireless access device (i.e., the transmitting end). Therefore, in the actual use process, the values of x and y can be respectively selected according to the MTU of the sending end, so that the coding efficiency and the broadcast stability are adjusted.
When encoding, the x designated bits in a WiFi frame may be high bits or low bits, for example, the high 3 bits are used as the code of the intra-group sequence number, or the low 3 bits are used as the code of the intra-group sequence number. Wherein, the value of x determines the number of different serial numbers in the group in the current code. Assuming that x is 1, the number of the sequence numbers in the different groups is only 2 at most, "0" or "1", that is, k is 2; assuming that x is 2, there are at most 4 sequence numbers in different groups, "00", "01", "10", or "11", that is, k is 4; and so on. When the data to be transmitted is encoded to each WiFi frame, the serial numbers in the groups are reused due to the limited number of the serial numbers in the different groups, and are allocated to each WiFi frame according to the encoding order of the data to be transmitted. For example, assuming that x is 2, data to be transmitted is sequentially encoded into 7 WiFi frames, then the intra-group sequence numbers sequentially allocated by the 7 WiFi frames are: "00", "01", "10", "11", "00", "01", "10".
and for y designated bits in one WiFi frame, it may also be the upper or lower bits. When the x designated bits are high bits, the y designated bits are low bits; conversely, when the x designated bits are low bits, the y designated bits are high bits. It should be noted that when encoding data to be transmitted into y designated bits of each WiFi frame, the data to be transmitted must be encoded in the order in which they are to be transmitted. For example, if the binary format of the data to be transmitted is "001101110101", and y is 3, the data to be transmitted is sequentially encoded into 4 WiFi frames, where y designated bits in the first WiFi frame are "001", y designated bits in the second WiFi frame are "101", y designated bits in the third WiFi frame are "110", and y designated bits in the fourth WiFi frame are "101".
It should be noted that the data to be transmitted further includes a data check value and an effective data length required by the current encoding. The data check value is used for the receiving end to check the correctness of the received data; the effective data length is used for the receiving end to calculate the total length of the data sequence sent by the sending end at this time, so that the effective data length is used as a judgment basis for stopping receiving.
For the step 102, it is known from the content about the x designated bits that, since the number of different intra-group sequence numbers is limited, in order for the receiving end to know the global sequence number of each WiFi frame of the data sequence sent this time, it is necessary to group the WiFi frames, and group adjacent WiFi frames with different intra-group sequence numbers into one group, that is, each k WiFi frames are regarded as 1 group according to the order of the data to be transmitted, so as to obtain a plurality of groups. For example, for the 7 WiFi frames that are sequentially assigned the sequence numbers in the 7 groups of "00", "01", "10", "11", "00", "01", "10", the first 4 WiFi frames may be assigned to the first group, and the last 3 WiFi frames may be assigned to the second group. It should be noted that, assuming that the second group to which the last 3 WiFi frames are classified is the last 1 group to which the data sequence is sent at this time, since 3 WiFi frames are less than 1 group, 1 WiFi frame may be supplemented to the second group, so as to complete the second group. Wherein, the completion can be performed by filling 0.
For the above step 103, after grouping, each group needs to be assigned a unique group sequence number according to the grouping order. For example, for the 7 WiFi frames, the first group is assigned the group sequence number "0", and then the second group is assigned the group sequence number "1". In this embodiment, when the sending end sends each WiFi frame, the group sequence numbers are sent as an independent WiFi frame, that is, the group sequence number "0" is an independent WiFi frame, and the group sequence number "1" is another independent WiFi frame. It can be understood that, in order to let the receiving end know the corresponding relationship between each group sequence number and each group during WiFi broadcasting, each group sequence number is sent adjacent to the group to which it corresponds. Specifically, each group serial number and each group can be submitted to a sending end, and the sending end adjacently sends the group serial numbers and the groups corresponding to each other according to the corresponding relationship between each group serial number and each group during WiFi broadcasting; before submitting to the sending end, the group serial numbers and the groups are adjacent to each other and staggered according to the corresponding relation between each group serial number and each group, and then the arranged WiFi frame queues are submitted to the sending end according to the queue sequence, so that the sending end directly carries out WiFi broadcasting according to the submitted WiFi frame queues before WiFi broadcasting. For example, let 4 WiFi frames of the first group be "a 1", "a 2", "A3", and "a 4", respectively, and 4 WiFi frames of the second group be "B1", "B2", "B3", and "B4", respectively, and the group sequence number is arranged in front of the corresponding group, then the obtained WiFi frame queue is: "0", "a 1", "a 2", "A3", "a 4", "1", "B1", "B2", "B3", "B4". Therefore, when the transmitting end performs WiFi broadcasting, the transmitting end starts broadcasting from the WiFi frame of "0", then broadcasts the WiFi frame … … of "a 1", and finally broadcasts the WiFi frame of "B4".
As can be seen from the above, after grouping, for each WiFi frame sent this time, the sequence between each group is distinguished by the group sequence number, and for a plurality of WiFi frames in each group, the sequence between WiFi frames in the group is distinguished by the intra-group sequence number, so that the receiving end can know the global sequence of each WiFi frame corresponding to the data sequence sent this time by the sending end.
As for the step 104, after determining each group and the group sequence number corresponding to each group, the group sequence numbers may be submitted to the sending end in the order of grouping for WiFi broadcasting, and during WiFi broadcasting, each group sequence number is required to be sent adjacent to the group corresponding to the group sequence number. For example, following the example above with respect to 7 WiFi frames, the first group is sent adjacent to group sequence number "0" and the second group is sent adjacent to group sequence number "1". The group sequence number may be sent before the group, for example, when WiFi broadcasting is performed, a WiFi frame corresponding to the group sequence number "0" is sent first, then 4 WiFi frames in the first group are sent in sequence, then a WiFi frame corresponding to the group sequence number "1" is sent, and then 4 WiFi frames in the second group are sent in sequence; the group sequence number may also be sent after the group, for example, when WiFi broadcasting is performed, 4 WiFi frames in the first group are sent in sequence, then the WiFi frame corresponding to the group sequence number "0" is sent, then 4 WiFi frames in the second group are sent in sequence, and then the WiFi frame corresponding to the group sequence number "1" is sent.
Further, in order to reduce the loss probability of the group sequence number during WiFi broadcasting, each group sequence number is sent adjacent to the corresponding group during WiFi broadcasting, and each group sequence number is sent twice repeatedly. For example, the group sequence number "0" of 4 frames may be repeatedly transmitted 4 times, and then the 4 WiFi frames in the first group are sequentially transmitted. Thus, in the WiFi broadcasting process, even if a certain WiFi frame bearing group sequence number "0" is lost, the receiving end may also receive other 3 WiFi frames bearing group sequence number "0", and only under the condition that 4 WiFi frames bearing group sequence number "0" are all lost, the receiving end may not obtain group sequence number "0".
further, in order to avoid the situation that a receiving end cannot distinguish a group serial number from data to be transmitted due to the fact that a overlapping range exists between a value of a WiFi frame after the group serial number is coded and a value of a WiFi frame after data to be transmitted is coded, each group serial number corresponding to each group can be coded into the WiFi frame, and the value of each group serial number coded in the WiFi frame belongs to a preset first numerical value range; the value of the data to be transmitted after being coded in the WiFi frame belongs to a preset second numerical value range, and the first numerical value range and the second numerical value range do not have a superposition range. For example, when data to be transmitted is encoded, the encoded value range is controlled within [200, ∞ ], and after receiving each WiFi frame, the receiving end can determine whether the current WiFi frame carries the group serial number or the data to be transmitted according to the range in which the value of the WiFi frame falls.
preferably, for wireless access devices with different MTUs, the values of x and y determine the coding efficiency and broadcast stability of WiFi broadcast. For this reason, the present embodiment describes the above-mentioned WiFi frame encoding method in detail for a specific application scenario:
in one application scenario, the number of encodable bits of each WiFi frame of the WiFi broadcast by the transmitting end is 8, x is 3, y is 4, and k is 8. Wherein, 4 designated bits are low bits and are used for coding data to be transmitted, and 3 designated bits are high bits and are used for coding the serial number in the group. In this application scenario, the encoding range of the data to be transmitted is [200, ∞ ].
assuming that the data to be transmitted is "My", the effective data length thereof is 2, and the checksum of the CRC16 calculated is 0xC 376. And taking the effective data length 2, the data verification value 0xC376 and the data "My" as the data to be transmitted in the current transmission. Wherein, arranged from high order to low order, the ASCII code with effective data length 2 is: 0 and 0x 02; the ASCII code of the data check value 0xC376 is: 0x06 and 0x 76; the ASCII code of the data "My" is: 0x4D (for 'M'), 0x79 (for 'y').
since k is 8, that is, each 8 WiFi frames in the present application scenario is 1 subgroup, the sequence numbers in 8 subgroups are '000' (denoted as 0< <7), '001' (denoted as 1< <7), '010' (denoted as 2< <7), '011' (denoted as 3< <7), '100' (denoted as 4< <7), '101' (denoted as 5< <7), '110' (denoted as 6< <7), and '111' (denoted as 7< <7), respectively. For the data packets to be transmitted, 1 group is obtained in total, and the data to be transmitted contained in the first group are respectively: 0. 0x02, 0x06, 0x76, 0x4D (for 'M'), 0x79 (for 'y').
When data to be transmitted is coded into a WiFi frame, corresponding intra-group serial numbers are added into the high 3 bits according to the sequence of the data to be transmitted, so that the WiFi frames to be transmitted are respectively: (0< <7) |0 ═ 0x000, (1< <7) |0x02 ═ 0x082, (2< <7) |0x06 ═ 0x106, (3< <7) |0x76 ═ 0x1F6, (4< <7) |0x4D ═ 0x24D, (5< <7) |0x79 ═ 0x2F 9.
in this application scenario, the group sequence numbers are counted from 0, so the group sequence number of the first group is 0, and the group sequence number of the second group is 1. Each group sequence number is sent as a WiFi frame individually, so encoding group sequence number 0 into a WiFi frame is: 0, encoding group sequence number 1 into a WiFi frame is: 0x01 ═ 0x 001.
In this application scenario, the group sequence number of each group is arranged in front of and adjacent to the corresponding group, and the data sequence submitted to the transmitting end is as follows:
in order to improve the probability of reducing the loss of the group sequence number, in the present application scenario, each group sequence number is repeatedly transmitted 4 times. Thus, with the offset added, the data sequence submitted to the sender is as follows:
It can be known that, in the application scenario, the final data sequence to be submitted to the sending end when the data "My" is transmitted is {0,0,0, 223,330,462,702,789,961}, and when the sending end performs WiFi broadcasting, the frame length of the 1 st WiFi frame sent is 0, the frame length of the 2 nd WiFi frame is 0, …, and the frame length of the last 1 WiFi frame is 961.
in the present application scenario, x is 3, y is 7, and k is 8, each group id is sent repeatedly 4 times, and therefore, the coding efficiency is (7 × 8)/(10 × 12) 46.6%. The coding efficiency is higher than that of the prior art, and the probability of losing the group sequence number is greatly reduced and the broadcasting stability is enhanced because the group sequence number is repeatedly sent for 4 times. If each group id can be transmitted only 1 time for higher coding efficiency, the coding efficiency reaches (7 × 8)/(10 × 9) ═ 62.2%.
preferably, in another application scenario, the number of encodable bits of each WiFi frame of the WiFi broadcast by the transmitting end is 10, x is 2, y is 8, and k is 4, each group sequence number is transmitted 1 time, and similarly, the encoding efficiency reaches (8 × 4)/(10 × 5) 64%. Through comparison of various application scenes, when the number of the encodable bits of one WiFi frame is 10, the encoding efficiency of the application scene is the highest.
preferably, in another application scenario, the number of encodable bits of each WiFi frame of the WiFi broadcast by the transmitting end is 10, x is 2, y is 8, and k is 4, each group sequence number is transmitted 3 times, and similarly, the encoding efficiency reaches (8 × 4)/(10 × 7) 45.7%. It can be seen that, in contrast to the above-mentioned application scenario where "x ═ 3, y ═ 7, and k ═ 8, each group sequence number is repeatedly transmitted 4 times", and after repeated verification, when the number of encodable bits per WiFi frame of a WiFi broadcast is 10, and each group sequence number needs to be transmitted multiple times, the encoding efficiency of x ═ 3 and y ═ 7 can reach the highest.
Considering that SmartConfig technology is mainly used for transmitting SSID and passwords, the passwords are all visible characters, and the ASCII is within 127; whereas the SSID may contain chinese characters, it is necessary to compress data having an ASCII value greater than 127 into 127. Therefore, further, when the wireless access device transmits the SSID and the password, the SSID and the password can be encoded separately, which is beneficial to reducing the complexity of encoding.
In summary, the invention utilizes the idea of packet design to send the group sequence number and the group together, and distinguishes the order between the groups through the group sequence number, and distinguishes the order between the WiFi frames in the group through the sequence number in the group, thereby solving the problem of data global sequence number. The receiving end only needs to restore the received data according to the coding rule of the WiFi frames, so that the respective global serial numbers of the WiFi frames can be obtained, and the data to be transmitted after restoration is obtained.
Referring to fig. 2, an embodiment of a method for decoding a WiFi frame in the embodiment of the present invention includes:
201. a receiving end receives each WiFi frame broadcasted by a WiFi of a sending end; wherein the respective WiFi frames comprise respective first WiFi frames and respective second WiFi frames; each first WiFi frame is used for bearing data to be transmitted of the WiFi broadcast and a respective group serial number, and each second WiFi frame is used for bearing the group serial number of a group in which the second WiFi frame is located;
202. if any first WiFi frame in the first WiFi frames is received and a second WiFi frame adjacent to the first WiFi frame is not received, the receiving end determines a group serial number of a group where the first WiFi frame is located according to the group serial number of the first WiFi frame, the group serial number of the previous first WiFi frame and the group serial number of the previous second WiFi frame; the previous first WiFi frame is a first WiFi frame recently received by the receiving end before receiving any first WiFi frame, and the previous second WiFi frame is a second WiFi frame recently received by the receiving end before receiving any first WiFi frame;
203. The receiving end analyzes each first WiFi frame and each second WiFi frame adjacent to each first WiFi frame to obtain an intra-group serial number of each first WiFi frame and a group serial number of a group in which the first WiFi frame is located;
204. the receiving end calculates the global sequence number of each first WiFi frame according to the group sequence number of each first WiFi frame and the group sequence number of the group in which the receiving end is located, and the global sequence number is used for representing the global sequence of each first WiFi frame in the WiFi broadcast;
205. the receiving end analyzes each first WiFi frame according to the global serial number of each first WiFi frame to obtain the data to be transmitted;
206. The receiving end verifies the data to be transmitted according to the data check value and the effective data length in the data to be transmitted;
207. if the verification fails, the receiving end discards the data to be transmitted and returns to re-execute step 201;
208. And if the verification is passed, the receiving end determines to obtain the complete data to be transmitted.
As to step 201, it can be understood that, when the transmitting end performs WiFi broadcasting, each first WiFi frame and each second WiFi frame are adjacent and broadcast cyclically. For example, in an application scenario of transmitting data "My", a sending end broadcasts 4 second WiFi frames "0", then broadcasts first WiFi frames "223", "330", "462", "702", "789", and "961" in sequence, and after the first WiFi frame "961" is broadcast in the first round, the sending end performs the second round of broadcasting again, broadcasts 4 second WiFi frames "0" … … again, and so on, until the sending end finishes broadcasting. Therefore, the receiving end may receive each WiFi frame in sequence in the WiFi broadcast process of the transmitting end, including the first WiFi frame and the second WiFi frame.
for step 202, there may be a case of packet loss during the WiFi broadcasting process, that is, the receiving end cannot receive part of the WiFi frame. In this case, the receiving end may receive a certain first WiFi frame, but does not receive a second WiFi frame adjacent to the first WiFi frame, especially, in a case where each second WiFi frame is only transmitted once (not repeatedly transmitted in a round), at this time, the receiving end may deduce the group sequence number of the group where the first WiFi frame is located according to the group sequence number of the first WiFi frame, the group sequence number of the previous first WiFi frame, and the group sequence number of the previous second WiFi frame, which is equivalent to deducing the group sequence number carried by the lost second WiFi frame.
for steps 203 and 204, the receiving end performs reverse decoding on the coding method of each WiFi frame according to the sending end, so as to analyze the group serial number of each first WiFi frame and the group serial number of the group in which the group is located, and thus calculate the global serial number of each first WiFi frame.
as for step 205, it can be understood that after the global sequence number of each first WiFi frame is determined, the data to be transmitted carried by each WiFi frame may be sequentially reassembled according to the global sequence number, so as to obtain the data transmitted by the transmitting end this time.
For steps 206 to 208, after the data to be transmitted is obtained, the receiving end may verify the data to be transmitted according to the data check value and the effective data length in the data to be transmitted, and it can be known that, if the verification fails, it indicates that the data to be transmitted analyzed by the receiving end is incorrect and is inconsistent with the data broadcast by the sending end, so the analyzed data to be transmitted is discarded, and then the step 201 is returned to be executed to execute the WiFi frame decoding method of the present invention again. Otherwise, if the verification is passed, it indicates that the data to be transmitted analyzed by the receiving end is correct and is consistent with the data broadcasted by the transmitting end this time, so that it can be determined that the receiving end completes the receiving this time, and the receiving of the broadcasted WiFi frame can be finished.
For the sake of understanding, the following detailed description will be made of the procedure of restoring data at the receiving end in an application scenario where x is 3, y is 7, and k is 8:
When the receiving end receives the group sequence number i, it can be known that the group sequence number of the following data is also i. If the data received later is k, the sequence number in the group is k > >7 (taking the high 3 bits), and the global sequence number of the data is i × 8+ k > > 7;
when the receiving end does not receive the group serial number but receives the WiFi frame corresponding to the group, the group serial number of the group can be deduced according to the group serial number received last time. If the last received group sequence number is i, the intra-group sequence number is k, and the intra-group sequence number of the currently received WiFi frame is t. If t > k, the group sequence number of the group where the current WiFi frame is located can be considered as i; if t <, k, the current WiFi frame may be considered to belong to the next group, the group sequence number of the group where the current WiFi frame belongs is i +1, and the global sequence number is (i +1) × 8+ t.
only when the group sequence number of a certain group and the WiFi frame corresponding to the group are all discarded, the receiving end cannot infer the global sequence number of the data. In addition, the invention can reduce the probability that the receiving end can not calculate the global sequence number due to continuous packet loss by increasing the transmission of the redundant group sequence number.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
the above mainly describes a method for encoding a WiFi frame and a method for decoding a WiFi frame, and a device for encoding a WiFi frame and a device for decoding a WiFi frame will be described in detail below.
Fig. 3 is a block diagram illustrating an embodiment of an apparatus for encoding a WiFi frame in an embodiment of the present invention.
in this embodiment, an apparatus for encoding a WiFi frame includes:
The data encoding module 301 is configured to sequentially encode data to be transmitted in a binary format into each WiFi frame, where in each WiFi frame, y designated bits are used for encoding the data to be transmitted, and x designated bits are used for encoding a serial number in a group; k different in-group serial numbers are provided, k is less than or equal to 2^ x, and the in-group serial numbers are sequentially distributed to all the WiFi frames according to the sequence of encoding the data to be transmitted to all the WiFi frames; the data to be transmitted comprises a data check value and an effective data length;
a frame grouping module 302, configured to group the WiFi frames according to an order of the data to be transmitted, where each k WiFi frame is used as 1 group, so as to obtain each group;
a group sequence number assignment module 303, configured to assign unique group sequence numbers to the respective subgroups according to a grouping order, where each group sequence number is sent as an independent WiFi frame during sending;
A sending module 304, configured to send the group sequence numbers corresponding to the respective groups and the respective groups to the sending end according to the grouping order for WiFi broadcasting, where during WiFi broadcasting, each group sequence number is sent adjacent to the group corresponding to the group sequence number.
further, the sending module may be configured to: and when in WiFi broadcasting, each group serial number is sent adjacent to the corresponding group, and each group serial number is sent more than twice repeatedly.
Further, if the number of encodable bits of each WiFi frame of the WiFi broadcast by the transmitting end is 10, x is 3, y is 7, and k is 8;
Or
if the number of encodable bits of each WiFi frame of the WiFi broadcast by the transmitting end is 10, x is 2, y is 8, and k is 4.
further, the encoding device of the WiFi frame may further include:
the group serial number coding module is used for coding each group serial number corresponding to each group into a WiFi frame, and the value of each group serial number coded in the WiFi frame belongs to a preset first numerical value range;
The value of the data to be transmitted after being coded in the WiFi frame belongs to a preset second numerical value range, and the first numerical value range and the second numerical value range do not have a superposition range.
Fig. 4 is a schematic diagram of a wireless access device according to an embodiment of the present invention. As shown in fig. 4, the wireless access device 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42, such as an encoding program for WiFi frames, stored in said memory 41 and executable on said processor 40. The processor 40, when executing the computer program 42, implements the steps in the above-described embodiment of the encoding method for WiFi frames, such as the steps 101 to 104 shown in fig. 1. Alternatively, the processor 40, when executing the computer program 42, implements the functions of each module/unit in the above-mentioned device embodiments, for example, the functions of the modules 201 to 204 shown in fig. 2.
illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program 42 in the wireless access device 4.
The wireless access device 4 may be a computing device such as a mobile terminal, a tablet computer, a notebook computer, a wireless router, a wireless switch, and the like. The wireless access device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of wireless access device 4 and is not intended to be limiting of wireless access device 4 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the wireless access device may also include input output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the wireless access device 4, such as a hard disk or a memory of the wireless access device 4. The memory 41 may also be an external storage device of the wireless access device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the wireless access device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the wireless access device 4. The memory 41 is used for storing the computer program and other programs and data required by the wireless access device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
Fig. 5 is a block diagram illustrating an embodiment of a device for decoding a WiFi frame in an embodiment of the present invention.
in this embodiment, an apparatus for decoding a WiFi frame includes:
a frame receiving module 501, configured to receive each WiFi frame broadcasted by a sending end WiFi; wherein the respective WiFi frames comprise respective first WiFi frames and respective second WiFi frames; each first WiFi frame is used for bearing data to be transmitted of the WiFi broadcast and a respective group serial number, and each second WiFi frame is used for bearing the group serial number of a group in which the second WiFi frame is located;
A serial number determining module 502, configured to determine, if the frame receiving module 501 receives any first WiFi frame in the first WiFi frames and does not receive a second WiFi frame adjacent to the any first WiFi frame, a group serial number of a group in which the any first WiFi frame is located according to an intra-group serial number of the any first WiFi frame, an intra-group serial number of a previous first WiFi frame, and a group serial number of a previous second WiFi frame; the previous first WiFi frame refers to a first WiFi frame that is received most recently by the frame receiving module 501 before any first WiFi frame is received, and the previous second WiFi frame refers to a second WiFi frame that is received most recently by the frame receiving module 501 before any first WiFi frame is received;
a frame analyzing module 503, configured to analyze each first WiFi frame and each second WiFi frame adjacent to each first WiFi frame to obtain an intra-group serial number of each first WiFi frame and a group serial number of a group in which the first WiFi frame is located;
a global sequence calculation module 504, configured to calculate a global sequence number of each first WiFi frame according to the group sequence number of each first WiFi frame and the group sequence number of the group in which the group is located, where the global sequence number is used to represent a global order of each first WiFi frame in the current WiFi broadcast;
a data parsing module 505, configured to parse each first WiFi frame according to a global sequence number of each first WiFi frame to obtain the data to be transmitted;
A data verification module 506, configured to verify the data to be transmitted according to the data verification value and the effective data length in the data to be transmitted;
a receiving completion determining module 507, configured to determine to obtain the complete data to be transmitted if the data verification module 506 verifies that the data is passed.
Further, the data to be transmitted of the current WiFi broadcast by the sending end is sequentially encoded into each first WiFi frame, and k different intra-group serial numbers are sequentially allocated to each first WiFi frame according to the encoding order of the data to be transmitted; the data to be transmitted comprises a data check value and an effective data length; grouping each first WiFi frame according to the sequence of the carried data to be transmitted, taking each k first WiFi frames as 1 group to obtain each group, respectively allocating unique group serial numbers to each group according to the grouping sequence, and sending each group serial number as one second WiFi frame when sending; and the sending end carries out WiFi broadcasting on the groups and the group sequence numbers corresponding to the groups according to the grouping sequence, and each group sequence number is sent adjacent to the group corresponding to the group sequence number.
further, the apparatus for decoding the WiFi frame may further include:
a reserving and discarding module, configured to reserve any one of the same second WiFi frames and discard other second WiFi frames in the same second WiFi frame if the frame receiving module 501 receives more than two same second WiFi frames adjacently.
Fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in said memory 61 and executable on said processor 60, for example a program performing a method of decoding said WiFi frames. The processor 60, when executing the computer program 62, implements the steps in the above-described embodiments of the method for decoding WiFi frames, such as the steps 201 to 208 shown in fig. 2. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 501 to 507 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal device 6.
the terminal device 6 can be a smart television, a smart refrigerator, a smart sound box, a smart air conditioner and the like. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 6 and does not constitute a limitation of terminal device 6 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
the Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
the memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
in the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
the above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (18)

1. A method for encoding a WiFi frame, comprising:
sequentially coding data to be transmitted in a binary format into each WiFi frame, wherein in each WiFi frame, y designated bits are used for coding the data to be transmitted, and x designated bits are used for coding a serial number in a group; k different in-group serial numbers are provided, k is less than or equal to 2^ x, and the in-group serial numbers are sequentially distributed to all the WiFi frames according to the sequence of encoding the data to be transmitted to all the WiFi frames; the data to be transmitted comprises a data check value and an effective data length; the WIFI frame carries data by utilizing a WiFi frame length code;
grouping the WiFi frames according to the sequence of the data to be transmitted, wherein each k WiFi frames are used as 1 group to obtain each group;
respectively allocating unique group sequence numbers to the groups according to the grouping order, and when in transmission, each group sequence number is transmitted as an independent WiFi frame;
and transmitting the group sequence numbers corresponding to the groups and the groups to the transmitting end according to the grouping sequence for WiFi broadcasting, wherein each group sequence number is transmitted adjacent to the group corresponding to the group sequence number during WiFi broadcasting.
2. The method of claim 1, wherein each group sequence number is sent adjacent to the corresponding subgroup during WiFi broadcasting, and each group sequence number is sent twice or more repeatedly.
3. The WiFi frame encoding method of claim 1, wherein if the number of encodable bits of each WiFi frame that the transmitting end performs WiFi broadcasting is 10, x is 3, y is 7, and k is 8;
Or
If the number of encodable bits of each WiFi frame of the WiFi broadcast by the transmitting end is 10, x is 2, y is 8, and k is 4.
4. the method for encoding WiFi frames according to any one of claims 1-3, further comprising:
Encoding each group serial number corresponding to each group into a WiFi frame, wherein the value of each group serial number encoded in the WiFi frame belongs to a preset first numerical value range;
the value of the data to be transmitted after being coded in the WiFi frame belongs to a preset second numerical value range, and the first numerical value range and the second numerical value range do not have a superposition range.
5. An apparatus for encoding a WiFi frame, comprising:
The data coding module is used for coding data to be transmitted in a binary format into each WiFi frame in sequence, in each WiFi frame, y designated bits are used for coding the data to be transmitted, and x designated bits are used for coding the serial number in the group; k different in-group serial numbers are provided, k is less than or equal to 2^ x, and the in-group serial numbers are sequentially distributed to all the WiFi frames according to the sequence of encoding the data to be transmitted to all the WiFi frames; the data to be transmitted comprises a data check value and an effective data length; the WIFI frame carries data by utilizing a WiFi frame length code;
the frame grouping module is used for grouping the WiFi frames according to the sequence of the data to be transmitted, and each k WiFi frames are used as 1 group to obtain each group;
The group sequence number distribution module is used for respectively distributing unique group sequence numbers for the groups according to the grouping sequence, and each group sequence number is used as an independent WiFi frame to be sent when the group sequence number is sent;
and the sending module is used for sending the group sequence numbers corresponding to the groups and the groups to the sending end according to the grouping sequence for WiFi broadcasting, and each group sequence number is sent adjacent to the group corresponding to the group sequence number during WiFi broadcasting.
6. the apparatus for encoding a WiFi frame of claim 5, wherein the sending module is configured to: and when in WiFi broadcasting, each group serial number is sent adjacent to the corresponding group, and each group serial number is sent more than twice repeatedly.
7. The apparatus according to claim 5, wherein if the number of encodable bits of each WiFi frame that the transmitting end performs WiFi broadcasting is 10, x is 3, y is 7, and k is 8;
Or
If the number of encodable bits of each WiFi frame of the WiFi broadcast by the transmitting end is 10, x is 2, y is 8, and k is 4.
8. the apparatus for encoding a WiFi frame as claimed in any one of claims 5 to 7, wherein the apparatus for encoding a WiFi frame further comprises:
the group serial number coding module is used for coding each group serial number corresponding to each group into a WiFi frame, and the value of each group serial number coded in the WiFi frame belongs to a preset first numerical value range;
The value of the data to be transmitted after being coded in the WiFi frame belongs to a preset second numerical value range, and the first numerical value range and the second numerical value range do not have a superposition range.
9. A wireless access device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the method of encoding a WiFi frame of any one of claims 1-4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method for encoding a WiFi frame as claimed in any one of claims 1 to 4.
11. a method for decoding a WiFi frame, comprising:
A receiving end receives each WiFi frame broadcasted by a WiFi of a sending end; wherein the respective WiFi frames comprise respective first WiFi frames and respective second WiFi frames; each first WiFi frame is used for bearing data to be transmitted of the WiFi broadcast and a respective group serial number, and each second WiFi frame is used for bearing the group serial number of a group in which the second WiFi frame is located; the WIFI frame carries data by utilizing a WiFi frame length code;
If any first WiFi frame in the first WiFi frames is received and a second WiFi frame adjacent to the first WiFi frame is not received, the receiving end determines a group serial number of a group where the first WiFi frame is located according to the group serial number of the first WiFi frame, the group serial number of the previous first WiFi frame and the group serial number of the previous second WiFi frame; the previous first WiFi frame is a first WiFi frame recently received by the receiving end before receiving any first WiFi frame, and the previous second WiFi frame is a second WiFi frame recently received by the receiving end before receiving any first WiFi frame;
the receiving end analyzes each first WiFi frame and each second WiFi frame adjacent to each first WiFi frame to obtain an intra-group serial number of each first WiFi frame and a group serial number of a group in which the first WiFi frame is located;
the receiving end calculates the global sequence number of each first WiFi frame according to the group sequence number of each first WiFi frame and the group sequence number of the group in which the receiving end is located, and the global sequence number is used for representing the global sequence of each first WiFi frame in the WiFi broadcast;
The receiving end analyzes each first WiFi frame according to the global serial number of each first WiFi frame to obtain the data to be transmitted;
The receiving end verifies the data to be transmitted according to the data check value and the effective data length in the data to be transmitted;
and if the verification is passed, the receiving end determines to obtain the complete data to be transmitted.
12. The WiFi frame decoding method of claim 11, characterized in that the data to be transmitted of the current WiFi broadcast by the sending end is sequentially encoded into each first WiFi frame, and k different intra-group serial numbers are sequentially allocated to each first WiFi frame according to the encoding order of the data to be transmitted; the data to be transmitted comprises a data check value and an effective data length; grouping each first WiFi frame according to the sequence of the carried data to be transmitted, taking each k first WiFi frames as 1 group to obtain each group, respectively allocating unique group serial numbers to each group according to the grouping sequence, and sending each group serial number as one second WiFi frame when sending; and the sending end carries out WiFi broadcasting on the groups and the group sequence numbers corresponding to the groups according to the grouping sequence, and each group sequence number is sent adjacent to the group corresponding to the group sequence number.
13. the method for decoding WiFi frames according to claim 11 or 12, further comprising:
if the receiving end receives more than two same second WiFi frames adjacently, the receiving end reserves any one of the same second WiFi frames and discards other second WiFi frames in the same second WiFi frames.
14. an apparatus for decoding a WiFi frame, comprising:
the frame receiving module is used for receiving each WiFi frame broadcasted by the WiFi of the sending end; wherein the respective WiFi frames comprise respective first WiFi frames and respective second WiFi frames; each first WiFi frame is used for bearing data to be transmitted of the WiFi broadcast and a respective group serial number, and each second WiFi frame is used for bearing the group serial number of a group in which the second WiFi frame is located; the WIFI frame carries data by utilizing a WiFi frame length code;
A serial number determining module, configured to determine, if the frame receiving module receives any first WiFi frame in the first WiFi frames and does not receive a second WiFi frame adjacent to the any first WiFi frame, a group serial number of a group in which the any first WiFi frame is located according to an intra-group serial number of the any first WiFi frame, an intra-group serial number of a previous first WiFi frame, and a group serial number of a previous second WiFi frame; the previous first WiFi frame is a first WiFi frame recently received by the frame receiving module before any first WiFi frame is received, and the previous second WiFi frame is a second WiFi frame recently received by the frame receiving module before any first WiFi frame is received;
The frame analysis module is used for analyzing each first WiFi frame and each second WiFi frame adjacent to each first WiFi frame to obtain an intra-group serial number of each first WiFi frame and a group serial number of a group in which the first WiFi frame is located;
The global sequence calculation module is used for calculating a global sequence number of each first WiFi frame according to the group sequence number of each first WiFi frame and the group sequence number of the group in which the first WiFi frame is positioned, and the global sequence number is used for representing the global sequence of each first WiFi frame in the WiFi broadcast;
The data analysis module is used for analyzing each first WiFi frame according to the global serial number of each first WiFi frame to obtain the data to be transmitted;
the data verification module is used for verifying the data to be transmitted according to the data verification value and the effective data length in the data to be transmitted;
And the receiving completion determining module is used for determining to obtain the complete data to be transmitted if the data verification module passes the verification.
15. The apparatus according to claim 14, wherein the data to be transmitted of the current WiFi broadcast by the transmitting end is sequentially encoded into each first WiFi frame, and k different intra-group sequence numbers are sequentially allocated to each first WiFi frame according to an encoding order of the data to be transmitted; the data to be transmitted comprises a data check value and an effective data length; grouping each first WiFi frame according to the sequence of the carried data to be transmitted, taking each k first WiFi frames as 1 group to obtain each group, respectively allocating unique group serial numbers to each group according to the grouping sequence, and sending each group serial number as one second WiFi frame when sending; and the sending end carries out WiFi broadcasting on the groups and the group sequence numbers corresponding to the groups according to the grouping sequence, and each group sequence number is sent adjacent to the group corresponding to the group sequence number.
16. the apparatus for decoding WiFi frame as claimed in claim 14 or 15, wherein the apparatus for decoding WiFi frame further comprises:
And a reserving and discarding module, configured to reserve any one of the same second WiFi frames and discard other second WiFi frames in the same second WiFi frame if the frame receiving module receives more than two same second WiFi frames adjacently.
17. a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor when executing the computer program implements the steps of the method for decoding a WiFi frame according to any of claims 11 to 13.
18. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method for decoding a WiFi frame as claimed in any one of claims 11 to 13.
CN201710557237.3A 2017-07-10 2017-07-10 WiFi frame encoding method, transmitting end, storage medium and wireless access equipment Active CN107222848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710557237.3A CN107222848B (en) 2017-07-10 2017-07-10 WiFi frame encoding method, transmitting end, storage medium and wireless access equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710557237.3A CN107222848B (en) 2017-07-10 2017-07-10 WiFi frame encoding method, transmitting end, storage medium and wireless access equipment

Publications (2)

Publication Number Publication Date
CN107222848A CN107222848A (en) 2017-09-29
CN107222848B true CN107222848B (en) 2019-12-17

Family

ID=59953236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710557237.3A Active CN107222848B (en) 2017-07-10 2017-07-10 WiFi frame encoding method, transmitting end, storage medium and wireless access equipment

Country Status (1)

Country Link
CN (1) CN107222848B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213017B (en) * 2019-04-30 2021-11-12 普联技术有限公司 Data transmission method, device and system, storage medium and terminal equipment
CN110324115B (en) * 2019-06-10 2022-01-04 普联技术有限公司 Data transmission method and device, storage medium and terminal equipment
CN113660057B (en) * 2020-05-12 2024-02-06 深圳市科瑞康实业有限公司 Method and device for transmitting monitored data
CN112672400A (en) * 2020-12-15 2021-04-16 成都新潮传媒集团有限公司 Data interaction control method, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986966A (en) * 2014-05-28 2014-08-13 广州视源电子科技股份有限公司 System and method for pushing smart television image to mobile terminal for display
CN105101102A (en) * 2015-07-01 2015-11-25 北京奇虎科技有限公司 Multicast transmission method, information extraction method and corresponding terminal and equipment
CN105120012A (en) * 2015-07-10 2015-12-02 北京奇虎科技有限公司 Intelligent device, networking access method thereof, information reception method and device
CN105378834A (en) * 2013-07-05 2016-03-02 杜比国际公司 Packet loss concealment apparatus and method, and audio processing system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8311013B2 (en) * 2009-10-28 2012-11-13 Motorola Mobility Llc Method for efficiently increasing hand-off and access reliability
CN105072665B (en) * 2015-07-01 2019-03-05 北京奇虎科技有限公司 Networking control, cut-in method and corresponding terminal and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105378834A (en) * 2013-07-05 2016-03-02 杜比国际公司 Packet loss concealment apparatus and method, and audio processing system
CN103986966A (en) * 2014-05-28 2014-08-13 广州视源电子科技股份有限公司 System and method for pushing smart television image to mobile terminal for display
CN105101102A (en) * 2015-07-01 2015-11-25 北京奇虎科技有限公司 Multicast transmission method, information extraction method and corresponding terminal and equipment
CN105120012A (en) * 2015-07-10 2015-12-02 北京奇虎科技有限公司 Intelligent device, networking access method thereof, information reception method and device

Also Published As

Publication number Publication date
CN107222848A (en) 2017-09-29

Similar Documents

Publication Publication Date Title
CN107222848B (en) WiFi frame encoding method, transmitting end, storage medium and wireless access equipment
US11071116B2 (en) Coding/decoding method, apparatus, and device
CN104303470B (en) In the method broadcasted with send and receive grouping in communication system
CN110312147B (en) Method, system and storage medium for service data transmission
CN107888516B (en) Method, equipment and system for bearing service
CN105659544A (en) Systems, methods, and devices for controlling transport of ratelessly coded messages
CN107888344A (en) A kind of method, apparatus and system of error detection
CN110831010B (en) Multichannel data sending and receiving method and device and data transmission system
EP3553977A1 (en) Method and apparatus for sending and receiving multiframe, device, system, and storage medium
CN109327283B (en) Network self-adaptive packet loss resisting method and device and terminal equipment
US20240080816A1 (en) Resource Indication Method and Apparatus
CN111683118A (en) Block chain-based consensus method and device, master node equipment and slave node equipment
CN107295646A (en) A kind of resource allocation methods and the network equipment
CN110380842B (en) CAN bus message signature method, device and system suitable for intelligent network-connected automobile
EP3101844A1 (en) Packet loss detection method, apparatus, and system
CN110324094B (en) Sound wave communication method and device, storage medium and electronic device
EP3493442B1 (en) Method and apparatus for coding received packets in a broadcasting and communication system
CN110022534B (en) Data transmission method and device based on multicast
CN107005538B (en) Data transmission method, device and system
CN109245863B (en) Apparatus and method for transmitting and receiving forward error correction packet
CN108242977B (en) Data processing method, data processing device and electronic equipment
CN113242473B (en) Data processing method, system, data acquisition equipment and readable storage medium
CN111614375B (en) Data transmission method, data transmission device, terminal and storage medium
CN112188562B (en) Multicast scheduling method and device for relay base station, storage medium and electronic device
CN103957102A (en) Safety multicast source authentication method based on group data packet coupling

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant