Nothing Special   »   [go: up one dir, main page]

CN110213017B - Data transmission method, device and system, storage medium and terminal equipment - Google Patents

Data transmission method, device and system, storage medium and terminal equipment Download PDF

Info

Publication number
CN110213017B
CN110213017B CN201910365682.9A CN201910365682A CN110213017B CN 110213017 B CN110213017 B CN 110213017B CN 201910365682 A CN201910365682 A CN 201910365682A CN 110213017 B CN110213017 B CN 110213017B
Authority
CN
China
Prior art keywords
data
group
data packet
length
data packets
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
CN201910365682.9A
Other languages
Chinese (zh)
Other versions
CN110213017A (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.)
Chengdu Lianzhou International Technology 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 CN201910365682.9A priority Critical patent/CN110213017B/en
Publication of CN110213017A publication Critical patent/CN110213017A/en
Application granted granted Critical
Publication of CN110213017B publication Critical patent/CN110213017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0033Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the transmitter

Landscapes

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

Abstract

The invention discloses a data transmission method, a device, a system, a storage medium and a terminal device, comprising: generating a synchronous sequence according to the length difference sequence standard; the synchronous sequence consists of a plurality of synchronous data packets; determining the reference length of the reference data packet according to the length of the synchronous data packet; grouping data to be transmitted, encoding each group of data into a group of data packets, and allocating a group identifier for each group of data packets; the length difference value of the length of each group of data packets and the reference length carries the original data information corresponding to the group of data packets and the group offset information of the original data; integrating the synchronous sequence, the identification data packet and the group data packet into a data packet to be sent according to a preset sequence; and circularly transmitting the data packet to be transmitted until the information for stopping transmitting is received. The invention can solve the problem that the data cannot be correctly analyzed due to different encryption modes of the sending end and the receiving end, and ensure the correctness and the reliability of data transmission.

Description

