CN112486885B - Data frame generation method, storage medium and computer equipment - Google Patents

Data frame generation method, storage medium and computer equipment Download PDF

Info

Publication number
CN112486885B
CN112486885B CN202011418173.7A CN202011418173A CN112486885B CN 112486885 B CN112486885 B CN 112486885B CN 202011418173 A CN202011418173 A CN 202011418173A CN 112486885 B CN112486885 B CN 112486885B
Authority
CN
China
Prior art keywords
data
encoded
application data
coding
application
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
CN202011418173.7A
Other languages
Chinese (zh)
Other versions
CN112486885A (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.)
Zhuhai Unicook Technology Co Ltd
Original Assignee
Zhuhai Unicook Technology 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 Zhuhai Unicook Technology Co Ltd filed Critical Zhuhai Unicook Technology Co Ltd
Priority to CN202011418173.7A priority Critical patent/CN112486885B/en
Publication of CN112486885A publication Critical patent/CN112486885A/en
Application granted granted Critical
Publication of CN112486885B publication Critical patent/CN112486885B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a data frame generation method, a storage medium and computer equipment, which relate to the field of intelligent control and are mainly characterized in that a initiator can be guaranteed to exist only in a generated data frame, so that the initiator can accurately delimit the data frame received from a serial port in the communication process, the data frame is extracted, and the communication efficiency is improved. The method comprises the following steps: acquiring application data and a corresponding initiator thereof; encoding and converting byte data in the application data to obtain encoded application data; judging first position information of the converted data in the encoded application data; and generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data. The method and the device are suitable for generating the data frames.

Description

