WO2021073463A1 - 数据接收处理方法及装置 - Google Patents

数据接收处理方法及装置 Download PDF

Info

Publication number
WO2021073463A1
WO2021073463A1 PCT/CN2020/120274 CN2020120274W WO2021073463A1 WO 2021073463 A1 WO2021073463 A1 WO 2021073463A1 CN 2020120274 W CN2020120274 W CN 2020120274W WO 2021073463 A1 WO2021073463 A1 WO 2021073463A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data frame
frame
current
receiving
Prior art date
Application number
PCT/CN2020/120274
Other languages
English (en)
French (fr)
Inventor
管西忠
程绍江
孙继国
高玉辉
时斌
Original Assignee
青岛海尔空调电子有限公司
海尔智家股份有限公司
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 青岛海尔空调电子有限公司, 海尔智家股份有限公司 filed Critical 青岛海尔空调电子有限公司
Publication of WO2021073463A1 publication Critical patent/WO2021073463A1/zh

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

Definitions

  • the present invention relates to the field of data communication technology, in particular to a data receiving and processing method and device.
  • Data communication mainly refers to the realization of data transmission between different data terminal equipment through data communication equipment and communication channels.
  • data is usually a data frame (packed by bytes, and each byte is composed of multiple bits of data) In the form of transmission.
  • the data frame transmitted in the communication channel may be bit inverted due to interference (for example, the data of one or more data bits changes from "0" Inverted to "1"), if the data terminal equipment on the receiving side cannot detect the accuracy of the data in time, it will greatly affect the reliability of data communication.
  • Checksum checksum byte
  • this inspection method still has a certain probability of false detection. For example, when two data bits in the data frame are bit inverted and the original data of the two data bits are 0 and 1, respectively, the data bits of the data frame The cumulative sum will not change, that is, the wrong data cannot be accurately checked by comparing the checksum.
  • the embodiments of the present invention provide a data receiving and processing method and device.
  • the data receiving and processing method and device obtain the data of specific data bits in the current data frame and the target data frame and compare whether the data of the specific data is consistent. To judge the accuracy of the current data frame, it can significantly improve the reliability of data communication.
  • an embodiment of the present invention provides a data receiving and processing method.
  • the method includes the following steps:
  • the target data frame is a data frame adjacent to the current data frame in the received data frame, and the specific data bit is a data bit whose data adjustment frequency is less than or equal to a preset adjustment frequency in the data frame.
  • the method further includes:
  • the method further includes:
  • the preset checksum algorithm is the same as the checksum algorithm used by the actual checksum.
  • the number of the target data frame is one or more.
  • the number of the specific data bits is multiple.
  • an embodiment of the present invention provides a data receiving and processing device, which includes the following structure:
  • a data acquisition module which is configured to respectively acquire the data of specific data bits in the current data frame and the target data frame received;
  • a data analysis module configured to compare whether the data of the specific data bits are consistent: if they are consistent, analyze the current data frame; if they are inconsistent, continue to analyze the last analyzed data frame;
  • the target data frame is a data frame adjacent to the current data frame in the received data frame, and the specific data bit is a data bit whose data adjustment frequency is less than or equal to a preset adjustment frequency in the data frame.
  • the device also includes:
  • the data check module is configured to determine whether the calculated checksum of the current data frame is consistent with the actual checksum currently received: if they are consistent, the data acquisition module and the data analysis module are activated.
  • the data check module is further configured to use a preset checksum algorithm and calculate the calculated checksum of the current data frame according to the data of the data bits in the current data frame;
  • the preset checksum algorithm is the same as the checksum algorithm used by the actual checksum.
  • the number of the target data frame is one or more.
  • the number of the specific data bits is multiple.
  • the embodiment of the present invention selects the analytical method by judging whether the data of a specific data bit is consistent.
  • the data frame can ensure that the data frame that is parsed each time is the correct data frame, thereby avoiding misoperation due to parsing of wrong data, and significantly improving the reliability of data communication.
  • Fig. 1 is a schematic diagram of main steps of a data receiving and processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of the main structure of a data receiving and processing device according to an embodiment of the present invention
  • FIG. 1 exemplarily shows the main steps of a data receiving and processing method in an embodiment of the present invention.
  • the data receiving and processing method in the embodiment of the present invention mainly includes the following steps:
  • Step S101 Obtain the received data of specific data bits in the current data frame and the target data frame respectively.
  • the data terminal device on the data sending side (for concise description, referred to as the sending side device in this embodiment) to the data terminal device on the data receiving side (for concise description, referred to as the receiving side in this embodiment)
  • the communication data is transmitted frame by frame in units of data frames, and the receiving side device will also receive the communication data frame by frame.
  • the current data frame in this embodiment refers to the data frame received by the receiving device at the current moment
  • the target data frame refers to the data frame adjacent to the current data frame among all the data frames that the receiving device has received.
  • Adjacent data frames can be understood as one or several data frames newly received by the receiving device before receiving the current data frame.
  • the specific data bit refers to the data bit in the data frame whose data adjustment frequency is less than or equal to the preset adjustment frequency.
  • the specific data bit in this embodiment can be the data bit where the data representing the identity information of the device on the sending side (the identity information of the device should remain unchanged for a long time), or the instruction information of the device on the sending side (such as controlling the device on the receiving side).
  • An instruction to perform a certain action, or an instruction that controls the receiving-side device to report certain information to the sending-side device and other instructions that remain unchanged for a certain period of time) and other data adjustment frequency is less than or equal to the data bit where the data of the preset adjustment frequency is located.
  • the specific data bit may be an 8-bit data bit of a certain byte in a data frame, or a combination of different data bits in different bytes.
  • Step S102 Compare whether the data of the specific data bit in the current data frame and the target data frame are consistent. Specifically, in this embodiment, if the data of the specific data bit in the current data frame and the target data frame are consistent (for example, the data of the specific data bit is 1), then go to step S103; if the current data frame and the target data frame The data of the specific data bit in the data is inconsistent (for example, the data of the specific data bit in the current data frame is 1, and the data of the specific data bit in the target data frame is 0), then go to step S104;
  • Step S103 Parse the current data frame.
  • Step S104 Continue to parse the last parsed data frame.
  • the data of a specific data bit in the current data frame and the target data frame are inconsistent, it indicates that the data in the current data frame may be the command information of the sending device, etc., has changed, or it may be due to environmental interference or other reasons.
  • the cause has been bit inverted.
  • FIG. 1 The data receiving and processing method shown in FIG. 1 will be further described below in conjunction with a specific implementation in the embodiment of the present invention.
  • the specific data bit of each data frame in the communication data sent by the sending-side device to the receiving-side device is the first byte in the data frame, that is, byte 1; the target data frame is the current received by the receiving-side device The last data frame of the received data frame, that is, the target data frame is the first data frame adjacent to the current data frame among the data frames that the receiving device has received.
  • the receiving side device is currently receiving the m data frames the TX m, i.e., the target data frame is a data frame is a data frame the TX m of TX m-1; comparison, determining the data frame the TX m data frame TX m- the data If the data of byte 1 in 1 is consistent, the data frame TX m is directly parsed;
  • the receiving device currently receives the m+1th data frame TX m+1 , that is, the target data frame is the data frame TX m . Through data comparison, it is determined that the data frame TX m+1 and the byte 1 in the data frame TX m If the data is inconsistent, continue to analyze the data frame TX m ;
  • the receiving device currently receives the m+2th data frame TX m+2 , that is, the target data frame is the data frame TX m+1 ; through data comparison, the data frame TX m+2 and the data frame TX m+1 are determined If the data of byte 1 in the middle is inconsistent, continue to analyze the data frame TX m ;
  • the receiving device currently receives the m+3th data frame TX m+3 , that is, the target data frame is the data frame TX m+2 ; through data comparison, the data frame TX m+3 and the data frame TX m+2 are determined If the data of byte 1 in the middle is consistent, the data frame TX m+3 is directly parsed.
  • the specific data bit of each data frame in the communication data sent by the sending-side device to the receiving-side device is the first byte in the data frame, namely byte 1; the target data frame is the current The two most recently received data frames before the received data frame, that is, the target data frame is the first 1-2 data frames adjacent to the current data frame among the data frames that the receiving device has received.
  • the receiving side device is currently receiving the m data frames the TX m, i.e., the target data frame is a data frame the TX m consecutive data frames TX m-1 and a data frame TX m-2; comparison, it is determined through the data frames
  • the data of byte 1 in TX m , data frame TX m-1 and data frame TX m-2 are all consistent, then the data frame TX m is directly parsed;
  • the receiving side device currently receives the m+1 th data frame TX m+1 , that is, the target data frame is the data frame TX m and the data frame TX m-1 adjacent to the data frame TX m+ 1; through data comparison , It is determined that the data of byte 1 in the data frame TX m+1 is inconsistent with the data frame TX m and the data frame TX m-1 , then continue to analyze the data frame TX m ;
  • the receiving-side device is currently receiving the first m + 2 data frames the TX m + 2, i.e. the target data frame is a data frame the TX m + 2 adjacent frames TX m + 1 and data frames TX m; compare data determining data frame TX m + 2 and m + 1 data frame TX 1 byte consistent and inconsistent data TX data frames m 1 bytes, the data frame TX continue parsing m;
  • the receiving-side device is currently receiving the first m + 3 data frames the TX m + 3, i.e., the target data frame is a data frame the TX m + 3 adjacent data frames TX m + 2 and the data frame TX m + 1; by According to the data comparison, it is determined that the data of byte 1 in the data frame TX m+3 , the data frame TX m+2 and the data frame TX m+1 are all consistent, and the data frame TX m+3 is directly analyzed.
  • the accuracy of the current data frame is judged by obtaining the data of the specific data bits in the current data frame and the target data frame and comparing whether the data of the specific data is consistent, which significantly improves the sending side device and the receiving side device Reliability of communication between.
  • data receiving processing can also be performed according to the following steps:
  • Step S201 Determine whether the calculated checksum of the current data frame is consistent with the actual checksum currently received. Specifically, in this embodiment, if the calculated checksum of the current data frame is consistent with the actual checksum, then go to step S202; if the calculated checksum of the current data frame is inconsistent with the actual checksum, then it is determined that the current data frame is inconsistent with the actual checksum. The frame is a wrong data frame.
  • the calculated checksum of the current data frame refers to the calculated checksum of the current data frame based on the data of the data bits in the current data frame using a preset checksum algorithm, and the actual checksum Refers to the checksum actually received currently.
  • the preset checksum algorithm in this embodiment should be the same as the actual checksum algorithm used.
  • the checksum algorithm used in the actual checksum may be a cumulative sum algorithm or a CRC (Cyclic Redundancy Check) check algorithm.
  • Step S202 Obtain the received data of specific data bits in the current data frame and the target data frame respectively.
  • Step S203 Compare the data of the specific data bit in the current data frame and the target data frame. Specifically, in this embodiment, if the data of the specific data bit in the current data frame and the target data frame are consistent, then go to step S204; if the data of the specific data bit in the current data frame and the target data frame are inconsistent, then go to step S204 S205.
  • Step S204 Parse the current data frame.
  • Step S205 Continue to parse the last parsed data frame.
  • step S202, step S203, step S204, and step S205 in this embodiment are the same as those of step S101, step S102, step S103, and step S104 in the foregoing embodiment, respectively.
  • step S101, step S102, step S103, and step S104 in the foregoing embodiment respectively.
  • I will not repeat them here.
  • the accuracy of the current data frame is judged by comparing "the calculated checksum of the current data frame" and the "actual checksum currently received", and then the accuracy of the current data frame is obtained by obtaining the current data frame.
  • the accuracy of the current data frame can be judged by comparing the data of the specific data bit with the data of the specific data bit in the target data frame, which can further improve the reliability of the communication between the sending-side device and the receiving-side device.
  • an embodiment of the present invention also provides a data receiving and processing device.
  • the data receiving and processing device in the embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
  • FIG. 2 exemplarily shows the main structure of the data receiving and processing device in the embodiment of the present invention.
  • the data receiving and processing device in the embodiment of the present invention mainly includes a data acquisition module 11 and a data analysis module 12.
  • the data obtaining module 11 may be configured to obtain the received data of specific data bits in the current data frame and the target data frame respectively; the data analysis module 12 may be configured to compare whether the data of the specific data bits are consistent: If they are consistent, analyze the current data frame; if they are inconsistent, continue to analyze the last analyzed data frame; among them, the target data frame is the data frame adjacent to the current data frame in the received data frame, and the specific data bit is In the data frame, the data adjustment frequency is less than or equal to the data bits of the preset adjustment frequency.
  • the number of target data frames may be one or more, and the number of specific data bits may be more than one.
  • the data receiving processing device shown in FIG. 2 may further include a data verification module, and the data verification module may be configured to determine the calculation verification of the current data frame Whether the sum is consistent with the actual checksum currently received: If they are the same, start the data acquisition module 11 and the data analysis module 12, that is, after judging that the calculated checksum of the current data frame is consistent with the actual checksum, start again The data acquisition module 11 and the data analysis module 12 enable them to perform their own operations respectively.
  • the data check module can be further configured to use a preset checksum algorithm and calculate the calculated checksum of the current data frame based on the data of the data bits in the current data frame;
  • the set checksum algorithm is the same as the actual checksum algorithm.
  • the foregoing embodiment of the data receiving and processing device is used to implement the foregoing embodiment of the data receiving and processing method.
  • the technical principles, the technical problems solved and the technical effects produced are similar, and those skilled in the art can clearly understand
  • the specific working process and related description of the foregoing data receiving and processing device embodiment may refer to the corresponding process in the foregoing data receiving and processing method embodiment, which is not repeated here.
  • the above-mentioned data receiving and processing device also includes some other well-known structures, such as processors, controllers, memories, etc., where the memories include, but are not limited to, random access memory, flash memory, read-only memory, and programmable read-only memory. , Volatile memory, non-volatile memory, serial memory, parallel memory or registers, etc., processors include but are not limited to CPLD/FPGA, DSP, ARM processor, MIPS processor, etc., in order to unnecessarily obscure the present disclosure Examples of these well-known structures are not shown in FIG. 2.
  • each module in FIG. 2 is merely illustrative. According to actual needs, each module can have any number.
  • the present invention can also be implemented as a device or device program (for example, a PC program and a PC program product) for executing part or all of the methods described herein.
  • a program for realizing the present invention may be stored on a PC-readable medium, or may have the form of one or more signals.
  • Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

