A data encoding method for a multi-mode hardware-in-the-loop simulation system

By analyzing the frequency and change trends of sensor data, screening out key stages and optimizing Hoffman coding, the problem of poor performance of traditional encoding methods at critical moments is solved, and more efficient data encoding and transmission is achieved.

CN120263195BActive Publication Date: 2025-08-12XIAN GAOSHANG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510733389.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-08-12
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

In the prior art, the traditional Hoffmann encoding method fails to effectively consider the importance of different testing stages in the semi-physical simulation testing system, resulting in poor encoding effects at critical moments.

Method used

By analyzing the frequency, change trend and time distribution characteristics of sensor data, key stages are selected, and Hoffman encoding is optimized according to coding priority to ensure priority processing of key data during the coding process.

Benefits of technology

It improves the effectiveness and efficiency of data encoding, reduces data transmission delay, and improves the system's response speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263195B_ABST
    Figure CN120263195B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data encoding technology, and in particular to a data encoding method for a multi-mode semi-physical simulation system. The present invention analyzes the changing trend of the data value corresponding to the character data under each sensor in each historical test, and obtains the possibility that each character data is in a critical stage; obtains a preset number of initial critical stages under each sensor; obtains the time approximation degree of each initial critical stage of the same serial number under all sensors based on the time distribution characteristics corresponding to the character data in each initial critical stage of the same serial number between different sensors; screens out the final critical stage in each historical test; and then obtains the critical frequency of each character data; obtains the encoding priority of each character data in combination with the frequency of occurrence of each character data; and encodes all sensor data. The present invention improves the effectiveness of data encoding by obtaining the accurate encoding priority of each character data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data coding, and in particular to a data coding method for a multi-mode hardware-in-the-loop simulation system. Background Art

[0002] In a semi-physical simulation test system, real-time interaction between the physical object and the simulation model can be achieved, generating more realistic input and output responses, thereby obtaining relatively reliable test results. Throughout the entire process, in order to better simulate the actual operating status of the system, it is usually necessary to select a suitable data encoding method to encode and transmit efficiently and accurately. The optimized encoding can reduce data transmission delays, improve transmission efficiency, and enable the system to respond more quickly to changes in the external environment and user operations.

[0003] In the prior art, traditional Huffman coding is used to encode acquired data based on the frequency of occurrence of the data. The greater the frequency of occurrence, the shorter the code length, and the smaller the frequency of occurrence, the longer the code length. However, since there are test stages of different importance during system testing, there is a possibility that the frequency of data may be low at critical moments that require high response speed. Traditional Huffman coding only uses the frequency of data occurrence as a measure of code length, resulting in a relatively long code length at critical moments and poor coding effect. Summary of the Invention

[0004] In order to solve the technical problem that the different importance levels of the test phases are not taken into account and the data encoding effect is poor, the purpose of the present invention is to provide a data encoding method for a multi-mode hardware-in-the-loop simulation system. The technical solution adopted is as follows:

[0005] The present invention proposes a data encoding method for a multi-mode hardware-in-the-loop simulation system, the method comprising:

[0006] Acquire multiple sensor data of the multi-mode hardware-in-the-loop simulation system in each historical test in time sequence;

[0007] Traverse all sensor data in all historical tests and obtain the frequency of occurrence of each character data in the sensor data;

[0008] For any historical test, the probability of each character data under each sensor being in a critical stage is obtained based on the change trend of the corresponding data value between each character data under each sensor and the character data within different preset neighborhoods; a preset number of initial critical stages under each sensor are obtained based on the probability; the time distribution characteristics corresponding to each character data in each initial critical stage with the same sequence number across different sensors are used to obtain the time proximity of each initial critical stage with the same sequence number under all sensors; and the final critical stage in each historical test is screened based on the time proximity.

[0009] Traversing the character data in the final critical phase of all historical tests to obtain the critical frequency of each character data; obtaining the encoding priority of each character data according to the occurrence frequency and the critical frequency of each character data;

[0010] All sensor data are encoded according to the encoding priority.