Data frame generation method, storage medium and computer equipment
Technical Field
The present invention relates to the field of industrial control technologies, and in particular, to a data frame generating method, a storage medium, and a computer device.
Background
The communication between the devices in the industrial control system usually adopts a serial communication mode, and establishes a necessary communication protocol for serial communication, and whether the communication protocol is reasonable or not determines the stability and reliability of the whole control system.
Currently, data frames are typically generated by adding a initiator in front of the application data in order to parse the data frames according to the initiator during communication. However, if the data same as the initiator exists in the application data, the data frame received from the serial port cannot be accurately delimited only according to the initiator, and the data same as the initiator in the application data may be analyzed as the initiator, so that the analysis error of the data frame is caused, and the accurate application data cannot be obtained, thereby affecting the communication efficiency.
Disclosure of Invention
The invention provides a data frame generation method, a storage medium and computer equipment, which mainly ensure that an initiator exists only in the generated data frame, so that the initiator can accurately delimit the data frame received from a serial port in the communication process, extract the data frame and further improve the communication efficiency.
According to a first aspect of the present invention, there is provided a method of generating a data frame, comprising:
acquiring application data and a corresponding initiator thereof;
encoding and converting byte data in the application data to obtain encoded application data;
Judging first position information of the converted data in the encoded application data;
And generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
Optionally, the generating a data frame corresponding to the application data according to the initiator, the first location information and the encoded application data includes:
Generating a coded control word corresponding to the coded application data according to the first position information;
And generating a data frame corresponding to the application data according to the initiator, the coding control word and the coded application data.
Optionally, the generating, according to the first location information, an encoded control word corresponding to the encoded application data includes:
judging quantity information corresponding to converted data in the encoded application data;
generating the coding quantity corresponding to the coded application data according to the quantity information;
generating coded position data corresponding to the coded application data according to the first position information;
And generating a coding control word corresponding to the coded application data according to the coding position data and the coding quantity.
Optionally, the generating, according to the first location information, encoded location data corresponding to the encoded application data includes:
Judging original data which are the same as the converted data in the encoded application data and corresponding second position information;
And generating encoded position data corresponding to the encoded application data according to the first position information and the second position information.
Optionally, the generating, according to the encoded position data and the encoded number, an encoded control word corresponding to the encoded application data includes:
the byte data in the coding position data are converted into data different from the initiator to code the coding position data, so that coded coding position data are obtained;
Judging second position information of the converted data in the encoded position data; generating first coded mark data corresponding to the coded position data according to the second position information;
Acquiring a check code corresponding to the application data; the check code is encoded by converting each byte of data in the check code into data different from the initiator, so that the encoded check code is obtained;
Judging third position information of the converted data in the encoded check code; generating second coded mark data corresponding to the coded check code according to the third position information;
and generating a coding control word corresponding to the coded application data according to the first coding mark data, the second coding mark data, the coding quantity and the coded coding position data.
According to a second aspect of the present invention, there is provided a method for parsing a data frame, including:
receiving source data;
Extracting a data frame from the source data by reading the initiator;
Decoding the application data coded in the data frame, and analyzing the application data in the data frame.
Optionally, the decoding the application data encoded in the data frame, and analyzing the application data in the data frame includes:
reading the coding control word in the data frame, and restoring the check code in the data frame according to the second coding mark in the coding control word;
Judging whether the data frame passes the inspection according to the check code;
If the data frame passes the inspection, decoding the application data coded in the data frame, and restoring the application data in the data frame;
And if the data frame does not pass the verification, discarding the data frame.
Optionally, the decoding the application data encoded in the data frame, and restoring the application data in the data frame includes:
reading first coding mark data in the coding control word, decoding coded coding position data in the coding control word according to the first coding mark data, and restoring the coding position data in the coding control word;
and decoding the application data coded in the data frame according to the coding position data, and restoring the application data in the data frame.
Optionally, before the decoding the application data encoded in the data frame, the method further includes:
reading the coding quantity in the coding control word, and judging whether coded application data exists in the data frame according to the coding quantity;
If the encoded application data exists, decoding the encoded application data, and restoring the application data in the data frame;
and if the encoded application data does not exist, directly reading the application data in the data frame.
According to a third aspect of the present invention, there is provided a data frame generating apparatus comprising:
The acquisition unit is used for acquiring the application data and the corresponding initiator thereof;
The coding unit is used for coding and converting byte data in the application data to obtain coded application data;
The judging unit is used for judging the first position information of the converted data in the encoded application data;
and the generating unit is used for generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
Optionally, the generating unit includes: a first generation module and a second generation module,
The first generation module is used for generating a coding control word corresponding to the coded application data according to the first position information;
the second generation module is configured to generate a data frame corresponding to the application data according to the initiator, the coding control word and the coded application data.
Optionally, the first generating module includes: the judging sub-module and the generating sub-module,
The judging submodule is used for judging quantity information corresponding to converted data in the encoded application data;
The generation sub-module is used for generating the coding quantity corresponding to the coded application data according to the quantity information;
The generation sub-module is further configured to generate encoded position data corresponding to the encoded application data according to the first position information;
the generation sub-module is further configured to generate a coding control word corresponding to the coded application data according to the coding position data and the coding number.
Optionally, the generating sub-module is specifically configured to determine the same original data as the converted data and the second position information corresponding to the original data in the encoded application data; and generating encoded position data corresponding to the encoded application data according to the first position information and the second position information.
Optionally, the generating sub-module is further specifically configured to encode the encoded position data by converting byte data in the encoded position data into data different from the initiator, to obtain encoded position data; judging second position information of the converted data in the encoded position data; generating first coded mark data corresponding to the coded position data according to the second position information; acquiring a check code corresponding to the application data; the check code is encoded by converting each byte of data in the check code into data different from the initiator, so that the encoded check code is obtained; judging third position information of the converted data in the encoded check code; generating second coded mark data corresponding to the coded check code according to the third position information; and generating a coding control word corresponding to the coded application data according to the first coding mark data, the second coding mark data, the coding quantity and the coded coding position data.
According to a fourth aspect of the present invention, there is provided an apparatus for parsing a data frame, comprising:
A receiving unit for receiving source data;
A reading unit for extracting a data frame from the source data by reading the initiator;
And the decoding unit is used for decoding the application data coded in the data frame and analyzing the application data in the data frame.
Optionally, the decoding unit includes: a restoring module, a judging module, a decoding module and a discarding module,
The restoring module is used for reading the coding control word in the data frame and restoring the check code in the data frame according to the second coding mark in the coding control word;
the judging module is used for judging whether the data frame passes the inspection according to the check code;
The decoding module is used for decoding the application data coded in the data frame and restoring the application data in the data frame if the data frame passes the inspection;
the discarding module is configured to discard the data frame if the data frame fails to pass the verification.
Optionally, the decoding module includes: a first codon module and a second codon module,
The first decoding sub-module is used for reading first coding mark data in the coding control word, decoding coded coding position data in the coding control word according to the first coding mark data and restoring the coding position data in the coding control word;
And the second decoding submodule is used for decoding the application data coded in the data frame according to the coding position data and restoring the application data in the data frame.
Optionally, the decoding unit further includes: the reading module is used for reading the data,
The judging module is further configured to read the number of codes in the code control word, and judge whether encoded application data exists in the data frame according to the number of codes;
the decoding module is further configured to decode the encoded application data if the encoded application data exists, and restore the application data in the data frame;
And the reading module is used for directly reading the application data in the data frame if the encoded application data does not exist.
According to a fifth aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring application data and a corresponding initiator thereof;
encoding and converting byte data in the application data to obtain encoded application data;
Judging first position information of the converted data in the encoded application data;
And generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
According to a sixth aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
receiving source data;
Extracting a data frame from the source data by reading the initiator;
Decoding the application data coded in the data frame, and analyzing the application data in the data frame.
According to a seventh aspect of the present invention there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
acquiring application data and a corresponding initiator thereof;
encoding and converting byte data in the application data to obtain encoded application data;
Judging first position information of the converted data in the encoded application data;
And generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
According to an eighth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
receiving source data;
Extracting a data frame from the source data by reading the initiator;
Decoding the application data coded in the data frame, and analyzing the application data in the data frame.
Compared with the mode that only one initiator exists in the data frame generated by the prior art, the method can acquire the application data and the initiator corresponding to the application data; the byte data in the application data are coded and converted to obtain coded application data; meanwhile, judging first position information of the converted data in the encoded application data; and finally, generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data, thereby converting each byte of data in the application data into data different from the initiator to encode the application data, and generating a data frame according to the encoded application data, the first position information and the initiator, and ensuring that the initiator exists only in the generated data frame, so that the data frame received from a serial port can be accurately delimited in the communication process by the initiator, and the data frame is extracted, thereby improving the communication efficiency.
Detailed Description
Hereinafter, the present application will be described in detail with reference to examples. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
If the data same as the initiator exists in the application data, the data frame received from the serial port cannot be accurately delimited only according to the initiator, and the data same as the initiator in the application data may be analyzed as the initiator, so that the analysis error of the data frame is caused, the accurate application data cannot be obtained, and the communication efficiency is affected.
In order to solve the above problems, an embodiment of the present invention provides a method for generating a data frame, including:
101. And acquiring application data and a corresponding initiator thereof.
In order to transmit the application data through the serial port, the application data that needs to be transmitted by both communication parties need to be assembled into a data frame according to a serial port communication protocol for transmission, the application data is generally composed of a plurality of byte data, for example, the length of the application data is 64 bytes, an initiator is used for delimiting the data frame in the serial port communication process, the data frame can be extracted from a data source through the initiator, the initiator is located at the first bit of the data frame, and usually occupies one byte length, and can occupy a plurality of byte lengths. In order to solve the problem that the data frame generated in the prior art may have byte data identical to the initiator, so that the data frame cannot be accurately delimited, and the communication efficiency is affected. The embodiment of the invention is mainly applicable to the generation of the data frame, and the execution main body of the embodiment of the invention is a device or equipment capable of generating the data frame, and can be arranged at the side of a client or a server.
For the embodiment of the present invention, in the process of generating the data frame, the application data to be transmitted and the corresponding initiator thereof are first acquired, if the initiator selected by 0x61 0xCC 0xFB 0x20 0x130x00 0x00 0x00 0x50 0x56 0x2C 0xDE 0xA8 0x00 0x00 0xFB 0x00 0x00 0xFD0x00 0xBC 0x01 0x98 0x00 0x22 0x3A 0x35 0x30 0x30 0x7D FB 0x7D 0xFD, for the application data to be transmitted is 0xFB, it should be noted that, in the embodiment of the present invention, the initiator may be arbitrarily selected or set, the length of the initiator is usually set to one byte in view of saving data space, the initiator is first set to the length of the application data in the composition format of the data frame, then the application data is next, for example, the initiator is set to 0xFB with one byte length, and the length of the application data is 64 bytes.
102. And coding and converting the byte data in the application data to obtain coded application data.
For the embodiment of the present invention, in order to ensure that an initiator exists uniquely in a generated data frame, each byte of data in application data needs to be converted into data different from the initiator, and further, the application data is encoded, so as to obtain encoded application data, specifically, if each byte of data in application data has target byte data identical to the initiator, the target byte of data needs to be converted into data different from the initiator, so as to obtain converted data corresponding to the target data, if a plurality of target byte of data exist in the application data, the converted data corresponding to the plurality of target byte of data can be identical or different, and if the application data has a plurality of target byte of data, the converted data can be identical or different, and if the initiator is set to be 0xFB, the application data is 0x61 0xCC 0xFB 0x20 0x13 0x00 0x00 0x00 0x50 0x56 0x2C 0xFB, so that two bytes of data identical to the initiator exist in the application data, therefore, the target byte of data needs to be converted, the target byte of data is set to be converted into 0xFD, so as to obtain encoded application data 0x61 0xCC 0xFD 0x20 0x13 0x00 0x00 0x00 0x50 0x56 0x2C 0xFD, and if the application data has a plurality of bytes of data corresponding to the initiator, the converted data can not be identical to the initiator, and the frame can be accurately extracted from the frame identifier, and the frame can be generated from the frame can be accurately received through the frame, and the frame can be extracted from the frame, and the frame can be generated by the frame, and the frame can be uniquely delimited by the frame.
103. And judging the first position information of the converted data in the encoded application data.
For the embodiment of the present invention, in order to enable a receiving party to restore encoded application data after receiving a data frame, in the process of encoding application data, first position information of converted application data in encoded application data needs to be recorded, so that according to the first position information, it can be known which byte data in encoded application data is converted, not original data, and further, by restoring the same, the encoded application data can be decoded, for example, an initiator is set to be 0xFB, the application data is set to be 0x61 0xCC 0xFB 0x20 0x13 0x00 0x00 0x00 0x50 0x56 0x2C 0xFB, and encoding processing is performed on the application data to obtain 0x61 0xCC 0xFD 0x20 0x13 0x00 0x00 0x00 0x50 0x56 0x2C 0xFD, wherein the first position information of 0xFD in the converted application data is respectively the first byte and the third byte, that is, "0xFD" in the first byte and the third byte in the converted application data is converted, and is not original data, so that a data frame generated according to the converted application data can be sent to the receiving party to the following, and the original data can be restored according to the first position information.
104. And generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
The data frame includes a start symbol, encoded application data, and recorded first location information, in the composition format of the data frame, the start symbol is first, then the length of the application data is second, then the encoded application data is last, and finally the first location information of the encoding location is recorded, for the embodiment of the present invention, for the process of generating the data frame, as an optional embodiment, step 104 specifically includes: generating a coded control word corresponding to the coded application data according to the first position information; and generating a data frame corresponding to the application data according to the initiator, the coding control word and the coded application data. Further, the generating, according to the first location information, the encoded control word corresponding to the encoded application data includes: judging quantity information corresponding to converted data in the encoded application data; generating the coding quantity corresponding to the coded application data according to the quantity information; generating coded position data corresponding to the coded application data according to the first position information; and generating a coding control word corresponding to the coded application data according to the coding position data and the coding quantity.
The encoding control word mainly includes encoding position data and encoding quantity, the encoding position data is used for recording first position information of each converted byte in the application data, the encoding quantity is used for recording the converted byte quantity in the application data, in addition, the length of the encoding position data depends on the length of the application data, specifically, the length of the encoding position data = length/8 of the application data, for example, 64 bytes of the application data, each byte data needs one binary number for marking, and if a certain byte data in the encoded application data is converted data, a flag bit corresponding to the byte data in the encoding position data is 1; if the byte data is not converted, the flag bit corresponding to the byte data in the encoded position data is 0, so that it is known that a 64-bit binary number is needed, that is, 8 bytes of data are needed to mark the encoded application data, so that the length of the encoded position data is 8 bytes, further, the byte length of the encoded number depends on the number of converted bytes in the application data, and can be generally set to one byte length or can be set to a plurality of byte lengths.
For a specific generation process of the encoded control word, for example, the length of the encoded application data is 64 bytes, the 1 st byte, the 8 th byte and the 12 th byte are converted data different from the initiator, that is, are not original data, so that it is known that 3 converted byte data exist in the encoded application data, and therefore the number of codes corresponding to the encoded application data is 3, the binary number converted into one byte is 00000011, further, since the 1 st byte, the 8 th byte and the 12 th byte are converted, the first position information is determined to be the 1 st byte, the 8 th byte and the 12 th byte, the encoded position data corresponding to the encoded application data is generated according to the first position information, the 1 st, the 8 th and the 12 th bits are 1, and the rest of bits are 0, that is, the 8 th bytes of data are all encoded according to the number, and the encoded position data, the encoded application data corresponding to the encoded application data can be formed into the encoded control word, so that after a data frame is received, the encoded application data can be decoded according to the control word in the data frame, and the application can be accurately restored to the decoded, and the decoded application data can be accurately transmitted at the same time, and the frame can be restored to the application side.
In a specific application scenario, the embodiment of the present invention further provides another method for determining encoded location data, that is, only using a last byte of the encoded location data to mark each converted byte data in the encoded application data, based on which, the generating, according to the first location information, encoded location data corresponding to the encoded application data includes: judging original data which are the same as the converted data in the encoded application data and corresponding second position information; and generating encoded position data corresponding to the encoded application data according to the first position information and the second position information.
For example, the initiator is 0xFB, the length of the application data is 64 bytes, the application data is encoded by converting each byte of data identical to the initiator in the application data into 0xFD, 5 xFD's are present in the encoded application data, the first, second and fourth 0 xFD's are converted data, the third and fifth are raw data, so that the binary data of the first, second and fourth bits in the last byte of the encoded position data of 8 bytes are determined to be 1, the binary data of the third and fifth bits are 0, since only 5 xFD's are present, the binary data of the sixth to eighth bits are 0, and the remaining 7 bytes of the encoded position data can be set to 0x00, so that when the converted data is identical to the raw data, the raw data and the converted data can be accurately distinguished by using the encoded position data, and further, when the receiver decodes the data frame, the encoded application data can be accurately decoded according to the encoded position data in the encoding control word, and the application data transmitted by the sender can be accurately acquired.
Further, since the encoded position data generally includes a plurality of byte data, the same target byte data as the initiator may exist in each byte data of the encoded position data, so in order to ensure that a unique initiator exists in the composed data frame, it is also necessary to convert the byte data in the encoded position data into data different from the initiator, and in the same way, the check code of the data frame may also exist the same target byte data as the initiator, and it is also necessary to convert the byte data in the check code into data different from the initiator, based on this, the generating the encoded control word corresponding to the encoded application data according to the encoded position data and the encoded number includes: the byte data in the coding position data are converted into data different from the initiator to code the coding position data, so that coded coding position data are obtained; judging second position information of the converted data in the encoded position data; generating first coded mark data corresponding to the coded position data according to the second position information; acquiring a check code corresponding to the application data; the check code is encoded by converting each byte of data in the check code into data different from the initiator, so that the encoded check code is obtained; judging third position information of the converted data in the encoded check code; generating second coded mark data corresponding to the coded check code according to the third position information; and generating a coding control word corresponding to the coded application data according to the first coding mark data, the second coding mark data, the coding quantity and the coded coding position data. Wherein, the length of the first code mark data=code position data/8, the length of the second code mark data=check code/8, for example, for 64 bytes of application data, the length of the first code mark data is 1 byte, the check code generally comprises two bytes, namely a low address byte and a high address byte, so that the first code mark and the second code mark can be set to occupy two bytes in total, the first code number is the code number in the composition format of the code control word, the first code mark data and the second code mark data are the code position data.
For example, the initial symbol is set to be 0xFB, the encoded position data is 0x20 0x13 0xFB 0x20 0x13 0x00 0x00 0x00, and 0x20 0x13 0xFD 0x20 0x13 0x00 0x00 0x00 is obtained after encoding the encoded position data, so that it is known that 0xFD of a third byte in the encoded position data is converted data, and further, second position information of the 0xFD in the converted encoded position data can be determined, specifically, a process of generating first encoded flag data according to the second position information is exactly the same as a process of encoding application data to generate encoded position data, and there are two embodiments, one embodiment adopts an 8-bit binary number of one byte, and if a certain byte data in the converted encoded position data is converted data, a flag bit corresponding to the byte data in the first encoded flag data is set to be 1; if a certain byte data in the converted encoded data is original data, a flag bit corresponding to the byte data in the first encoded flag data is set to 0, and in another embodiment, if 0xFD appearing in the first one of the encoded position data is converted, the first bit of the 8-bit binary data is marked to 1, and if 0xFD appearing in the second one of the encoded position data is original data, the second bit of the 8-bit binary data is marked to 0, so that the first encoded flag data corresponding to the encoded position data can be determined according to the two embodiments, and the check code in the data frame can be encoded in the same manner, the second encoded flag data corresponding to the encoded check code can be determined, and then an encoded control word is generated according to the first encoded flag data, the second encoded flag data, the encoded number and the encoded position data, so that after the receiving party extracts the data frame, the encoded position data and the encoded check code position data can be decoded and restored according to the first flag data and the second flag data in the encoded control word.
Further, the encoded control word generated in the above manner, the initiator and the encoded application data together form a data frame, for example, the formed data frame is 0xFB 0x21 0x61 0xCC 0xFD 0x20 0x13 0x00 0x00 0x00 0x50 0x56 0x2C 0xDE 0xA8 0x00 0x00 0xFD 0x00 0x00 0xFD 0x00 0xBC 0x01 0x98 0x00 0x22 0x3A 0x35 0x30 0x30 0x7D 0xFD 0x7D 0xFD 0x03 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0B 0x2F 0xFD,, where the first 0xFB is the initiator, 0x21 is the length of the application data, and 0xFD is converted from 0xFB, and may be the original data, the 0x03 of the last line indicates that 30 xfbs of the application data are converted into 0xFD,0x01 is the first tag encoded data, the 0xFD appearing first in the check code is converted from 0xFB, the binary representation corresponding to the byte data of 0x0B of the last line is 00001011, and the 0xFD appearing first, second and fourth in the encoded application data is converted, so that it can be ensured that a unique initiator exists in the generated data frame, and the data frame received from the serial port can be accurately extracted in the communication process through the initiator, thereby improving the communication efficiency.
Compared with the mode that only one initiator exists in the data frame generated by the prior art, the data frame generation method provided by the embodiment of the invention can acquire the application data and the initiator corresponding to the application data; the byte data in the application data are coded and converted to obtain coded application data; meanwhile, judging first position information of the converted data in the encoded application data; and finally, generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data, thereby converting each byte of data in the application data into data different from the initiator to encode the application data, and generating a data frame according to the encoded application data, the first position information and the initiator, and ensuring that the initiator exists only in the generated data frame, so that the data frame received from a serial port can be accurately delimited in the communication process by the initiator, and the data frame is extracted, thereby improving the communication efficiency.
Meanwhile, the embodiment of the invention provides a decoding method of a data frame, which comprises the following steps:
201. source data is received.
For the embodiment of the invention, when the sender sends the data information to the receiver according to the serial communication protocol, the receiver can receive the source data from the sender, the source data can be composed of a plurality of data frames, the receiver is required to extract each data frame by using the initiator agreed with the sender, and analyze each data frame to obtain the application data in the data frame.
202. A data frame is extracted from the source data by reading the initiator.
Because the data frame generated by the embodiment of the invention only contains the unique initiator, the receiver can accurately delimit the data frame by using the initiator, for example, when the initiator appointed by the sender appears in the source data received from the serial port, the initiator at the position can be determined until the next initiator in the source data is encountered, the end bit of the data frame at the position can be determined, and the initiator is also the initiator of the next data frame, thereby extracting each data frame from the data received from the serial port by the initiator and ensuring that the data frame is accurately delimited.
203. Decoding the application data coded in the data frame, and analyzing the application data in the data frame.
For the embodiment of the present invention, in order to parse the application data in the data frame, step 203 specifically includes: reading the coding control word in the data frame, and restoring the check code in the data frame according to the second coding mark in the coding control word; judging whether the data frame passes the inspection according to the check code; if the data frame passes the inspection, decoding the application data coded in the data frame, and restoring the application data in the data frame; and if the data frame does not pass the verification, discarding the data frame.
For example, the second encoded flag data is 0x01, which indicates that the first 0xFD in the check code is converted from 0xFB, so that the first 0xFD in the check code is restored to 0xFB to obtain a restored check code, and then whether the extracted data frame passes the verification is judged according to the restored check code, if the data frame passes the verification, it indicates that the data frame is available, the data frame is decoded, and the application data in the data frame is restored; if the data frame is not verified, the data frame is not available and is directly discarded.
Further, if the data frame passes verification of the check code, decoding the data frame to restore the application data, based on which, the decoding the application data encoded in the data frame, restoring the application data in the data frame includes: reading first coding mark data in the coding control word, decoding coded coding position data in the coding control word according to the first coding mark data, and restoring the coding position data in the coding control word; and decoding the application data coded in the data frame according to the coding position data, and restoring the application data in the data frame.
For example, the binary representation corresponding to the first encoded flag data is 00001000, which indicates that the 0xFD appearing in the 1 st of the encoded position data is converted from 0xFB, so that the first 0xFD in the encoded position data is restored to 0xFB, and further restored encoded position data is obtained, and further the encoded application data is decoded according to the restored encoded position data, and the application data is restored.
Further, if the number of codes in the code control word is zero, it indicates that each byte of data in the application data is not converted, so that it is not necessary to restore the code position data again, and then restore the application data according to the code position data, based on which, before decoding the application data encoded in the data frame, and restoring the application data in the data frame, the method further includes: reading the coding quantity in the coding control word, and judging whether coded application data exists in the data frame according to the coding quantity; if the encoded application data exists, decoding the encoded application data, and restoring the application data in the data frame; and if the encoded application data does not exist, directly reading the application data in the data frame.
Specifically, after the data frame passes the inspection, the coding quantity in the coding control word can be directly read, if the coding quantity is zero, the condition that each byte of data in the application data is not converted is indicated, and the data does not need to be restored by using coding position data; if the number of codes is not zero, it indicates that the application data has byte data to be converted, that is, the coded application data has converted data, and needs to be restored, at this time, the coded position data needs to be restored according to the first coded mark data, and then the coded application data is decoded according to the coded position data, so that the application data is restored, and therefore, the receiver can avoid decoding the coded position data and directly obtain the application data by directly reading the number of codes in the coded control word under the condition that the number of codes is zero, thereby further improving the communication efficiency.
Compared with the prior art, the method for analyzing the data frame provided by the embodiment of the invention can receive the source data in a mode of delimiting the data frame according to a plurality of initial symbols; extracting a data frame from the source data by reading the initiator; meanwhile, the application data coded in the data frame are decoded, and the application data in the data frame are analyzed, so that the data frame received from the serial port can be accurately delimited in the communication process through the unique initiator existing in the data frame, the data frame is extracted, and the communication efficiency is further improved.
Further, as a specific implementation of the data frame generating method, an embodiment of the present invention provides a generating device of a data frame, including: the device comprises an acquisition unit, a coding unit, a judging unit and a generating unit.
The acquiring unit may be configured to acquire application data and a corresponding initiator thereof. The acquisition unit is a main functional module for acquiring application data and corresponding initiator thereof in the device.
The encoding unit can be used for encoding and converting byte data in the application data to obtain encoded application data. The coding unit is a main functional module for coding and converting byte data in the application data to obtain coded application data in the device, and is also a core module.
The judging unit may be configured to judge first location information of the converted data in the encoded application data. The judging unit is a main functional module for judging the first position information of the converted data in the encoded application data in the device.
The generating unit may be configured to generate a data frame corresponding to the application data according to the initiator, the first location information, and the encoded application data. The generating unit is a main functional module, which is also a core module, for generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data in the device.
In a specific application scenario, in order to generate a data frame corresponding to application data, the generating unit includes: the device comprises a first generation module and a second generation module.
The first generating module may be configured to generate, according to the first location information, a coded control word corresponding to the coded application data.
The second generating module may be configured to generate a data frame corresponding to the application data according to the initiator, the coding control word, and the coded application data.
Further, in order to generate an encoded control word corresponding to the encoded application data, the first generation module includes: a judging sub-module and a generating sub-module.
The judging submodule can be used for judging quantity information corresponding to converted data in the encoded application data.
The generation sub-module can be used for generating the coding quantity corresponding to the coded application data according to the quantity information.
The generating sub-module is further configured to generate encoded location data corresponding to the encoded application data according to the first location information.
The generation sub-module is further configured to generate a coding control word corresponding to the coded application data according to the coding position data and the coding number.
Further, the generating sub-module may be specifically configured to determine, in the encoded application data, original data that is the same as the converted data and second position information corresponding to the original data; and generating encoded position data corresponding to the encoded application data according to the first position information and the second position information.
Further, the generating sub-module may be further specifically configured to encode the encoded position data by converting byte data in the encoded position data into data different from the initiator, to obtain encoded position data; judging second position information of the converted data in the encoded position data; generating first coded mark data corresponding to the coded position data according to the second position information; acquiring a check code corresponding to the application data; the check code is encoded by converting each byte of data in the check code into data different from the initiator, so that the encoded check code is obtained; judging third position information of the converted data in the encoded check code; generating second coded mark data corresponding to the coded check code according to the third position information; and generating a coding control word corresponding to the coded application data according to the first coding mark data, the second coding mark data, the coding quantity and the coded coding position data.
It should be noted that, other corresponding descriptions of each functional module related to the generating device of the data frame provided by the embodiment of the present invention may refer to corresponding descriptions of the above method, which are not repeated herein.
Based on the above method, correspondingly, the embodiment of the invention further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, realizes the following steps: based on the above method, correspondingly, the embodiment of the invention further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, realizes the following steps: acquiring application data and a corresponding initiator thereof; encoding and converting byte data in the application data to obtain encoded application data; judging first position information of the converted data in the encoded application data; and generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
Based on the embodiments of the recipe creation method and the recipe creation apparatus, the cooking apparatus includes: a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the memory and the processor are both disposed on a bus, the processor performing the steps of: acquiring application data and a corresponding initiator thereof; encoding and converting byte data in the application data to obtain encoded application data; judging first position information of the converted data in the encoded application data; and generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
By the technical scheme, the application data and the corresponding initiator thereof can be acquired; the byte data in the application data are coded and converted to obtain coded application data; meanwhile, judging first position information of the converted data in the encoded application data; and finally, generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data, thereby converting each byte of data in the application data into data different from the initiator to encode the application data, and generating a data frame according to the encoded application data, the first position information and the initiator, and ensuring that the initiator exists only in the generated data frame, so that the data frame received from a serial port can be accurately delimited in the communication process by the initiator, and the data frame is extracted, thereby improving the communication efficiency.
Further, as a specific implementation of the above data frame parsing method, an embodiment of the present invention provides a data frame parsing apparatus, including: a receiving unit, a reading unit and a decoding unit.
The receiving unit may be configured to receive source data. The receiving unit is a main functional module for receiving source data in the device.
The reading unit may be configured to extract a data frame from the source data by reading the initiator. The reading unit is a main functional module for extracting a data frame from source data by reading a initiator in the device, and is also a core module.
The decoding unit may be configured to decode the application data encoded in the data frame, and parse the application data in the data frame. The decoding unit is a main functional module for decoding the application data encoded in the data frame and analyzing the application data in the data frame in the device, and is also a core module.
In a specific application scenario, in order to verify a data frame, the decoding unit includes: the device comprises a restoring module, a judging module, a decoding module and a discarding module.
The restoring module may be configured to read the encoded control word in the data frame, and restore the check code in the data frame according to the second encoded flag in the encoded control word.
The judging module can be used for judging whether the data frame passes the inspection according to the check code.
The decoding module may be configured to decode the application data encoded in the data frame and restore the application data in the data frame if the data frame passes the inspection.
The discarding module may be configured to discard the data frame if the data frame fails to pass the check.
In a specific application scenario, in order to restore application data in a data frame, the decoding module includes: a first codon module and a second codon module.
The first decoding sub-module can be used for reading the first coding mark data in the coding control word, decoding the coded coding position data in the coding control word according to the first coding mark data, and restoring the coding position data in the coding control word.
And the second decoding submodule is used for decoding the application data coded in the data frame according to the coding position data and restoring the application data in the data frame.
Further, in order to read the application data in the data frame, the decoding unit further includes: and a reading module.
The judging module is further configured to read the number of codes in the code control word, and judge whether the encoded application data exists in the data frame according to the number of codes.
The decoding module may be further configured to decode the encoded application data if the encoded application data exists, and restore the application data in the data frame.
The reading module may be configured to directly read the application data in the data frame if the encoded application data does not exist.
It should be noted that, other corresponding descriptions of each functional module related to the parsing apparatus for a data frame provided by the embodiment of the present invention may refer to corresponding descriptions of the above method, which are not repeated herein.
Based on the above method, correspondingly, the embodiment of the invention further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, realizes the following steps: based on the above method, correspondingly, the embodiment of the invention further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, realizes the following steps: receiving source data; extracting a data frame from the source data by reading the initiator; decoding the application data coded in the data frame, and analyzing the application data in the data frame.
Based on the embodiments of the recipe creation method and the recipe creation apparatus, the cooking apparatus includes: a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the memory and the processor are both disposed on a bus, the processor performing the steps of: receiving source data; extracting a data frame from the source data by reading the initiator; decoding the application data coded in the data frame, and analyzing the application data in the data frame.
By the technical scheme, the invention can receive the source data; extracting a data frame from the source data by reading the initiator; meanwhile, the application data coded in the data frame are decoded, and the application data in the data frame are analyzed, so that the data frame received from the serial port can be accurately delimited in the communication process through the unique initiator existing in the data frame, the data frame is extracted, and the communication efficiency is further improved.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Embodiments of the present invention also include these and other aspects defined in the following numbered clauses:
1. A method of generating a data frame, comprising:
acquiring application data and a corresponding initiator thereof;
encoding and converting byte data in the application data to obtain encoded application data;
Judging first position information of the converted data in the encoded application data;
And generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
2. The method according to clause 1, wherein the generating a data frame corresponding to the application data according to the initiator, the first location information and the encoded application data includes:
Generating a coded control word corresponding to the coded application data according to the first position information;
And generating a data frame corresponding to the application data according to the initiator, the coding control word and the coded application data.
3. The method according to clause 2, wherein generating the encoded control word corresponding to the encoded application data according to the first location information includes:
judging quantity information corresponding to converted data in the encoded application data;
generating the coding quantity corresponding to the coded application data according to the quantity information;
generating coded position data corresponding to the coded application data according to the first position information;
And generating a coding control word corresponding to the coded application data according to the coding position data and the coding quantity.
4. The method according to clause 3, wherein generating the encoded location data corresponding to the encoded application data according to the first location information includes:
Judging original data which are the same as the converted data in the encoded application data and corresponding second position information;
And generating encoded position data corresponding to the encoded application data according to the first position information and the second position information.
5. The method according to clause 3, wherein generating the encoded control word corresponding to the encoded application data according to the encoded position data and the encoded number includes:
the byte data in the coding position data are converted into data different from the initiator to code the coding position data, so that coded coding position data are obtained;
Judging second position information of the converted data in the encoded position data; generating first coded mark data corresponding to the coded position data according to the second position information;
Acquiring a check code corresponding to the application data; the check code is encoded by converting each byte of data in the check code into data different from the initiator, so that the encoded check code is obtained;
Judging third position information of the converted data in the encoded check code; generating second coded mark data corresponding to the coded check code according to the third position information;
and generating a coding control word corresponding to the coded application data according to the first coding mark data, the second coding mark data, the coding quantity and the coded coding position data.
6. A method of parsing a data frame, the method comprising:
receiving source data;
Extracting a data frame from the source data by reading the initiator;
Decoding the application data coded in the data frame, and analyzing the application data in the data frame.
7. The method according to clause 6, wherein decoding the encoded application data in the data frame, and parsing the application data in the data frame, includes:
reading the coding control word in the data frame, and restoring the check code in the data frame according to the second coding mark in the coding control word;
Judging whether the data frame passes the inspection according to the check code;
If the data frame passes the inspection, decoding the application data coded in the data frame, and restoring the application data in the data frame;
And if the data frame does not pass the verification, discarding the data frame.
8. The method according to clause 7, wherein decoding the encoded application data in the data frame and restoring the application data in the data frame includes:
reading first coding mark data in the coding control word, decoding coded coding position data in the coding control word according to the first coding mark data, and restoring the coding position data in the coding control word;
and decoding the application data coded in the data frame according to the coding position data, and restoring the application data in the data frame.
9. The method of clause 7, further comprising, prior to said decoding the encoded application data in the data frame, restoring the application data in the data frame:
reading the coding quantity in the coding control word, and judging whether coded application data exists in the data frame according to the coding quantity;
If the encoded application data exists, decoding the encoded application data, and restoring the application data in the data frame;
and if the encoded application data does not exist, directly reading the application data in the data frame.
10. A data frame generation apparatus, comprising:
The acquisition unit is used for acquiring the application data and the corresponding initiator thereof;
The coding unit is used for coding and converting byte data in the application data to obtain coded application data;
The judging unit is used for judging the first position information of the converted data in the encoded application data;
and the generating unit is used for generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data.
11. The apparatus of clause 10, the generating unit comprising: a first generation module and a second generation module,
The first generation module is used for generating a coding control word corresponding to the coded application data according to the first position information;
the second generation module is configured to generate a data frame corresponding to the application data according to the initiator, the coding control word and the coded application data.
12. The apparatus of clause 11, the first generation module comprising: the judging sub-module and the generating sub-module,
The judging submodule is used for judging quantity information corresponding to converted data in the encoded application data;
The generation sub-module is used for generating the coding quantity corresponding to the coded application data according to the quantity information;
The generation sub-module is further configured to generate encoded position data corresponding to the encoded application data according to the first position information;
the generation sub-module is further configured to generate a coding control word corresponding to the coded application data according to the coding position data and the coding number.
13. The apparatus according to clause 12, wherein the generating submodule is specifically configured to determine the same original data as the converted data and the second position information corresponding to the original data in the encoded application data; and generating encoded position data corresponding to the encoded application data according to the first position information and the second position information.
14. The apparatus according to clause 12, wherein the generating sub-module is further specifically configured to encode the encoded position data by converting byte data in the encoded position data into data different from the initiator, to obtain encoded position data; judging second position information of the converted data in the encoded position data; generating first coded mark data corresponding to the coded position data according to the second position information; acquiring a check code corresponding to the application data; the check code is encoded by converting each byte of data in the check code into data different from the initiator, so that the encoded check code is obtained; judging third position information of the converted data in the encoded check code; generating second coded mark data corresponding to the coded check code according to the third position information; and generating a coding control word corresponding to the coded application data according to the first coding mark data, the second coding mark data, the coding quantity and the coded coding position data.
15. An apparatus for parsing a data frame, comprising:
A receiving unit for receiving source data;
A reading unit for extracting a data frame from the source data by reading the initiator;
And the decoding unit is used for decoding the application data coded in the data frame and analyzing the application data in the data frame.
16. The apparatus of clause 15, the decoding unit comprising: a restoring module, a judging module, a decoding module and a discarding module,
The restoring module is used for reading the coding control word in the data frame and restoring the check code in the data frame according to the second coding mark in the coding control word;
the judging module is used for judging whether the data frame passes the inspection according to the check code;
The decoding module is used for decoding the application data coded in the data frame and restoring the application data in the data frame if the data frame passes the inspection;
the discarding module is configured to discard the data frame if the data frame fails to pass the verification.
17. The apparatus of clause 16, the decoding module comprising: a first codon module and a second codon module,
The first decoding sub-module is used for reading first coding mark data in the coding control word, decoding coded coding position data in the coding control word according to the first coding mark data and restoring the coding position data in the coding control word;
And the second decoding submodule is used for decoding the application data coded in the data frame according to the coding position data and restoring the application data in the data frame.
18. The apparatus of clause 16, the decoding unit further comprising: the reading module is used for reading the data,
The judging module is further configured to read the number of codes in the code control word, and judge whether encoded application data exists in the data frame according to the number of codes;
the decoding module is further configured to decode the encoded application data if the encoded application data exists, and restore the application data in the data frame;
And the reading module is used for directly reading the application data in the data frame if the encoded application data does not exist.
19. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of clauses 1 to 5 or/and 6-9.
20. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method of any one of clauses 1 to 5 or/and 6-9.