本发明涉及数据通信技术领域,具体提供了一种数据接收处理方法及装置,旨在解决如何提高数据通信可靠性的技术问题。为此目的,本发明实施例提供的一种数据接收处理方法通过分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据,比较特定数据位的数据是否一致:若一致,则解析当前数据帧;若不一致,则继续解析上一个被解析的数据帧,能够确保每次被解析的数据帧均是正确的数据帧,从而避免了由于解析错误数据而发生误操作,显著提高了数据通信的可靠性。本发明实施例提供的一种数据接收处理装置能够执行上述数据接收处理方法,同样能够显著提高数据通信的可靠性。

Description

数据接收处理方法及装置 技术领域
本发明涉及数据通信技术领域,具体涉及数据接收处理方法及装置。
背景技术
数据通信主要是指通过数据通信设备和通信信道等实现不同数据终端设备之间的数据传输,其中,数据通常是以数据帧(由字节封装而成,每个字节由多位数据组成)的形式进行传输。在强干扰环境(如高噪声、高电磁干扰等)下进行数据通信时,通信信道中传输的数据帧可能会由于干扰发生位反转(例如,一个或多个数据位的数据由“0”反转为“1”),若接收侧的数据终端设备无法及时甄别数据的准确性,将会极大影响数据通信的可靠性。为此,当前主要是通过在数据帧的帧尾增加校验和字节(Checksum)(例如,判断在数据发送与接收侧,数据帧中数据位的数据累加和是否一致)来检验数据帧是否发生异常。但是,这种检验方式仍然存在一定的误检概率,例如,当数据帧中有两个数据位发生位反转且这两个数据位的原数据分别是0和1时,数据帧的数据位累加和不会发生改变,即通过比较校验和仍无法准确检验出错误数据。
相应地,本领域需要一种新的数据处理方案来解决上述问题。
发明内容
为了解决现有技术中的上述问题,即为了解决如何提高数据通信可靠性的技术问题。为此目的,本发明实施例提供了一种数据接收处理方法及装置,该数据接收处理方法及装置通过获取当前数据帧和目标数据帧中特定数据位的数据并且比较特定数据的数据是否一致,来判断当前数据帧的准确性,能够显著提高数据通信的可靠性。
在第一方面,本发明实施例提供了一种数据接收处理方法,该方法包括以下步骤:
分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据;
比较所述特定数据位的数据是否一致:若一致,则解析所述当前数据帧;若不一致,则继续解析上一个被解析的数据帧;
其中,所述目标数据帧是已接收到的数据帧中与所述当前数据帧相邻的数据帧,所述特定数据位是数据帧中数据调整频率小于等于预设调整频率的数据位。
进一步地,本发明实施例的一个可选技术方案是:
在“分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据”的步骤之前,所述方法还包括:
判断所述当前数据帧的计算校验和与当前接收到的实际校验和是否一致,
若一致,则执行“分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据”的步骤。
进一步地,本发明实施例的一个可选技术方案是:
在“判断所述当前数据帧的计算校验和与当前接收到的实际校验和是否一致”的步骤之前,所述方法还包括:
利用预设的校验和算法并根据所述当前数据帧中数据位的数据,计算所述当前数据帧的计算校验和;
其中,所述预设的校验和算法与所述实际校验和使用的校验和算法相同。
进一步地,本发明实施例的一个可选技术方案是:
所述目标数据帧的数量是一个或多个。
进一步地,本发明实施例的一个可选技术方案是:
所述特定数据位的数量是多个。
在第二方面,本发明实施例提供了一种数据接收处理装置,该装置包括以下结构:
数据获取模块,其被配置成分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据;
数据解析模块,其被配置成比较所述特定数据位的数据是否一致:若一致,则解析所述当前数据帧;若不一致,则继续解析上一个被解析的数据帧;
其中,所述目标数据帧是已接收到的数据帧中与所述当前数据帧相邻的数据帧,所述特定数据位是数据帧中数据调整频率小于等于预设调整频率的数据位。
进一步地,本发明实施例的一个可选技术方案是:
所述装置还包括:
数据校验模块,其被配置成判断所述当前数据帧的计算校验和与当前接收到的实际校验和是否一致:若一致,则启动所述数据获取模块和所述数据解析模块。
进一步地,本发明实施例的一个可选技术方案是:
所述数据校验模块进一步被配置成利用预设的校验和算法并根据所述当前数据帧中数据位的数据,计算所述当前数据帧的计算校验和;
其中,所述预设的校验和算法与所述实际校验和使用的校验和算法相同。
进一步地,本发明实施例的一个可选技术方案是:
所述目标数据帧的数量是一个或多个。
进一步地,本发明实施例的一个可选技术方案是:
所述特定数据位的数量是多个。
本领域技术人员能够理解的是,上述技术方案至少具有如下有益效果:
通过分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据,比较特定数据位的数据是否一致:若一致,则解析当前数据帧;若不一致,则继续解析上一个被解析的数据帧,解决了当前无法检测出由于环境干扰等因素造成数据帧发生位反转,从而致使通信可靠性较差的问题,本发明实施例通过判断特定数据位的数据是否一致的方式来选择解析的数据帧,能够确保每次被解析的数据帧均是正确的数据帧,从而避免了由于解析错误数据而发生误操作,显著提高了数据通信的可靠性。
附图说明
图1是根据本发明一个实施例的数据接收处理方法的主要步骤示意图;
图2是根据本发明一个实施例的数据接收处理装置的主要结构示意图;
附图标记列表:
11-数据获取模块;12-数据分析模块。
具体实施方式
下面参照附图来描述本发明的优选实施方式。本领域技术人员应当理解的是,这些实施方式仅仅用于解释本发明的技术原理,并非旨在限制本发明的保护范围。
下面结合附图对本发明实施例提供的一种数据接收处理方法进行说明。参阅附图1,图1示例性示出了本发明实施例中一种数据接收处理方法的主要步骤。如图1所示,本发明实施例中数据接收处理方法主要包括以下步骤:
步骤S101:分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据。
在本实施例中数据发送侧的数据终端设备(为描述简洁,在本实施例中简称为发送侧设备)向数据接收侧的数据终端设备(为描述简洁,在本实施例中简称为接收侧设备)发送通信数据时,通信数据以数据帧为单位一帧一帧地传输,接收侧设备也会一帧一帧地接收通信数据。本实施例中的当前数据帧指的是在当前时刻接收侧设备接收到的数据帧,目标数据帧指的是接收侧设备已经接收到的所有数据帧中与当前数据帧相邻的数据帧,而相邻的数据帧可以理解为接收侧设备在接收当前数据帧之前,最新接收到的一个或几个数据帧。
在本实施例中特定数据位指的是数据帧中数据调整频率小于等于预设调整频率的数据位。例如,本实施例中特定数据位可以是表示发送侧设备身份信息(设备身份信息应当保持长期不变)的数据所在的数据位,还可以是表示发送侧设备的指令信息(如控制接收侧设备执行某个动作的指令,或控制接收侧设备向发送侧设备上报某种信息的指令等一定时间内保持不变的指令)等其他数据调整频率小于等于预设调整频率的数据所在的数据位。可选的,本实施例中特定数据位可以是多个,例如特定数据位可以是数据帧中某个字节的8位数据位,也可是不同字节中不同数据位的组合。
步骤S102:比较当前数据帧和目标数据帧中特定数据位的数据是否一致。具体地,在本实施例中若当前数据帧和目标数据帧中特定数据位的数据一致(例如,特定数据位的数据均是1),则转至步骤S103;若当 前数据帧和目标数据帧中特定数据位的数据不一致(例如,当前数据帧中特定数据位的数据是1,而目标数据帧中特定数据位的数据是0),则转至步骤S104;
步骤S103:解析当前数据帧。
在本实施例中若当前数据帧和目标数据帧中特定数据位的数据一致时,表明当前数据帧中的数据没有由于环境干扰或其他原因发生位反转,即当前数据帧是正确的数据帧,可以直接解析当前数据帧。
步骤S104:继续解析上一个被解析的数据帧。
在本实施例中若当前数据帧和目标数据帧中特定数据位的数据不一致时,表明当前数据帧中的数据有可能是发送侧设备的指令信息等发生了改变,也可能由于环境干扰或其他原因发生了位反转。综上所述,为了避免解析错误数据而发生误操作,需要在“当前数据帧和目标数据帧中特定数据位的数据不一致”的情况下,继续解析上一个被解析的数据帧,即继续解析上一个正确的数据帧。
下面结合本发明实施例中的一个具体实施方案对图1所示的数据接收处理方法作进一步说明。
在本实施方案中发送侧设备向接收侧设备发送的通信数据中每个数据帧的特定数据位是数据帧中的第1个字节,即字节1;目标数据帧是接收侧设备当前接收到的数据帧的上一个数据帧,即目标数据帧是接收侧设备已经接收到的数据帧中与当前数据帧相邻的第1个数据帧。
1、接收侧设备当前接收到了第m个数据帧TX m,即目标数据帧是数据帧TX m的上一个数据帧TX m-1;通过数据比较,确定数据帧TX m与数据帧TX m-1中字节1的数据一致,则直接解析数据帧TX m
2、接收侧设备当前接收到了第m+1个数据帧TX m+1,即目标数据帧是数据帧TX m,通过数据比较,确定数据帧TX m+1与数据帧TX m中字节1的数据不一致,则继续解析数据帧TX m
3、接收侧设备当前接收到了第m+2个数据帧TX m+2,即目标数据帧是数据帧TX m+1;通过数据比较,确定数据帧TX m+2与数据帧TX m+1中字节1的数据不一致,则继续解析数据帧TX m
4、接收侧设备当前接收到了第m+3个数据帧TX m+3,即目标数据帧是数据帧TX m+2;通过数据比较,确定数据帧TX m+3与数据帧TX m+2中字节1的数据一致,则直接解析数据帧TX m+3
下面结合本发明实施例中的另一个具体实施方案对图1所示的数据接收处理方法作进一步说明。
在本实施方案中发送侧设备向接收侧设备发送的通信数据中每个数据帧的特定数据位是数据帧中的第1个字节,即字节1;目标数据帧是在接收侧设备当前接收到的数据帧之前最新接收到的两个数据帧,即目标数据帧是接收侧设备已经接收到的数据帧中与当前数据帧相邻的第1-2个数据帧。
1、接收侧设备当前接收到了第m个数据帧TX m,即目标数据帧是与数据帧TX m相邻的数据帧TX m-1和数据帧TX m-2;通过数据比较,确定数据帧TX m、数据帧TX m-1和数据帧TX m-2中字节1的数据均一致,则直接解析数据帧TX m
2、接收侧设备当前接收到了第m+1个数据帧TX m+1,即目标数据帧是与数据帧TX m+1相邻的数据帧TX m和数据帧TX m-1;通过数据比较,确定数据帧TX m+1与数据帧TX m和数据帧TX m-1中字节1的数据均不一致,则继续解析数据帧TX m
3、接收侧设备当前接收到了第m+2个数据帧TX m+2,即目标数据帧是与数据帧TX m+2相邻的数据帧TX m+1和数据帧TX m;通过数据比较,确定数据帧TX m+2与数据帧TX m+1字节1一致,和数据帧TX m中字节1的数据不一致,则继续解析数据帧TX m
4、接收侧设备当前接收到了第m+3个数据帧TX m+3,即目标数据帧是与数据帧TX m+3相邻的数据帧TX m+2和数据帧TX m+1;通过数据比较,确定数据帧TX m+3、数据帧TX m+2和数据帧TX m+1中字节1的数据均一致,则直接解析数据帧TX m+3
在本发明实施例中,通过获取当前数据帧和目标数据帧中特定数据位的数据并且比较特定数据的数据是否一致,来判断当前数据帧的准确性,显著提高了发送侧设备与接收侧设备之间的通信可靠性。
进一步地,在本发明的一个可选实施例中,还可以按照以下步骤进行数据接收处理:
步骤S201:判断当前数据帧的计算校验和与当前接收到的实际校验和是否一致。具体地,在本实施例中若当前数据帧的计算校验和与实际校验和一致,则转至步骤S202;若当前数据帧的计算校验和与实际校验和不一致,则判定当前数据帧是错误的数据帧。
在本实施例中当前数据帧的计算校验和指的是利用预设的校验和算法并根据当前数据帧中数据位的数据,计算得到的当前数据帧的校验和,实际校验和指的是当前实际接收到的校验和。同时,在本实施例中预设校验和算法应当与实际校验和使用的校验和算法相同。可选的,实际校验和使用的校验和算法可以是累加和算法或CRC(Cyclic Redundancy Check)校验算法等。
步骤S202:分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据。
步骤S203:比较当前数据帧和目标数据帧中特定数据位的数据。具体地,在本实施例中若当前数据帧和目标数据帧中特定数据位的数据一致,则转至步骤S204;若当前数据帧和目标数据帧中特定数据位的数据不一致,则转至步骤S205。
步骤S204:解析当前数据帧。
步骤S205:继续解析上一个被解析的数据帧。
要说明的是,本实施例中的步骤S202、步骤S203、步骤S204和步骤S205的具体实施方案分别与前述实施例中的步骤S101、步骤S102、步骤S103和步骤S104的具体实施方案的相同,为了描述简洁,在此不再赘述。
在本发明实施例中,首先通过比较“当前数据帧的计算校验和”以及“当前接收到的实际校验和”是否一致的方式判断当前数据帧的准确性,进而再通过获取当前数据帧和目标数据帧中特定数据位的数据并且比较特定数据的数据是否一致,来判断当前数据帧的准确性,能够进一步提高发送侧设备与接收侧设备之间的通信可靠性。
上述实施例中虽然将各个步骤按照上述先后次序的方式进行了描述,但是本领域技术人员可以理解,为了实现本实施例的效果,不同的步骤之间不必按照这样的次序执行,其可以同时(并行)执行或以颠倒的次序执行,这些简单的变化都在本发明的保护范围之内。
基于上述方法实施例所述的数据接收处理方法,本发明实施例还提供了一种数据接收处理装置,下面结合附图对本发明实施例中的数据接收处理装置进行具体说明。
参阅附图2,图2示例性示出了本发明实施例中数据接收处理装置的主要结构。如图2所示,本发明实施例中数据接收处理装置主要包括 数据获取模块11和数据解析模块12。具体而言,数据获取模块11可以被配置成分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据;数据解析模块12可以被配置成比较所述特定数据位的数据是否一致:若一致,则解析当前数据帧;若不一致,则继续解析上一个被解析的数据帧;其中,目标数据帧是已接收到的数据帧中与当前数据帧相邻的数据帧,特定数据位是数据帧中数据调整频率小于等于预设调整频率的数据位。可选的,本发明实施例中目标数据帧的数量可以是一个或多个,特定数据位的数量可以是多个。
进一步地,在本发明实施例的一个可选实施方案中,图2所示的数据接收处理装置还可以包括数据校验模块,该数据校验模块可以被配置成判断当前数据帧的计算校验和与当前接收到的实际校验和是否一致:若一致,则启动数据获取模块11和数据解析模块12,即在判断出当前数据帧的计算校验和与实际校验和一致后,再启动数据获取模块11和数据解析模块12,使二者分别执行各自的操作。
可选的,在本实施方案中数据校验模块可以进一步被配置成利用预设的校验和算法并根据当前数据帧中数据位的数据,计算当前数据帧的计算校验和;其中,预设的校验和算法与实际校验和使用的校验和算法相同。
要说明的是,上述数据接收处理装置实施例以用于执行上述数据接收处理方法实施例,其技术原理、所解决的技术问题及产生的技术效果相似,所属技术领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述数据接收处理装置实施例的具体工作过程及有关说明,可以参考前述数据接收处理方法实施例中的对应过程,在此不再赘述。
本领域技术人员能够理解,上述数据接收处理装置还包括一些其他公知结构,例如处理器、控制器、存储器等,其中,存储器包括但不限于随机存储器、闪存、只读存储器、可编程只读存储器、易失性存储器、非易失性存储器、串行存储器、并行存储器或寄存器等,处理器包括但不限于CPLD/FPGA、DSP、ARM处理器、MIPS处理器等,为了不必要地模糊本公开的实施例,这些公知的结构未在图2中示出。
应该理解,图2中的各个模块的数量仅仅是示意性的。根据实际需要,各模块可以具有任意的数量。
本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,PC程序和PC程序产品)。这样的实现 本发明的程序可以存储在PC可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,单词“包括”不排除存在未列在权利要求中的元件或步骤。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的PC来实现。
至此,已经结合附图所示的优选实施方式描述了本发明的技术方案,但是,本领域技术人员容易理解的是,本发明的保护范围显然不局限于这些具体实施方式。在不偏离本发明的原理的前提下,本领域技术人员可以对相关技术特征作出等同的更改或替换,这些更改或替换之后的技术方案都将落入本发明的保护范围之内。