[0011] Furthermore, the method for obtaining the possibility includes:

[0012] For any sensor in each historical test, the different preset neighborhood ranges include the left neighborhood range and the right neighborhood range of each character data;

[0013] Obtaining the mean of the differences between corresponding data values of each character data and different character data within the left neighborhood as the first change feature;

[0014] Obtaining the mean difference between the corresponding data values of each character data and different character data within the right neighboring range as the second change feature;

[0015] According to the first change feature and the second change feature, the probability of each character data under each sensor in each historical test being in a critical stage is obtained, the first change feature is positively correlated with the probability, and the second change feature is negatively correlated with the probability.

[0016] Furthermore, the method for obtaining the initial critical stage includes:

[0017] A preset number of character data with the greatest probability of being in a critical stage are selected as starting points of a preset number of initial critical stages; and the character data with the least probability after each starting point is obtained as the end point of the initial critical stage corresponding to each starting point.

[0018] Furthermore, the method for obtaining the time approximation degree includes:

[0019] Under any sensor in each historical test, the mean value of the corresponding time series of all character data in each initial critical stage is obtained as the occurrence time of each initial critical stage;

[0020] Obtain the mean of the occurrence time of each initial critical phase with the same sequence number under all sensors as the average occurrence time of each initial critical phase with the same sequence number;

[0021] Based on the difference between the occurrence time of each initial critical phase with the same serial number under different sensors and the corresponding average occurrence time, the time convergence degree of each initial critical phase with the same serial number under all sensors in each historical test is obtained. The difference is negatively correlated with the time convergence degree.

[0022] Furthermore, the method for obtaining the final critical stage includes:

[0023] If the time approximation of each initial critical phase with the same sequence number under all sensors in each historical test is greater than a preset approximation threshold, the initial critical phase with the corresponding sequence number is taken as the final critical phase.

[0024] Furthermore, the method for obtaining the key frequency includes:

[0025] For the character data included in the final criticality stage, obtaining the ratio between the number of occurrences of each character data in all the final critical stages and the number of all the character data as the critical frequency of the corresponding character data;

[0026] For character data not included in the final criticality stage, the critical frequency of the corresponding character data is zero.

[0027] Furthermore, the method for obtaining the encoding priority includes:

[0028] Calculate the sum of the key frequency corresponding to each character data and the positive integer 1 as the weight value;

[0029] The occurrence frequency of each character data is weighted according to the weight value to obtain the encoding priority of each character data.

[0030] Furthermore, encoding all sensor data according to the encoding priority includes:

[0031] Based on the encoding priority, all sensor data are encoded using Huffman encoding.

[0032] Furthermore, the method for obtaining the occurrence frequency includes:

[0033] The character data of each sensor data is obtained, and the ratio of the number of occurrences of each character data in all historical tests to the number of all character data is obtained as the occurrence frequency of each character data.

[0034] Furthermore, the preset approach threshold is 0.5.

[0035] The present invention has the following beneficial effects:

[0036] The present invention traverses all sensor data in all historical tests, obtains the frequency of occurrence of each character data in the sensor data, understands which character data appear frequently, and may reveal the potential pattern or periodicity of the data; since the critical stage is sudden, in order to capture the dynamic changes of each sensor data over time, for any historical test, according to the change trend of the corresponding data value between each character data under each sensor and the character data within different preset neighborhoods, the possibility of each character data under each sensor being in the critical stage is obtained, and the position where the data value changes significantly is identified; according to the possibility, a preset number of initial critical stages under each sensor are obtained, and the initial focus is on the stage that is most likely to represent important changes, thereby reducing the amount of data analyzed; since multiple sensors simultaneously monitor the simulation test process of the same system, ideally, the changes in data should be consistent to a certain extent, and according to the different sensors, the changes in data should be consistent to a certain extent. The time distribution characteristics corresponding to the character data in each initial critical phase with the same sequence number are obtained to obtain the time approximation of each initial critical phase with the same sequence number under all sensors, and to evaluate the consistency of the change of critical phases between sensors; the final critical phase in each historical test is screened out according to the time approximation to ensure that the final selected critical phase has high consistency and representativeness under all sensors; the character data in the final critical phase in all historical tests are traversed to obtain the key frequency of each character data, reflecting the importance of the character data in the critical phase; the encoding priority of each character data is obtained according to the occurrence frequency and key frequency of each character data, and the importance of the character data is more comprehensively evaluated, thereby determining its priority in the encoding process, helping to optimize the encoding strategy and improve encoding efficiency and accuracy; all sensor data are encoded according to the encoding priority. The present invention obtains the accurate encoding priority of each character data by considering the different importance of the test process, thereby improving the effectiveness of data encoding. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 A flow chart of a data encoding method for a multi-mode hardware-in-the-loop simulation system provided by one embodiment of the present invention;