Data transmission method, device and system, storage medium and terminal equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method, apparatus, system, computer-readable storage medium, and terminal device.
Background
In the WIFI data transmission system, in order to guarantee data transmission's security, can encrypt the transmission to data usually to the difference of the length of the data after encrypting and the length of original data is a fixed value, all adopts the same encryption processing back when different WIFI equipment send data package, and the length of the data package that the sending end sent is exactly the length of the data package that the receiving end monitored, can accomplish to a certain extent: when two WIFI devices are in the same network environment, even if the two WIFI devices are not directly connected, one WIFI device sends data packets of a specific length sequence, the other WIFI device monitors the lengths of the data packets, as long as common agreement is observed between the two WIFI devices, the sending end sends data according to the agreement rule, and the receiving end analyzes the data according to the agreement rule, so that the purpose of data transmission can be achieved.
However, when the encryption methods used by the sending end and the receiving end are different, the length of the data packet sent by the sending end is inconsistent with the length of the data packet monitored by the receiving end, and the receiving end cannot correctly analyze the data.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a data transmission method, apparatus, system, computer-readable storage medium, and terminal device, which can solve the problem that data cannot be correctly analyzed due to different encryption modes of a sending end and a receiving end, and ensure correctness and reliability of data transmission.
In order to solve the foregoing technical problem, a first aspect of the embodiments of the present invention provides a data transmission method, where the method is executed by a sending end; the method comprises the following steps:
generating a synchronous sequence according to a preset length difference value sequence standard; wherein, the synchronization sequence is composed of a plurality of synchronization data packets;
determining a first reference length of a first reference data packet according to the length of the synchronous data packet;
grouping data to be transmitted, correspondingly encoding each group of data into a group of data packets, and distributing a group identifier for each group of data packets; the length difference value of the length of each group of data packets and the first reference length carries original data information corresponding to the group of data packets and group offset information of the original data; the group identification is an identification data packet with a preset length;
integrating the synchronous sequence, all the identification data packets and all the group data packets into a data packet to be sent according to a first preset sequence;
and circularly transmitting the data packet to be transmitted until receiving the information of stopping transmitting returned by the receiving end.
Further, the method further comprises:
checking and calculating the data to be sent to obtain a first check code of the data to be sent; then the process of the first step is carried out,
the integrating the synchronization sequence, all the identification data packets, and all the group data packets into a data packet to be transmitted according to a first preset sequence specifically includes:
and integrating the synchronization sequence, the first check code, all the identification data packets and all the group data packets into a data packet to be sent according to a second preset sequence.
Further, the data packet to be sent includes N consecutive synchronization sequences; wherein N > 1.
In order to solve the foregoing technical problem, a first aspect of the embodiments of the present invention further provides a data transmission apparatus, where the apparatus is arranged in a sending end; the device comprises:
the synchronous sequence generating module is used for generating a synchronous sequence according to a preset length difference value sequence standard; wherein, the synchronization sequence is composed of a plurality of synchronization data packets;
the reference length confirming module is used for confirming a first reference length of a first reference data packet according to the length of the synchronous data packet;
the data grouping and coding module is used for grouping data to be sent, correspondingly coding each group of data into a group of data packets, and distributing a group identifier for each group of data packets; the length difference value of the length of each group of data packets and the first reference length carries original data information corresponding to the group of data packets and group offset information of the original data; the group identification is an identification data packet with a preset length;
the data integration module is used for integrating the synchronous sequence, all the identification data packets and all the group data packets into a data packet to be sent according to a first preset sequence; and the number of the first and second groups,
and the data sending/receiving module is used for circularly sending the data packet to be sent until receiving the sending stopping information returned by the receiving end.
Further, the apparatus further comprises:
and the first storage module is used for storing the data to be sent.
In order to solve the foregoing technical problem, a second aspect of the embodiments of the present invention provides a data transmission method, where the method is executed by a receiving end; the method comprises the following steps:
switching working channels in sequence at preset time intervals, and setting the working channels as fixed working channels when the data packets received on any one working channel are synchronous sequences meeting the preset length difference sequence standard;
receiving a data packet on the fixed working channel;
when the data packet received on the fixed working channel is the identification data packet, decoding to obtain a corresponding group identification, so as to identify the corresponding group data packet according to the group identification, and decoding the group data packet corresponding to the received group identification according to a second reference length of a preset second reference data packet to obtain original data corresponding to the group data packet;
when the decoding of each group of data packets is finished, storing the original data corresponding to the group of data packets into a preset storage space;
when all the group data packets are received, generating sending stopping information and returning the sending stopping information to the sending end;
the decoding, according to a second reference length of a preset second reference data packet, the group data packet corresponding to the received group identifier to obtain original data corresponding to the group data packet specifically includes:
acquiring a length difference value between the length of the group data packet and the second reference length;
analyzing according to the length difference to obtain original data information corresponding to the group data packet and group offset information of the original data;
and obtaining original data corresponding to the group data packet according to the original data information and the group offset information.
Further, the method further comprises:
when the decoding of each group of data packets is finished, carrying out checksum calculation on the original data stored in the storage space to obtain a second check code; then the process of the first step is carried out,
when all the group data packets are received, generating sending stop information and returning the sending stop information to the sending end, specifically comprising:
comparing the second check code with the received first check code sent by the sending end;
and when the second check code is matched with the first check code, generating information for stopping sending and returning the information to the sending end.
In order to solve the above technical problem, a second aspect of the embodiments of the present invention further provides a data transmission apparatus, where the apparatus is disposed in a receiving end; the device comprises:
the channel setting and synchronizing module is used for switching working channels in turn at preset time intervals, and setting the working channels as fixed working channels when the data packets received on any one working channel are synchronous sequences meeting the preset length difference sequence standard;
the data receiving/sending module is used for receiving data packets on the fixed working channel;
a data decoding module, configured to, when a data packet received on the fixed working channel is an identification data packet, decode to obtain a corresponding group identifier, so as to identify the corresponding group data packet according to the group identifier, and decode the group data packet corresponding to the received group identifier according to a second reference length of a preset second reference data packet, to obtain original data corresponding to the group data packet;
the second storage module is used for storing the original data corresponding to each group of data packets into a preset storage space when the decoding of each group of data packets is finished; and the number of the first and second groups,
the stop information generating module is used for generating stop sending information and returning the stop sending information to the sending end when all the group data packets are received;
the data decoding module specifically includes:
a length difference value obtaining unit, configured to obtain a length difference value between the length of the group data packet and the second reference length;
the length difference decoding unit is used for analyzing and obtaining original data information corresponding to the group data packet and group offset information of the original data according to the length difference; and the number of the first and second groups,
and the original data acquisition unit is used for acquiring original data corresponding to the group data packet according to the original data information and the group offset information.
The embodiment of the invention also provides a data transmission system, which comprises at least one sending end and at least one receiving end; wherein,
each transmitting end is configured to perform the data transmission method according to any one of the first aspect;
each receiving end is configured to perform the data transmission method according to any one of the second aspect.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program; wherein the computer program, when running, controls the device on which the computer-readable storage medium is located to perform any one of the above-mentioned data transmission methods.
An embodiment of the present invention further provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the data transmission method described in any one of the above when executing the computer program.
Compared with the prior art, the embodiment of the invention provides a data transmission method, a device, a system, a computer readable storage medium and terminal equipment, wherein a synchronization sequence is generated according to a preset length difference value sequence standard; wherein, the synchronization sequence is composed of a plurality of synchronization data packets; determining a first reference length of a first reference data packet according to the length of the synchronous data packet; grouping data to be transmitted, correspondingly encoding each group of data into a group of data packets, and distributing a group identifier for each group of data packets; the length difference value of the length of each group of data packets and the first reference length carries original data information corresponding to the group of data packets and group offset information of the original data; the group identification is an identification data packet with a preset length; integrating the synchronous sequence, all the identification data packets and all the group data packets into a data packet to be sent according to a first preset sequence; and circularly transmitting the data packet to be transmitted until the information of stopping transmission returned by the receiving end is received, so that the problem that the data cannot be correctly analyzed due to different encryption modes of the transmitting end and the receiving end can be solved, and the correctness and the reliability of data transmission are ensured.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of a data transmission method provided by the present invention;
FIG. 2 is a block diagram of a preferred embodiment of a data transmission apparatus according to the present invention;
FIG. 3 is a flow chart of another preferred embodiment of a data transmission method provided by the present invention;
FIG. 4 is a block diagram of another preferred embodiment of a data transmission apparatus provided by the present invention;
FIG. 5 is a block diagram of a preferred embodiment of a data transmission system provided by the present invention;
fig. 6 is a block diagram of a preferred embodiment of a terminal device provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments 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 any inventive step, are within the scope of the present invention.
A first aspect of the embodiments of the present invention provides a data transmission method, which is a flowchart of a preferred embodiment of the data transmission method provided by the present invention, as shown in fig. 1, where the method is executed by a sending end; the method includes steps S11 to S15:
step S11, generating a synchronization sequence according to a preset length difference sequence standard; wherein the synchronization sequence is composed of a plurality of synchronization data packets.
The sending end generates a synchronous sequence according to a preset length difference sequence standard, the synchronous sequence is not a data packet but a sequence formed by a plurality of synchronous data packets, and the length difference value of two adjacent synchronous data packets in the synchronous sequence correspondingly meets the length difference value sequence standard.
The length difference sequence standard is agreed by a sending end and a receiving end together, a plurality of WIFI devices may exist in the environment, each WIFI device can send a data packet, a monitoring device, namely the receiving end identifies the data packet which the sending end wants by itself in a plurality of data packets by a method for identifying a synchronization sequence, as long as the sending end constructs the synchronization sequence according to the agreed length difference sequence standard, and the receiving end can identify the synchronization sequence by comparing whether the front and back length differences of the received data packet meet the length difference sequence standard, so that the synchronization of data transmission and reception of the receiving end and the sending end is consistent.
For example, the length difference sequence standard that the synchronization sequence needs to satisfy is agreed to be 2, -2, 2, -1, 1 by the sending end and the receiving end, then the synchronization sequence is composed of six synchronization data packets, the length difference between the first synchronization data packet and the second synchronization data packet is 2 (the length of the previous synchronization data packet minus the length of the next synchronization data packet), the length difference between the second synchronization data packet and the third synchronization data packet is-2, the length difference between the third synchronization data packet and the fourth synchronization data packet is 2, the length difference between the fourth synchronization data packet and the fifth synchronization data packet is-1, and the length difference between the fifth synchronization data packet and the sixth synchronization data packet is 1.
It should be noted that the lengths of the synchronization packets in the synchronization sequence are not necessarily all the same, as long as the above-mentioned length difference sequence criterion is satisfied, but it is necessary to ensure that the length of the synchronization packet does not overlap with the length of the actually transmitted data, and for example, the length of the synchronization packet may be limited to a specific length range.
Step S12, determining a first reference length of a first reference packet according to the length of the synchronization packet.
After the sending end generates the synchronization sequence, the first reference length of the first reference packet of the sending end may be determined according to the length of the synchronization packet in the synchronization sequence, for example, a maximum length value or a minimum length value of the synchronization packet is used as the first reference length of the first reference packet.
Step S13, grouping the data to be sent, correspondingly encoding each group of data into a group of data packets, and allocating a group identifier for each group of data packets; the length difference value of the length of each group of data packets and the first reference length carries original data information corresponding to the group of data packets and group offset information of the original data; the group identification is an identification data packet with a preset length.
In the process of data transmission by a sending end, the data to be sent may be disordered due to the transmission problem of data packets of other modules or the analysis problem of a receiving end, the embodiment of the invention adopts the mode of carrying out block coding and block sending on the data to be sent for transmission, dividing the data to be transmitted into specific groups according to the appointed group length, correspondingly coding each group of data into a group of data packets, allocating a group identifier for each group of data packets, before each group of data packets is sent, the group identifier corresponding to the group of data packets is sent, for the convenience of identification, the group identifier can be identified by a length value, the identification data packet with preset length is taken as group identification, and the group identification corresponding to each group of data is different, i.e. each identification packet is of a different length, it is necessary to ensure that the length of the identification packet does not overlap with the length of the synchronisation packet and the length of the data actually transmitted.
By the method for transmitting the data packet to be transmitted, the influence of single error data can be controlled within a packet range, and the influence of single data error on the correctness of the whole data transmission and analysis can be reduced.
Specifically, when each group of data is encoded into one data packet, in order to ensure correctness of data transmission and parsing in the group, the original data information of the group of data needs to be encoded in a length difference value between the length of the corresponding group of data packet and the first reference length of the first reference data packet, and the group offset information of the original data of the group of data in the group of data needs to be encoded in the length difference value, that is, the length difference value includes the group offset information and the original data information.
It should be noted that the group offset information of the original data refers to the position information of the original data in the group to which the original data belongs, for example, if the position of one original data in a certain group of data in the group of data is the second position, the position information 2 thereof needs to be encoded in the length difference as the group offset information.
And step S14, integrating the synchronization sequence, all the identification data packets, and all the group data packets into a data packet to be sent according to a first preset sequence.
After the data packet to be transmitted is encoded, the transmitting end integrates the generated synchronization sequence, all group identification data packets, and all group data packets into a data packet to be transmitted according to a preset sequence, for example, integrates the sequence of "synchronization sequence, first group identification data packet, first group data packet, second group identification data packet, second group data packet, · · · last group identification data packet, and last group data packet" into a data packet to be transmitted.
And step S15, circularly sending the data packet to be sent until receiving the sending stop information returned by the receiving end.
And circularly transmitting the data packets to be transmitted according to the integrated sequence, wherein the data packets transmitted in each circulation are completely the same until receiving the information of stopping transmission returned by the receiving end.
It should be noted that the mechanism for stopping the loop is not related in the embodiments of the present invention, and may be that the receiving end notifies the sending end to stop sending the data packet after all the receiving ends are received, or may need a higher-layer mechanism to notify the stopping of sending in different application scenarios.
The data transmission method provided by the embodiment of the invention comprises the steps of firstly determining the reference length of a reference data packet, even if the encryption modes adopted by a sending end and a receiving end are different, so that the absolute values of the lengths of the data packets carrying the same information at the sending end and the receiving end are inconsistent, but the length difference between the length of the data packet analyzed by the receiving end and the reference length of the reference data packet at the receiving end is consistent with the length difference between the length of the data packet sent by the sending end and the reference length of the reference data packet at the sending end, carrying the original data in the length difference between the length of the group data packet obtained by coding each group of data and the reference length of the reference data packet at the sending end by the sending end, so that the receiving end can decode the length difference between the length of the received data packet and the reference length of the reference data packet at the receiving end to obtain the original data, therefore, the problem of data analysis caused by inconsistent data length due to inconsistent encryption modes of the sending end and the receiving end can be solved, and the correctness and the reliability of data transmission are ensured by carrying out block coding on the data to be sent.
It should be added that the reference length of the reference data packet at the transmitting end and the reference length of the reference data packet at the receiving end may be different, in the case of different, the data (which may be regarded as an IP packet) of the transmitted reference data packet is another packet after being forwarded by another SSID (a WIFI packet carrying the IP packet), the length may be different from the WIFI packet carrying the IP packet at the transmitting end due to different encryption methods, and the reason for ensuring the same length difference is that the length difference between one IP packet carried by the encrypted WIFI packet and one IP packet carried by the unencrypted WIFI packet is fixed, this is determined by the encryption algorithm of WIFI, for example, assuming that the transmitting end uses no encryption, the receiving end uses AES encryption, the difference value of the packet lengths of the WIFI packets carrying the same IP packet at the two ends is 20, so the difference values of the packet lengths of the reference data packet and the WIFI packet actually carrying data at the two ends are necessarily equal.
As an improvement of the above, the method further comprises:
checking and calculating the data to be sent to obtain a first check code of the data to be sent; then the process of the first step is carried out,
the integrating the synchronization sequence, all the identification data packets, and all the group data packets into a data packet to be transmitted according to a first preset sequence specifically includes:
and integrating the synchronization sequence, the first check code, all the identification data packets and all the group data packets into a data packet to be sent according to a second preset sequence.
Specifically, with reference to the foregoing embodiment, the sending end performs checksum calculation on data to be sent to obtain a first check code corresponding to the data to be sent, and integrates the generated synchronization sequence, the first check code, all group identification data packets, and all group data packets into a data packet to be sent according to a preset sequence, for example, integrates the synchronization sequence, the first check code, the first group identification data packet, the first group data packet, the second group identification data packet, the second group data packet, the last group identification data packet, and the last group data packet into a data packet to be sent according to a sequence of "synchronization sequence, first check code, first group identification data packet, second group identification data packet, last group identification data packet", and last group data packet "and sends out the data packet to be sent, so that the receiving end can check the received data according to the received first check code.
The data transmission method provided by the embodiment of the invention transmits the check code of the data to be transmitted before data transmission so that a receiving end can verify the data when receiving the data, thereby ensuring the correctness and the integrity of the data.
As an improvement of the above scheme, the data packet to be sent includes N consecutive synchronization sequences; wherein N > 1.
It will be appreciated that to increase the probability of the receiving end rapidly synchronizing to the synchronization sequence, the synchronization sequence may be sent multiple times in each cycle in succession.
For example, when N ═ 3, the data packet to be transmitted includes 3 consecutive synchronization sequences, that is, the data packets transmitted in each cycle are "synchronization sequence, first check code, first group identification data packet, first group data packet, second group identification data packet, second group data packet, · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · last group identification data packet, last group data packet.
The first aspect of the embodiments of the present invention further provides a data transmission apparatus, which is capable of implementing all processes of the data transmission method described in any one of the embodiments of the first aspect, and the functions and implemented technical effects of each module and unit in the apparatus are respectively the same as those of the data transmission method described in the embodiment of the first aspect and implemented technical effects, and are not described herein again.
Referring to fig. 2, it is a block diagram of a preferred embodiment of a data transmission apparatus provided in the present invention, where the apparatus is disposed in a sending end; the device comprises:
a synchronization sequence generation module 11, configured to generate a synchronization sequence according to a preset length difference sequence standard; wherein, the synchronization sequence is composed of a plurality of synchronization data packets;
a reference length confirming module 12, configured to determine a first reference length of a first reference data packet according to the length of the synchronization data packet;
the data grouping and encoding module 13 is configured to group data to be transmitted, correspondingly encode each group of data into a group of data packets, and allocate a group identifier to each group of data packets; the length difference value of the length of each group of data packets and the first reference length carries original data information corresponding to the group of data packets and group offset information of the original data; the group identification is an identification data packet with a preset length;
a data integration module 14, configured to integrate the synchronization sequence, all identification data packets, and all group data packets into a data packet to be sent according to a first preset sequence; and the number of the first and second groups,
and the data sending/receiving module 15 is configured to send the data packet to be sent in a circulating manner until receiving the sending stop information returned by the receiving end.
Preferably, the apparatus further comprises:
and the first storage module is used for storing the data to be sent.
Preferably, the apparatus further comprises:
the first check sum calculation module is used for checking and calculating the data to be sent to obtain a first check code of the data to be sent; then the process of the first step is carried out,
the data integration module 14 specifically includes:
and the data integration unit is used for integrating the synchronization sequence, the first check code, all the identification data packets and all the group data packets into a data packet to be sent according to a second preset sequence.
Preferably, the data packet to be sent includes N consecutive synchronization sequences; wherein N > 1.
A second aspect of the embodiment of the present invention provides a data transmission method, which is a flowchart shown in fig. 3 of another preferred embodiment of the data transmission method provided by the present invention, where the method is executed by a receiving end; the method includes steps S21 to S25:
step S21, switching the working channels in turn at preset time intervals, and setting the working channels as fixed working channels when the data packets received on any working channel are synchronous sequences according with the preset length difference sequence standard;
step S22, receiving data packets on the fixed working channel;
step S23, when the data packet received on the fixed working channel is an identification data packet, decoding to obtain a corresponding group identification, so as to identify the corresponding group data packet according to the group identification, and decoding the group data packet corresponding to the received group identification according to a second reference length of a preset second reference data packet, to obtain original data corresponding to the group data packet;
step S24, when decoding of each group of data packets is completed, storing the original data corresponding to the group of data packets in a preset storage space;
and step S25, when all the group data packets are received, generating the stop sending information and returning the stop sending information to the sending end.
Specifically, the receiving end may switch to different working channels in sequence when starting to operate, and stay on each working channel for a period of time to monitor a data packet, if the data packet received within the stay time on any one working channel meets the length difference sequence standard in the above embodiment, it is described that the data packet is a synchronization sequence sent by the sending end, which indicates that synchronization is successful, and indicates that the data packet sent by the sending end is sent on the working channel, and it is also necessary to receive the data packet on the working channel when analyzing data subsequently, at this time, the working channel needs to be fixed, and channel switching is not performed, so that the working channel is set as the fixed working channel.
The receiving end works on the fixed working channel to receive the data packets, because the sending end sends the data packets according to a certain sequence, the receiving end starts to sequentially analyze each group identification data packet and each group data packet after monitoring the synchronous sequence sent by the sending end, when the data packets received on the fixed working channel are identification data packets (whether the data packets are the identification data packets can be judged according to the lengths of the data packets), the identification data packets are decoded to obtain corresponding group identifications and recorded, the next data packet of the received identification data packets is identified as the group data packet corresponding to the group identification according to the group identifications, the group data packet corresponding to the group identification is decoded according to the second reference length of a preset second reference data packet to obtain the original data corresponding to the group data packet, and after the decoding of each received group data packet is finished, storing original data obtained by decoding the group of data packets correspondingly into a preset storage space, when a new identification data packet is received, indicating that the group of data packets corresponding to the previous identification data packet are received completely, then starting to receive the new identification data packet and the corresponding new group of data packets, decoding the new identification data packet and the corresponding new group of data packets until all the identification data packets and the group of data packets are received completely, when a synchronous sequence is received again, indicating that a sending end starts to circularly send the data packets to be sent for a new time, when a receiving end successfully receives all the group of data packets and decodes the group of data packets to obtain all the data packets to be sent, generating corresponding sending stopping information, and returning the sending stopping information to the sending end to inform the sending end to stop circularly sending the data packets to be sent.
As an improvement of the above scheme, the decoding, according to a second reference length of a preset second reference data packet, the group data packet corresponding to the received group identifier to obtain original data corresponding to the group data packet specifically includes:
acquiring a length difference value between the length of the group data packet and the second reference length;
analyzing according to the length difference to obtain original data information corresponding to the group data packet and group offset information of the original data;
and obtaining original data corresponding to the group data packet according to the original data information and the group offset information.
Specifically, with reference to the foregoing embodiment, when the receiving end decodes each received group of data packets, first, a length difference between the length of the group of data packets and the second reference length is obtained according to the preset second reference length of the second reference data packet of the receiving end (the length difference and the length of the group of data packets sent by the sending end are the same as the length difference of the first reference length of the first reference data packet of the sending end), then, the original data information corresponding to the group of data packets and the group offset information of the original data, which are carried in the length difference, are analyzed according to the length difference, the actual position of the original data in the group can be located according to the group offset information of the original data, so that the original data corresponding to the group of data packets can be obtained according to the original data information and the group offset information, correspondingly, the actual position of the group of original data in the entire complete data segment of the data to be sent can be located according to the group identifier corresponding to the group of data packets, therefore, when the original data obtained by decoding is stored, each group of data can be stored at the original position, and each data in each group of data is also stored at the original position, so that the consistency of the data received by the receiving end and the data sent by the sending end can be ensured.
As an improvement of the above, the method further comprises:
when the decoding of each group of data packets is finished, carrying out checksum calculation on the original data stored in the storage space to obtain a second check code; then the process of the first step is carried out,
when all the group data packets are received, generating sending stop information and returning the sending stop information to the sending end, specifically comprising:
comparing the second check code with the received first check code sent by the sending end;
and when the second check code is matched with the first check code, generating information for stopping sending and returning the information to the sending end.
Specifically, with the above embodiments, if the receiving end receives the first check code sent by the sending end, the receiving end can check the received data according to the first check code, and after completely analyzing the original data corresponding to one group of data packets, the method comprises the steps of carrying out checksum calculation on all original data (possibly original data corresponding to more than one group of data packets) stored in a storage space, correspondingly obtaining a second check code, comparing the second check code with the received first check code sent by a sending end, if the second check code obtained by calculation is matched with the first check code transmitted, the data is complete, the currently stored data is all the transmitted data, the receiving end will generate the corresponding stop sending information, and returning the transmission stopping information to the transmitting end to inform the transmitting end to stop circularly transmitting the data packet to be transmitted.
It can be understood that, if the calculated second check code does not match the transmitted first check code, it indicates that the data is incomplete, and there may be an analysis error in the stored original data, at this time, it is necessary to continue to decode each group of data packets in a new cycle and correct the corresponding stored original data, and it may also be necessary to continue to receive and decode the group of data packets and continue to check until the calculated second check code matches the transmitted first check code.
A second aspect of the embodiments of the present invention further provides a data transmission apparatus, which is capable of implementing all processes of the data transmission method described in any embodiment of the second aspect, and the functions and implemented technical effects of each module and unit in the apparatus are respectively the same as those of the data transmission method described in the embodiment of the second aspect and implemented technical effects, and are not described herein again.
Referring to fig. 4, it is a block diagram of another preferred embodiment of a data transmission device provided in the present invention, where the device is disposed in a receiving end; the device comprises:
the channel setting and synchronizing module 21 is configured to switch the working channels in sequence at preset time intervals, and set a working channel as a fixed working channel when a data packet received on any working channel is a synchronization sequence meeting a preset length difference sequence standard;
a data receiving/transmitting module 22, configured to receive a data packet on the fixed working channel;
a data decoding module 23, configured to, when the data packet received on the fixed working channel is an identification data packet, decode to obtain a corresponding group identifier, so as to identify the corresponding group data packet according to the group identifier, and decode the group data packet corresponding to the received group identifier according to a second reference length of a preset second reference data packet, to obtain original data corresponding to the group data packet;
a second storage module 24, configured to store, when decoding of each group of data packets is completed, original data corresponding to the group of data packets in a preset storage space; and the number of the first and second groups,
and a stop information generating module 25, configured to generate stop sending information and return the stop sending information to the sending end when all the group data packets are received.
Preferably, the data decoding module 23 specifically includes:
a length difference value obtaining unit, configured to obtain a length difference value between the length of the group data packet and the second reference length;
the length difference decoding unit is used for analyzing and obtaining original data information corresponding to the group data packet and group offset information of the original data according to the length difference; and the number of the first and second groups,
and the original data acquisition unit is used for acquiring original data corresponding to the group data packet according to the original data information and the group offset information.
Preferably, the apparatus further comprises:
the second check sum calculation module is used for carrying out check sum calculation on the original data stored in the storage space when the decoding of each group of data packets is finished so as to obtain a second check code; then the process of the first step is carried out,
the stop information generating module 25 specifically includes:
the check code comparison unit is used for comparing the second check code with the received first check code sent by the sending end; and the number of the first and second groups,
and the stop information generating unit is used for generating stop sending information and returning the stop sending information to the sending end when the second check code is matched with the first check code.
An embodiment of the present invention further provides a data transmission system, which is a block diagram of a structure of a preferred embodiment of the data transmission system provided by the present invention, and as shown in fig. 5, the system includes at least one sending end and at least one receiving end; wherein,
each transmitting end is configured to execute the data transmission method according to any embodiment of the first aspect;
each receiving end is configured to perform the data transmission method according to any of the embodiments of the second aspect.
It can be understood that the data transmission system provided in the embodiment of the present invention can correspondingly implement all the processes of the data transmission method described in any embodiment of the first aspect and the second aspect, and the action and the implemented technical effect of the system are respectively the same as the action and the implemented technical effect of the data transmission method described in the embodiment of the first aspect and the second aspect, and are not described again here.
It should be noted that the block diagram of the data transmission system shown in fig. 5 includes a sending end and a receiving end, which is merely an example of the system and does not constitute a limitation to the system.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program; wherein, when running, the computer program controls the device on which the computer readable storage medium is located to execute the data transmission method according to any of the above embodiments.
An embodiment of the present invention further provides a terminal device, as shown in fig. 6, which is a block diagram of a preferred embodiment of the terminal device provided in the present invention, the terminal device includes a processor 10, a memory 20, and a computer program stored in the memory 20 and configured to be executed by the processor 10, and the processor 10 implements the data transmission method according to any of the embodiments when executing the computer program.
Preferably, the computer program can be divided into one or more modules/units (e.g. computer program 1, computer program 2,) which are stored in the memory 20 and executed by the processor 10 to accomplish 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 for describing the execution process of the computer program in the terminal device.
The Processor 10 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, etc., the general purpose Processor may be a microprocessor, or the Processor 10 may be any conventional Processor, the Processor 10 is a control center of the terminal device, and various interfaces and lines are used to connect various parts of the terminal device.
The memory 20 mainly includes a program storage area that may store an operating system, an application program required for at least one function, and the like, and a data storage area that may store related data and the like. In addition, the memory 20 may be a high speed random access memory, may also be a non-volatile memory, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), and the like, or the memory 20 may also be other volatile solid state memory devices.
It should be noted that the terminal device may include, but is not limited to, a processor and a memory, and those skilled in the art will understand that the structural block diagram of fig. 6 is only an example of the terminal device and does not constitute a limitation to the terminal device, and may include more or less components than those shown, or combine some components, or different components.
To sum up, the data transmission method, apparatus, system, computer-readable storage medium and terminal device provided by the embodiments of the present invention have the following technical effects:
(1) the method for carrying the information by the length difference does not need to consider the problem of data mismatching caused by the fact that the lengths of the data packets carrying the same information are inconsistent due to inconsistent encryption modes of the sending end and the receiving end, and is easy to use;
(2) the reliability and correctness of data transmission can be ensured by grouping the data and coding the data group offset together with the data;
(3) the embodiment of the invention can be used for achieving the purpose of data transmission or control under the condition that the sending end and the receiving end do not need to be directly communicated, and has better experience in the aspects of WIFI rapid configuration and the like.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (11)

1. A data transmission method, characterized in that the method is performed by a transmitting end; the method comprises the following steps:
generating a synchronous sequence according to a preset length difference value sequence standard; wherein, the synchronization sequence is composed of a plurality of synchronization data packets;
determining a first reference length of a first reference data packet according to the length of the synchronous data packet;
grouping data to be transmitted, correspondingly encoding each group of data into a group of data packets, and distributing a group identifier for each group of data packets; the length difference value of the length of each group of data packets and the first reference length carries original data information corresponding to the group of data packets and group offset information of the original data; the group identification is an identification data packet with a preset length;
integrating the synchronous sequence, all the identification data packets and all the group data packets into a data packet to be sent according to a first preset sequence;
and circularly transmitting the data packet to be transmitted until receiving the information of stopping transmitting returned by the receiving end.
2. The data transmission method of claim 1, wherein the method further comprises:
checking and calculating the data to be sent to obtain a first check code of the data to be sent; then the process of the first step is carried out,
the integrating the synchronization sequence, all the identification data packets, and all the group data packets into a data packet to be transmitted according to a first preset sequence specifically includes:
and integrating the synchronization sequence, the first check code, all the identification data packets and all the group data packets into a data packet to be sent according to a second preset sequence.
3. The data transmission method according to claim 1 or 2, wherein the data packet to be transmitted includes N consecutive synchronization sequences; wherein N > 1.
4. A data transmission apparatus, characterized in that the apparatus is provided in a transmitting end; the device comprises:
the synchronous sequence generating module is used for generating a synchronous sequence according to a preset length difference value sequence standard; wherein, the synchronization sequence is composed of a plurality of synchronization data packets;
the reference length confirming module is used for confirming a first reference length of a first reference data packet according to the length of the synchronous data packet;
the data grouping and coding module is used for grouping data to be sent, correspondingly coding each group of data into a group of data packets, and distributing a group identifier for each group of data packets; the length difference value of the length of each group of data packets and the first reference length carries original data information corresponding to the group of data packets and group offset information of the original data; the group identification is an identification data packet with a preset length;
the data integration module is used for integrating the synchronous sequence, all the identification data packets and all the group data packets into a data packet to be sent according to a first preset sequence; and the number of the first and second groups,
and the data sending/receiving module is used for circularly sending the data packet to be sent until receiving the sending stopping information returned by the receiving end.
5. The data transmission apparatus of claim 4, wherein the apparatus further comprises:
and the first storage module is used for storing the data to be sent.
6. A data transmission method, wherein the method is performed by a receiving end; the method comprises the following steps:
switching working channels in sequence at preset time intervals, and setting the working channels as fixed working channels when the data packets received on any one working channel are synchronous sequences meeting the preset length difference sequence standard;
receiving a data packet on the fixed working channel;
when the data packet received on the fixed working channel is the identification data packet, decoding to obtain a corresponding group identification, so as to identify the corresponding group data packet according to the group identification, and decoding the group data packet corresponding to the received group identification according to a second reference length of a preset second reference data packet to obtain original data corresponding to the group data packet;
when the decoding of each group of data packets is finished, storing the original data corresponding to the group of data packets into a preset storage space;
when all the group data packets are received, generating sending stopping information and returning the sending stopping information to the sending end;
the decoding, according to a second reference length of a preset second reference data packet, the group data packet corresponding to the received group identifier to obtain original data corresponding to the group data packet specifically includes:
acquiring a length difference value between the length of the group data packet and the second reference length;
analyzing according to the length difference to obtain original data information corresponding to the group data packet and group offset information of the original data;
and obtaining original data corresponding to the group data packet according to the original data information and the group offset information.
7. The data transmission method of claim 6, wherein the method further comprises:
when the decoding of each group of data packets is finished, carrying out checksum calculation on the original data stored in the storage space to obtain a second check code; then the process of the first step is carried out,
when all the group data packets are received, generating sending stop information and returning the sending stop information to the sending end, specifically comprising:
comparing the second check code with the received first check code sent by the sending end;
and when the second check code is matched with the first check code, generating information for stopping sending and returning the information to the sending end.
8. A data transmission apparatus, characterized in that said apparatus is arranged in a receiving end; the device comprises:
the channel setting and synchronizing module is used for switching working channels in turn at preset time intervals, and setting the working channels as fixed working channels when the data packets received on any one working channel are synchronous sequences meeting the preset length difference sequence standard;
the data receiving/sending module is used for receiving data packets on the fixed working channel;
a data decoding module, configured to, when a data packet received on the fixed working channel is an identification data packet, decode to obtain a corresponding group identifier, so as to identify the corresponding group data packet according to the group identifier, and decode the group data packet corresponding to the received group identifier according to a second reference length of a preset second reference data packet, to obtain original data corresponding to the group data packet;
the second storage module is used for storing the original data corresponding to each group of data packets into a preset storage space when the decoding of each group of data packets is finished; and the number of the first and second groups,
the stop information generating module is used for generating stop sending information and returning the stop sending information to the sending end when all the group data packets are received;
the data decoding module specifically includes:
a length difference value obtaining unit, configured to obtain a length difference value between the length of the group data packet and the second reference length;
the length difference decoding unit is used for analyzing and obtaining original data information corresponding to the group data packet and group offset information of the original data according to the length difference; and the number of the first and second groups,
and the original data acquisition unit is used for acquiring original data corresponding to the group data packet according to the original data information and the group offset information.
9. A data transmission system is characterized in that the system comprises at least one sending end and at least one receiving end; wherein,
each transmitting end is used for executing the data transmission method according to any one of claims 1-3;
each receiving end is configured to perform the data transmission method according to any one of claims 6 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored computer program; wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the data transmission method according to any one of claims 1 to 3 or the data transmission method according to any one of claims 6 to 7.
11. A terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the data transmission method according to any one of claims 1 to 3 or the data transmission method according to any one of claims 6 to 7 when executing the computer program.
CN201910365682.9A 2019-04-30 2019-04-30 Data transmission method, device and system, storage medium and terminal equipment Active CN110213017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910365682.9A CN110213017B (en) 2019-04-30 2019-04-30 Data transmission method, device and system, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910365682.9A CN110213017B (en) 2019-04-30 2019-04-30 Data transmission method, device and system, storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN110213017A CN110213017A (en) 2019-09-06
CN110213017B true CN110213017B (en) 2021-11-12

Family

ID=67785403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910365682.9A Active CN110213017B (en) 2019-04-30 2019-04-30 Data transmission method, device and system, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN110213017B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111556496A (en) * 2020-04-30 2020-08-18 航天宏康智能科技(北京)有限公司 Wireless communication method and transceiver
CN111833206B (en) * 2020-06-27 2021-05-25 中国计量科学研究院 Energy management system
CN114567485A (en) * 2022-03-01 2022-05-31 北京全路通信信号研究设计院集团有限公司 Data processing method, device, equipment and storage medium
WO2023168573A1 (en) * 2022-03-07 2023-09-14 Shenzhen Tcl New Technology Co., Ltd. Wireless communication method and device for extended reality traffic
CN114554242B (en) * 2022-04-24 2022-08-05 深圳市前海日新数码科技有限公司 Live broadcast method and readable storage medium
CN116073929B (en) * 2023-03-17 2023-06-09 湖南迈克森伟电子科技有限公司 Data detection method in MIMO satellite communication system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103945369A (en) * 2013-01-18 2014-07-23 杭州古北电子科技有限公司 Internet access configuration method for WIFI device by checking length of WIFI data packets
CN104883268A (en) * 2014-02-28 2015-09-02 海尔集团公司 Method for transmitting and receiving network configuration information based on multicast technology, and terminal thereof
CN105049227A (en) * 2015-06-12 2015-11-11 杭州德澜科技有限公司 Wifi non-networking control and setting method
CN105072665A (en) * 2015-07-01 2015-11-18 北京奇虎科技有限公司 Networking control and access method and corresponding terminal and equipment
CN105101102A (en) * 2015-07-01 2015-11-25 北京奇虎科技有限公司 Multicast transmission method, information extraction method and corresponding terminal and equipment
CN105704679A (en) * 2016-05-04 2016-06-22 深圳市蜂联科技有限公司 Method for quickly connecting AP and SD with confirming function under uncorrelated WIFI environment
CN105873052A (en) * 2016-03-29 2016-08-17 海尔优家智能科技(北京)有限公司 Network access method and device of wifi device
CN107222848A (en) * 2017-07-10 2017-09-29 普联技术有限公司 Coding method, transmitting terminal, storage medium and a kind of radio reception device of Wifi frame
CN107371219A (en) * 2016-05-13 2017-11-21 华为终端(东莞)有限公司 WiFi collocation methods, WiFi mobile terminals and WiFi equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101842047B1 (en) * 2012-03-15 2018-03-26 삼성전자주식회사 Method and apparatus for group profile management in wi-fi direct communication system
US9451381B2 (en) * 2013-08-06 2016-09-20 Time Warner Cable Enterprises Llc Automated provisioning of managed services in a Wi-Fi capable client device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103945369A (en) * 2013-01-18 2014-07-23 杭州古北电子科技有限公司 Internet access configuration method for WIFI device by checking length of WIFI data packets
CN104883268A (en) * 2014-02-28 2015-09-02 海尔集团公司 Method for transmitting and receiving network configuration information based on multicast technology, and terminal thereof
CN105049227A (en) * 2015-06-12 2015-11-11 杭州德澜科技有限公司 Wifi non-networking control and setting method
CN105072665A (en) * 2015-07-01 2015-11-18 北京奇虎科技有限公司 Networking control and access method and corresponding terminal and equipment
CN105101102A (en) * 2015-07-01 2015-11-25 北京奇虎科技有限公司 Multicast transmission method, information extraction method and corresponding terminal and equipment
CN105873052A (en) * 2016-03-29 2016-08-17 海尔优家智能科技(北京)有限公司 Network access method and device of wifi device
CN105704679A (en) * 2016-05-04 2016-06-22 深圳市蜂联科技有限公司 Method for quickly connecting AP and SD with confirming function under uncorrelated WIFI environment
CN107371219A (en) * 2016-05-13 2017-11-21 华为终端(东莞)有限公司 WiFi collocation methods, WiFi mobile terminals and WiFi equipment
CN107222848A (en) * 2017-07-10 2017-09-29 普联技术有限公司 Coding method, transmitting terminal, storage medium and a kind of radio reception device of Wifi frame

Also Published As

Publication number Publication date
CN110213017A (en) 2019-09-06

Similar Documents

Publication Publication Date Title
CN110213017B (en) Data transmission method, device and system, storage medium and terminal equipment
CN110324115B (en) Data transmission method and device, storage medium and terminal equipment
US11943695B2 (en) Network channel switching method and apparatus, device, and storage medium
CN109309650B (en) Data processing method, terminal equipment and network equipment
CN109948347B (en) Data storage method and device, server and readable storage medium
CN107888344B (en) Method, equipment and system for detecting error code
US10182039B2 (en) Encrypted and authenticated data frame
CN104703176A (en) Configuration method of wireless network, intelligent terminal and wireless network equipment
US11050541B2 (en) Feedback information processing method, device and system, base station and terminal
KR101055843B1 (en) Method for encryption and decryption of transaction in power network and system thereof
KR20130142960A (en) Computer, communication unit including such a computer, railway management system including such a unit, and method for enhancing data reliability in a computer
WO2016004905A1 (en) Information transmission method, information reception method and apparatus
CN114726515B (en) Quantum encryption communication method and corresponding communication system
US8774410B1 (en) Secret sharing in cryptographic devices via controlled release of plaintext information
CN111865557A (en) Check code generation method and device
WO2019125290A1 (en) Encryption methods and devices
CN111262837B (en) Data encryption method, data decryption method, system, equipment and medium
US20150086015A1 (en) Cryptographically Protected Redundant Data Packets
US10623140B2 (en) Method for processing signaling sub-segment, processing apparatus, access point, and station
US9928370B2 (en) Communication device, communication method, computer program product, and communication system
CN106604305B (en) Wireless network configuration method and device and terminal
CN110636081B (en) Data decryption processing method, data encryption processing method and device
KR101613572B1 (en) Variable encryption algorithm management apparatus and method based on the security environment changes
CN109150867B (en) Network information transmission encryption/decryption device and encryption/decryption method
WO2020063350A1 (en) Quantum key distribution method and device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220608

Address after: Floor 12-17, unit 1, building 2, No. 466, Xinyu Road, high tech Zone, Chengdu, Sichuan 610000

Patentee after: Chengdu Lianzhou International Technology Co.,Ltd.

Address before: 518000 the 1st and 3rd floors of the south section of building 24 and the 1st-4th floor of the north section of building 28, Shennan Road Science and Technology Park, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: TP-LINK TECHNOLOGIES Co.,Ltd.