Claims (10)

  1. 一种数据接收处理方法,其特征在于,所述方法包括:
    分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据;
    比较所述特定数据位的数据是否一致:若一致,则解析所述当前数据帧;若不一致,则继续解析上一个被解析的数据帧;
    其中,所述目标数据帧是已接收到的数据帧中与所述当前数据帧相邻的数据帧,所述特定数据位是数据帧中数据调整频率小于等于预设调整频率的数据位。
  2. 根据权利要求1所述的数据接收处理方法,其特征在于,在“分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据”的步骤之前,所述方法还包括:
    判断所述当前数据帧的计算校验和与当前接收到的实际校验和是否一致,若一致,则执行“分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据”的步骤。
  3. 根据权利要求2所述的数据接收处理方法,其特征在于,在“判断所述当前数据帧的计算校验和与当前接收到的实际校验和是否一致”的步骤之前,所述方法还包括:
    利用预设的校验和算法并根据所述当前数据帧中数据位的数据,计算所述当前数据帧的计算校验和;
    其中,所述预设的校验和算法与所述实际校验和使用的校验和算法相同。
  4. 根据权利要求1至3中任一项所述的数据接收处理方法,其特征在于,所述目标数据帧的数量是一个或多个。
  5. 根据权利要求1至3中任一项所述的数据接收处理方法,其特征在于,所述特定数据位的数量是多个。
  6. 一种数据接收处理装置,其特征在于,所述装置包括:
    数据获取模块,其被配置成分别获取接收到的当前数据帧和目标数据帧中特定数据位的数据;
    数据解析模块,其被配置成比较所述特定数据位的数据是否一致:若一致,则解析所述当前数据帧;若不一致,则继续解析上一个被解析的数据帧;
    其中,所述目标数据帧是已接收到的数据帧中与所述当前数据帧相邻的数据帧,所述特定数据位是数据帧中数据调整频率小于等于预设调整频率的数据位。
  7. 根据权利要求6所述的数据接收处理装置,其特征在于,所述装置还包括:
    数据校验模块,其被配置成判断所述当前数据帧的计算校验和与当前接收到的实际校验和是否一致:若一致,则启动所述数据获取模块和所述数据解析模块。
  8. 根据权利要求7所述的数据接收处理装置,其特征在于,
    所述数据校验模块进一步被配置成利用预设的校验和算法并根据所述当前数据帧中数据位的数据,计算所述当前数据帧的计算校验和;
    其中,所述预设的校验和算法与所述实际校验和使用的校验和算法相同。
  9. 根据权利要求6至8中任一项所述的数据接收处理装置,其特征在于,所述目标数据帧的数量是一个或多个。
  10. 根据权利要求6至8中任一项所述的数据接收处理装置,其特征在于,所述特定数据位的数量是多个。