[0039] Figure 2 A flow chart of a possible acquisition method provided by one embodiment of the present invention;

[0040] Figure 3 A flow chart of a method for obtaining the degree of temporal proximity provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0041] To further illustrate the technical means and effectiveness of the present invention in achieving its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail a data encoding method for a multi-mode hardware-in-the-loop simulation system, including its specific implementation, structure, features, and effectiveness. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

[0042] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0043] The following describes in detail a data encoding method for a multi-mode hardware-in-the-loop simulation system provided by the present invention with reference to the accompanying drawings.

[0044] See also Figure 1 , which shows a flow chart of a data encoding method for a multi-mode hardware-in-the-loop simulation system provided by one embodiment of the present invention. The specific method includes:

[0045] Step S1: Acquire multiple sensor data of the multi-mode hardware-in-the-loop simulation system in each historical test according to time sequence.

[0046] In an embodiment of the present invention, in order to reduce the delay of data transmission in the simulation system, improve the transmission efficiency, and better simulate the actual operating status of the system, it is necessary to encode and process various types of data in the system; first, in the multi-mode semi-physical simulation system, there are multiple sensors used to capture the physical parameters and environmental conditions during the actual system operation process, analyze the operating status of the system, and obtain multiple sensor data of the multi-mode semi-physical simulation system in each historical test in a time sequence; among them, the multiple sensors include at least pressure sensors, temperature sensors, and position sensors.

[0047] It should be noted that, in one embodiment of the present invention, the time range of each historical test is 10 minutes and the interval is 2 seconds; in other embodiments of the present invention, the time range and interval size of each historical test can be set according to the specific circumstances, and are not limited or elaborated here.

[0048] Step S2: traverse all sensor data in all historical tests and obtain the occurrence frequency of each character data in the sensor data.

[0049] Since the number of occurrences of each sensor character data in the sensor data may be different, knowing which character data appear frequently may reveal the underlying pattern or periodicity of the data.

[0050] It should be noted that the same sensor data contains the same information, and the corresponding character data is the same; in one embodiment of the present invention, the method for obtaining the frequency of occurrence includes: obtaining the character data of each sensor data, obtaining the ratio of the number of occurrences of each character data in all historical tests to the number of all character data as the frequency of occurrence of each character data, the more the number of occurrences, the greater the frequency of occurrence.

[0051] It should be noted that in the embodiments of the present invention, the numerical values, symbols and other information in the sensor data can be converted into readable character forms through existing ASCII codes, Unicode, etc. The specific means are technical means well known to those skilled in the art and will not be elaborated here.

[0052] Among them, the formula for the frequency of occurrence is expressed as: ;in, Indicates the The frequency of occurrence of character data; Indicates the The number of times a character data appears in all historical tests; Indicates the number of character data in all historical tests.

[0053] Step S3: For any historical test, based on the changing trend of the corresponding data values between each character data under each sensor and the character data in different neighborhood ranges, the possibility of each character data under each sensor being in the critical stage is obtained; based on the possibility, a preset number of initial critical stages under each sensor are obtained; based on the time distribution characteristics corresponding to the character data in each initial critical stage with the same serial number between different sensors, the time convergence degree of each initial critical stage with the same serial number under all sensors is obtained; and based on the time convergence degree, the final critical stage in each historical test is screened out.