Claims (9)

1. A method of generating a data frame, comprising:
acquiring application data and a corresponding initiator thereof;
encoding and converting byte data in the application data to obtain encoded application data;
Judging first position information of the converted data in the encoded application data;
generating a data frame corresponding to the application data according to the initiator, the first position information and the encoded application data;
Wherein the generating a data frame corresponding to the application data according to the initiator, the first location information and the encoded application data includes:
Generating a coded control word corresponding to the coded application data according to the first position information;
And generating a data frame corresponding to the application data according to the initiator, the coding control word and the coded application data.
2. The method of claim 1, wherein generating the encoded control word corresponding to the encoded application data according to the first location information comprises:
judging quantity information corresponding to converted data in the encoded application data;
generating the coding quantity corresponding to the coded application data according to the quantity information;
generating coded position data corresponding to the coded application data according to the first position information;
And generating a coding control word corresponding to the coded application data according to the coding position data and the coding quantity.
3. The method of claim 2, wherein generating encoded location data corresponding to the encoded application data based on the first location information comprises:
Judging original data which are the same as the converted data in the encoded application data and corresponding second position information;
And generating encoded position data corresponding to the encoded application data according to the first position information and the second position information.
4. The method according to claim 2, wherein generating the encoded control word corresponding to the encoded application data according to the encoded position data and the encoded number comprises:
the byte data in the coding position data are converted into data different from the initiator to code the coding position data, so that coded coding position data are obtained;
Judging second position information of the converted data in the encoded position data; generating first coded mark data corresponding to the coded position data according to the second position information;
Acquiring a check code corresponding to the application data; the check code is encoded by converting each byte of data in the check code into data different from the initiator, so that the encoded check code is obtained;
Judging third position information of the converted data in the encoded check code; generating second coded mark data corresponding to the coded check code according to the third position information;
and generating a coding control word corresponding to the coded application data according to the first coding mark data, the second coding mark data, the coding quantity and the coded coding position data.
5. A method of parsing a data frame, the method comprising:
receiving source data;
Extracting a data frame from the source data by reading the initiator;
decoding the application data coded in the data frame, and analyzing the application data in the data frame;
The decoding the application data encoded in the data frame, and analyzing the application data in the data frame includes:
reading the coding quantity in the coding control word of the data frame, and judging whether the coded application data exists in the data frame according to the coding quantity;
If the encoded application data exists, decoding the encoded application data, and restoring the application data in the data frame;
and if the encoded application data does not exist, directly reading the application data in the data frame.
6. The method of claim 5, wherein prior to decoding the encoded application data in the data frame and parsing the application data in the data frame, the method further comprises:
reading the coding control word in the data frame, and restoring the check code in the data frame according to the second coding mark in the coding control word;
Judging whether the data frame passes the inspection according to the check code;
If the data frame passes the inspection, decoding the application data coded in the data frame, and restoring the application data in the data frame;
And if the data frame does not pass the verification, discarding the data frame.
7. The method of claim 6, wherein decoding the encoded application data in the data frame to recover the application data in the data frame comprises:
reading first coding mark data in the coding control word, decoding coded coding position data in the coding control word according to the first coding mark data, and restoring the coding position data in the coding control word;
and decoding the application data coded in the data frame according to the coding position data, and restoring the application data in the data frame.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 4 or/and 5 to 7.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements the steps of the method of any one of claims 1 to 4 or/and 5 to 7.
CN202011418173.7A 2020-12-07 2020-12-07 Data frame generation method, storage medium and computer equipment Active CN112486885B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011418173.7A CN112486885B (en) 2020-12-07 2020-12-07 Data frame generation method, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011418173.7A CN112486885B (en) 2020-12-07 2020-12-07 Data frame generation method, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN112486885A CN112486885A (en) 2021-03-12
CN112486885B true CN112486885B (en) 2024-06-07