PCT/CN2020/120274 2019-10-18 2020-10-12 数据接收处理方法及装置 WO2021073463A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910995738.9A CN112688759B (zh) 2019-10-18 2019-10-18 数据接收处理方法及装置
CN201910995738.9 2019-10-18

Publications (1)

Publication Number Publication Date
WO2021073463A1 true WO2021073463A1 (zh) 2021-04-22

Family

ID=75445019

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/120274 WO2021073463A1 (zh) 2019-10-18 2020-10-12 数据接收处理方法及装置

Country Status (2)

Country Link
CN (1) CN112688759B (zh)
WO (1) WO2021073463A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949487A (zh) * 2021-10-18 2022-01-18 湖南兴天电子科技有限公司 数据通信方法、装置、通信终端及计算机可读存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204763A (zh) * 2021-04-22 2021-08-03 山东英信计算机技术有限公司 一种cpld接收数据的方法、系统、存储介质及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090199039A1 (en) * 2008-02-06 2009-08-06 Inventec Corporation File data restoring system and method of computer operating system and software thereof
CN102299767A (zh) * 2011-08-31 2011-12-28 深圳市元征软件开发有限公司 Tpms系统的无线通讯质量监控方法
CN104378549A (zh) * 2014-10-30 2015-02-25 东莞宇龙通信科技有限公司 一种抓拍方法、装置及终端
WO2016000371A1 (zh) * 2014-06-30 2016-01-07 深圳市中兴微电子技术有限公司 多通道同步方法、同步装置及系统和计算机存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4145024B2 (ja) * 2001-05-17 2008-09-03 富士通株式会社 情報再生装置、及び情報記録媒体再生システム
CN1964250B (zh) * 2006-11-23 2010-04-14 华为技术有限公司 一种数据帧类型的识别方法及装置
CN103018726B (zh) * 2012-12-10 2014-03-12 中国科学院对地观测与数字地球科学中心 一种遥感卫星信号的处理方法及设备
CN104991833B (zh) * 2015-06-15 2018-03-27 联想(北京)有限公司 一种错误检测方法及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090199039A1 (en) * 2008-02-06 2009-08-06 Inventec Corporation File data restoring system and method of computer operating system and software thereof
CN102299767A (zh) * 2011-08-31 2011-12-28 深圳市元征软件开发有限公司 Tpms系统的无线通讯质量监控方法
WO2016000371A1 (zh) * 2014-06-30 2016-01-07 深圳市中兴微电子技术有限公司 多通道同步方法、同步装置及系统和计算机存储介质
CN104378549A (zh) * 2014-10-30 2015-02-25 东莞宇龙通信科技有限公司 一种抓拍方法、装置及终端

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949487A (zh) * 2021-10-18 2022-01-18 湖南兴天电子科技有限公司 数据通信方法、装置、通信终端及计算机可读存储介质

Also Published As

Publication number Publication date
CN112688759B (zh) 2022-04-22
CN112688759A (zh) 2021-04-20

Similar Documents

Publication Publication Date Title
WO2021073463A1 (zh) 数据接收处理方法及装置
US10678672B1 (en) Security validation of software delivered as a service
CN106843957A (zh) 系统固件升级方法及装置
US11444861B2 (en) Method and apparatus for detecting traffic
CN108279910B (zh) 程序代码烧写方法、装置、计算机设备和存储介质
US10410730B1 (en) Selectively synchronizing flash memory block refreshes based in part upon memory block temperature
CN111045921A (zh) 自动化接口测试方法、装置、计算机设备及存储介质
CN113114680B (zh) 用于文件上传漏洞的检测方法和检测装置
JP2018521411A (ja) ネットワークにおけるノードの設定管理
US20220210250A1 (en) Adaptive Payload Extraction in Wireless Communications Involving Multi-Access Address Packets
CN114024884B (zh) 一种测试方法、装置、电子设备及存储介质
CN105187408A (zh) 网络攻击检测方法和设备
CN104598342A (zh) 内存的检测方法和装置
CN112380046B (zh) 计算结果校验方法、系统、装置、设备及存储介质
CN112631888A (zh) 分布式系统的故障预测方法、装置、存储介质及电子设备
CN107370634B (zh) 一种输电线路在线监测信息采集方法、装置和系统
CN116450511A (zh) 信息更新方法、装置、电子设备和计算机可读介质
US20210146972A1 (en) Method, system, and computer-readable medium comprising software code for communicating data from a transmitter to a receiver via a physical transmission medium, and related railway track circuit
CN111315026B (zh) 信道的选择方法、装置、网关及计算机可读存储介质
US20210021622A1 (en) Network traffic monitoring device
CN115129509B (zh) 一种数据传输方法、装置、介质
CN116166536A (zh) 一种测试方法、装置、电子设备及存储介质
CN115509931A (zh) 基于系统的性能测试方法、装置、电子设备及存储介质
CN110417461B (zh) 多故障点的光缆定位方法、装置及终端设备
US20230050327A1 (en) Detection Method and Apparatus, Terminal, and Storage Medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20876046

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20876046

Country of ref document: EP

Kind code of ref document: A1