Data correction method, device and system, equipment and storage medium
By determining the frame difference between two data streams in the pressure-sensitive shoe and performing frame interpolation, the problem of data asynchrony between the pressure-sensitive shoe's data acquisition components was solved, achieving data synchronization and improved accuracy.
Patent Information
- Application Number
- CN202411302427.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2026-03-20
AI Technical Summary
The data collected by the data acquisition components on the two shoes of pressure-sensitive shoes are often out of sync, affecting the accuracy of data analysis.
By obtaining the timestamps of the two data streams, the frame difference is determined, and the data stream with more frame loss is processed to make the two data streams synchronized.
It improves the accuracy of data analysis, enables synchronization of two data streams, and facilitates subsequent data processing and analysis.
Smart Images

Figure CN121694732A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data processing of pressure sensing shoes, and in particular to a data correction method, device, equipment, storage medium and system. BACKGROUND
[0002] A pressure sensing shoe is a shoe equipped with a pressure sensor at the bottom, which can detect and measure the pressure distribution on the sole when the user is walking or exercising, and is usually used in the fields of rehabilitation and medical treatment, sports training, etc. The working principle of the pressure sensing shoe is that when the user wears the shoe and walks, the pressure sensor at the bottom of the pressure sensing shoe senses the pressure change, converts the pressure change into pressure sensing data and transmits the pressure sensing data to the corresponding device or system, so that the device or system analyzes the pressure sensing data to obtain information about gait, posture or foot pressure distribution, etc.
[0003] Both shoes of the pressure sensing shoe are provided with acquisition components, and the acquisition components include pressure sensors. The two acquisition components of the pressure sensing shoe are used to detect the pressure change of the two feet respectively. In order to ensure the accuracy of data analysis, it is necessary to ensure that the data collected by the acquisition components on the two shoes are synchronous. However, in the actual acquisition scene, the data collected by the two acquisition components are often asynchronous. SUMMARY
[0004] The present application provides a data correction method, device, equipment, storage medium and system to solve the technical problem that the data collected by the acquisition components of the pressure sensing shoe are asynchronous.
[0005] In a first aspect, a data correction method is provided, comprising:
[0006] Obtaining two-way data to be corrected, the two-way data being data collected by data acquisition components of two pressure sensing shoes matched with each other, each pressure sensing shoe including a shoe body, a sensing pad and a data acquisition component, the sensing pad being provided with a plurality of pressure sensors for measuring plantar pressure; the data acquisition component is electrically connected with the sensing pad to receive measurement data of the plurality of pressure sensors, each of the two-way data containing a plurality of data frames, each data frame of the plurality of data frames including measurement data of the plurality of pressure sensors, each data frame having a time stamp;
[0007] According to the time stamp of the data frame in the two-way data, the frame difference between the two-way data is determined;
[0008] Based on the frame difference between the two-way data, the data with more missing frames in the two-way data is subjected to frame filling processing to obtain corrected two-way data.
[0009] In this technical solution, after acquiring two data streams to be corrected from the data acquisition components of the two matching pressure-sensitive shoes, the frame difference between the two data streams is determined based on the timestamps of the data frames. Then, based on the frame difference, the data stream with more missing frames is processed to fill in the missing frames, resulting in the corrected data streams. Determining the frame difference between the two data streams based on the timestamps of the data frames and filling in the missing frames based on the frame difference enables the two data streams to synchronize, which helps improve the accuracy of data analysis.
[0010] In conjunction with the first aspect, in one possible implementation, determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams includes: determining a first reference data frame and a second reference data frame with the same timestamp in the two data streams, wherein the first reference data frame is a data frame from one of the two data streams, and the second reference data frame is a data frame from the other of the two data streams; and determining the frame difference between the two data streams based on the difference between the frame numbers of the first reference data frame and the second reference data frame. Determining the frame difference between the two data streams based on the difference in frame numbers of two reference data frames with the same timestamp is a simple implementation method that can quickly determine the frame difference between the two data streams.
[0011] In conjunction with the first aspect, in one possible implementation, determining a first reference data frame and a second reference data frame with the same timestamp in the two data streams based on the timestamps of the data frames in the two data streams includes: traversing the timestamps in one of the data streams as the first timestamp; traversing the timestamps in the other data stream as the second timestamp; comparing the second timestamp with the first timestamp; if the second timestamp is the same as the first timestamp, using the data frame corresponding to the first timestamp in one of the data streams as the first reference data frame, and using the data frame corresponding to the second timestamp in the other data stream as the second reference data frame; if the second timestamp is different from the first timestamp, traversing the next timestamp of the second timestamp in the other data stream as the second timestamp, and performing the step of comparing the second timestamp with the first timestamp, until the second timestamp is the same as the first timestamp or all timestamps in the other data stream have been traversed; if all timestamps in the other data stream have been traversed, traversing the next timestamp of the first timestamp in one of the data streams as the first timestamp, and performing the step of traversing the timestamps in the other data stream as the second timestamp.
[0012] In conjunction with the first aspect, in one possible implementation, determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams includes: determining a reference data frame combination in the two data streams based on the timestamps of the data frames in the two data streams; the reference data frame combination includes a first reference data frame and a second reference data frame; the first reference data frame is a data frame in one of the two data streams, and its timestamp is located before and closest to a reference timestamp in the one data stream; the second reference data frame is a data frame in the other data stream, and its timestamp is located before and closest to the reference timestamp in the other data stream; and determining the frame difference between the two data streams based on the frame difference between the first reference data frame and the second reference data frame. By determining two data frames from the two data streams closest to the reference timestamp as reference data frames and forming a reference data frame combination, and then comparing the frame difference of the reference data frames in the reference data frame combination to determine the frame difference between the two data streams, the frame difference between the two data streams can be accurately determined.
[0013] In conjunction with the first aspect, in one possible implementation, determining the frame difference between the two data streams based on the frame difference between the first and second reference data frames includes: determining the theoretical frame difference corresponding to the combination of reference data frames based on the timestamps of the first and second reference data frames; determining the actual frame difference corresponding to the combination of reference data frames based on the frame numbers of the first and second reference data frames; determining the corrected frame difference corresponding to the combination of reference data frames based on the theoretical and actual frame differences; and determining the frame difference between the two data streams based on the corrected frame difference. Combining the theoretical frame difference determined based on the timestamps of the data frames and the actual frame difference determined based on the frame numbers of the data frames to comprehensively determine the frame difference between the two data streams allows for a more accurate frame difference determination.
[0014] In conjunction with the first aspect, in one possible implementation, the reference data frame combinations are multiple sets, with different sets of reference data frame combinations corresponding to different reference timestamps; determining the frame difference between the two data streams based on the corrected frame differences corresponding to the reference data frame combinations includes: calculating the average of the corrected frame differences corresponding to each of the multiple sets of reference data frame combinations to obtain the frame difference between the two data streams. By combining the corrected frame differences of multiple sets of reference data frame combinations to calculate the frame difference between the two data streams, the frame difference between the data streams can be made more accurate.
[0015] In conjunction with the first aspect, in one possible implementation, the step of performing frame interpolation processing on the data stream with more frame drops based on the frame difference between the two data streams to obtain synchronized data includes: determining a reference data frame in the data stream with more frame drops, the reference data frame representing the reference position where frame drops occurred in the data stream with more frame drops, the reference data frame being the first data frame in the data stream with more frame drops, and the first data frame being the data frame with the earliest timestamp; and supplementing n data frames before the reference data frame, where n is the frame difference between the two data streams. By supplementing n data frames before the reference data frame in the data stream with more frame drops, the two data frames can be synchronized, facilitating subsequent data analysis and processing.
[0016] In conjunction with the first aspect, in one possible implementation, supplementing n data frames before the reference data frame includes: determining a single-frame interval based on the data frame rates corresponding to the two data streams; subtracting i from the frame number of the reference data frame to obtain the frame number of the (n+1-i)th data frame among the n data frames preceding the reference data frame; and subtracting i single-frame intervals from the timestamp of the reference data frame to obtain the timestamp of the (n+1-i)th data frame among the n data frames, where 1≤i≤n.
[0017] In conjunction with the first aspect, in one possible implementation, before determining the reference data frame from the data path with more frame drops, the method further includes: determining the data path with the larger frame number of the first data frame among the two data paths as the data path with more frame drops.
[0018] In conjunction with the first aspect, in one possible implementation, before determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams, the method further includes: determining whether the two data streams meet a preset continuous frame dropping condition; if neither of the two data streams meets the preset continuous frame dropping condition, then the step of determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams is executed.
[0019] In conjunction with the first aspect, in one possible implementation, the method further includes: if at least one of the two data streams meets the preset continuous frame loss condition, outputting a data re-acquisition prompt, the data re-acquisition prompt being used to prompt the user wearing the two pressure-sensitive shoes to re-acquire the two data streams based on the data acquisition components of the two pressure-sensitive shoes. When one or both of the two data streams do not meet the preset continuous frame loss condition, outputting a data re-acquisition prompt to prompt the user to re-acquire data can ensure the accuracy of data acquisition and ensure that data analysis can be achieved.
[0020] Secondly, a data correction device is provided, comprising:
[0021] The data acquisition module is used to acquire two data streams to be corrected. The two data streams are data collected by the data acquisition components of two matching pressure-sensitive shoes. Each of the two pressure-sensitive shoes includes a shoe body, a sensing pad, and the data acquisition component. The sensing pad is equipped with multiple pressure sensors for measuring plantar pressure. The data acquisition component is electrically connected to the sensing pad to receive the measurement data from the multiple pressure sensors. Each of the two data streams contains multiple data frames, each data frame includes the measurement data from the multiple pressure sensors, and each data frame has a timestamp.
[0022] The frame difference determination module is used to determine the frame difference between the two data streams based on the timestamps of the data frames in the two data streams.
[0023] The frame interpolation module is used to perform frame interpolation on the data stream with more frame loss based on the frame difference between the two data streams, so as to obtain the corrected data streams.
[0024] Thirdly, a computer device is provided, including a memory and one or more processors, the memory being connected to the one or more processors, the one or more processors being configured to execute one or more computer programs stored in the memory, wherein, when executing the one or more computer programs, the one or more processors cause the computer device to implement the data correction method of the first aspect described above.
[0025] Fourthly, a computer-readable storage medium is provided, which stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the data correction method of the first aspect.
[0026] Fifthly, a pressure-sensitive shoe data processing system is provided, comprising a data processing device and two matching pressure-sensitive shoes; each of the two pressure-sensitive shoes includes a shoe body, a sensing pad, and the data acquisition component, wherein the sensing pad is provided with multiple pressure sensors for measuring plantar pressure; the data acquisition component is electrically connected to the sensing pad to receive measurement data from the multiple pressure sensors; the data processing device is connected to the two pressure-sensitive shoes, and the data processing device is used to execute the data correction method of the first aspect described above.
[0027] This application can achieve the following technical effects: by determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams, and by supplementing the data stream with more lost frames based on the frame difference between the two data streams, the two data streams can be synchronized, which helps to improve the accuracy of data analysis. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a schematic diagram of the system composition of the pressure-sensitive shoe data processing system provided in the embodiments of this application;
[0030] Figure 2 This is a schematic diagram of the structure of the pressure-sensitive shoe provided in an embodiment of this application;
[0031] Figure 3 This is an exploded view of the pressure-sensitive shoe provided in an embodiment of this application;
[0032] Figure 4 A flowchart illustrating a data correction method provided in an embodiment of this application;
[0033] Figure 5 A flowchart illustrating another data correction method provided in an embodiment of this application;
[0034] Figure 6 This is a schematic diagram of the structure of a data correction device provided in an embodiment of this application;
[0035] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0037] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0038] The technical solution of this application is used to synchronize data collected by the data acquisition components of two matching pressure-sensitive shoes. The data collected by these components is pressure-sensitive data. Since both pressure-sensitive shoes are equipped with data acquisition components, the pressure-sensitive data collected by these components needs to be aggregated for processing and analysis. To aggregate the pressure-sensitive data, the pressure-sensitive data collected by the two components needs to be transmitted to a unified data processing device. However, in actual use, the two channels of pressure-sensing data collected by the data acquisition components of the two matching shoes are not synchronized. Through research and analysis, the inventors discovered that the main reason for this asynchrony is that after the pressure-sensitive shoes are shipped to the user, the user often operates them improperly during testing, causing the mobile device to be too far from the shoes. This results in frame loss when the pressure-sensing shoes transmit pressure-sensing data to the mobile device, and the number of lost frames often differs between the two data streams, leading to asynchrony.
[0039] This application aims to complete the header frame of the data channel with more missing frames, so that the two data channels collected by the data acquisition components of the two matching pressure-sensitive shoes can remain synchronized after transmission, which facilitates subsequent data processing and analysis.
[0040] The technical solution of this application is applied to a pressure-sensitive shoe data processing system. For ease of understanding, the pressure-sensitive shoe data processing system of this application will be introduced first.
[0041] See Figures 1-3 , Figure 1 This is a schematic diagram of the system composition of the pressure-sensitive shoe data processing system provided in the embodiments of this application. Figure 2 and Figure 3 This is a schematic diagram of a pressure-sensitive shoe provided in an embodiment of this application. Figure 1 As shown, the pressure-sensitive shoe data processing system 1 includes a data processing device 11 and two matching pressure-sensitive shoes 12.
[0042] like Figure 2 and Figure 3 As shown, each pressure-sensitive shoe 12 includes a shoe body 121, a sensing pad 122, and a data acquisition component 123. The shoe body 121 includes a sole 1211 and an upper 1212 disposed on the sole 1211. The sole 1211 and the upper 1212 together form a shoe cavity 1213. The sensing pad 122 is located inside the shoe cavity 1213 and disposed on the sole 1211. The sensing pad 122 is equipped with multiple pressure sensors Q for measuring foot pressure. The data acquisition component 123 is located outside the shoe cavity 1213 and disposed on the shoe body 121. The data acquisition component 123 is electrically connected to the sensing pad 122 to receive measurement data from the multiple pressure sensors Q.
[0043] When a user wears pressure-sensitive shoes and walks or exercises, multiple pressure sensors Q on the sensing pad 122 measure the corresponding parts of the sole of the foot. The data acquisition unit 123 receives the measurement data from the multiple pressure sensors Q and forms data frames. The data acquisition unit 123 continuously receives the measurement data from the multiple pressure sensors Q and forms data frames, resulting in multiple data frames. These multiple data frames form one channel of pressure-sensitive data. Since the data acquisition unit 123 of both pressure-sensitive shoes 12 receives the measurement data from the pressure sensors Q and forms data frames, the two matching pressure-sensitive shoes will generate two channels of pressure-sensitive data.
[0044] The data processing device 11 is connected to two pressure-sensitive shoes 12. The data processing device 11 is used to receive and process the two pressure-sensitive data generated by the two pressure-sensitive shoes.
[0045] In some possible scenarios, the data processing device 11 is part of the pressure-sensitive shoe 12, and the data processing device 11 can be installed on the pressure-sensitive shoe 12. For example, the data processing device 11 can be installed in the data acquisition component 123 of one of the pressure-sensitive shoes 12, and the data acquisition component 123 of the other pressure-sensitive shoe sends the acquired data frames to the data processing device 11 in the data acquisition component 123 of the other pressure-sensitive shoe, and the data processing device 11 completes the processing of the two data streams on the pressure-sensitive shoe 12.
[0046] In other possible scenarios, the data processing device 11 can also be a standalone device independent of the pressure-sensitive shoes 12. For example, the data processing device 11 can be a mobile phone connected to both pressure-sensitive shoes via Bluetooth. The data acquisition components of the two pressure-sensitive shoes communicate with the mobile phone based on the Bluetooth Low Energy (BLE) protocol, thereby sending the acquired data frames to the mobile phone, where the mobile phone processes the two data streams. Alternatively, the data processing device 11 can also be a backend server. The backend server connects to the two pressure-sensitive shoes via the mobile phone. After receiving the two data streams sent by the data acquisition components of the two pressure-sensitive shoes via Bluetooth, the mobile phone sends the received data streams to the backend server for processing, where the processing of the two data streams is completed.
[0047] In some other possible scenarios, the data processing device 11 may also include multiple independent devices separate from the pressure-sensitive shoes 12. For example, the data processing device 11 includes a mobile phone and a backend server. The mobile phone receives two data streams sent by the data acquisition components of the two pressure-sensitive shoes via Bluetooth, detects whether the two data streams meet the detection and processing requirements, and provides feedback on the detection results to the user. When the two data streams meet the detection and processing requirements, the mobile phone sends the two data streams to the backend server for processing and provides feedback on the processing results to the user.
[0048] The technical solution of this application is specifically applied to the data processing device 11 in the pressure-sensitive shoe data processing system 1. The specific composition of the data processing device 11 can be set according to actual needs, and this application does not impose any restrictions.
[0049] The technical solution of this application is described in detail below.
[0050] See Figure 4 , Figure 4 This is a flowchart illustrating a data correction method provided in an embodiment of this application, as shown below. Figure 4 As shown, the method includes the following steps:
[0051] S201, Obtain the two data streams to be corrected.
[0052] Here, the two data streams to be corrected are the data collected by the data acquisition components of the two matching pressure-sensitive shoes. The data collected by the data acquisition components of the two matching pressure-sensitive shoes constitutes two channels of pressure-sensitive data. For the principle of how the data acquisition components of the two matching pressure-sensitive shoes acquire two channels of pressure-sensitive data, please refer to the aforementioned description.
[0053] In theory, the two pressure-sensitive data collected by the data acquisition components of the two matching pressure-sensitive shoes will keep the two pressure-sensitive data synchronized. That is, for a pressure sensing data frame in one pressure sensing data, there will be a corresponding pressure sensing data frame in the other pressure sensing data. This other pressure sensing data frame has the same timestamp and the same frame number.
[0054] Each of the two data streams to be corrected contains multiple data frames, each with a timestamp reflecting the acquisition time of the measurement data contained within it. The timestamp can be in millisecond format, representing the milliseconds from January 1, 1970, 00:00:00 to the present. For example, if a data frame was acquired on May 8, 2024, at 12:30:50, its millisecond timestamp would be 1715142650000. Each data frame also has a frame number, which increments with the generation of new data frames. The frame number reflects the order of the data frame within its respective data stream; a larger frame number indicates a later acquisition time within that data stream. For example, the timestamps and frame numbers of the two data streams to be corrected can be shown in Table 1.
[0055]
[0056] Table 1
[0057] L1 represents the timestamp and frame number of a data frame in one data stream, and L2 represents the timestamp and frame number of a data frame in the other data stream.
[0058] If the data processing device is installed on the pressure-sensitive shoe, it can acquire the data collected by the two data acquisition components of the pressure-sensitive shoe to obtain two data streams to be corrected. If the data processing device is independent of the pressure-sensitive shoe, it can acquire the data collected by the two data acquisition components through the connection with the two data acquisition components of the pressure-sensitive shoe to obtain two data streams to be corrected.
[0059] S202, determine the frame difference between the two data streams based on the timestamps of the data frames in the two data streams to be corrected.
[0060] Here, the frame difference between two data streams refers to the frame difference between two data frames at the same time in the two data streams. The frame difference between two data streams can reflect the number of data frames lost in the data stream with more frame loss during the initial data acquisition phase.
[0061] In some possible cases, a first reference data frame and a second reference data frame with the same timestamp can be determined from the two data streams to be corrected based on the timestamps of the data frames in the two data streams to be corrected. The first reference data frame is a data frame in one of the two data streams, and the second reference data frame is a data frame in the other of the two data streams. Then, the frame difference between the two data streams is determined based on the difference between the frame number of the first reference data frame and the frame number of the second reference data frame.
[0062] For example, the timestamps and frame numbers of the two data streams to be corrected are shown in Table 1. As can be seen from Table 1, the timestamp 1715142650500 in one data stream L1 is the same as the timestamp 1715142650500 in the other data stream L2. Therefore, the data frame corresponding to the timestamp 1715142650500 in L1 is the first reference data frame, and the frame number of the first reference data frame is 27. The data frame corresponding to the timestamp 1715142650500 in L2 is the second reference data frame, and the frame number of the second reference data frame is 36. The difference between the frame numbers of the first and second reference data frames is 36-27=9. Therefore, the frame difference between the two data streams is 9.
[0063] The process involves iterating through the timestamps in one data stream as the first timestamp, then iterating through the timestamps in the other data stream as the second timestamp, and comparing the second timestamp with the first timestamp. If the second timestamp is the same as the first timestamp, the data frame corresponding to the first timestamp in the first data stream is used as the first reference data frame, and the data frame corresponding to the second timestamp in the other data stream is used as the second reference data frame. If the second timestamp is different from the first timestamp, the process iterates through the next timestamp of the second timestamp in the other data stream as the second timestamp, and returns to the step of comparing the second timestamp with the first timestamp, until the second timestamp is the same as the first timestamp or all timestamps in the other data stream have been iterated through. If all timestamps in the other data stream are different from the first timestamp, the process iterates through the next timestamp of the first timestamp in the first data stream as the first timestamp, and returns to the step of iterating through the timestamps in the other data stream as the second timestamp, until all timestamps in the first data stream have been iterated through.
[0064] Optionally, if there are multiple first reference data frames and second reference data frames with the same timestamp, the difference between the frame numbers of the first reference data frames and the second reference data frames corresponding to different timestamps can be determined to obtain multiple frame number differences. Then, the average of the multiple frame number differences is determined as the frame difference between the two data streams.
[0065] The frame difference between two data streams is determined by the difference in frame number of data frames with the same timestamp in the two data streams. The implementation method is simple and can quickly determine the frame difference between two data streams.
[0066] In other possible cases, the frame difference between the two data streams can also be determined through the following steps A1 to A2:
[0067] A1. Based on the timestamps of the data frames in the two data streams to be corrected, determine the matching data frame combination in the two data streams to be corrected.
[0068] The comparison data frame combination includes a first comparison data frame and a second comparison data frame. The first comparison data frame is a data frame from one of the two data streams, and its timestamp is located before and closest to the reference timestamp in that data stream. The second comparison data frame is a data frame from the other of the two data streams, and its timestamp is located before and closest to the reference timestamp in that other data stream. The reference timestamp is the timestamp used as a time reference.
[0069] For example, if the base timestamp is 1715142650500, and the timestamps and frame numbers of the two data streams to be corrected are shown in Table 1, then in the two data streams to be synchronized, we search for the timestamp that is before 1715142650500 and closest to it. We find timestamps 1715142650488 and 1715142650499. The data frames corresponding to timestamps 1715142650488 and 1715142650499 constitute a set of reference data frames. The data frame corresponding to timestamp 1715142650488 is the first reference data frame in this set, and the data frame corresponding to timestamp 1715142650499 is the second reference data frame. The timestamps and frame numbers of the first and second reference data frames in this set are shown in Table 2.
[0070]
[0071] Table 2
[0072] One or more timestamps can be arbitrarily selected from the timestamps corresponding to the two data streams to be corrected as reference timestamps. Alternatively, one or more reference timestamps can be set based on preset timestamps. In one specific implementation, a minimum timestamp can be determined from the timestamps corresponding to the two data streams to be corrected. The minimum timestamp is then delayed by a first preset duration to obtain a reference timestamp. This is repeated to obtain the next reference timestamp, and so on, resulting in multiple reference timestamps. For example, if the timestamps and frame numbers of the two data streams to be corrected are shown in Table 1, and the minimum timestamp is 1715142650000, then a 500-millisecond delay is made to obtain timestamp 1715142650500, which is used as the reference timestamp. Then, a 200-millisecond delay is made to obtain timestamp 1715142650700, which is used as the next reference timestamp. This application does not impose any restrictions on the number of reference timestamps or the specific implementation method for determining the reference timestamps.
[0073] If there are multiple reference timestamps, there will be multiple sets of reference data frame combinations, and different sets of reference data frame combinations correspond to different reference timestamps.
[0074] A2. Determine the frame difference between the two data streams based on the frame difference between the first reference data frame in the reference data frame combination and the second reference data frame in the reference data frame combination.
[0075] In one feasible implementation, the frame difference between the two data streams can be determined through the following steps A21-A24:
[0076] A21. Determine the theoretical frame difference corresponding to the reference data frame combination based on the timestamps of the first reference data frame and the second reference data frame in the reference data frame combination.
[0077] Specifically, the time difference between the timestamp of the first reference data frame and the timestamp of the second reference data frame in the reference data frame combination can be determined; based on the time difference and the data frame rates corresponding to the two data streams to be corrected, the theoretical frame difference corresponding to the reference data frame combination is calculated.
[0078] When the timestamp is a millisecond timestamp, the formula for calculating the theoretical frame difference is: fd0 = Δt / 1000 * fp, where fd0 represents the theoretical frame difference, Δt represents the time difference, and fp represents the data frame rate, which refers to the number of data frames transmitted per unit time (i.e., 1 second).
[0079] For example, if the data frame rate corresponding to the two data streams to be synchronized is 40 Hz, that is, 40 data frames are transmitted within 1 second, and the timestamps of the first and second reference data frames in the reference data frame combination are shown in Table 2, then the time difference between the timestamps of the first and second reference data frames in the reference data frame combination is 1715142650499-1715142650488=11; the theoretical frame difference is 11 / 1000*40≈1.
[0080] A22. Determine the actual frame difference corresponding to the reference data frame combination based on the frame number of the first reference data frame and the frame number of the second reference data frame in the reference data frame combination.
[0081] The actual frame difference corresponding to the reference data frame combination is the difference between the frame number of the first reference data frame in the reference data frame combination and the frame number of the second reference data frame in the reference data frame combination.
[0082] For example, if the frame numbers of the first and second reference data frames in the reference data frame combination are shown in Table 2, then the actual frame difference corresponding to the reference data frame combination is 35-26=9.
[0083] A23. Determine the corrected frame difference corresponding to the reference data frame combination based on the theoretical frame difference and the actual frame difference corresponding to the reference data frame combination.
[0084] The corrected frame difference corresponding to the reference data frame combination is equal to the actual frame difference corresponding to the reference data frame combination minus the theoretical frame difference corresponding to the reference data frame combination.
[0085] For example, if the actual frame difference corresponding to the reference data frame combination is 9 and the theoretical frame difference corresponding to the reference data frame combination is 1, then the corrected frame difference corresponding to the reference data frame combination is 9-1=8.
[0086] A24. Determine the frame difference between the two data streams based on the corrected frame difference corresponding to the combination of reference data frames.
[0087] Among them, the corrected frame difference corresponding to the combination of reference data frames can be determined as the frame difference between the two data streams.
[0088] In steps A21 to A24 above, the frame difference between the two data streams is determined by combining the theoretical frame difference based on the timestamp of the data frame and the actual frame difference based on the frame number of the data frame, which makes the frame difference more accurate.
[0089] If there are multiple sets of reference data frame combinations, then there are multiple corrected frame differences determined by the above steps A21 to A24. The average of the corrected frame differences corresponding to each of the multiple sets of reference data frame combinations can be calculated to obtain the frame difference between the two data streams.
[0090] For example, if there are 15 reference timestamps, the corrected frame differences for the 15 sets of reference data frame combinations are 8, 9, 7, 5, 3, 5, 6, 7, 8, 9, 6, 5, 5, 6, 5. Then the frame difference between the two data streams is: (8+9+7+5+3+5+6+7+8+9+6+5+5+6+5) / 15≈6.
[0091] By combining the corrected frame difference of multiple sets of reference data frames to calculate the frame difference between two data streams, the frame difference between the data can be made more accurate.
[0092] In another feasible implementation, the actual frame difference corresponding to the reference data frame combination can be determined based on the frame number of the first data frame and the frame number of the second data frame in the reference data frame combination. The frame difference between the two data streams can then be determined based on this actual frame difference. For example, the actual frame difference corresponding to the reference data frame combination can be directly determined as the frame difference between the two data streams. Similarly, when there are multiple sets of reference data frame combinations, the average of the actual frame differences corresponding to each of the multiple sets of reference data frame combinations can be determined as the frame difference between the two data streams. This application does not impose any limitations.
[0093] In steps A1 to A2 above, two data frames from the two data streams closest to the reference timestamp are determined as reference data frames and a reference data frame combination is formed. Then, the frame difference between the two data streams is determined by comparing the frame difference of the reference data frames in the reference data frame combination. This can accurately determine the frame difference between the two data streams.
[0094] S203, based on the frame difference between the two data streams, performs frame interpolation on the data stream with more frame loss, and obtains the corrected data streams.
[0095] Here, the data path with more frame drops mainly refers to the data path with more frame drops during the initial data acquisition phase. Based on the frame difference between the two data paths, the data path with more frame drops is processed by adding frames at the beginning of the data path with more frame drops.
[0096] Specifically, the data with the larger frame number of the first data frame in the two data streams can be identified as the data stream with more frame loss. A reference data frame is then determined in the data stream with more frame loss. The reference data frame is used to indicate the reference position where frame loss occurred in the data stream with more frame loss. The reference data frame can be the first data frame in the data stream with more frame loss, which refers to the data frame with the earliest timestamp. n data frames are then added before the reference data frame, where n is the frame difference between the two data streams.
[0097] During the process of supplementing n data frames before the reference data frame, the single frame interval can be determined according to the data frame rate corresponding to the two data paths. The single frame interval refers to the timestamp interval between two consecutive data frames with consecutive frame numbers. The frame number of the reference data frame is subtracted by i, which is used as the frame number of the (n+1-i)th data frame among the n data frames before the reference data frame. The timestamp of the reference data frame is subtracted by i single frame intervals, which is used as the timestamp of the (n+1-i)th data frame among the n data frames. This is to achieve the completion of the timestamp and frame number of the lost data frames, where 1≤i≤n.
[0098] For example, if two data streams are shown in Table 1, and the frame rate of the two data streams to be corrected is 40 Hz, then the single frame interval is 1 / 40 * 1000 = 25. Since the frame number of the first data frame of L1 in Table 1 is 1, and the frame number of the first data frame of L2 is 10, and the frame number of the first data frame of L2 is larger, then L2 is the data stream with more lost frames. The reference data frame is the data frame with frame number 10 in L2. Therefore, 10 - 1 = 9 is taken as the frame number of the 6th data frame among the 6 data frames that need to be supplemented. 1715142650200 - 1 * 25 = 1715142650175 The timestamp of the 6th data frame out of the 6 data frames to be supplemented, i.e., the timestamp of the data frame with frame number 9, is 1715142650175; 10-2=8 is taken as the frame number of the 5th data frame out of the 6 data frames to be supplemented, and 1715142650200-2*25=1715142650150 is taken as the timestamp of the 5th data frame out of the 6 data frames to be supplemented, i.e., the timestamp of the data frame with frame number 8 is 1715142650150, and so on, so that the frame number and timestamp of each of the 6 data frames to be supplemented can be obtained.
[0099] After the timestamps and frame numbers of the lost data frames are replenished, the data of each lost data frame can also be replenished. Specifically, the data in each lost data frame (hereinafter referred to as the data frame to be replenished) can be set to 0, or the data in the replenished data frame can be set to be the same as the data in the reference data frame; this application does not impose any restrictions.
[0100] Since a data frame contains measurement data from multiple pressure sensors, each supplementary data frame includes multiple pressure sensing values, which are the pressure sensing values detected by the multiple pressure sensors. For each data frame to be supplemented, each pressure sensing value in the data frame to be supplemented can be set to 0, thereby completing the data supplementation in the data frame to be supplemented. Alternatively, for each pressure sensor corresponding to a point (hereinafter referred to as a sensing point) in each data frame to be supplemented, the pressure sensing value of the target sensing point in the data frame to be supplemented can be set to be the same as the pressure sensor value of the target sensing point in the reference data frame. The target sensing point can be any sensing point, thereby completing the data supplementation in the data frame to be supplemented.
[0101] In the above Figure 4In the corresponding technical solution, after acquiring the two data streams to be corrected from the two matching acquisition components, the frame difference between the two data streams is determined based on the timestamps of the data frames in the two data streams. Then, based on the frame difference between the two data streams, the data stream with more missing frames is processed to fill in the missing frames, resulting in the corrected data streams. Determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams and filling in the missing frames based on the frame difference between the two data streams enables the two data streams to be synchronized, which helps to improve the accuracy of data analysis.
[0102] See Figure 5 , Figure 5 A flowchart illustrating another data correction method provided in this application embodiment is shown below. Figure 5 As shown, the method includes the following steps:
[0103] S301, acquire the two data streams to be corrected.
[0104] S302, determine whether the two data streams to be corrected meet the preset continuous frame dropping conditions.
[0105] Here, meeting the preset continuous frame drop condition means that the number of consecutive frame drops exceeds the preset frame number. The preset frame number can be, for example, 10 frames, 15 frames, etc. Not meeting the preset continuous frame drop condition means that the number of consecutive frame drops does not exceed the preset frame number.
[0106] If neither of the two data streams to be corrected meets the preset continuous frame loss condition, it means that the number of data frames lost is not large, and the lost frames can be supplemented by frame replacement. Step S303 is executed. If at least one of the two data streams meets the preset continuous frame loss condition, it means that at least one data stream has lost too many consecutive frames and cannot be replaced. Step S305 is executed.
[0107] S303, determine the frame difference between the two data streams based on the timestamps of the data frames in the two data streams to be corrected.
[0108] S304, based on the frame difference between the two data streams, performs frame interpolation on the data stream with more frame loss, to obtain the corrected data streams.
[0109] The specific implementation methods of steps S303 to S304 are described here, and will not be repeated here.
[0110] S305, prompting for re-acquisition of output data.
[0111] Here, the data re-acquisition prompt is used to remind the user wearing the two matching pressure-sensitive shoes to re-acquire two channels of data based on the data acquisition components of the two pressure-sensitive shoes.
[0112] Among them, prompts for data re-collection can be output through voice prompts, pop-up prompts on the display interface, and other prompting methods.
[0113] For example, when the data processing device is installed on a pressure-sensitive shoe, the shoe can also be equipped with an indicator light to show whether the pressure-sensitive data meets the processing requirements. When two data streams do not meet the preset continuous frame loss condition, the indicator light is green, indicating that frame interpolation can be performed for subsequent data processing. When at least one of the two data streams meets the preset continuous frame loss condition, the indicator light is red, indicating that frame interpolation cannot be performed and subsequent data processing cannot be performed. Furthermore, indicator lights can be installed on both pressure-sensitive shoes, and the two indicator lights can respectively indicate which pressure-sensitive shoe's data acquisition component collected data that meets / does not meet the preset continuous frame loss condition.
[0114] For example, when the data processing device includes a mobile device, if two data streams do not meet the preset continuous frame loss condition, the mobile device displays a message indicating successful acquisition; if at least one of the two data streams meets the preset continuous frame loss condition, the mobile device displays a "reacquisition" message, instructing the user to reacquire the pressure-sensitive data.
[0115] In the above Figure 5 In the corresponding technical solution, after acquiring the two data streams to be corrected, it is first determined whether the two data streams meet the preset continuous frame loss condition. If neither of the two data streams meets the preset continuous frame loss condition, then the data stream with more frame loss is processed for frame interpolation based on the frame difference between the two data streams to obtain the corrected two data streams, which can ensure the accuracy of frame interpolation. If at least one of the two data streams meets the preset continuous frame loss condition, a data re-acquisition prompt is output to prompt the user to re-acquire data, which can ensure the accuracy of data acquisition and ensure that data analysis can be achieved.
[0116] The following uses data processing equipment, including mobile devices and backend servers, as examples to illustrate the above method embodiments.
[0117] 1. When the user starts data collection, the data acquisition components on the two pressure-sensitive shoes receive the measurement data from multiple pressure sensors inside the two pressure-sensitive shoes and form a data frame. The data acquisition components on the two pressure-sensitive shoes generate a timestamp of the data frame and a frame number according to the time of receiving the measurement data. The timestamp, frame number and measurement data from multiple pressure sensors are packaged into a data frame.
[0118] 2. The data acquisition components on the two pressure-sensitive shoes are based on the BLE transmission protocol and send the packaged data frames to the mobile device. The mobile device receives the data frames sent by the data acquisition components on the two pressure-sensitive shoes. The mobile device forms two data streams according to the sending end of the data frame.
[0119] Third, the mobile device will sort the data frames from the two data streams received by the device according to their timestamps.
[0120] Fourth, the mobile device determines whether the two received data streams meet the preset continuous frame dropping conditions according to the method described in step S302 above; if neither data stream meets the preset continuous frame dropping conditions, the mobile device sends the two data streams to the backend server, and the backend server executes the above steps S303 to S304; if at least one of the two data streams meets the preset continuous frame dropping conditions, the mobile device executes the above step 305.
[0121] The mobile device only sends the two data streams to the backend service when neither of them meets the preset continuous frame loss condition. This avoids invalid data transmission and ensures that the two data streams received by the backend server are data that can be processed and analyzed.
[0122] The method of this application has been described above; the apparatus of this application will be described next.
[0123] See Figure 6 , Figure 6 This is a schematic diagram of the structure of a data correction device provided in an embodiment of this application, as shown below. Figure 6 As shown, the data correction device 40 includes:
[0124] The data acquisition module 401 is used to acquire two data streams to be corrected. The two data streams are data collected by the data acquisition components of two matching pressure-sensitive shoes. Each of the two pressure-sensitive shoes includes a shoe body, a sensing pad, and the data acquisition component. The sensing pad is provided with multiple pressure sensors for measuring plantar pressure. The data acquisition component is electrically connected to the sensing pad to receive the measurement data from the multiple pressure sensors. Each of the two data streams contains multiple data frames, each data frame includes the measurement data from the multiple pressure sensors, and each data frame has a timestamp.
[0125] The frame difference determination module 402 is used to determine the frame difference between the two data streams based on the timestamps of the data frames in the two data streams;
[0126] The frame interpolation module 403 is used to perform frame interpolation processing on the data with more frame loss in the two data streams based on the frame difference between the two data streams, so as to obtain the corrected two data streams.
[0127] In one possible design, the frame difference determination module 402 is specifically used to: determine a first reference data frame and a second reference data frame with the same timestamp in the two data streams based on the timestamps of the data frames in the two data streams, wherein the first reference data frame is a data frame in one of the two data streams and the second reference data frame is a data frame in the other of the two data streams; and determine the frame difference between the two data streams based on the difference between the frame number of the first reference data frame and the frame number of the second reference data frame.
[0128] In one possible design, the frame difference determination module 402 is specifically used for: traversing the timestamps in one of the data streams as a first timestamp; traversing the timestamps in the other data stream as a second timestamp; comparing the second timestamp with the first timestamp; if the second timestamp is the same as the first timestamp, using the data frame corresponding to the first timestamp in one of the data streams as a first reference data frame, and using the data frame corresponding to the second timestamp in the other data stream as a second reference data frame; if the second timestamp is different from the first timestamp, traversing the next timestamp of the second timestamp in the other data stream as the second timestamp, and performing the step of comparing the second timestamp with the first timestamp, until the second timestamp is the same as the first timestamp or all timestamps in the other data stream have been traversed; if all timestamps in the other data stream have been traversed, traversing the next timestamp of the first timestamp in one of the data streams as the first timestamp, and performing the step of traversing the timestamps in the other data stream as the second timestamp.
[0129] In one possible design, the frame difference determination module 402 is specifically used to: determine a reference data frame combination in the two data streams based on the timestamps of the data frames in the two data streams, the reference data frame combination including a first reference data frame and a second reference data frame, wherein the first reference data frame is a data frame in one of the two data streams, the timestamp of the first reference data frame is located before and closest to the reference timestamp in the one of the data streams, and the second reference data frame is a data frame in the other of the two data streams, the timestamp of the second reference data frame is located before and closest to the reference timestamp in the other data stream; and determine the frame difference between the two data streams based on the frame difference between the first reference data frame and the second reference data frame.
[0130] In one possible design, the frame difference determination module 402 is specifically used to: determine the theoretical frame difference corresponding to the combination of reference data frames based on the timestamps of the first and second reference data frames; determine the actual frame difference corresponding to the combination of reference data frames based on the frame numbers of the first and second reference data frames; determine the corrected frame difference corresponding to the combination of reference data frames based on the theoretical and actual frame differences; and determine the frame difference between the two data streams based on the corrected frame difference.
[0131] In one possible design, there are multiple sets of reference data frame combinations, and different sets of reference data frame combinations correspond to different reference timestamps; the frame difference determination module 402 is specifically used to: calculate the mean of the corrected frame difference corresponding to each of the multiple sets of reference data frame combinations, and obtain the frame difference between the two data streams.
[0132] In one possible design, the above-mentioned frame interpolation module 403 is specifically used to: determine a reference data frame in the data path with more frame drops, the reference data frame being used to indicate the reference position where frame drops occurred in the data path with more frame drops, the reference data frame being the first data frame in the data path with more frame drops, the first data frame being the data frame with the earliest timestamp; and supplement n data frames before the reference data frame, where n is the frame difference between the two data paths.
[0133] In one possible design, the above-mentioned frame interpolation module 403 is specifically used to: determine the single frame interval according to the data frame rate corresponding to the two data streams; subtract i from the frame number of the reference data frame to obtain the frame number of the (n+1-i)th data frame among the n data frames preceding the reference data frame; and subtract i single frame intervals from the timestamp of the reference data frame to obtain the timestamp of the (n+1-i)th data frame among the n data frames, where 1≤i≤n.
[0134] In one possible design, the above-mentioned frame interpolation module 403 is specifically used to: determine the data with the larger frame number of the first data frame in the two data frames as the data with more frame loss.
[0135] In one possible design, the frame difference determination module 402 is further configured to: determine whether the two data streams meet a preset continuous frame loss condition; if neither of the two data streams meets the preset continuous frame loss condition, execute the step of determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams.
[0136] In one possible design, the frame difference determination module 402 is further configured to: if at least one of the two data streams meets the preset continuous frame loss condition, output a data re-acquisition prompt, wherein the data re-acquisition prompt is used to prompt the user wearing the two pressure-sensitive shoes to re-acquire the two data streams based on the data acquisition components on the two pressure-sensitive shoes.
[0137] It should be noted that, Figure 6 For any content not mentioned in the corresponding embodiments, please refer to the description of the foregoing method embodiments, which will not be repeated here.
[0138] The aforementioned device, after acquiring two data streams to be corrected from two matching acquisition units, determines the frame difference between the two data streams based on the timestamps of the data frames in the two data streams. Then, based on the frame difference between the two data streams, it performs frame interpolation processing on the data stream with more missing frames to obtain the corrected two data streams. Determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams and performing frame interpolation on the data stream with more missing frames based on the frame difference can synchronize the two data streams, which helps to improve the accuracy of data analysis.
[0139] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device 50 provided in an embodiment of this application. The computer device 50 includes a processor 501 and a memory 502. The memory 502 is connected to the processor 501, for example, via a bus.
[0140] Processor 501 is configured to support the computer device 50 in performing the corresponding functions in the methods described in the above method embodiments. Processor 501 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0141] Memory 502 is used to store program code, etc. Memory 502 may include volatile memory (VM), such as random access memory (RAM); memory 502 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 502 may also include combinations of the above types of memory.
[0142] Processor 501 can call the program code to perform the following operations:
[0143] Two data streams to be corrected are acquired. These two data streams are data collected by the data acquisition components of two matching pressure-sensitive shoes. Each of the two pressure-sensitive shoes includes a shoe body, a sensing pad, and the data acquisition component. The sensing pad is equipped with multiple pressure sensors for measuring plantar pressure. The data acquisition component is electrically connected to the sensing pad to receive measurement data from the multiple pressure sensors. Each of the two data streams contains multiple data frames, and each data frame includes measurement data from the multiple pressure sensors. Each data frame has a timestamp.
[0144] The frame difference between the two data streams is determined based on the timestamps of the data frames in the two data streams.
[0145] Based on the frame difference between the two data streams, the data stream with more frame loss is processed to obtain the corrected data streams.
[0146] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in the foregoing embodiments.
[0147] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0148] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data correction method, characterized in that, include: Two data streams to be corrected are acquired. These two data streams are data collected by the data acquisition components of two matching pressure-sensitive shoes. Each of the two pressure-sensitive shoes includes a shoe body, a sensing pad, and the data acquisition component. The sensing pad is equipped with multiple pressure sensors for measuring plantar pressure. The data acquisition component is electrically connected to the sensing pad to receive measurement data from the multiple pressure sensors. Each of the two data streams contains multiple data frames, and each data frame includes measurement data from the multiple pressure sensors. Each data frame has a timestamp. The frame difference between the two data streams is determined based on the timestamps of the data frames in the two data streams. Based on the frame difference between the two data streams, the data stream with more frame loss is processed to obtain the corrected data streams.
2. The method according to claim 1, characterized in that, The step of determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams includes: Based on the timestamps of the data frames in the two data streams, a first reference data frame and a second reference data frame with the same timestamp are determined in the two data streams. The first reference data frame is a data frame in one of the two data streams, and the second reference data frame is a data frame in the other of the two data streams. The frame difference between the two data streams is determined based on the difference between the frame number of the first reference data frame and the frame number of the second reference data frame.
3. The method according to claim 2, characterized in that, The step of determining a first reference data frame and a second reference data frame with the same timestamp from the two data streams based on the timestamps of the data frames in the two data streams includes: Iterate through the timestamps in one of the data streams and use it as the first timestamp; Iterate through the timestamps in the other data stream and use them as the second timestamp; Compare the second timestamp with the first timestamp; If the second timestamp is the same as the first timestamp, the data frame corresponding to the first timestamp in one of the data streams is taken as the first reference data frame, and the data frame corresponding to the second timestamp in the other data stream is taken as the second reference data frame. If the second timestamp is different from the first timestamp, the next timestamp of the second timestamp in the other data is used as the second timestamp, and the step of comparing the second timestamp with the first timestamp is executed until the second timestamp is the same as the first timestamp or all timestamps in the other data are traversed. If all timestamps in the other data path have been traversed, the next timestamp of the first timestamp in one of the data paths is used as the first timestamp, and the step of traversing the timestamps in the other data path as the second timestamp is executed.
4. The method according to claim 1, characterized in that, The step of determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams includes: Based on the timestamps of the data frames in the two data streams, a set of reference data frames is determined in the two data streams. The set of reference data frames includes a first reference data frame and a second reference data frame. The first reference data frame is a data frame in one of the two data streams, and its timestamp is located before and closest to the reference timestamp in the one data stream. The second reference data frame is a data frame in the other data stream, and its timestamp is located before and closest to the reference timestamp in the other data stream. The frame difference between the two data streams is determined based on the frame difference between the first and second reference data frames.
5. The method according to claim 4, characterized in that, Determining the frame difference between the two data streams based on the frame difference between the first and second reference data frames includes: Based on the timestamps of the first and second reference data frames, the theoretical frame difference corresponding to the combination of reference data frames is determined; Based on the frame number of the first reference data frame and the frame number of the second reference data frame, determine the actual frame difference corresponding to the combination of reference data frames; The corrected frame difference corresponding to the reference data frame combination is determined based on the theoretical frame difference and the actual frame difference corresponding to the reference data frame combination. The frame difference between the two data streams is determined based on the corrected frame difference corresponding to the combination of the reference data frames.
6. The method according to claim 5, characterized in that, The comparison data frame combination has multiple groups, and different groups of comparison data frame combinations correspond to different reference timestamps; The step of determining the frame difference between the two data streams based on the corrected frame difference corresponding to the comparison data frame combination includes: The average of the corrected frame differences corresponding to each of the multiple sets of comparison data frame combinations is calculated to obtain the frame difference between the two data streams.
7. The method according to any one of claims 1-6, characterized in that, The step involves performing frame interpolation on the data stream with more frame drops based on the frame difference between the two data streams, resulting in corrected data streams, including: A reference data frame is determined in the data channel with more frame loss. The reference data frame is used to indicate the reference position where frame loss occurred in the data channel with more frame loss. The reference data frame is the first data frame in the data channel with more frame loss. The first data frame is the data frame with the earliest timestamp. n data frames are added before the reference data frame, where n is the frame difference between the two data streams.
8. The method according to claim 7, characterized in that, The step of supplementing n data frames before the reference data frame includes: The single frame interval is determined based on the data frame rate corresponding to the two data streams; Subtract i from the frame number of the reference data frame to obtain the frame number of the (n+1-i)th data frame among the n data frames preceding the reference data frame. Subtract i single-frame intervals from the timestamp of the reference data frame to obtain the timestamp of the (n+1-i)th data frame among the n data frames, where 1≤i≤n.
9. The method according to claim 7, characterized in that, Before determining the reference data frame from the data stream with more lost frames, the method further includes: The data with the larger frame number in the first data frame of the two data frames is identified as the data with more lost frames.
10. The method according to any one of claims 1-6, characterized in that, Before determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams, the method further includes: Determine whether the two data streams meet the preset continuous frame dropping condition; If neither of the two data streams meets the preset continuous frame loss condition, the step of determining the frame difference between the two data streams based on the timestamps of the data frames in the two data streams is executed.
11. The method according to claim 10, characterized in that, The method further includes: If at least one of the two data streams meets the preset continuous frame loss condition, a data re-acquisition prompt is output. The data re-acquisition prompt is used to prompt the user wearing the two pressure-sensitive shoes to re-acquire the two data streams based on the data acquisition components of the two pressure-sensitive shoes.
12. A data correction device, characterized in that, include: The data acquisition module is used to acquire two data streams to be corrected. The two data streams are data collected by the data acquisition components of two matching pressure-sensitive shoes. Each of the two pressure-sensitive shoes includes a shoe body, a sensing pad, and the data acquisition component. The sensing pad is equipped with multiple pressure sensors for measuring plantar pressure. The data acquisition component is electrically connected to the sensing pad to receive the measurement data from the multiple pressure sensors. Each of the two data streams contains multiple data frames, each data frame includes the measurement data from the multiple pressure sensors, and each data frame has a timestamp. The frame difference determination module is used to determine the frame difference between the two data streams based on the timestamps of the data frames in the two data streams. The frame interpolation module is used to perform frame interpolation on the data stream with more frame loss based on the frame difference between the two data streams, so as to obtain the corrected data streams.
13. A computer device, characterized in that, The device includes a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, and the processor, when executing the one or more computer programs, causing the computer device to perform the method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-11.
15. A pressure-sensitive shoe data processing system, characterized in that, Includes data processing equipment and two matching pressure-sensitive shoes; Each of the two pressure-sensitive shoes includes a shoe body, a sensing pad, and the data acquisition component. The sensing pad is equipped with multiple pressure sensors for measuring plantar pressure. The data acquisition component is electrically connected to the sensing pad to receive measurement data from the multiple pressure sensors. The data processing device is connected to the two pressure-sensitive shoes, and the data processing device is used to perform the method as described in any one of claims 1-11.
