CN115567939A - Data integrity detection method, device, equipment and medium - Google Patents
Data integrity detection method, device, equipment and medium Download PDFInfo
- Publication number
- CN115567939A CN115567939A CN202211163343.0A CN202211163343A CN115567939A CN 115567939 A CN115567939 A CN 115567939A CN 202211163343 A CN202211163343 A CN 202211163343A CN 115567939 A CN115567939 A CN 115567939A
- Authority
- CN
- China
- Prior art keywords
- time scale
- data
- data frame
- scale interval
- frame
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/10—Integrity
- H04W12/106—Packet or message integrity
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
Abstract
The invention discloses a data integrity detection method, a device, equipment and a medium.A demodulator receives a data frame and arranges at least one time mark information in the data frame, then calculates an average time mark interval of the whole data frame, respectively calculates adjacent time mark intervals according to adjacent time mark information of the data frame, and finally judges whether the received data frame is complete according to the average time mark interval and the adjacent time mark intervals and executes corresponding operation. The method judges the integrity of the data frame in a mode of obtaining the adjacent time scale interval by utilizing the time scale information of the data frame, avoids the problems of low reliability and difficult realization caused by verifying the integrity by utilizing the data content in the prior art, and can be applied to more scenes compared with the prior art, thereby expanding the application range of detecting the data integrity.
Description
Technical Field
The present invention relates to the field of wireless communications, and in particular, to a method, an apparatus, a device, and a medium for detecting data integrity.
Background
A demodulator is a computer hardware that translates a computer's digital signals into analog signals that can be transmitted along a common telephone line, and these analog signals can be received by another demodulator on the other end of the line and translated into a computer-understandable language. The wireless data acquisition device has wide application in various fields, the acquisition device sends acquired information through wireless signals, the demodulator transmits data to the rear end after receiving the wireless signals to complete data analysis, and various situations can occur in the data receiving and transmitting process of the demodulator to cause demodulated data loss, so that a series of problems are caused.
In the prior art, a demodulator detects whether received data is complete by using frame count information in the data, the frame count information is added when modulating traffic data and is closely related to data content, and data integrity analysis is performed by detecting the data content. However, in the process of demodulating data, there may occur errors in demodulated data such as too low signal-to-noise ratio, descrambling error, frame counting error, or failure to analyze frame counting information, and at this time, whether data is continuous and has no error code cannot be effectively ensured by the frame counting information, so that the problem of low reliability of detection by the frame counting information is caused. Therefore, how to avoid using the data content to detect the integrity of the data becomes a problem that must be considered by those skilled in the art.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a data integrity detection method, a device, equipment and a medium, wherein the integrity of a data frame is verified by utilizing time mark information, so that the problem of low reliability caused by verifying the integrity of the data frame through data content is solved.
The purpose of the invention is realized by the following technical scheme:
a data integrity detection method is applied to a demodulator, and comprises the following steps:
receiving a data frame and setting at least one time mark information in the data frame;
calculating an average time scale interval of the data frames;
respectively calculating adjacent time scale intervals of the data frames according to the time scale information;
and judging whether the data frame is complete or not according to the average time scale interval and the adjacent time scale interval, and executing corresponding operation.
Further, the step of calculating the average time scale interval of the data frame includes:
the calculation formula of the average time scale interval is as follows: Δ T = L/R b ;
Wherein Δ T is an average time scale interval of the data frame, L is a frame length of the data frame, R b Is the data transmission rate.
Further, the step of determining whether the data frame is complete through the average time scale interval and the adjacent time scale interval, and performing corresponding operations includes:
comparing the average time scale interval with each adjacent time scale interval to obtain a comparison result;
and judging whether the data frame is complete according to the comparison result, and executing corresponding operation.
Further, the step of judging whether the data frame is complete according to the comparison result and executing corresponding operation includes:
if the comparison result is that the average time scale interval is consistent with each adjacent time scale interval, judging that the data frame is complete;
and if the comparison result shows that the average time scale interval is inconsistent with at least one adjacent time scale interval, judging that the data frame is incomplete, calculating the lost data frame and accumulating all the lost data frames.
Further, the step of calculating the lost data frame includes:
the calculation formula of the lost data frame is M N =(Δt N -ΔT)/ΔT,
Where Δ T is the average time scale interval of the data frame, Δ T N Is the interval of time scale information of the Nth frame and the (N + 1) th frame of the data frame, M N Is a lost data frame.
In another aspect, the present invention further provides a data integrity detection apparatus applied to a demodulator, where the apparatus includes:
the receiving module is used for receiving a data frame and setting at least one time mark information in the data frame;
a first calculation module, configured to calculate an average time scale interval of the data frame;
the second calculation module is used for respectively calculating adjacent time scale intervals of the data frames according to the time scale information;
and the execution module is used for judging whether the data frame is complete or not through the average time scale interval and the adjacent time scale interval and executing corresponding operation.
Optionally, the first computing module is configured to:
the calculation formula of the average time scale interval is as follows: Δ T = L/R b ;
Wherein Δ T is an average time scale interval of the data frame, L is a frame length of the data frame, R b Is the data transmission rate.
Optionally, the execution module is configured to compare the average time scale interval with each of the adjacent time scale intervals respectively to obtain a comparison result;
and judging whether the data frame is complete according to the comparison result, and executing corresponding operation.
Optionally, the execution module is further configured to determine that the data frame is complete if the comparison result indicates that the average time scale interval is consistent with each of the adjacent time scale intervals;
and if the comparison result shows that the average time scale interval is inconsistent with at least one adjacent time scale interval, judging that the data frame is incomplete, calculating the lost data frame and accumulating all the lost data frames.
In another aspect, the present invention further provides a computer device, where the computer device includes a processor and a memory, where the memory stores a computer program, and the computer program is loaded and executed by the processor to implement any one of the above-mentioned data integrity detection methods.
In another aspect, the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is loaded and executed by a processor to implement any one of the above-mentioned data integrity detection methods.
The main scheme and the further selection schemes thereof can be freely combined to form a plurality of schemes which are all adopted and claimed by the invention; in the invention, the selection (each non-conflict selection) and other selections can be freely combined. The skilled person in the art can understand that there are many combinations, which are all the technical solutions to be protected by the present invention, according to the prior art and the common general knowledge after understanding the scheme of the present invention, and the technical solutions are not exhaustive herein.
The invention has the beneficial effects that:
(1) The integrity of the data frame is verified by utilizing the time mark information, so that the problem of low reliability caused by verifying the integrity of the data frame through the content of the data frame is solved.
(2) The integrity of the data frame is verified by using the frame counting information and is restricted by the demodulated data, but the time scale information is used, so that the method can be applied regardless of whether the demodulated data is correct, and the method has fewer limiting conditions, higher stability and wider application range.
(3) The method is suitable for the environment in which the integrity of the data frame cannot be accurately judged in the data content.
Drawings
Fig. 1 shows a schematic flow chart of a data integrity detection method provided by an embodiment of the present invention.
Fig. 2 is a schematic diagram illustrating that time scale information provided by the embodiment of the present invention is evenly distributed in a data frame.
Fig. 3 is a schematic diagram illustrating that the time mark information provided by the embodiment of the present invention is located in the header of the data frame.
Fig. 4 is a schematic flowchart illustrating step S140 in the data integrity detection method according to the embodiment of the present invention.
Fig. 5 is a schematic flowchart illustrating step S142 in the data integrity detection method according to the embodiment of the present invention.
Fig. 6 shows a block diagram of a data integrity detection apparatus according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In the prior art, a demodulator detects whether received data is complete by using frame count information in the data, the frame count information is added when modulating traffic data and is closely related to data content, and data integrity analysis is performed by detecting the data content. However, in the process of demodulating data, there may occur errors in demodulated data such as too low signal-to-noise ratio, descrambling error, frame counting error, or failure to analyze frame counting information, and at this time, whether data is continuous and has no error code cannot be effectively ensured by the frame counting information, so that the problem of low reliability of detection by the frame counting information is caused.
In addition, when the demodulator needs to receive some signals with undefined data formats, because the signals of the type have no defined data formats, the demodulator can only complete carrier synchronization and clock synchronization, but cannot perform data processing such as frame synchronization, descrambling and decoding, and therefore, the demodulator cannot acquire frame count information, and cannot detect the integrity of the type of demodulated data. Therefore, how to avoid using the data content to detect the integrity of the data becomes a problem that must be considered by those skilled in the art.
In order to solve the above technical problem, the present invention provides the following embodiments of a data integrity detection method, apparatus, device and medium.
Example 1
The data integrity detection method provided by the embodiment avoids the problem of low reliability caused by verifying the integrity of the data frame through the data content.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a flow of a data integrity detection method according to an embodiment of the present invention, where the method is applied to a demodulator, and the demodulator may be an external demodulator, an internal demodulator, an ISDN modem, or an ADSL modem. The data integrity detection method specifically comprises the following steps:
step S110, receiving the data frame and setting at least one timestamp information in the data frame.
It should be noted that the time stamp information may be evenly distributed in the data frame, please refer to fig. 2, and fig. 2 shows a schematic diagram that the time stamp information provided by the embodiment of the present invention is evenly distributed in the data frame. As shown, the time stamp information evenly divides the entire data frame into a plurality of small data frames. In addition, time scale information can be added to the head or tail of each frame of data, and the demodulated data is output. Referring to fig. 3, fig. 3 is a schematic diagram illustrating that time mark information provided by an embodiment of the present invention is located in a header of a data frame. As shown, the time stamp information is located at the head of the data frame, and each data frame has time stamp information corresponding thereto. In addition, the time stamp information may be added to the data frame by acquiring an accumulator count value to add the time stamp information to each point on the data frame using a pulse signal synchronized with a standard time source as a time reference. The data frame is a bearer for transmitting service data, and is mainly used for carrying the service data.
After completing all data processing such as decoding and descrambling, the demodulator finally obtains a data frame with time stamp information, wherein the data frame is demodulation data, and the purpose of verifying the integrity of the demodulation data is completed by processing the time stamp information.
And step S120, calculating the average time scale interval of the data frame.
Further, the calculation formula of the average time scale interval is as follows: Δ T = L/R b Where Δ T is the average time scale interval of the data frame, L is the frame length of the data frame in bits (bit), R b Is the data transmission rate, which has units of bits per second (bit/s).
And step S130, respectively calculating adjacent time scale intervals of the data frames according to the time scale information.
After obtaining the average time scale interval of the data frame, the demodulator extracts each time scale information in the data frame, referring again to fig. 3, where the time scale information of the first frame data frame is denoted as t 1 And time mark information of the Nth frame data frame is marked as t N And the time mark information of the N +1 th frame data frame is marked as t N+1 And so on, then the extracted time scale information is used to obtain the time scale interval of the adjacent data frames, i.e. the adjacent time scale interval, illustratively, the time scale interval of the nth frame data and the N +1 th frame data is marked as Δ t N =t N+1 -t N In this way, the adjacent time scale intervals of all data frames can be calculated, and the embodiment of the present invention is not described herein again.
Step S140, determining whether the data frame is complete through the average time scale interval and the adjacent time scale interval, and performing corresponding operations.
The demodulator is used for judging the integrity of the received data frame, and the essence of the judgment is to compare the average time scale interval with the adjacent time scale interval, judge whether the average time scale interval meets the requirement, and execute corresponding operation according to the judgment result, wherein the operation can be sending the complete information of the data frame, sending the data frame to the next device or executing the next operation.
Referring to fig. 4 on the basis of fig. 1, fig. 4 is a schematic flowchart illustrating a step S140 in the data integrity detection method according to the embodiment of the present invention. As described in detail below with respect to step S140, step S140 may include:
step S141, comparing the average time scale interval with each adjacent time scale interval to obtain a comparison result.
And S142, judging whether the data frame is complete according to the comparison result, and executing corresponding operation.
After obtaining the average time scale interval and the plurality of adjacent time scale intervals, the average time scale interval Δ T is separated from the first adjacent time scale interval Δ T 1 Comparing the average time scale interval Deltat with the next adjacent time scale interval Deltat after the comparison is finished 2 Compare, and so on until the last adjacent time scale interval Δ t N And comparing, namely finishing the whole process to obtain a comparison result, wherein the comparison result is divided into two conditions, wherein the average time scale interval is consistent with each adjacent time scale interval in one condition, and the average time scale interval indicates that no error occurs in the received data frame, so that the safety of the data frame is guaranteed. There is also a case where the average time scale interval does not coincide with at least one adjacent time scale interval, where the data frame is not complete and a loss of data occurs during transmission, making the data discontinuous.
Referring to fig. 5, fig. 5 is a flowchart illustrating the step S142 in the data integrity detection method according to the embodiment of the present invention.
And step S142-a, if the comparison result is that the average time scale interval is consistent with each adjacent time scale interval, judging that the data frame is complete.
And if the comparison result is that the average time scale interval is inconsistent with at least one adjacent time scale interval, judging that the data frame is incomplete, calculating the lost data frame and accumulating all the lost data frames.
After the demodulator obtains the comparison result of the data, the comparison result is evaluated, the data integrity is represented by the fact that the average time scale interval is completely consistent with each adjacent time scale interval, the whole data frame is a complete and continuous data frame, however, as long as one adjacent time scale interval is not matched with the average time scale interval, the demodulator considers that the data frame is incomplete and lost, at the moment, the data frame can count how many adjacent time scale intervals are not matched with the average time scale interval, the data frames which are not matched are accumulated, the accumulated data are sent to a worker to see, and therefore the number of the lost data frames in the whole data frame can be accurately counted.
The formula of the lost data frame is M N =(Δt N -ΔT)/ΔT,
Where Δ T is the average time scale interval of the data frame, Δ T N Is the interval of time stamp information of the Nth frame and the (N + 1) th frame of the data frame, M N Is a lost data frame. And cumulatively adding the number of all the lost data frames to obtain the total number of the lost data frames of the whole data.
The invention discloses a data integrity detection method, which comprises the steps of firstly receiving a data frame with at least one piece of time mark information by a demodulator, then calculating the average time mark interval of the whole data frame, simultaneously respectively calculating adjacent time mark intervals according to the adjacent time mark information of the data frame, finally judging whether the received data frame is complete according to the average time mark interval and the adjacent time mark intervals, and executing corresponding operation. The method judges the integrity of the data frame by using the time mark information of the data frame to obtain the adjacent time mark intervals, avoids the problem of low reliability caused by verifying the integrity by using the data content in the prior art, can be suitable for more scenes, and enlarges the application range of detecting the integrity of the data.
Example 2
Referring to fig. 6, fig. 6 is a block diagram illustrating a structure of a data integrity detection apparatus provided by an embodiment of the present invention, where the apparatus is applied to a demodulator, and the apparatus includes:
a receiving module 101, configured to receive a data frame and set at least one time stamp information in the data frame;
a first calculating module 102, configured to calculate an average time scale interval of the data frame;
a second calculating module 103, configured to calculate adjacent time scale intervals of the data frames according to the time scale information;
and the execution module 104 is configured to determine whether the data frame is complete through the average time scale interval and the adjacent time scale interval, and execute a corresponding operation.
In one embodiment, the execution module 104 is further configured to compare the average time scale interval with each adjacent time scale interval to obtain a comparison result;
and judging whether the data frame is complete according to the comparison result, and executing corresponding operation.
As an embodiment, the execution module 104 is further configured to determine that the data frame is complete if the comparison result is that the average time scale interval is consistent with each of the adjacent time scale intervals;
and if the comparison result is that the average time scale interval is inconsistent with at least one adjacent time scale interval, judging that the data frame is incomplete, calculating the lost data frame and accumulating all the lost data frames.
The data integrity detection device provided by the embodiment of the invention firstly receives a data frame with at least one piece of time scale information by a demodulator, then calculates the average time scale interval of the whole data frame, simultaneously respectively calculates the adjacent time scale intervals according to the adjacent time scale information of the data frame, finally judges whether the received data frame is complete according to the average time scale interval and the adjacent time scale intervals, and executes corresponding operation. The method judges the integrity of the data frame by using the time mark information of the data frame to obtain the adjacent time mark intervals, avoids the problem of low reliability caused by verifying the integrity by using the data content in the prior art, can be suitable for more scenes, and enlarges the application range of detecting the integrity of the data.
Example 3
The preferred embodiment provides a computer device, which can implement the steps in any embodiment of the data integrity detection method provided in the embodiments of the present application, and therefore, the beneficial effects of the data integrity detection method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
Example 4
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps of any embodiment of the data integrity detection method provided in the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any data integrity detection method provided in the embodiments of the present invention, beneficial effects that can be achieved by any data integrity detection method provided in the embodiments of the present invention may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (8)
1. A data integrity detection method, applied to a demodulator, the method comprising:
receiving a data frame and setting at least one time mark information in the data frame;
calculating an average time scale interval of the data frames;
respectively calculating adjacent time scale intervals of the data frames according to the time scale information;
and judging whether the data frame is complete or not according to the average time scale interval and the adjacent time scale interval, and executing corresponding operation.
2. The data integrity detection method of claim 1, wherein said step of calculating an average time scale interval for said data frames comprises:
the calculation formula of the average time scale interval is as follows: Δ T = L/R b ;
Wherein Δ T is an average time scale interval of the data frame, L is a frame length of the data frame, R b Is the data transmission rate.
3. The data integrity checking method of claim 1, wherein the step of determining whether the data frame is complete through the average time scale interval and the adjacent time scale interval and performing corresponding operations comprises:
comparing the average time scale interval with each adjacent time scale interval to obtain a comparison result;
and judging whether the data frame is complete according to the comparison result, and executing corresponding operation.
4. The method as claimed in claim 3, wherein the step of determining whether the data frame is complete according to the comparison result and performing the corresponding operation comprises:
if the comparison result is that the average time scale interval is consistent with each adjacent time scale interval, judging that the data frame is complete;
and if the comparison result shows that the average time scale interval is inconsistent with at least one adjacent time scale interval, judging that the data frame is incomplete, calculating the lost data frame and accumulating all the lost data frames.
5. The data integrity detection method of claim 1, wherein the step of calculating the missing data frame comprises:
the calculation formula of the lost data frame is M N =(Δt N -ΔT)/ΔT,
Where Δ T is the average time scale interval of the data frames, Δ T N Is the dataInterval of time scale information of Nth frame and (N + 1) th frame of frame, M N Is a lost data frame.
6. A data integrity detection apparatus, for use in a demodulator, the apparatus comprising:
the receiving module is used for receiving a data frame and setting at least one time mark information in the data frame;
a first calculation module, configured to calculate an average time scale interval of the data frame;
the second calculation module is used for respectively calculating adjacent time scale intervals of the data frames according to the time scale information;
and the execution module is used for judging whether the data frame is complete or not through the average time scale interval and the adjacent time scale interval and executing corresponding operation.
7. A computer device, characterized in that the computer device comprises a processor and a memory, in which a computer program is stored, which computer program is loaded and executed by the processor to implement the data integrity detection method as claimed in any one of claims 1-5.
8. A computer-readable storage medium, in which a computer program is stored, which is loaded and executed by a processor to implement the data integrity detection method as claimed in any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211163343.0A CN115567939A (en) | 2022-09-23 | 2022-09-23 | Data integrity detection method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211163343.0A CN115567939A (en) | 2022-09-23 | 2022-09-23 | Data integrity detection method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115567939A true CN115567939A (en) | 2023-01-03 |
Family
ID=84740582
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211163343.0A Pending CN115567939A (en) | 2022-09-23 | 2022-09-23 | Data integrity detection method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115567939A (en) |
-
2022
- 2022-09-23 CN CN202211163343.0A patent/CN115567939A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2013511205A5 (en) | ||
US7720109B2 (en) | One-way delay time estimation method and apparatus and clock synchronization method and apparatus using the same | |
CN107070743A (en) | A kind of CAN load factor detection method and device | |
US5687200A (en) | System for synchronizing distorted data in a data communication system | |
CN106559286A (en) | A kind of error-code testing method and system based on CAN | |
CN105281883A (en) | Multi-channel synchronization method, synchronization device and system | |
CN108390752A (en) | Signal acceptance method | |
CN112422250A (en) | Method and system for multi-reference signal joint measurement time offset | |
US20110016232A1 (en) | Time stamping apparatus and method for network timing synchronization | |
CN115567939A (en) | Data integrity detection method, device, equipment and medium | |
CN101582738B (en) | Device and method for measuring frame error rate in transmission link | |
US10432392B1 (en) | Frame synchronization method, processor, and communication apparatus | |
CN101938332A (en) | Method and device for synchronizing blocks and frames | |
KR100839691B1 (en) | Method and system for tone detection | |
JP4331367B2 (en) | Frame synchronization apparatus and frame synchronization method | |
US8214722B2 (en) | Method and system for signal error determination and correction in a flexray communication system | |
CN115441994A (en) | Method for correcting channel coding of high-speed airborne aviation bus | |
CN112019318B (en) | Method for improving communication reliability of equipment | |
CN116915367B (en) | Data detection method, storage medium and electronic device | |
CN113965309B (en) | Optimal frame head locking method in frame synchronizer | |
US11581907B2 (en) | System and method for reception of wireless local area network packets with bit errors | |
CN112436911B (en) | Channel state detection device for data chain | |
CN102904852B (en) | The synchronous method of the opposing bursty interference of a kind of ofdm system and device | |
JP7182470B2 (en) | Message processing device and message processing method | |
US7468987B1 (en) | Method and apparatus for detecting a DS3 frame format |
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 |