Data processing method, device, equipment and medium
By using output phase and prediction correction separation technology in the Kalman filtering algorithm, the input data delay and loss problems are solved, and high-quality and efficient output data processing is achieved.
Patent Information
- Application Number
- CN202411379626.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-09-30
AI Technical Summary
The existing Kalman filtering algorithm cannot effectively process the delay fluctuations and loss of input data when processing network transmission instability and sensor data processing time-consuming, resulting in low quality and low efficiency of output data.
By obtaining the input frequency, number of frames of the input data, and the arrival time of each input frame, the output phase is determined, and the Kalman filtering start time of each input frame is determined according to the delay time indicated by the output phase. Using prediction correction separation, according to the input frequency of the input data and the arrival time of each input frame, it is determined to predict or correct each input frame at the Kalman filtering start time of each input frame, and then determine the corresponding target of each input frame. Output frames.
It is realized that when there are fluctuations or frame drops in the arrival time of the input frame, it is ensured that Kalman filtering outputs the target output frame at a fixed output frequency, improving the quality and efficiency of the output data.
Smart Images

Figure CN118890031B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and more specifically, to a data processing method, apparatus, device and medium. Background Art
[0002] In the field of intelligent transportation technology, vehicle-road collaboration is the mainstream development direction. The roadside perception system needs to fuse the input data of the sensor, track the trajectory of the perceived object, and output the trajectory of the perceived object at a fixed frequency. In the process of trajectory tracking, data processing is performed through the Kalman filter algorithm.
[0003] At present, the trajectory tracking method based on the Kalman filter algorithm requires input data with a fixed frequency input. When the input data arrives, the Kalman filter calculation starts immediately to obtain a fixed output. However, due to the instability of network transmission or the non-fixed time consumption of the sensor to process the raw data, the sensor's collected data has an unfixed delay, and even data loss. When the input data delay fluctuates or the input data is lost during the Kalman filter, the input data cannot arrive at equal intervals during the Kalman filter. At this time, the Kalman filter algorithm cannot obtain a fixed frequency output.
[0004] The existing Kalman filter algorithm assumes that the input data is an ideal fixed frequency. The way of outputting data using the Kalman filter algorithm does not take into account the situation of input data loss or lag, which has the disadvantage of low output data quality. In addition, some existing Kalman filter algorithms use complex neural network algorithms to predict and complete the lost data, and then use the Kalman filter algorithm to output the data, which has a large amount of calculation and the disadvantage of low output data efficiency.
[0005] Therefore, the existing Kalman filter algorithm has certain limitations. How to improve the Kalman filter algorithm to improve the quality and output efficiency of the output data is an urgent problem to be solved. Summary of the invention
[0006] The purpose of this application is to provide a data processing method, device, equipment and medium to address the practical needs of the prior art, which has certain limitations in the existing Mann filter algorithm.
[0007] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0008] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising: obtaining an input frequency of input data, a number of frames of input data, and an arrival time of each input frame in the input data;
[0009] determining an output phase according to an input frequency of the input data, a number of frames of the input data, and an arrival time of each input frame in the input data;
[0010] Determining a Kalman filter start time for each input frame according to the output phase;
[0011] According to the arrival time of each input frame, the input frequency of the input data and the Kalman filter start time of each input frame, the target output frame corresponding to each input frame is determined and output, wherein the target output frame is a predicted frame or a corrected frame.
[0012] As an optional implementation manner, determining the output phase according to the input frequency of the input data, the number of frames of the input data, and the arrival time of each input frame in the input data includes:
[0013] Determining an input phase of each input frame according to an input frequency of the input data and an arrival time of each input frame in the input data;
[0014] Sorting the input phases of the input frames to obtain a target sequence, and determining a target frame number according to a preset filtering threshold and the number of frames of the input data;
[0015] The output phase is determined according to the target sequence and the target frame number.
[0016] As an optional implementation manner, determining the input phase of each input frame according to the input frequency of the input data and the arrival time of each input frame in the input data includes:
[0017] Determining a period of the input data according to an input frequency of the input data;
[0018] Determine a reference time origin according to the arrival time of the first input frame among the arrival times of the input frames and the period of the input data;
[0019] Determine the time origin of each input frame according to the reference time origin and the period of the input data;
[0020] The input phase of each input frame is determined according to the arrival time of each input frame and the time origin of each input frame.
[0021] As an optional implementation, determining the Kalman filter start time of each input frame according to the output phase includes:
[0022] The sum of the time origin of the input frame and the output phase is used as the Kalman filter start time of the input frame.
[0023] As an optional implementation, determining and outputting a target output frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of the input data, and the Kalman filter start time of each input frame includes:
[0024] Determine a standby output frame corresponding to a previous input frame of the current input frame, wherein the standby output frame corresponding to the previous input frame is a predicted frame corresponding to the previous input frame or a corrected frame corresponding to the previous input frame;
[0025] Predicting a predicted frame corresponding to a current input frame according to the stand-by output frame of the previous input frame;
[0026] According to the arrival time of the current input frame, the Kalman filter start time of the current input frame and the predicted frame corresponding to the current input frame, a target output frame corresponding to the current input frame is determined and output.
[0027] As an optional implementation, determining and outputting a target output frame corresponding to the current input frame according to the arrival time of the current input frame, the Kalman filter start time of the current input frame, and the predicted frame corresponding to the current input frame includes:
[0028] Determine whether the current input frame has arrived in timeout according to the arrival time of the current input frame and the Kalman filter start time of the current input frame;
[0029] If not, correcting the current input frame to obtain a corrected frame corresponding to the current input frame, and using the corrected frame corresponding to the current input frame as a target output frame corresponding to the current input frame;
[0030] Otherwise, the predicted frame corresponding to the current input frame is used as the target output frame corresponding to the current input frame.
[0031] As an optional implementation, the step of determining the standby output frame corresponding to the previous input frame of the current input frame includes:
[0032] Determine the arrival time of the previous input frame of the current input frame, and determine whether the previous input frame has timed out according to the arrival time of the previous input frame and the Kalman filter start time of the previous input frame;
[0033] If the previous input frame arrives with a timeout, and the arrival time of the previous input frame is not later than the Kalman filter start time of the current input frame, then, according to the previous input frame, a correction frame corresponding to the previous input frame is obtained by correction, and the correction frame corresponding to the previous input frame is used as a standby output frame corresponding to the previous input frame;
[0034] If the last input frame arrives at a timeout, and the arrival time of the last input frame is later than the Kalman filter start time of the current input frame, the predicted frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame;
[0035] If the last input frame arrives on time, the corrected frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame.
[0036] In a second aspect, an embodiment of the present application provides a data processing device, the device comprising:
[0037] An acquisition module, used to acquire the input frequency of input data, the number of frames of input data, and the arrival time of each input frame in the input data;
[0038] A determination module, configured to determine an output phase according to an input frequency of the input data, a number of frames of the input data, and an arrival time of each input frame in the input data;
[0039] The determination module is further used to determine the Kalman filter start time of each input frame according to the output phase;
[0040] The determination module is also used to determine and output the target output frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of the input data and the Kalman filter start time of each input frame, wherein the target output frame is a predicted frame or a corrected frame.
[0041] As an optional implementation manner, the determining module is specifically used for:
[0042] Determining an input phase of each input frame according to an input frequency of the input data and an arrival time of each input frame in the input data;
[0043] Sorting the input phases of the input frames to obtain a target sequence, and determining a target frame number according to a preset filtering threshold and the number of frames of the input data;
[0044] The output phase is determined according to the target sequence and the target frame number.
[0045] As an optional implementation manner, the determining module is specifically used for:
[0046] Determining a period of the input data according to an input frequency of the input data;
[0047] Determine a reference time origin according to the arrival time of the first input frame among the arrival times of the input frames and the period of the input data;
[0048] Determine the time origin of each input frame according to the reference time origin and the period of the input data;
[0049] The input phase of each input frame is determined according to the arrival time of each input frame and the time origin of each input frame.
[0050] As an optional implementation manner, the determining module is specifically used for:
[0051] The sum of the time origin of the input frame and the output phase is used as the Kalman filter start time of the input frame.
[0052] As an optional implementation manner, the determining module is specifically used for:
[0053] Determine a standby output frame corresponding to a previous input frame of the current input frame, wherein the standby output frame corresponding to the previous input frame is a predicted frame corresponding to the previous input frame or a corrected frame corresponding to the previous input frame;
[0054] Predicting a predicted frame corresponding to a current input frame according to the stand-by output frame of the previous input frame;
[0055] According to the arrival time of the current input frame, the Kalman filter start time of the current input frame and the predicted frame corresponding to the current input frame, a target output frame corresponding to the current input frame is determined and output.
[0056] As an optional implementation manner, the determining module is specifically used for:
[0057] Determine whether the current input frame has timed out, and if not, correct the current input frame to obtain a corrected frame corresponding to the current input frame, and use the corrected frame corresponding to the current input frame as the target output frame corresponding to the current input frame;
[0058] Otherwise, the predicted frame corresponding to the current input frame is used as the target output frame corresponding to the current input frame.
[0059] As an optional implementation manner, the determining module is specifically used for:
[0060] Determine the arrival time of the previous input frame of the current input frame according to the arrival time of the current input frame and the input frequency of the input data;
[0061] Determining whether the last input frame has arrived in timeout according to the arrival time of the last input frame and the Kalman filter start time of the last input frame;
[0062] If the previous input frame arrives with a timeout, and the arrival time of the previous input frame is not later than the Kalman filter start time of the current input frame, then, according to the previous input frame, a correction frame corresponding to the previous input frame is obtained by correction, and the correction frame corresponding to the previous input frame is used as a standby output frame corresponding to the previous input frame;
[0063] If the last input frame arrives at a timeout, and the arrival time of the last input frame is later than the Kalman filter start time of the current input frame, the predicted frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame;
[0064] If the last input frame arrives on time, the corrected frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame.
[0065] In a third aspect, an embodiment of the present application provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of the data processing method described in the first aspect above.
[0066] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method described in the first aspect are executed.
[0067] The beneficial effects of this application are:
[0068] The present application provides a data processing method, device, equipment and medium, through phase alignment during Kalman filtering, according to the input frequency, number of frames and arrival time of each input frame of the acquired input data, the output phase is determined, and the Kalman filter start time of each input frame is determined according to the delay time indicated by the output phase. According to the input frequency of the input data, the output period is determined, and through prediction and correction separation during Kalman filtering, according to the arrival time, output period and Kalman filter start time of each input frame, each input frame is predicted or predicted and corrected at the Kalman filter start time of each input frame, and then the target output frame corresponding to each input frame is determined as a predicted frame or a corrected frame, and the target output frame corresponding to each input frame is output at the Kalman filter start time of each input frame. The Kalman filter outputs the target output frame corresponding to each input frame at a fixed output frequency, and the phase alignment and prediction and correction separation during Kalman filtering make it possible to output the target output frame corresponding to the input frame when the input frame arrives overtime or even loses the frame, thereby improving the quality and output efficiency of the target output frame. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;
[0071] Figure 2 A schematic diagram of each input frame of the Kalman filter and the output frame corresponding to each input frame of the data processing method provided in an embodiment of the present application;
[0072] Figure 3 A schematic diagram of a flow chart of determining an output phase of a data processing method provided in an embodiment of the present application;
[0073] Figure 4 A schematic diagram of a flow chart of determining an input phase of each input frame in a data processing method provided in an embodiment of the present application;
[0074] Figure 5 A schematic diagram of a flow chart of determining and outputting a target output frame corresponding to each input frame in a data processing method provided in an embodiment of the present application;
[0075] Figure 6 A schematic diagram of a flow chart of determining and outputting a target output frame corresponding to a current input frame according to a data processing method provided in an embodiment of the present application;
[0076] Figure 7 A schematic diagram of a flow chart of determining a standby output frame corresponding to a previous input frame of a current input frame according to a data processing method provided in an embodiment of the present application;
[0077] Figure 8 A module structure diagram of a data processing device provided in an embodiment of the present application;
[0078] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0080] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0081] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0082] In the field of data processing, data processing through the Kalman filter algorithm requires input data with a fixed frequency input, and the Kalman filter calculation starts immediately when the input data arrives to obtain a fixed output. The existing Kalman filter algorithm assumes that the input data is an ideal fixed frequency, does not consider the situation where the input data is lost or delayed, and the output data quality is low. Another part of the existing Kalman filter algorithm uses a complex neural network algorithm to predict and complete the lost data, and then uses the Kalman filter algorithm to output the data, which has a large amount of calculation and low output data efficiency.
[0083] Based on the above problems, the embodiment of the present application proposes a data processing method. When performing Kalman filtering on each input frame in the input data, the target output frame of each input frame is fixedly output through phase alignment, prediction and correction separation and delay correction, so that the data can be processed when the arrival time of each input frame in the input data fluctuates or even loses frames, thereby improving the quality and output efficiency of the target output frame. Among them, phase alignment is to determine the output phase according to the input data, and to determine the Kalman filter start time of each input frame according to the output phase to achieve fixed frequency output. Prediction and correction separation is to separate the continuous prediction and correction steps in the Kalman filtering process into independent prediction steps and correction steps. When the input frame is lost or arrives overtime, only the prediction step is executed, and the predicted frame is output as the target output frame. When the input frame arrives on time, the prediction step and correction step are executed, and the correction frame is output as the target output frame. Delay correction is to delay the correction step of the current input frame to the next frame correction of the current input frame when the current input frame arrives overtime to eliminate the accumulated error.
[0084] Figure 1 The flowchart of the data processing method provided in the embodiment of the present application is shown in FIG. 1 , and the execution subject of the method can be any computer device with computing processing capabilities. Figure 1 As shown, the method includes:
[0085] S101 . Obtain an input frequency of input data, a frame number of input data, and an arrival time of each input frame in the input data.
[0086] Optionally, the sensor collects data within a period of time, processes the data within the period of time, and uses the processed data as input data for Kalman filtering, wherein the input data includes multiple input frames. Each input frame in the input data is input into the Kalman filtering algorithm at a fixed input frequency. Due to the instability of network transmission and the non-fixed time consumption of sensor pre-processing data, the arrival time intervals of each input frame are not equal.
[0087] Read the input data into the Kalman filter algorithm and obtain the input frequency of the input data , Frames N and the arrival time of each input frame , where the input frequency With output frequency Same, input cycle With input frequency Inversely proportional to the output cycle With output frequency Inversely proportional to the input period With output cycle For example, Figure 2Schematic diagram of each input frame of the Kalman filter and the output frame corresponding to each input frame of the data processing method provided in the embodiment of the present application, the input frequency With output frequency All are 10Hz, such as Figure 2 As shown, the number of frames of input data , the arrival time of the first input frame is 100 milliseconds, the arrival time of the second input frame 213 milliseconds, the third input frame is lost, and the arrival time of the third input frame is Can be regarded as , the arrival time of the 4th input frame 412 milliseconds, the arrival time of the 5th input frame is 507 milliseconds.
[0088] S102 : Determine an output phase according to an input frequency of the input data, a number of frames of the input data, and an arrival time of each input frame in the input data.
[0089] Optionally, based on the input frequency of the input data , Frames N and the arrival time of each input frame , the output phase is determined by phase alignment during Kalman filtering Among them, the output phase Used to indicate the delay time. Figure 2 , output phase , the delay time is 10 milliseconds.
[0090] S103: Determine the Kalman filter start time of each input frame according to the output phase.
[0091] Optionally, depending on the output phase The indicated delay time is obtained by phase alignment during Kalman filtering to obtain the Kalman filter start time of each input frame Among them, the Kalman filter start time of each input frame is The time interval is fixed.
[0092] For example, refer to Figure 2 , Kalman filter start time of the first input frame 110 milliseconds, the Kalman filter start time of the second input frame 210 milliseconds, the Kalman filter start time of the third input frame 310 milliseconds, the Kalman filter start time of the 4th input frame 410 milliseconds, the Kalman filter start time for the 5th input frame The Kalman filter start time for each input frame is 510 milliseconds. The time interval is fixed at 100 milliseconds.
[0093] S104, determining and outputting a target output frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of the input data, and the Kalman filter start time of each input frame, wherein the target output frame is a predicted frame or a corrected frame.
[0094] Optionally, based on the input frequency of the input data Same output frequency , determine the output cycle . Based on the arrival time of each input frame , output cycle And the Kalman filter start time of each input frame , by separating prediction and correction during Kalman filtering, the prediction and correction are separated into two independent steps, and the Kalman filtering start time of each input frame is determined Each input frame is predicted or predicted and corrected, and the target output frame corresponding to each input frame is determined to be a predicted frame or a corrected frame, and the Kalman filter start time of each input frame is determined. Output the target output frames corresponding to each input frame respectively. If, at the start time of the Kalman filter of an input frame, an input frame is predicted and corrected, and a predicted frame and a corrected frame corresponding to the input frame are obtained, the corrected frame is used as the target output frame corresponding to the input frame. If, at the start time of the Kalman filter of an input frame, an input frame is only predicted but not corrected, and only a predicted frame corresponding to the input frame is obtained, the predicted frame is used as the target output frame corresponding to the input frame.
[0095] For example, continue to refer to Figure 2 , the Kalman filter start time at the first input frame That is, at 110 milliseconds, the first input frame is predicted and corrected, and the corrected frame corresponding to the first input frame is output as the target output frame corresponding to the first input frame. That is, at 210 milliseconds, only the second input frame is predicted, and the predicted frame corresponding to the second input frame is output as the target output frame corresponding to the second input frame. Accordingly, the target output frame corresponding to the third input frame is the predicted frame corresponding to the third input frame, the target output frame corresponding to the fourth input frame is the predicted frame corresponding to the fourth input frame, and the target output frame corresponding to the fifth input frame is the corrected frame corresponding to the fifth input frame.
[0096] In this embodiment, the output phase is determined according to the input frequency, number of frames and arrival time of each input frame of the acquired input data through phase alignment during Kalman filtering, and the Kalman filter start time of each input frame is determined according to the delay time indicated by the output phase. The output period is determined according to the input frequency of the input data, and the prediction and correction separation during Kalman filtering is performed according to the arrival time, output period and Kalman filter start time of each input frame to predict or predict and correct each input frame at the Kalman filter start time of each input frame, thereby determining the target output frame corresponding to each input frame as a prediction frame or a correction frame, and outputting the target output frame corresponding to each input frame at the Kalman filter start time of each input frame. The Kalman filter outputs the target output frame corresponding to each input frame at a fixed output frequency, and the phase alignment and prediction and correction separation during Kalman filtering make it possible to output the target output frame corresponding to the input frame when the input frame arrives overtime or even loses the frame, thereby improving the quality and output efficiency of the target output frame.
[0097] The following describes in detail a process of determining an output phase according to an input frequency of input data, a number of frames of input data, and an arrival time of each input frame in the input data.
[0098] Figure 3 A flow chart of determining the output phase of the data processing method provided in the embodiment of the present application is shown in FIG. Figure 3 As shown, the step of determining the output phase in the above step S102 according to the input frequency of the input data, the number of frames of the input data, and the arrival time of each input frame in the input data includes:
[0099] S301 . Determine an input phase of each input frame according to an input frequency of input data and an arrival time of each input frame in the input data.
[0100] Optionally, based on the input frequency of the input data and the arrival time of each input frame , determine the time origin of each input frame , the time origin of each input frame It can represent the ideal arrival time of each input frame under ideal conditions, according to the actual arrival time of each input frame The input phase of each input frame is calculated by comparing the ideal arrival time of each input frame .
[0101] S302 , sorting the input phases of each input frame to obtain a target sequence, and determining a target frame number according to a preset filtering threshold and the number of frames of input data.
[0102] Optionally, the input phase of each input frame Sort in descending order to get the sorted target sequence { , , …, }. According to the sensor's perception accuracy, a filtering threshold is pre-set A , filter threshold A is between the interval [0,1). Among them, the filtering threshold A The value can be adjusted according to sensors with different perception accuracy. The higher the perception accuracy of the sensor, the smaller the fluctuation of the input data. The preset filtering threshold A The smaller the value.
[0103] According to the preset filtering threshold A And the number of frames of input data N , determine the target frame number based on the following formula M :
[0104]
[0105] in, M is the target frame number, , A is the preset filtering threshold, , N is the number of frames of input data, Indicates the filtering threshold A The number of frames of input data N The product of is rounded down.
[0106] S303: Determine an output phase according to a target sequence and a target frame number.
[0107] Optionally, replace the target sequence { , , …, }Target frame number M The input phase corresponding to the frame As the output phase ,Right now For example, if the target frame number M= 2, then the target sequence { , , …, }Target frame number M The input phase corresponding to the frame As the output phase .
[0108] In this embodiment, the ideal arrival time of each input frame under an ideal state is determined according to the input frequency of the input data and the arrival time of each input frame, and the input phase of each input frame is determined according to the arrival time of each input frame and the ideal arrival time of each input frame. The input phases of each input frame are sorted in order from large to small to obtain a target sequence, and the target frame number is obtained according to a preset filtering threshold and the number of frames of the input data, and then the input phase corresponding to the target frame number in the target sequence is used as the output phase according to the target frame number and the sorted target sequence. The output phase is determined according to the preset filtering threshold and the sorted target sequence, so that the output phase is more adapted to the fluctuation of the input data.
[0109] The following describes in detail a process of determining the input phase of each input frame according to the input frequency of the input data and the arrival time of each input frame in the input data.
[0110] Figure 4 A flow chart of determining the input phase of each input frame of the data processing method provided in the embodiment of the present application is shown as follows: Figure 4 As shown, the step of determining the input phase of each input frame according to the input frequency of the input data and the arrival time of each input frame in the input data in the above step S301 includes:
[0111] S401. Determine a period of input data according to an input frequency of the input data.
[0112] Optionally, the input frequency of the input data The cycle of the input data Inversely proportional to the input frequency of the input data , the period of input data is determined based on the following formula :
[0113]
[0114] in, is the period of input data, is the frequency of the input data.
[0115] Reference Figure 2 , the input frequency of the input data The input cycle of the input data is 10Hz. is 0.1 seconds, or 100 milliseconds.
[0116] S402: Determine a reference time origin according to the arrival time of the first input frame among the arrival times of the input frames and the cycle of the input data.
[0117] Optionally, the arrival time of each input frame The arrival time of the first input frame is the arrival time of the first input frame. , the arrival time of the first input frame Divide by the period of the input data , and get the remainder , based on the arrival time of the first input frame , input data cycle and remainder , determine the reference time origin Z based on the following formula:
[0118]
[0119] Among them, Z is the reference time origin, indicating the time origin of the 0th input frame, is the arrival time of the first input frame, is the remainder, is the period of the input data.
[0120] S403: Determine the time origin of each input frame according to the reference time origin and the period of the input data.
[0121] Optionally, based on the input frame number of each input frame , input data cycle And the base time origin , determine the time origin of each input frame based on the following formula :
[0122] ( )
[0123] in, is the input frame number of each input frame, is the base time origin, is the period of the input data.
[0124] S404: Determine the input phase of each input frame according to the arrival time of each input frame and the time origin of each input frame.
[0125] Optionally, the arrival time of each input frame The time origin of each input frame The difference between the two is taken as the input phase of each input frame. , that is, the actual arrival time of each input frame The difference between the ideal arrival time of each input frame is taken as the input phase of each input frame. Specifically, according to the arrival time of each input frame and the time origin of each input frame , the input phase of each input frame is determined based on the following formula :
[0126]
[0127] in, is the input phase of each input frame, is the arrival time of each input frame, is the time origin of each input frame, is the base time origin, is the input frame number of each input frame, and , is the period of the input data.
[0128] In this embodiment, the input frequency of the input data is inversely proportional to the period of the input data. The period of the input data is determined according to the input frequency of the input data, and the reference time origin is determined according to the arrival time of the first input frame, the period of the input data, and the remainder obtained by dividing the arrival time of the first input frame by the period of the input data. The time origin of each input frame is determined according to the input frame number of each input frame, the period of the input data, and the reference time origin, and the difference between the arrival time of each input frame and the time origin of each input frame is used as the input phase of each input frame. The input phase of each input frame in the input data is accurately determined, so that the output phase can be determined according to the input phase of each input frame.
[0129] As an optional implementation, the step of determining the Kalman filter start time of each input frame according to the output phase in the above step S103 includes:
[0130] The sum of the time origin of the input frame and the output phase is used as the Kalman filter start time of the input frame.
[0131] Optionally, the time origin of each input frame represents the ideal arrival time of each input frame. In an ideal state, the ideal arrival time of each input frame is equal to the ideal Kalman filter start time of each input frame. Through phase alignment during Kalman filtering, according to the output phase The indicated delay time delays the ideal Kalman filter start time of each input frame to obtain the Kalman filter start time of each input frame in the actual state That is, the Kalman filter start time of each input frame is determined based on the following formula: :
[0132]
[0133] in, is the Kalman filter start time for each input frame, is the time origin of each input frame, is the output phase, is the base time origin, is the input frame number of each input frame, , is the period of input data, For the target sequence { , , …, }Target frame number M The input phase corresponding to the frame.
[0134] In this embodiment, by aligning the phase during Kalman filtering, the ideal Kalman filter start time of the input frame is delayed according to the delay time indicated by the output phase, and the Kalman filter start time of the input frame in the actual state is obtained. Among them, the time origin of the input frame represents the ideal arrival time of the input frame, and the ideal arrival time of the input frame in the ideal state is equivalent to the ideal start filtering time of the input frame. By taking the sum of the time origin of the input frame and the output phase as the Kalman filter start time of the input frame, the Kalman filter start time of each input frame is obtained by delaying based on the input phase and the time origin of each input frame.
[0135] The following describes in detail the process of determining and outputting a target output frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of input data, and the Kalman filter start time of each input frame.
[0136] Figure 5 A flow chart of determining and outputting a target output frame corresponding to each input frame in a data processing method provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the step of determining and outputting the target output frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of the input data and the Kalman filter start time of each input frame in the above step S104 includes:
[0137] S501 , determining a standby output frame corresponding to a previous input frame of a current input frame, wherein the standby output frame corresponding to the previous input frame is a predicted frame corresponding to the previous input frame or a corrected frame corresponding to the previous input frame.
[0138] Optionally, assume that the current input frame is Input frame, the previous input frame of the current input frame is Input frame, the Kalman filter start time of the previous input frame of the current input frame is Kalman filter start time of input frame Through prediction correction separation and delay correction during Kalman filtering, a standby output frame corresponding to the previous input frame of the current input frame is determined, wherein the standby output frame corresponding to the previous input frame is a prediction frame corresponding to the previous input frame or a correction frame corresponding to the previous input frame.
[0139] Specifically, if the Kalman filter start time of the previous input frame , the previous input frame is predicted and corrected, and the predicted frame and corrected frame corresponding to the previous input frame are obtained. Then the standby output frame corresponding to the previous input frame is the corrected frame corresponding to the previous input frame. , the previous input frame is only predicted without correction, only the predicted frame corresponding to the previous input frame is obtained, and the Kalman filter start time of the current input frame The previous input frame is delayed and the correction frame corresponding to the previous input frame is obtained by delay. Then the standby output frame corresponding to the previous input frame is the correction frame corresponding to the previous input frame. , the previous input frame is only predicted without correction, only the predicted frame corresponding to the previous input frame is obtained, and the Kalman filter start time of the current input frame is not The previous input frame is delayed and corrected, and the standby output frame corresponding to the previous input frame is the predicted frame corresponding to the previous input frame. The standby output frame corresponding to the previous input frame of the current input frame is used to start the Kalman filter at the start time of the current input frame. Predict the predicted frame corresponding to the current input frame.
[0140] For example, refer to Figure 2 The standby output frame corresponding to the 1st input frame is the corrected frame corresponding to the 1st input frame, the standby output frame corresponding to the 2nd input frame is the corrected frame corresponding to the 2nd input frame, the standby output frame corresponding to the 3rd input frame is the predicted frame corresponding to the 3rd input frame, the standby output frame corresponding to the 4th input frame is the corrected frame corresponding to the 4th input frame, and the standby output frame corresponding to the 5th input frame is the corrected frame corresponding to the 5th input frame.
[0141] S502: predict a predicted frame corresponding to the current input frame according to the standby output frame of the previous input frame.
[0142] Optionally, at the Kalman filter start time of the current input frame , based on the standby output frame corresponding to the previous input frame, predict the predicted frame corresponding to the current input frame. Figure 2 , if the current input frame is the second input frame, then the Kalman filter start time of the second input frame That is, at 210 milliseconds, the predicted frame corresponding to the second input frame is predicted based on the correction frame corresponding to the first input frame. If the current input frame is the fourth input frame, then the Kalman filter start time of the fourth input frame is That is, at 410 milliseconds, the predicted frame corresponding to the fourth input frame is predicted based on the predicted frame corresponding to the third input frame.
[0143] S503 . Determine and output a target output frame corresponding to the current input frame according to the arrival time of the current input frame, the Kalman filter start time of the current input frame, and the predicted frame corresponding to the current input frame.
[0144] Optionally, based on the arrival time of the current input frame Kalman filter start time of the current input frame , through the prediction and correction separation during Kalman filtering, determine the Kalman filter start time of the current input frame Whether there is a correction frame corresponding to the current input frame, if so, the correction frame corresponding to the current input frame is output as the target output frame corresponding to the current input frame; if not, the prediction frame corresponding to the current input frame is output as the target output frame corresponding to the current input frame.
[0145] For example, continue to refer to Figure 2 , if the current input frame is the 5th input frame, the Kalman filter start time of the 5th input frame That is, at 510 milliseconds, there is a correction frame corresponding to the fifth input frame, then the correction frame corresponding to the fifth input frame is output as the target output frame corresponding to the fifth input frame. If the current input frame is the second input frame, at the Kalman filter start time of the second input frame That is, at 210 milliseconds, there is no correction frame corresponding to the second input frame, and the prediction frame corresponding to the second input frame is output as the target output frame corresponding to the second input frame.
[0146] In this embodiment, the standby output frame corresponding to the previous input frame of the current input frame is determined, and the standby output frame corresponding to the previous input frame is determined through prediction correction separation and delay correction during Kalman filtering. The standby output frame corresponding to the previous input frame is the prediction frame corresponding to the previous input frame or the correction frame corresponding to the previous input frame. At the start time of the Kalman filter of the current input frame, the prediction frame corresponding to the current input frame is predicted based on the standby output frame corresponding to the previous input frame, and the target output frame corresponding to the current input frame is determined and output through prediction correction separation during Kalman filtering based on the arrival time of the current input frame and the start time of the Kalman filter of the current input frame. Through prediction correction separation and delay correction during Kalman filtering, the cumulative error caused by the prediction frames corresponding to each input frame is eliminated, and the quality of the target output frame corresponding to each input frame is improved.
[0147] The following describes in detail the process of determining and outputting a target output frame corresponding to the current input frame according to the arrival time of the current input frame, the Kalman filter start time of the current input frame, and the predicted frame corresponding to the current input frame.
[0148] Figure 6A flow chart of determining and outputting a target output frame corresponding to a current input frame according to a data processing method provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the step of determining and outputting the target output frame corresponding to the current input frame according to the arrival time of the current input frame, the Kalman filter start time of the current input frame, and the predicted frame corresponding to the current input frame in the above step S503 includes:
[0149] S601. Determine whether the current input frame has arrived overtime according to the arrival time of the current input frame and the Kalman filter start time of the current input frame.
[0150] Optionally, based on the arrival time of the current input frame Kalman filter start time of the current input frame , determine whether the current input frame has timed out, and then determine whether the Kalman filter start time of the current input frame can be Correct the current input frame. Specifically, if the arrival time of the current input frame is No later than the Kalman filter start time of the current input frame ,Right now , it is determined that the current input frame has not timed out and can be used at the Kalman filter start time of the current input frame Correct the current input frame. If the arrival time of the current input frame Kalman filter start time later than the current input frame ,Right now , it is determined that the current input frame has timed out and cannot be processed within the Kalman filter start time of the current input frame. Correct the current input frame.
[0151] For example, refer to Figure 2 , the 1st and 5th input frames arrive without timeout, and the 2nd, 3rd and 4th input frames arrive with timeout.
[0152] S602: If not, correct the current input frame to obtain a corrected frame corresponding to the current input frame, and use the corrected frame corresponding to the current input frame as a target output frame corresponding to the current input frame.
[0153] Optionally, if it is determined that the current input frame has not timed out, then at the Kalman filter start time of the current input frame Correct the current input frame to obtain a corrected frame corresponding to the current input frame, and output the corrected frame corresponding to the current input frame as the target output frame corresponding to the current input frame. For example, if the current input frame is the fifth input frame, at the Kalman filter start time of the fifth input frame That is, at 510 milliseconds, the fifth input frame is corrected to obtain a corrected frame corresponding to the fifth input frame, and the corrected frame corresponding to the fifth input frame is output as the target output frame corresponding to the fifth input frame.
[0154] S603: Otherwise, use the predicted frame corresponding to the current input frame as the target output frame corresponding to the current input frame.
[0155] Optionally, if it is determined that the current input frame has timed out, the Kalman filter start time of the current input frame is If there is no correction frame corresponding to the current input frame, the prediction frame corresponding to the current input frame is used as the target output frame corresponding to the current input frame, and the delay correction during Kalman filtering is performed according to the arrival time of the current input frame. Kalman filter start time of the next input frame with respect to the current input frame , determine whether the Kalman filter start time of the next input frame of the current input frame Perform delay correction on the current input frame.
[0156] In this embodiment, according to the arrival time of the current input frame and the Kalman filter start time of the current input frame, it is determined whether the current input frame has arrived overtime, and then it is determined whether the current input frame can be corrected at the Kalman filter start time of the current input frame. If it is determined that the current input frame has not arrived overtime, the current input frame is corrected at the Kalman filter start time of the current input frame to obtain the correction frame corresponding to the current input frame, and the correction frame corresponding to the current input frame is output as the target output frame corresponding to the current input frame. If it is determined that the current input frame has arrived overtime, the prediction frame corresponding to the current input frame is used as the target output frame corresponding to the current input frame, and through the delay correction during Kalman filtering, according to the arrival time of the current input frame and the Kalman filter start time of the next input frame of the current input frame, it is determined whether the current input frame is delayed at the Kalman filter start time of the next input frame of the current input frame. The cumulative error generated by the prediction is eliminated, and the output quality of the target output frame corresponding to the current input frame is improved.
[0157] The following describes in detail the process of determining the standby output frame corresponding to the previous input frame of the current input frame.
[0158] Figure 7 A flow chart of determining a standby output frame corresponding to a previous input frame of a current input frame according to a data processing method provided in an embodiment of the present application, such as Figure 7 As shown, the step of determining the standby output frame corresponding to the previous input frame of the current input frame in the above step S501 includes:
[0159] S701. Determine the arrival time of the previous input frame of the current input frame, and determine whether the previous input frame has arrived due to timeout according to the arrival time of the previous input frame and the Kalman filter start time of the previous input frame.
[0160] Optionally, the arrival time of the previous input frame of the current input frame is Arrival time of input frame , based on the arrival time of the previous input frame Kalman filter start time of the previous input frame , determine whether the previous input frame arrived due to timeout.
[0161] Specifically, if the arrival time of the previous input frame is No later than the Kalman filter start time of the previous input frame ,Right now , it is determined that the previous input frame arrived on time, that is, the previous input frame did not arrive before the timeout. Through the prediction correction separation during Kalman filtering, the Kalman filter start time of the previous input frame The previous input frame is predicted and corrected, and the predicted frame and corrected frame corresponding to the previous input frame are obtained. Kalman filter start time later than the previous input frame ,Right now , it is determined that the previous input frame has timed out, that is, the previous input frame did not arrive at the Kalman filter start time of the previous input frame. Through the prediction correction separation during Kalman filtering, at the Kalman filter start time of the previous input frame Only the previous input frame is predicted, and the predicted frame corresponding to the previous input frame is obtained.
[0162] For example, continue to refer to Figure 2 , if the current input frame is the 5th input frame, and the previous input frame is the 4th input frame, the arrival time of the 4th input frame is 412 milliseconds, the Kalman filter start time for the 4th input frame 410 milliseconds, the arrival time of the 4th input frame Kalman filter start time later than the 4th input frame , then the 4th input frame times out and arrives, and the Kalman filter starts at the 4th input frame Only the 4th input frame is predicted, and the predicted frame corresponding to the 4th input frame is obtained. If the current input frame is the 2nd input frame, and the previous input frame of the current input frame is the 1st input frame, the arrival time of the 1st input frame is 100 milliseconds, the Kalman filter start time of the first input frame 110 milliseconds, the arrival time of the first input frame No later than the Kalman filter start time of the first input frame , then the first input frame does not arrive within the timeout period, and the Kalman filter start time of the first input frame The first input frame is predicted and corrected to obtain a predicted frame and a corrected frame corresponding to the first input frame.
[0163] S702. If the previous input frame arrives with a timeout, and the arrival time of the previous input frame is not later than the start time of the Kalman filter of the current input frame, then based on the previous input frame, a correction frame corresponding to the previous input frame is obtained, and the correction frame corresponding to the previous input frame is used as the standby output frame corresponding to the previous input frame.
[0164] Optionally, if the last input frame arrives at a timeout, the Kalman filter start time of the last input frame is determined The previous input frame is only predicted, but not corrected. The delay correction during Kalman filtering needs to be based on the arrival time of the previous input frame. Kalman filter start time of the current input frame , determine whether the Kalman filter start time of the current input frame Performs delay correction on the last input frame.
[0165] Specifically, if the arrival time of the previous input frame is No later than the Kalman filter start time of the current input frame ,Right now , then determine the Kalman filter start time in the current input frame Perform delay correction on the previous input frame and set the Kalman filter start time of the current input frame The last input frame is corrected to obtain a corrected frame corresponding to the last input frame, and the corrected frame corresponding to the last input frame is used as a stand-by output frame corresponding to the last input frame.
[0166] For example, continue to refer to Figure 2 , if the current input frame is the 5th input frame, and the previous input frame is the 4th input frame, the arrival time of the 4th input frame is 412 milliseconds, the Kalman filter start time for the 5th input frame 510 milliseconds, the arrival time of the 4th input frame Kalman filter start time no later than the 5th input frame , then through the delay correction during Kalman filtering, the Kalman filter start time of the 5th input frame is Delay correction is performed on the 4th input frame to obtain a corrected frame corresponding to the 4th input frame, and the corrected frame corresponding to the 4th input frame is used as a stand-by output frame corresponding to the 4th input frame.
[0167] S703: If the last input frame arrives with a timeout, and the arrival time of the last input frame is later than the Kalman filter start time of the current input frame, the predicted frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame.
[0168] Optionally, if the last input frame arrives after a timeout, and the arrival time of the last input frame is Kalman filter start time later than the current input frame ,Right now , indicating the Kalman filter start time of the previous input frame in the current input frame If it has not arrived yet, it is determined that the Kalman filter start time of the current input frame cannot be reached. Perform delay correction on the previous input frame and set the Kalman filter start time of the previous input frame to A predicted frame corresponding to the previous input frame obtained by predicting the previous input frame is used as a stand-by output frame corresponding to the previous input frame.
[0169] For example, continue to refer to Figure 2 , if the current input frame is the 4th input frame, the previous input frame of the current input frame is the 3rd input frame, the 3rd input frame is lost, the arrival time of the 3rd input frame Considered as , Kalman filter start time of the 4th input frame 410 milliseconds, the arrival time of the third input frame Kalman filter start time later than the 4th input frame , then through the delay correction during Kalman filtering, it is impossible to start the Kalman filter at the start time of the 4th input frame Perform delay correction on the third input frame and set the Kalman filter start time of the third input frame to A predicted frame corresponding to the third input frame obtained by predicting the third input frame is used as a stand-by output frame corresponding to the third input frame.
[0170] S704: If the last input frame arrives on time, the corrected frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame.
[0171] Optionally, if the last input frame arrives on time, the Kalman filter start time of the last input frame is determined The previous input frame is predicted and corrected, and the Kalman filter start time of the previous input frame is A corrected frame corresponding to the previous input frame obtained by correcting the previous input frame is used as a stand-by output frame corresponding to the previous input frame.
[0172] For example, continue to refer to Figure 2, if the current input frame is the second input frame, the previous input frame of the current input frame is the first input frame, and the first input frame arrives on time, the Kalman filter start time of the first input frame will be The corrected frame corresponding to the first input frame obtained by correcting the first input frame is used as the stand-by output frame corresponding to the first input frame.
[0173] In this embodiment, it is determined whether the previous input frame has timed out according to the arrival time of the previous input frame and the Kalman filter start time of the previous input frame. If it is determined that the previous input frame has timed out, then through the delay correction during Kalman filtering, according to the arrival time of the previous input frame and the Kalman filter start time of the current input frame, it is determined whether to perform delay correction on the previous input frame at the Kalman filter start time of the current input frame. If the arrival time of the previous input frame is not later than the Kalman filter start time of the current input frame, the previous input frame is corrected at the Kalman filter start time of the current input frame to obtain a corrected frame corresponding to the previous input frame, and the corrected frame corresponding to the previous input frame is used as the standby output frame corresponding to the previous input frame. If the previous input frame arrives with a timeout, and the arrival time of the previous input frame is later than the Kalman filter start time of the current input frame, it means that the previous input frame has not arrived at the Kalman filter start time of the current input frame, then it is determined that the previous input frame cannot be delayed corrected at the Kalman filter start time of the current input frame, and the predicted frame corresponding to the previous input frame obtained by predicting the previous input frame at the Kalman filter start time of the previous input frame is used as the standby output frame corresponding to the previous input frame. If the previous input frame arrives on time, it is determined that the previous input frame is predicted and corrected at the Kalman filter start time of the previous input frame, and the corrected frame corresponding to the previous input frame obtained by correcting the previous input frame at the Kalman filter start time of the previous input frame is directly used as the standby output frame corresponding to the previous input frame. The standby output frame corresponding to the previous input frame is determined by separating the prediction and correction and delay correction during Kalman filtering, eliminating the accumulated error.
[0174] Based on the same inventive concept, a data processing device corresponding to the data processing method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned data processing method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0175] Figure 8 The module structure diagram of the data processing device provided in the embodiment of the present application is as follows: Figure 8 As shown, the device comprises:
[0176] The acquisition module 801 is used to acquire the input frequency of the input data, the number of frames of the input data, and the arrival time of each input frame in the input data.
[0177] The determination module 802 is used to determine the output phase according to the input frequency of the input data, the number of frames of the input data, and the arrival time of each input frame in the input data.
[0178] The determination module 802 is further configured to determine the Kalman filter start time of each input frame according to the output phase.
[0179] The determination module 802 is also used to determine and output the target output value frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of the input data and the Kalman filter start time of each input frame, wherein the target output frame is a predicted frame or a corrected frame.
[0180] As an optional implementation manner, the determination module 802 is specifically configured to:
[0181] An input phase of each input frame is determined according to an input frequency of the input data and an arrival time of each input frame in the input data.
[0182] The input phases of each input frame are sorted to obtain a target sequence, and the target frame number is determined according to a preset filtering threshold and the number of frames of input data.
[0183] The output phase is determined according to the target sequence and the target frame number.
[0184] As an optional implementation manner, the determination module 802 is specifically configured to:
[0185] Determine the period of the input data based on the input frequency of the input data.
[0186] The reference time origin is determined according to the arrival time of the first input frame among the arrival times of the input frames and the cycle of the input data.
[0187] The time origin of each input frame is determined based on the reference time origin and the period of the input data.
[0188] The input phase of each input frame is determined according to the arrival time of each input frame and the time origin of each input frame.
[0189] As an optional implementation manner, the determination module 802 is specifically configured to:
[0190] The sum of the time origin of the input frame and the output phase is used as the Kalman filter start time of the input frame.
[0191] As an optional implementation manner, the determination module 802 is specifically configured to:
[0192] A standby output frame corresponding to a previous input frame of the current input frame is determined, where the standby output frame corresponding to the previous input frame is a predicted frame corresponding to the previous input frame or a corrected frame corresponding to the previous input frame.
[0193] According to the standby output frame of the previous input frame, a prediction frame corresponding to the current input frame is predicted.
[0194] According to the arrival time of the current input frame, the Kalman filter start time of the current input frame and the predicted frame corresponding to the current input frame, the target output frame corresponding to the current input frame is determined and output.
[0195] As an optional implementation manner, the determination module 802 is specifically configured to:
[0196] According to the arrival time of the current input frame and the Kalman filter start time of the current input frame, it is determined whether the current input frame has arrived overtime.
[0197] If not, the corrected frame corresponding to the current input frame is corrected according to the current input frame, and the corrected frame corresponding to the current input frame is used as the target output frame corresponding to the current input frame.
[0198] Otherwise, the predicted frame corresponding to the current input frame is used as the target output frame corresponding to the current input frame.
[0199] As an optional implementation manner, the determination module 802 is specifically configured to:
[0200] Determine the arrival time of the previous input frame of the current input frame, and determine whether the previous input frame has arrived in timeout according to the arrival time of the previous input frame and the Kalman filter start time of the previous input frame.
[0201] If the previous input frame arrives with a timeout, and the arrival time of the previous input frame is not later than the start time of the Kalman filter of the current input frame, then the corrected frame corresponding to the previous input frame is corrected according to the previous input frame, and the corrected frame corresponding to the previous input frame is used as the standby output frame corresponding to the previous input frame.
[0202] If the last input frame arrives with a timeout, and the arrival time of the last input frame is later than the Kalman filter start time of the current input frame, the predicted frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame.
[0203] If the last input frame arrives on time, the corrected frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame.
[0204] The present application also provides a computer device, such as Fig. 9 , which is a schematic diagram of the structure of a computer device provided in an embodiment of the present application, includes: a processor 91, a memory 92 and a bus 93. The memory 92 stores machine-readable instructions executable by the processor 91 (for example, Fig. 9The device acquires the module 801 and determines the execution instructions corresponding to the module 802, etc.), when the computer device is running, the processor 91 communicates with the memory 92 through the bus 93, and when the machine-readable instructions are executed by the processor 91, the steps of the data processing method in the above embodiment are executed.
[0205] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method in the above embodiment are executed.
[0206] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0207] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0208] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire the input frequency of input data, the number of frames of input data, and the arrival time of each input frame in the input data; Determining an output phase according to an input frequency of the input data, a number of frames of the input data, and an arrival time of each input frame in the input data; wherein the output phase is used to indicate a delay time; Determining a Kalman filter start time for each input frame according to the output phase; Determine and output a target output frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of the input data, and the Kalman filter start time of each input frame, wherein the target output frame is a predicted frame or a corrected frame; The step of determining the output phase according to the input frequency of the input data, the number of frames of the input data, and the arrival time of each input frame in the input data comprises: Determining an input phase of each input frame according to an input frequency of the input data and an arrival time of each input frame in the input data; Sorting the input phases of the input frames to obtain a target sequence, and determining a target frame number according to a preset filtering threshold and the number of frames of the input data; Determining the output phase according to the target sequence and the target frame number; Determining the Kalman filter start time of each input frame according to the output phase includes: Determining the Kalman filter start time of each input frame by phase alignment according to the delay time indicated by the output phase; The determining and outputting a target output frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of the input data, and the Kalman filter start time of each input frame comprises: Determine a standby output frame corresponding to a previous input frame of the current input frame, wherein the standby output frame corresponding to the previous input frame is a predicted frame corresponding to the previous input frame or a corrected frame corresponding to the previous input frame; Predicting a predicted frame corresponding to a current input frame according to the stand-by output frame of the previous input frame; According to the arrival time of the current input frame, the Kalman filter start time of the current input frame and the predicted frame corresponding to the current input frame, a target output frame corresponding to the current input frame is determined and output.
2. The method according to claim 1, characterized in that Determining the input phase of each input frame according to the input frequency of the input data and the arrival time of each input frame in the input data includes: Determining a period of the input data according to an input frequency of the input data; Determine a reference time origin according to the arrival time of the first input frame among the arrival times of the input frames and the period of the input data; Determine the time origin of each input frame according to the reference time origin and the period of the input data; The input phase of each input frame is determined according to the arrival time of each input frame and the time origin of each input frame.
3. The method according to claim 1, characterized in that Determining the Kalman filter start time of each input frame according to the output phase also includes: The sum of the time origin of the input frame and the output phase is used as the Kalman filter start time of the input frame.
4. The method according to claim 1, characterized in that: The step of determining and outputting a target output frame corresponding to the current input frame according to the arrival time of the current input frame, the Kalman filter start time of the current input frame, and the predicted frame corresponding to the current input frame comprises: Determine whether the current input frame has arrived in timeout according to the arrival time of the current input frame and the Kalman filter start time of the current input frame; If not, correcting the current input frame to obtain a corrected frame corresponding to the current input frame, and using the corrected frame corresponding to the current input frame as a target output frame corresponding to the current input frame; Otherwise, the predicted frame corresponding to the current input frame is used as the target output frame corresponding to the current input frame.
5. The method according to claim 1, characterized in that The step of determining a standby output frame corresponding to a previous input frame of the current input frame comprises: Determine the arrival time of the previous input frame of the current input frame, and determine whether the previous input frame has timed out according to the arrival time of the previous input frame and the Kalman filter start time of the previous input frame; If the previous input frame arrives with a timeout, and the arrival time of the previous input frame is not later than the Kalman filter start time of the current input frame, then, according to the previous input frame, a correction frame corresponding to the previous input frame is obtained by correction, and the correction frame corresponding to the previous input frame is used as a standby output frame corresponding to the previous input frame; If the last input frame arrives at a timeout, and the arrival time of the last input frame is later than the Kalman filter start time of the current input frame, the predicted frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame; If the last input frame arrives on time, the corrected frame corresponding to the last input frame is used as the standby output frame corresponding to the last input frame.
6. A data processing device, characterized in that: The device comprises: An acquisition module, used to acquire the input frequency of input data, the number of frames of input data, and the arrival time of each input frame in the input data; A determination module, configured to determine an output phase according to an input frequency of the input data, a number of frames of the input data, and an arrival time of each input frame in the input data; wherein the output phase is used to indicate a delay time; The determination module is further used to determine the Kalman filter start time of each input frame according to the output phase; The determination module is further configured to determine and output a target output value frame corresponding to each input frame according to the arrival time of each input frame, the input frequency of the input data, and the Kalman filter start time of each input frame, wherein the target output frame is a prediction frame or a correction frame; The determination module is specifically used to determine the input phase of each input frame according to the input frequency of the input data and the arrival time of each input frame in the input data; sort the input phases of each input frame to obtain a target sequence, and determine the target frame number according to a preset filtering threshold and the number of frames of the input data; determine the output phase according to the target sequence and the target frame number; The determination module is specifically used to determine the Kalman filter start time of each input frame through phase alignment according to the delay time indicated by the output phase; The determination module is specifically used to determine a standby output frame corresponding to the previous input frame of the current input frame, wherein the standby output frame corresponding to the previous input frame is a prediction frame corresponding to the previous input frame or a correction frame corresponding to the previous input frame; based on the standby output frame of the previous input frame, a prediction frame corresponding to the current input frame is predicted; based on the arrival time of the current input frame, the Kalman filter start time of the current input frame and the prediction frame corresponding to the current input frame, a target output frame corresponding to the current input frame is determined and output.
7. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the data processing method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 5 are executed.
Citation Information
Patent Citations
Carrier frequency offset tracking method and device
CN117478469A