Family

ID=74940279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011418173.7A Active CN112486885B (en) 2020-12-07 2020-12-07 Data frame generation method, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN112486885B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114337915A (en) * 2021-12-02 2022-04-12 华人运通(江苏)技术有限公司 Serial communication-based private protocol fault-tolerant processing method and device and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377505A (en) * 2010-08-06 2012-03-14 研祥智能科技股份有限公司 Serial port-based IPMI (Intelligent Platform Management Interface) package transmission method
CN102508455A (en) * 2011-09-26 2012-06-20 深圳市锦瑞电子有限公司 Control method and system of biochemical analyzer
CN103369311A (en) * 2012-04-04 2013-10-23 朱洪波 Method for preventing conflict of initial code
CN103840835A (en) * 2012-11-26 2014-06-04 艺伦半导体技术股份有限公司 Data decompression method and device
CN103914419A (en) * 2012-12-29 2014-07-09 北京谊安医疗系统股份有限公司 Communication method and system among board-level MCUs
CN104809100A (en) * 2015-04-02 2015-07-29 上海新时达电气股份有限公司 Text coding and decoding method and corresponding coding and decoding system
CN108055237A (en) * 2017-11-08 2018-05-18 长春希达电子技术有限公司 Advices plate control method based on XML format
CN108737026A (en) * 2018-05-08 2018-11-02 深圳市心流科技有限公司 Data transmission method, device and computer readable storage medium
CN109165001A (en) * 2018-08-24 2019-01-08 京东方科技集团股份有限公司 Coding method, device and display device
CN109802760A (en) * 2018-12-29 2019-05-24 北京行易道科技有限公司 The storage method and device of data, the coding/decoding method of data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3840026B2 (en) * 2000-01-21 2006-11-01 キヤノン株式会社 Image processing apparatus and method, and storage medium
JP4448334B2 (en) * 2002-04-19 2010-04-07 マイクロソフト コーポレーション Method and system for preventing start code emulation in positions that include non-byte-aligned positions and / or positions that include bit-shifted positions (bit-shifted positions)

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377505A (en) * 2010-08-06 2012-03-14 研祥智能科技股份有限公司 Serial port-based IPMI (Intelligent Platform Management Interface) package transmission method
CN102508455A (en) * 2011-09-26 2012-06-20 深圳市锦瑞电子有限公司 Control method and system of biochemical analyzer
CN103369311A (en) * 2012-04-04 2013-10-23 朱洪波 Method for preventing conflict of initial code
CN103840835A (en) * 2012-11-26 2014-06-04 艺伦半导体技术股份有限公司 Data decompression method and device
CN103914419A (en) * 2012-12-29 2014-07-09 北京谊安医疗系统股份有限公司 Communication method and system among board-level MCUs
CN104809100A (en) * 2015-04-02 2015-07-29 上海新时达电气股份有限公司 Text coding and decoding method and corresponding coding and decoding system
CN108055237A (en) * 2017-11-08 2018-05-18 长春希达电子技术有限公司 Advices plate control method based on XML format
CN108737026A (en) * 2018-05-08 2018-11-02 深圳市心流科技有限公司 Data transmission method, device and computer readable storage medium
CN109165001A (en) * 2018-08-24 2019-01-08 京东方科技集团股份有限公司 Coding method, device and display device
CN109802760A (en) * 2018-12-29 2019-05-24 北京行易道科技有限公司 The storage method and device of data, the coding/decoding method of data