[0054] For the normal test phase, that is, the correction and debugging phase, the size changes of its data values are similar, so the data character frequency usually dominates the high-frequency data, which will lead to relatively low data character frequencies corresponding to some critical phases of the test, causing the data transmission efficiency in the critical phase of the test to be lower than that in the normal phase of the test, affecting the data transmission efficiency. Therefore, it is necessary to consider the critical phase in the system test.

[0055] Because critical phases are often sudden, to capture the dynamic changes in each sensor's data over time, we focus on the changing trends of data values at different time points. By comparing the difference between each current character data and character data within different neighborhoods, we identify locations where data values have significantly changed, potentially indicating critical phases. Therefore, for any historical test, we determine the likelihood that each character data point for each sensor is in a critical phase based on the changing trends between the corresponding data values for each sensor and character data within different preset neighborhoods.

[0056] Preferably, in one embodiment of the present invention, the method for obtaining the possibility is as follows: Figure 2 , which shows a flow chart of a possible acquisition method provided by an embodiment of the present invention, the method comprising:

[0057] Step S201: For any sensor in each historical test, different preset neighborhood ranges include a left neighborhood range and a right neighborhood range of each character data.

[0058] Since each historical test usually requires a series of calibration and adjustments, and the critical stage requires a high system response stage, the data in the critical stage is significantly different from the data presented before, and the data corresponding to the critical stage is significantly larger; by comparing the character data with the character data after it, the continuity of the data change can be understood; if the character data is not much different from the character data after it, it may indicate that the data is in a relatively critical stage.

[0059] It should be noted that, in one embodiment of the present invention, the method for obtaining different preset neighborhood ranges includes: taking each character data as a benchmark, the M character data adjacent to the left constitute the left neighborhood range, and the M character data adjacent to the right constitute the right neighborhood range, and the value of M is 15; wherein, if the neighborhood range does not meet M character data, it is padded with zeros; in other embodiments of the present invention, the size of the neighborhood range can be set according to the specific situation, which is not limited or elaborated here.

[0060] Step S202: obtaining the mean of the differences between corresponding data values of each character data and different character data within the left neighborhood as the first change feature.

[0061] For the ordinary test stage and the critical stage, since the critical stage is more sudden than the ordinary test stage, the data value corresponding to the critical stage is significantly larger than that of the ordinary test stage. The larger the difference feature, the overall level of difference from the left neighborhood can be quantified by calculating the mean difference between each character data and the corresponding data values of different character data in the left neighborhood. If the difference is larger, the corresponding mean is larger, the difference change is larger, the corresponding character data is more likely to be in the critical stage, and the first change feature is larger.

[0062] Step S203: obtaining the mean difference between the corresponding data values of each character data and different character data within the right neighborhood as the second change feature.

[0063] The second change feature can evaluate the degree of difference between the data and the data in the right neighborhood range by calculating the mean difference between the corresponding data values of each character data and different character data in the right neighborhood range. The smaller the difference, the smaller the mean difference, the smaller the fluctuation, and the more consistent the data size. If it is likely to be in a continuous critical stage, the second change feature will also be smaller.

[0064] Step S204: Based on the first change feature and the second change feature, the probability of each character data under each sensor in each historical test being in a critical stage is obtained, wherein the first change feature is positively correlated with the probability and the second change feature is negatively correlated with the probability.

[0065] Among them, the positive correlation relationship indicates that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases, that is, the larger the first change feature, the greater the data value corresponding to each character data is than the corresponding data value of the character data in the left neighborhood range, and there is an obvious difference. It is more likely that the character data in the left neighborhood range is not in the same stage, and the possibility of being in the critical stage is greater; the negative correlation relationship indicates that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases, that is, the larger the second change feature, the greater the difference in the corresponding data value between each character data and the character data in the right neighborhood range, that is, the greater the fluctuation between the data, the more uneven the distribution, and the smaller the possibility of being in the critical stage.

[0066] In one embodiment of the present invention, the probability is expressed as:

[0067] ;

[0068] in, Indicates the The first historical test Type of sensor The probability that a character data is in a critical stage; Indicates the number of character data within each neighborhood; Indicates the The first historical test Type of sensor Character data corresponds to data value; Indicates the The first historical test Type of sensor The left neighbor of the character data Character data corresponds to data value; Indicates the The first historical test Type of sensor The character data in the right neighborhood Character data corresponds to data value; represents the adjustment parameter; represents the linear normalization function; Indicates taking the absolute value.

[0069] In the probability formula, It means calculating the mean of the difference between the corresponding data values of each character data and different character data in the left neighborhood, that is, the first change feature. The larger the first change feature, that is, the greater the difference between the corresponding data values of each character data and different character data in the left neighborhood, the more likely it is to be in the critical stage. The greater the possibility, the smaller the first change feature, that is, the smaller the difference between the corresponding data values of each character data and different character data in the left neighborhood, the smaller the possibility of being in the critical stage. It means calculating the mean difference between the corresponding data values of each character data and different character data in the right neighborhood, that is, the second change feature. The larger the second change feature, that is, the greater the difference between the corresponding data values of each character data and different character data in the right neighborhood, the more inconsistent the data sizes are, and the smaller the possibility of being in the same critical stage. The smaller the second change feature, that is, the smaller the difference between the corresponding data values of each character data and different character data in the right neighborhood, the more uniform the data distribution is, and the greater the possibility of being in the same critical stage. Therefore, the larger the first change feature, the smaller the second change feature, and the greater the possibility of being in the critical stage.

[0070] It should be noted that, in one embodiment of the present invention, in order to avoid the denominator of the formula being 0, the adjustment parameter It is set to 0.01; in other embodiments of the present invention, it can also be set to other values according to specific circumstances, which will not be limited or elaborated here.

[0071] Because the amount of data can be very large, directly processing all potential key data would be very complex. Considering the sudden nature of key stages, the likelihood of the starting point corresponding to a point should be greater, and the likelihood of the end of a key stage corresponding to a point should be smaller. By screening key points with high and low likelihood, we can focus on the stages most likely to represent important changes. Therefore, a preset number of initial key stages are obtained for each sensor based on the likelihood.

[0072] Preferably, in one embodiment of the present invention, the method for obtaining the initial criticality stage includes:

[0073] A preset number of character data with the greatest probability of being in a critical stage are selected as starting points of a preset number of initial critical stages; and the character data with the least probability after each starting point is obtained as the end point of the initial critical stage corresponding to each starting point.

[0074] It should be noted that, in the embodiment of the present invention, the preset number can be set by the implementer according to the specific situation, such as a value of 5, which is not limited or elaborated here.

[0075] Because multiple sensors simultaneously monitor the same system during simulation testing, ideally, data from each sensor should corroborate to a certain degree, and data changes should be consistent. By analyzing whether different sensors have similar time characteristics at the same critical phase, and analyzing the degree of temporal convergence between sensors, we can further select more accurate and reliable critical phases. Based on the temporal distribution characteristics of the character data corresponding to each initial critical phase with the same sequence number across different sensors, we can determine the temporal convergence of each initial critical phase with the same sequence number across all sensors.

[0076] Preferably, in one embodiment of the present invention, the method for obtaining the time approximation degree is as follows: Figure 3 , which shows a flow chart of a method for obtaining a degree of temporal proximity provided by an embodiment of the present invention, the method comprising:

[0077] Step S301: Under any sensor in each historical test, obtain the mean value of the corresponding time series of all character data in each initial critical stage as the occurrence time of each initial critical stage.

[0078] By calculating the mean of the time series corresponding to all character data in each initial critical stage, a representative time point can be obtained, which can better reflect the occurrence time series characteristics of this stage in the entire historical test.

[0079] Step S302: Obtain the average of the occurrence time of each initial critical phase with the same sequence number under all sensors as the average occurrence time of each initial critical phase with the same sequence number.

[0080] Since different sensors may be affected by factors such as equipment, they may produce different response changes. By calculating the average occurrence time of the initial critical phase with the same sequence number under all sensors, it can be used as a benchmark for evaluating the occurrence time deviation of each sensor in the corresponding initial critical phase, so as to subsequently analyze the change status between sensors.

[0081] Step S303: Based on the difference between the occurrence time of each initial critical phase with the same sequence number under different sensors and the corresponding average occurrence time, the time convergence degree of each initial critical phase with the same sequence number under all sensors in each historical test is obtained. The difference is negatively correlated with the time convergence degree.

[0082] Among them, the negative correlation relationship indicates that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. That is, the greater the difference, the more inconsistent the occurrence time of the initial critical stage of the same serial number under the corresponding sensor is with the overall occurrence time of all sensors, and the smaller the degree of temporal convergence.

[0083] In one embodiment of the present invention, the formula for the degree of temporal approximation is expressed as:

[0084] ;

[0085] in, Indicates the All sensors in the historical test the temporal proximity of the initial critical stages; Indicates the The first historical test Type of sensor The timing of the first critical phase; Indicates the All sensors in the historical test The average time it takes for the initial critical phase to occur; Indicates the number of sensors; represents the linear normalization function.

[0086] In the formula for the degree of temporal convergence, Indicates calculation of The different sensors in the historical test The mean of the difference between the occurrence time of the first critical stage and the average occurrence time is greater. The first time each sensor in the historical test The less the occurrence time of an initial critical stage is close to the average occurrence time, the greater the time deviation is, and the smaller the corresponding time convergence is.

[0087] It should be noted that, in other embodiments of the present invention, You can also use The negative correlation is achieved by finding the inverse, that is The larger it is, the smaller it is after taking the inverse, and the smaller the degree of time convergence; among them, if the inverse method is used to achieve negative correlation, it is necessary to artificially add an adjustment parameter at the denominator of the formula, such as 0.01, to avoid the denominator of the formula being 0; the specific means are technical fields well known to those skilled in the art and will not be elaborated here.

[0088] Temporal proximity can be used to assess the consistency of critical phase changes across sensors. If different sensors detect critical changes in data at similar time points, then these time points are more likely to represent the true critical phases of the system or process. This allows the elimination of critical phases that occur only in a single sensor and are not verified by other sensors, thereby optimizing the final critical phase identification results and ensuring that the selected critical phase is highly consistent and representative across all sensors. Therefore, the final critical phase in each historical test is selected based on temporal proximity.

[0089] Preferably, in one embodiment of the present invention, the method for obtaining the final critical stage includes:

[0090] If the time approximation of each initial critical phase with the same sequence number under all sensors in each historical test is greater than a preset approximation threshold, the initial critical phase with the corresponding sequence number is taken as the final critical phase.

[0091] It should be noted that, in one embodiment of the present invention, the preset approach threshold is 0.5; in other embodiments of the present invention, the size of the preset approach threshold can be set according to specific circumstances, which is not limited or elaborated here.

[0092] Step S4: traverse the character data in the final critical phase of all historical tests to obtain the critical frequency of each character data; obtain the encoding priority of each character data according to the occurrence frequency and critical frequency of each character data.

[0093] In order to fully understand and analyze which character data are important or frequently appearing in the critical stages of historical tests, the character data in the final critical stages of all historical tests are traversed to obtain the critical frequency of each character data, which reflects the importance of the character data in the critical stage.

[0094] Preferably, in one embodiment of the present invention, the method for obtaining the key frequency includes:

[0095] For the character data included in the final criticality stage, obtaining the ratio between the number of occurrences of each character data in all the final critical stages and the number of all the character data as the critical frequency of the corresponding character data;

[0096] For character data not included in the final criticality stage, the critical frequency of the corresponding character data is zero.

[0097] If the number of times the key characters appear in the final critical stage is greater, they need to be encoded in a priority manner to improve the real-time performance of the overall system performance.

[0098] Occurrence frequency can reveal the distribution of character data across the entire dataset, reflecting its prevalence or activity. By comprehensively considering both occurrence frequency and key frequency, we can more comprehensively assess the importance of character data and determine its priority during encoding, helping to optimize encoding strategies and improve encoding efficiency and accuracy. Therefore, we determine the encoding priority of each character data based on its occurrence frequency and key frequency.

[0099] Preferably, in one embodiment of the present invention, the method for obtaining the encoding priority includes:

[0100] Calculate the sum of the key frequency corresponding to each character data and the positive integer 1 as the weight value;

[0101] The occurrence frequency of each character data is weighted according to the weight value to obtain the encoding priority of each character data.

[0102] In one embodiment of the present invention, the formula for encoding priority is expressed as:

[0103] ;

[0104] in, Indicates the The encoding priority of character data; Indicates the The frequency of occurrence of character data; Indicates the The key frequency of character data.

[0105] In the formula for encoding priority, It means calculating the sum of the key frequency corresponding to each character data and the positive integer 1, that is, the weight value. The larger the key frequency, the more times it appears in the critical stage, the more it is necessary to increase the frequency of occurrence of the character data, and the greater the encoding priority.

[0106] It should be noted that in other embodiments of the present invention, other basic mathematical methods such as addition can also be used to obtain a positive correlation relationship in which the greater the frequency of occurrence, the greater the key frequency, and the greater the coding priority. The specific means are technical means well known to those skilled in the art and will not be elaborated here.

[0107] Step S5: Encode all sensor data according to the encoding priority.

[0108] During data transmission or storage, character data with a higher encoding priority represents data at a more critical stage or commonly occurring data, and thus needs to be retained or processed with priority. By encoding according to encoding priority, data can be compressed more effectively while ensuring that important information is not lost. All sensor data is encoded according to encoding priority.

[0109] Preferably, in one embodiment of the present invention, encoding all sensor data according to the encoding priority includes:

[0110] Based on the coding priority, Huffman coding is used to encode all sensor data.

[0111] By incorporating code priority, Huffman coding can more accurately allocate code lengths based on the importance of each sensor data type. High-priority data values, i.e., data that frequently or commonly appears during critical phases, are assigned shorter codes, further improving data encoding effectiveness. It should be noted that the specific Huffman coding techniques are well known to those skilled in the art and will not be detailed here.

[0112] After Huffman coding the data values from all sensors, the data volume can be reduced, effectively reducing the bandwidth and transmission time required during data transmission, improving the efficiency and real-time performance of data transmission, thereby reducing the corresponding response time under tests that require a high response stage, and thus improving the real-time performance of the overall system performance, making multi-mode semi-physical simulation tests more accurate.

[0113] In summary, the present invention traverses all sensor data from all historical tests to obtain the frequency of occurrence of each character data in the sensor data; for any historical test, based on the changing trend of the corresponding data values between each character data under each sensor and the character data within different preset neighborhoods, the probability of each character data under each sensor being in a critical stage is obtained; based on the probability, a preset number of initial critical stages under each sensor are obtained; based on the time distribution characteristics corresponding to the character data in each initial critical stage with the same sequence number between different sensors, the time proximity of each initial critical stage with the same sequence number under all sensors is obtained; based on the time proximity, the final critical stage in each historical test is selected; the character data in the final critical stage of all historical tests is traversed to obtain the critical frequency of each character data; based on the frequency of occurrence and the critical frequency of each character data, the encoding priority of each character data is obtained; and all sensor data are encoded. The present invention improves the effectiveness of data encoding by obtaining the accurate encoding priority of each character data.

[0114] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0115] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

Claims

1. A data encoding method for a multi-mode hardware-in-the-loop simulation system, characterized in that: The method comprises: Acquire multiple sensor data of the multi-mode hardware-in-the-loop simulation system in each historical test in time sequence; Traverse all sensor data in all historical tests and obtain the frequency of occurrence of each character data in the sensor data; For any historical test, the probability of each character data under each sensor being in a critical stage is obtained based on the change trend of the corresponding data value between each character data under each sensor and the character data within different preset neighborhoods; a preset number of initial critical stages under each sensor are obtained based on the probability; the time distribution characteristics corresponding to each character data in each initial critical stage with the same sequence number across different sensors are used to obtain the time proximity of each initial critical stage with the same sequence number under all sensors; and the final critical stage in each historical test is screened based on the time proximity. Traversing the character data in the final critical phase of all historical tests to obtain the critical frequency of each character data; obtaining the encoding priority of each character data according to the occurrence frequency and the critical frequency of each character data; Encoding all sensor data according to the encoding priority; The method for obtaining the possibility includes: For any sensor in each historical test, the different preset neighborhood ranges include the left neighborhood range and the right neighborhood range of each character data; Obtaining the mean of the differences between corresponding data values of each character data and different character data within the left neighborhood as the first change feature; Obtaining the mean difference between the corresponding data values of each character data and different character data within the right neighboring range as the second change feature; According to the first change feature and the second change feature, the probability of each character data under each sensor in each historical test being in a critical stage is obtained, the first change feature is positively correlated with the probability, and the second change feature is negatively correlated with the probability.

2. The data encoding method of a multi-mode hardware-in-the-loop simulation system according to claim 1, characterized in that: The method for obtaining the initial critical stage includes: A preset number of character data with the greatest probability of being in a critical stage are selected as starting points of a preset number of initial critical stages; and the character data with the least probability after each starting point is obtained as the end point of the initial critical stage corresponding to each starting point.

3. The data encoding method of a multi-mode hardware-in-the-loop simulation system according to claim 1, characterized in that: The method for obtaining the time approximation degree includes: Under any sensor in each historical test, the mean value of the corresponding time series of all character data in each initial critical stage is obtained as the occurrence time of each initial critical stage; Obtain the mean of the occurrence time of each initial critical phase with the same sequence number under all sensors as the average occurrence time of each initial critical phase with the same sequence number; Based on the difference between the occurrence time of each initial critical phase with the same serial number under different sensors and the corresponding average occurrence time, the time convergence degree of each initial critical phase with the same serial number under all sensors in each historical test is obtained. The difference is negatively correlated with the time convergence degree.

4. The data encoding method of a multi-mode hardware-in-the-loop simulation system according to claim 1, characterized in that: The method for obtaining the final critical stage includes: If the time approximation of each initial critical phase with the same sequence number under all sensors in each historical test is greater than a preset approximation threshold, the initial critical phase with the corresponding sequence number is taken as the final critical phase.

5. The data encoding method of a multi-mode hardware-in-the-loop simulation system according to claim 1, characterized in that: The method for obtaining the key frequency includes: For the character data included in the final criticality stage, obtaining the ratio between the number of occurrences of each character data in all the final critical stages and the number of all the character data as the critical frequency of the corresponding character data; For character data not included in the final criticality stage, the critical frequency of the corresponding character data is zero.

6. The data encoding method of a multi-mode hardware-in-the-loop simulation system according to claim 1, characterized in that: The method for obtaining the encoding priority includes: Calculate the sum of the key frequency corresponding to each character data and the positive integer 1 as the weight value; The occurrence frequency of each character data is weighted according to the weight value to obtain the encoding priority of each character data.

7. The data encoding method of a multi-mode hardware-in-the-loop simulation system according to claim 1, characterized in that: The encoding of all sensor data according to the encoding priority comprises: Based on the encoding priority, all sensor data are encoded using Huffman encoding.

8. The data encoding method of a multi-mode hardware-in-the-loop simulation system according to claim 1, characterized in that: The method for obtaining the occurrence frequency includes: The character data of each sensor data is obtained, and the ratio of the number of occurrences of each character data in all historical tests to the number of all character data is obtained as the occurrence frequency of each character data.

9. The data encoding method of a multi-mode hardware-in-the-loop simulation system according to claim 4, characterized in that: The preset approach threshold is 0.5.

Citation Information

Patent Citations

  • Motor data de-noising method and system

    CN118467935A

  • Device and method for coding and decoding keyword data

    CN1428742A