Also Published As

Publication number Publication date
CN112486885A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN110324115B (en) Data transmission method and device, storage medium and terminal equipment
CN110445860B (en) Message sending method, device, terminal equipment and storage medium
CN108777606B (en) Decoding method, apparatus and readable storage medium
CN103106378B (en) A kind of novel 15693 label chip verification platforms
CN111147462A (en) FPGA-based step protocol analysis method, system, terminal and storage medium
BR112015014405B1 (en) Communications method for an optical network system, optical network device and communications system
EP2219117A1 (en) A processing module, a device, and a method for processing of XML data
JPH05122282A (en) Data transmission system
CN112486885B (en) Data frame generation method, storage medium and computer equipment
CN103036641A (en) Method and system of data exchange and deserialization method
EP2458811B1 (en) Method, apparatus and system for processing user identity information in gigabit passive optical network system
US20230246741A1 (en) Data Processing Method and Device in Passive Optical Network System
US6385341B1 (en) Technique for decoding variable length data codes
US10623140B2 (en) Method for processing signaling sub-segment, processing apparatus, access point, and station
CN100449950C (en) Robust signal coding
CN100385887C (en) Method and device for coding, transmitting and decoding digital data
CN116193160A (en) Digital watermark embedding method, device, equipment and medium
CN113162628B (en) Data encoding method, data decoding method, terminal and storage medium
CN108347292A (en) A kind of the data decoding method and device of Physical Coding Sublayer
CN108551366B (en) Visible light communication method based on LED and mobile phone camera
CN111464238A (en) Visible light communication method and computer readable medium
CN104809100A (en) Text coding and decoding method and corresponding coding and decoding system
CN113242473B (en) Data processing method, system, data acquisition equipment and readable storage medium
CN111258806B (en) Data type error detection method and device
CN109802883B (en) Mail transmission method and system thereof

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
CB02 Change of applicant information

Address after: Floor 11, Building 1, No. 1200, Jinzhou Road, Tangjiawan Town, High tech Zone, Zhuhai City, Guangdong Province, 519000

Applicant after: ZHUHAI UNICOOK TECHNOLOGY Co.,Ltd.

Address before: 519000 -45895, 105 room 6, Baohua Road, Hengqin New District, Zhuhai, Guangdong (centralized office area)

Applicant before: ZHUHAI UNICOOK TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant