Data record recharge system and method

文档序号:1270917 发布日期:2020-08-25 浏览:39次 中文

阅读说明:本技术 数据记录回灌系统和方法 (Data record recharge system and method ) 是由 张智斌 邓郡 于 2020-05-21 设计创作,主要内容包括:本发明实施例提供数据记录回灌系统和方法。包括:上位机中的数据回灌单元和下位机中的实时激励引擎单元;其中:数据回灌单元用于:获取目标数据记录文件;对目标数据记录文件中的工程参数进行分组;对各工程参数组进行预处理,得到预处理后的各工程参数组;对预处理后的各工程参数组进行封装,得到二进制数据包;生成包括按绝对时间戳进行排序后的二进制数据包的数据文件;将数据文件发送给实时激励引擎单元;实时激励引擎单元用于执行调度线程和发送线程;调度线程用于:在第N调度周期从数据文件中获取与调度起始时刻的间隔位于Nt至(N+1)t之间的二进制数据包;发送线程用于:将调度线程获取的二进制数据包逐个发送至被测设备。(The embodiment of the invention provides a data record recharging system and a data record recharging method. The method comprises the following steps: a data recharging unit in the upper computer and a real-time excitation engine unit in the lower computer; wherein: the data recharging unit is used for: acquiring a target data recording file; grouping the engineering parameters in the target data record file; preprocessing each engineering parameter group to obtain each preprocessed engineering parameter group; packaging the preprocessed engineering parameter groups to obtain a binary data packet; generating a data file comprising binary data packets sequenced according to absolute timestamps; sending the data file to a real-time excitation engine unit; the real-time excitation engine unit is used for executing a scheduling thread and a sending thread; the dispatch thread is to: acquiring a binary data packet which is positioned between Nt and (N +1) t from the data file at the interval of the scheduling starting time in the Nth scheduling period; the send thread is to: and sending the binary data packets acquired by the scheduling thread to the tested device one by one.)

1. A data record recharge system, comprising: the device comprises a data recharging unit and a real-time excitation engine unit, wherein the data recharging unit is deployed in an upper computer, and the real-time excitation engine unit is deployed in a lower computer running a real-time operating system; wherein:

the data recharging unit is used for:

acquiring a target data recording file; the target data recording file is used for data recharging;

grouping the engineering parameters in the target data record file according to the data definition of each bus message to obtain an engineering parameter group; the absolute timestamps of the engineering parameters in the same engineering parameter group are the same and correspond to the same data packet;

preprocessing each engineering parameter group to obtain each preprocessed engineering parameter group;

packaging the preprocessed engineering parameter groups to obtain corresponding binary data packets;

generating a data file; the data file includes: binary data packets after sequencing according to absolute time stamps;

sending the data file to the real-time excitation engine unit;

the real-time excitation engine unit is used for executing independent scheduling threads and sending threads;

wherein the content of the first and second substances,

the dispatch thread is to:

acquiring a binary data packet which is positioned between Nt and (N +1) t from the data file at an interval of a scheduling starting moment in an Nth scheduling period; wherein t represents the duration of a scheduling period; n is an integer; the scheduling starting time is zero time, and the earliest absolute timestamp in the data file corresponds to the zero time;

the send thread is to:

and sending the binary data packets acquired by the scheduling thread to the tested equipment one by one.

2. The system of claim 1, wherein the data file further comprises: relative time of each binary data packet, wherein the binary data packets with the same absolute timestamp in the data file correspond to the same relative time; acquiring a binary data packet which is positioned between Nt and (N +1) t from the data file at an interval of a scheduling starting time in an Nth scheduling period, wherein the binary data packet comprises:

and acquiring a binary data packet with a relative time between Nt and (N +1) t from the data file in the Nth scheduling period, wherein the relative time of the earliest absolute timestamp in the data file is the zero time.

3. The system of claim 1, wherein the pre-processing of each set of engineering parameters comprises: at least one of time warping, defect compensation, and time alignment.

4. The system of claim 3, wherein the time warping comprises:

calculating the time interval between two engineering parameter groups adjacent in time in the same bus message;

adjusting the time interval between the engineering parameter groups which are adjacent in time and meet the preset conditions in the same bus message into a standard time interval; each bus message corresponds to a preset sending period, and the duration of the preset sending period is equal to the standard time interval;

wherein the preset conditions include: the difference value between the time interval of two adjacent engineering parameter groups and the standard time interval is not equal to 0 and is smaller than a preset threshold value, or the ratio of the difference value to the standard time interval is not equal to 0 and is smaller than a preset ratio value.

5. The system of claim 3,

the defect compensation comprises:

selecting a bus message with the earliest transmission start time from a plurality of bus messages as a first reference bus message;

adding at least one engineering parameter group according to the sending period of the target bus message; the target bus message includes: generating a bus message of a packet loss, and a bus message of which the transmission start time is later than that of the first reference bus message; after the adding is completed, the earliest absolute timestamp of the target bus message is equal to the earliest absolute timestamp of the first reference bus message, and each transmission cycle of the target bus message corresponds to one engineering parameter group.

6. The system of claim 3, wherein the time alignment comprises:

selecting one bus message from the plurality of bus messages as a second reference bus message; the time axis of the second reference bus message is a reference time axis; the time point on the reference time axis comprises absolute timestamps of all engineering parameter groups corresponding to the second reference bus message;

and time alignment is carried out on the absolute time stamp of each engineering parameter group in other bus messages and the time point of the reference time shaft.

7. The system of any one of claims 1-6,

the acquiring of the target data record file includes:

acquiring original data records generated by different data acquisition systems;

and converting the format of the original data record generated by each data acquisition system into a uniform data format to obtain a target data record file.

8. The system of claim 7, wherein the data-reinjection unit is further to:

sending a control instruction to the real-time excitation engine unit to control the real-time excitation engine unit to execute an operation corresponding to the control instruction.

9. The system of claim 8, wherein the control instructions comprise: at least one of a recharge start instruction, a recharge stop instruction, a pause instruction, a recharge progress setting instruction and a recharge progress reporting instruction.

10. A data record recharging method, based on a data record recharging system, the data record recharging system comprising: the device comprises a data recharging unit and a real-time excitation engine unit, wherein the data recharging unit is deployed in an upper computer, and the real-time excitation engine unit is deployed in a lower computer running a real-time operating system;

the method comprises the following steps:

the data recharging unit acquires a target data recording file; the target data recording file is used for data recharging;

the data recharging unit groups the engineering parameters in the target data recording file according to the data definition of each bus message to obtain an engineering parameter group; the absolute timestamps of the engineering parameters in the same engineering parameter group are the same and correspond to the same data packet;

the data recharging unit preprocesses each engineering parameter group to obtain each preprocessed engineering parameter group;

the data recharging unit encapsulates the preprocessed engineering parameter sets to obtain corresponding binary data packets;

the data recharging unit generates a data file; the data file includes: binary data packets after sequencing according to absolute time stamps;

the data recharging unit sends the data file to the real-time excitation engine unit;

the real-time excitation engine unit executes an independent scheduling thread and a sending thread;

wherein the content of the first and second substances,

the dispatch thread is to:

acquiring a binary data packet which is positioned between Nt and (N +1) t from the data file at an interval of a scheduling starting moment in an Nth scheduling period; wherein t represents the duration of a scheduling period; n is an integer; the scheduling starting time is zero time, and the earliest absolute timestamp in the data file corresponds to the zero time;

the send thread is to:

and sending the binary data packets acquired by the scheduling thread to the tested equipment one by one.

Technical Field

The invention relates to the technical field of electronic system integration verification, in particular to a data record recharging system and a data record recharging method.

Background

In the field of electronic system integration verification, such as scenes of aircraft system ground research and development tests, on-board ground tests, test flight tests and the like, communication data among aircraft systems (such as avionics systems and flight control systems) in the test process are collected and stored. After the test is finished, data excitation can be carried out on the tested equipment in a ground test environment in a mode of recharging data records, and the test process and the working condition when problems occur are restored, so that the problems are pertinently reproduced and positioned in the ground test environment.

In the test process, taking bus communication as an example, sensors of each aircraft system can generate sensor data, the sensor data is packaged into a data packet and sent to a bus, and a receiver can analyze the data packet and record the data in the data packet into a data recording file. Information of a plurality of engineering parameters (physical parameters such as height, speed, voltage and attitude) is recorded in a data recording file, and comprises parameter names, parameter values and timestamp information.

The basic idea of so-called data reinjection is to repackage data record files into data packets, which are transmitted over a bus.

The common data recharging scheme is completed by desktop recharging software based on a Windows operating system, and the operations of the scheme include:

the desktop recharging software loads and analyzes the data recording file, different threads are started, and the threads are scheduled and executed in parallel as follows:

based on the definition of the data packet, the parameters belonging to different data packets in the data record file are separated, the parameters belonging to the same data packet are recombined, and the parameters are repackaged into the data packet (the parameters and the time stamps in the same data packet are consistent). And determining the time interval between the data packets according to the time stamps of the data packets, and controlling the sending time sequence of the data packets according to the sending time interval. For example, if the time interval between packet 1 and packet 2 is 49ms, packet 2 is transmitted 49ms after packet 1 is transmitted.

The inventor finds that:

the recharging software needs to perform parallel scheduling according to respective updating intervals of data packets of each bus message, and in a complex test scene with a large number of messages to be recharged, if hundreds of bus messages exist, hundreds of threads may need to be started, and the software overhead is too large;

in addition, the Windows operating system is a non-real-time operating system, and the timing resolution of the non-real-time operating system-based recharge software can only reach 1 ms. And the resolution of the timestamp of the data collected by the electronic system can reach 1 us. For a sending interval less than 1ms (for example, 500us), the current recharging software may not be able to perform precise timing control, so that the sending interval of the data packets during data recharging may have a larger deviation than the real sending interval in the data record file.

Disclosure of Invention

In view of the above, embodiments of the present invention provide a data record recharging system and method, so as to reduce software overhead and reduce a deviation between a transmission interval between data packets and a real transmission interval.

In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:

a data record recharge system, comprising: the device comprises a data recharging unit and a real-time excitation engine unit, wherein the data recharging unit is deployed in an upper computer, and the real-time excitation engine unit is deployed in a lower computer running a real-time operating system; wherein:

the data recharging unit is used for:

acquiring a target data recording file; the target data recording file is used for data recharging;

grouping the engineering parameters in the target data record file according to the data definition of each bus message to obtain an engineering parameter group; the absolute timestamps of the engineering parameters in the same engineering parameter group are the same and correspond to the same data packet;

preprocessing each engineering parameter group to obtain each preprocessed engineering parameter group;

packaging the preprocessed engineering parameter groups to obtain corresponding binary data packets;

generating a data file; the data file includes: binary data packets after sequencing according to absolute time stamps;

sending the data file to the real-time excitation engine unit;

the real-time excitation engine unit is used for executing independent scheduling threads and sending threads;

wherein the content of the first and second substances,

the dispatch thread is to:

acquiring a binary data packet which is positioned between Nt and (N +1) t from the data file at an interval of a scheduling starting moment in an Nth scheduling period; wherein t represents the duration of a scheduling period; n is an integer; the scheduling starting time is zero time, and the earliest absolute timestamp in the data file corresponds to the zero time;

the send thread is to:

and sending the binary data packets acquired by the scheduling thread to the tested equipment one by one.

Optionally, the data file further includes: relative time of each binary data packet, wherein the binary data packets with the same absolute timestamp in the data file correspond to the same relative time; acquiring a binary data packet which is positioned between Nt and (N +1) t from the data file at an interval of a scheduling starting time in an Nth scheduling period, wherein the binary data packet comprises: and acquiring a binary data packet with a relative time between Nt and (N +1) t from the data file in the Nth scheduling period, wherein the relative time of the earliest absolute timestamp in the data file is the zero time.

Optionally, the preprocessing the engineering parameter sets includes: at least one of time warping, defect compensation, and time alignment.

Optionally, the time warping includes: calculating the time interval between two engineering parameter groups adjacent in time in the same bus message; adjusting the time interval between the engineering parameter groups which are adjacent in time and meet the preset conditions in the same bus message into a standard time interval; each bus message corresponds to a preset sending period, and the duration of the preset sending period is equal to the standard time interval; wherein the preset conditions include: the difference value between the time interval of two adjacent engineering parameter groups and the standard time interval is not equal to 0 and is smaller than a preset threshold value, or the ratio of the difference value to the standard time interval is not equal to 0 and is smaller than a preset ratio value.

Optionally, the defect compensation comprises: selecting a bus message with the earliest transmission start time from a plurality of bus messages as a first reference bus message; adding at least one engineering parameter group according to the sending period of the target bus message; the target bus message includes: generating a bus message of a packet loss, and a bus message of which the transmission start time is later than that of the first reference bus message; after the adding is completed, the earliest absolute timestamp of the target bus message is equal to the earliest absolute timestamp of the first reference bus message, and each transmission cycle of the target bus message corresponds to one engineering parameter group.

Optionally, the time alignment includes: selecting one bus message from the plurality of bus messages as a second reference bus message; the time axis of the second reference bus message is a reference time axis; the time point on the reference time axis comprises absolute timestamps of all engineering parameter groups corresponding to the second reference bus message; and time alignment is carried out on the absolute time stamp of each engineering parameter group in other bus messages and the time point of the reference time shaft.

Optionally, the obtaining the target data record file includes: acquiring original data records generated by different data acquisition systems; and converting the format of the original data record generated by each data acquisition system into a uniform data format to obtain a target data record file.

Optionally, the data recharging unit is further configured to: sending a control instruction to the real-time excitation engine unit to control the real-time excitation engine unit to execute an operation corresponding to the control instruction.

Optionally, the control instruction includes: at least one of a recharge start instruction, a recharge stop instruction, a pause instruction, a recharge progress setting instruction and a recharge progress reporting instruction.

A data record recharging method is based on a data record recharging system, and the data record recharging system comprises: the device comprises a data recharging unit and a real-time excitation engine unit, wherein the data recharging unit is deployed in an upper computer, and the real-time excitation engine unit is deployed in a lower computer running a real-time operating system; the method comprises the following steps:

the data recharging unit acquires a target data recording file; the target data recording file is used for data recharging;

the data recharging unit groups the engineering parameters in the target data recording file according to the data definition of each bus message to obtain an engineering parameter group; the absolute timestamps of the engineering parameters in the same engineering parameter group are the same and correspond to the same data packet;

the data recharging unit preprocesses each engineering parameter group to obtain each preprocessed engineering parameter group;

the data recharging unit encapsulates the preprocessed engineering parameter sets to obtain corresponding binary data packets;

the data recharging unit generates a data file; the data file includes: binary data packets after sequencing according to absolute time stamps;

the data recharging unit sends the data file to the real-time excitation engine unit;

the real-time excitation engine unit executes an independent scheduling thread and a sending thread;

wherein the content of the first and second substances,

the dispatch thread is to:

acquiring a binary data packet which is positioned between Nt and (N +1) t from the data file at an interval of a scheduling starting moment in an Nth scheduling period; wherein t represents the duration of a scheduling period; n is an integer; the scheduling starting time is zero time, and the earliest absolute timestamp in the data file corresponds to the zero time;

the send thread is to:

and sending the binary data packets acquired by the scheduling thread to the tested equipment one by one.

Therefore, in the embodiment, the recharging process is divided into two links of upper computer preparation processing and real-time excitation, the real-time excitation engine unit is only responsible for scheduling and data sending, and other work (grouping, preprocessing, packaging, sequencing and the like) is preposed to the preparation stage of the upper computer.

Through unified data sequencing and independent scheduling threads provided by the real-time excitation engine unit, unified processing of scheduling time sequences (sending time sequences) can be realized, and performance bottlenecks such as overlarge software overhead and the like caused by concurrent scheduling of hundreds of threads in the traditional recharging scheme are avoided;

meanwhile, the real-time excitation engine unit runs on a real-time operating system, the timing resolution of the real-time operating system is less than 1us, and compared with a Windows operating system, the precision requirement of time sequence control of data recharging can be met better.

Drawings

FIG. 1 is an exemplary architecture of a data record recharging system provided by an embodiment of the present invention;

FIG. 2 is an exemplary hardware architecture of a data record recharging system provided by embodiments of the present invention;

FIG. 3 is a flowchart illustrating a data record recharging method according to an embodiment of the present invention;

fig. 4 is a schematic diagram of a UI interface of the data recharging unit according to the embodiment of the present invention.

Detailed Description

And the data record recharging is used for sending the data record stored in the test process to the tested equipment again in the ground test environment, so that the working scene and the system state in the test process are reproduced.

The core requirement of data record recharging is to synchronously send a plurality of messages of different bus types and keep the relative time sequence of data packets in the messages, so that the working scene of data record can be accurately reproduced.

Taking the scenes of ground research and development tests, onboard ground tests, test flight tests and the like of an airplane system as an example, a complex function may involve hundreds of messages, the data volume of each message can reach over 20 thousands of orders of magnitude according to the calculation of a test flight for 4 hours and a data acquisition period of 50ms, and the conventional data recharge mode cannot meet the performance requirement.

As mentioned above, the common data recharging scheme is implemented by desktop recharging software based on the Windows operating system, and is characterized in that:

the recharging software needs to perform parallel scheduling according to respective updating intervals of data packets of each bus message, and in a complex test scene with a large number of messages to be recharged, if hundreds of bus messages exist, hundreds of threads may need to be started, and the software overhead is too large;

meanwhile, the Windows operating system is a non-real-time operating system, and the timing resolution of the recharge software based on the non-real-time operating system can only reach 1 ms. And the resolution of the time stamp of the data acquisition data of the electronic system can reach 1 us. For a sending interval less than 1ms (for example, 500us), the current recharging software may not be able to perform precise timing control, so that the sending interval of the data packets during data recharging may have a larger deviation than the real sending interval in the data record file.

In addition, one bus message includes multiple engineering parameters, the number of the parameters can reach thousands for a high-speed bus, even if only one of the parameters is involved in data recording, data encapsulation needs to be performed on the complete bus message during data recharging, and the multithreading problem is aggravated by the overhead, so that the performance during final recharging is further reduced.

In view of the above, the present invention provides a data record recharging system and method to reduce software overhead and reduce the deviation between the inter-packet transmission interval and the actual transmission interval.

An exemplary structure of a data record recharging system is shown in fig. 1, which may include: a data recharge unit 1 and a real-time excitation engine unit 2.

Referring to fig. 2, in terms of a hardware architecture, a data rollback unit 1 (which may be desktop software) is deployed in an upper computer, and a real-time excitation engine unit 2 (which may be a process) is deployed in a lower computer running a real-time operating system.

The lower computer may be an HIL (hardware-in-the-loop) lower computer.

In one example, a real-time processor and an I/O board card may be installed in the HIL lower computer. The real-time processor and the I/O card can communicate through a PXI (PCI extensions for Instrumentation) interface.

The real-time processor may run a real-time processing system (e.g., a real-time Linux operating system, a VxWorks, a QNX, etc. operating system).

The host computer may communicate with a real-time processor (real-time processing system) in a wired or wireless manner, for example, via ethernet.

The tested device is also in communication connection with the I/O board or the real-time processor. The I/O board may be used to simulate the electrical layer of an analog sensor to generate specific physical signals (e.g., voltages), as will be described later herein.

Referring to fig. 3, an exemplary flow of a data record recharging method performed by the data record recharging system is shown, including:

s1: the data recharging unit acquires a target data record file for data recharging.

In one example, obtaining the target data record may include the steps of:

step A: raw data records (e.g., test-flight raw data records) generated by different data acquisition systems are acquired.

The raw data records may be data records stored in the ground test environment or data records stored by a third-party data acquisition system.

Consider the following case:

the formats of raw data records output by data acquisition systems provided by different suppliers also exist in various forms, for example: parameter files, binary files, databases, txt, csv, db, etc.

Thus, after the raw data record is acquired, step B may also be performed: and converting the format of the original data record into a uniform data format, thereby obtaining a target data record file.

The unified data format herein may be a custom data format (template), such as: templates are defined by columns, sequence number, timestamp, variable 1, variable 2 ….

The step a and the step B may be executed by the data-recharging unit, and in other embodiments of the present invention, format conversion may also be performed by an independent data format conversion module, and after the format conversion is completed, the target data recording file is provided to the data-recharging unit.

Of course, if the format of each acquired raw data record of each data acquisition system is unified, no format conversion is performed.

Fig. 4 shows a ui (user interface) interface of the data recharging unit, in which an original data file in fig. 4 represents an original data record, and "uploading" in fig. 4 means that the data file is transmitted to a lower computer, and data records 1 to 6 represent a target data record file.

The UI interface supports better human-computer interaction than a real-time operating system, data management can be performed through the UI interface, the data management comprises unified management of original data records and target data record files, a user can maintain the original data records and the target data records through checking, deleting and editing operations and the like, and the user can select the original data records to be recharged to perform reprocessing (for example, different original data record preprocessing is selected to recharge again) and subsequent operations;

s2: and the data recharging unit groups the engineering parameters in the target data record file according to the data definition of each bus message to obtain an engineering parameter group.

The relationship between bus messages and data packets is now described. The message is a static description, and the data packet is equivalent to an example of the static description and carries specific engineering parameter values.

For example, a bus message a is defined as a sending height and a sending speed, a sending period is 50ms, and the data acquisition system a sends a data packet of the bus message a every 50 ms: packet 0 (height 0m, speed 100km/h) transmitted at 0ms, packet 1 (height 100m, speed 150km/h) transmitted at 50ms, and packet 2 (height 500m, speed 200km/h) transmitted at 100ms, … …. The data acquisition system a starts to work, and the transmitted data packets belong to the same bus message A until the data acquisition system a stops working.

And after the bus message and the data packet are introduced, returning to see the target data record file.

A plurality of engineering parameters, such as altitude, speed, attitude, etc., may be included in the target data record file.

Assuming bus message a is used to send altitude and speed and bus message B is used to send attitude, then the engineering parameters in the target data record file may be grouped according to the data definition of each bus message.

Each engineering parameter group corresponds to one data packet, and the absolute timestamps of the engineering parameters in the same engineering parameter group are the same.

In one example, the engineering parameters in the target data record file may be grouped in units of bus messages defined in an ICD (Interface control Document).

S3: and the data recharging unit encapsulates each engineering parameter group to obtain a corresponding binary data packet.

Specifically, the parameter values in the engineering parameter set may be encapsulated (packaged) according to the data format defined by the ICD to obtain a corresponding binary data packet.

For example, the engineering parameter groups A1-A100 belong to the same bus message A, and the engineering parameter groups A1-A100 can be encapsulated respectively according to the data format defined by the ICD of the bus message A, so as to obtain 100 data packets.

S4: the data recharging unit generates a data file.

In an example, the data file may include: and sorting the binary data packets according to the absolute time stamp.

In another example, the data file includes, in addition to: the relative time of each binary data packet can be included in addition to the binary data packets sorted by absolute time stamp. The binary data packets with the same absolute timestamp correspond to the same relative time. Where the zero time corresponds to the earliest absolute timestamp in the data file.

In the recharging process, the zero time is the scheduling starting time (recharging starting time).

The data file is sent to the real-time excitation engine unit subsequently, and the real-time excitation engine unit sends the binary data packet in the data file.

The absolute time stamp records the transmission/reception time of the data packet during the test. For example, the absolute timestamps of packets 1-4 are: 12:24:34.000000s, 12:24:34.000000s, 12:24:34.002000s, 12:24:34.005000s, which indicate that the transmission/reception times of the data packets 1-4 are 12:24:34.000000s, 12:24:34.000000s, 12:24:34.002000s, 12:24:34.005000s, respectively, during the experiment.

The data recharging is to reproduce the test process and working conditions, but the starting time of the data recharging is not required to be 12:24:34.000000 s.

This requires the calculation of the relative time instant from the absolute time stamp. Also taking the above-mentioned data packets 1-4 as an example (these four data packets do not necessarily belong to the same bus message), the relative time of the data packets 1 and 2 may be 0 time (the recharge start time), the time interval between the data packet 3 and the data packet 1 is 2ms, the relative time thereof is 2ms (meaning that the data packet 3 will be transmitted at a time point 2ms away from the recharge start time), and the time interval between the data packet 4 and the data packet 1 is 5ms, the relative time is 5ms (meaning that the data packet 4 will be transmitted at a time point 5ms away from the recharge start time).

S5: and the data recharging unit sends the data file to the real-time excitation engine unit.

The real-time excitation engine unit is used for executing independent scheduling threads and sending threads.

S6: and the scheduling thread acquires a binary data packet which is positioned between Nt and (N +1) t from the data file at the interval of the scheduling starting time in the Nth scheduling period.

Wherein t represents the duration of a scheduling period; the zeroth scheduling period corresponds to the zero relative time; n is an integer.

Assuming that t is 1ms, the scheduling thread acquires a binary data packet from the data file every 1 ms.

Specifically, if the data file includes the relative time, the scheduling thread may obtain, in the nth scheduling cycle, the binary data packet whose relative time is between Nt and (N +1) t from the data file.

Assuming that N is 0, the scheduling thread acquires all binary data packets with relative time between [0,1) ms in the 0 th ms (0 th scheduling period);

assuming that N is 1, the scheduling thread acquires all binary data packets with relative time between [1,2) ms in the 1 st ms (1 st scheduling period);

……

so on, it will not be described in detail.

If the data file does not contain the relative time, the relative time can be calculated by the scheduling thread according to the absolute timestamp, and then the binary data packet with the relative time between Nt and (N +1) t can be acquired from the data file in the Nth scheduling cycle.

S7: and the sending thread sends the binary data packets acquired by the scheduling thread to the tested device one by one.

In one example, the dispatch thread may write binary data packets into a first-in-first-out (FIFO) queue, while the send thread fetches from the FIFO queue and sends through the board.

Furthermore, the sending thread may also send the binary data packets one by one in order according to the acquired absolute time stamp of the binary data packet.

The board card can be used for simulating bus data transmission or simulating a sensor.

Taking an analog sensor as an example, the sending thread can send binary data packets to corresponding board cards one by one, the board cards simulate the electrical layers of the sensors according to the data in the data packets to generate sensor data, and the generated sensor data can be sent to the tested equipment.

In the existing recharging method, all processing is executed by desktop recharging software. Compared with the prior art, in the embodiment, the recharging process is divided into two links of the upper computer preparation processing and the real-time excitation, the real-time excitation engine unit is only responsible for scheduling and data sending, and other works (grouping, preprocessing, packaging, sequencing and the like) are all prepositioned to the preparation stage of the upper computer.

Through unified data sequencing and independent scheduling threads provided by the real-time excitation engine unit, unified processing of scheduling time sequences (sending time sequences) can be realized, and performance bottlenecks such as overlarge software overhead and the like caused by concurrent scheduling of hundreds of threads in the traditional recharging scheme are avoided;

in addition, as mentioned above, a bus message includes a plurality of engineering parameters, and for a high-speed bus, the number of the parameters can reach thousands, and even if only one of the parameters is involved in the data record, the data encapsulation needs to be performed on the complete bus message during the data reinjection. However, as the encapsulation of the bus message data packet is executed by the upper computer and not executed by the thread provided by the real-time excitation engine unit, the real-time excitation engine unit is not subjected to overhead problem, and the performance of the back-filling is not influenced. The real-time excitation engine provides two independent threads for scheduling and transmitting, and reasonably utilizes the computing resources of the real-time operating system to optimize the scheduling and transmitting performance.

And the real-time excitation engine unit runs on a real-time operating system, the timing resolution of the real-time operating system is less than 1us, and compared with a Windows operating system, the real-time excitation engine unit can better meet the precision requirement of the time sequence control of data recharging.

In another embodiment of the present invention, the data recharging unit is further configured to:

and sending a control instruction to the real-time excitation engine unit to control the real-time excitation engine unit to execute the operation corresponding to the control instruction.

In one example, the control instructions may include: at least one of a recharge start instruction, a recharge stop instruction, a pause instruction, a recharge progress setting instruction and a recharge progress reporting instruction.

The instruction for setting the recharge progress may be specifically used for the start-stop time of the recharge, for example, the duration of the data file acquired by the lower computer is 1 minute, the recharge start time (relative time) may be set to 30 seconds, and the recharge end time may be set to 50 seconds.

Through the control instruction, the data recharging unit in the upper computer can control starting and stopping, temporarily/starting and the like of the real-time excitation engine unit, can monitor the state of the engine and can control the recharging progress of the engine.

Specifically, the above functions can be realized by defining a set of interfaces for controlling and reporting states between the data recharging unit and the real-time excitation engine unit, and the interface functions include: startReplay, stopReplay, pauseReplay, setreppagestep (pause in replay), setreproyprogess (set recharge progress), reportreplayprogress (report recharge progress).

Further, the interface may include a control interface, which is used to implement "start recharging", "stop recharging", "suspend", "set recharging progress", and the like.

In addition, the interface may further include a status reporting interface, and the real-time engine unit may periodically report at least one of a recharge operation status, a recharge stop status, a pause status, and a data recharge progress.

Specifically, the flag bit may be used to represent the recharging operation state, and the flag bit is "1" to indicate "operation", and "0" to indicate "non-operation", and so on, which is not described herein again.

The data-reinjection progress can be calculated according to the number of data packets, absolute time stamps (relative time), and the like.

For example, knowing the total number of the data packets to be refilled, dividing the total number of the refilled data packets by the total number of the data packets, and obtaining the percentage as the data refilling progress. Assuming that the total number is 1000 and 500 data are recharged, the data recharging progress is 50%.

For another example, knowing the maximum time interval between absolute timestamps (the difference between the earliest and latest absolute timestamps), the time interval between the currently transmitted absolute timestamp and the earliest absolute timestamp is divided by the maximum time interval, and the obtained percentage can be used as the data back-filling progress. Assuming that the maximum time interval is 120 minutes and the time interval between the currently transmitted absolute timestamp and the earliest absolute timestamp is 60 minutes, the data-reinjection progress is 50%.

The calculation of the relative time is similar to this, and is not described in detail here.

The foregoing refers to the preprocessing of various sets of engineering parameters, and more detailed preprocessing operations are described below.

In one example, the preprocessing may include: at least one of time warping, defect compensation, and time alignment. The following are introduced separately:

firstly, time warping:

time warping is used to time warp corresponding to the set of engineering parameters in the same bus message. The operation comprises the following steps:

step a: calculating the time interval between two engineering parameter groups adjacent in time in the same bus message;

step b: and adjusting the time interval between the engineering parameter groups which are adjacent in time and meet the preset conditions in the same bus message into a standard time interval.

Each bus message corresponds to a preset sending period, and the duration of the preset sending period is equal to the standard time interval (for example, 50 ms).

The preset conditions include: the difference between the time interval of two adjacent engineering parameter sets and the standard time interval is not equal to 0 and is less than the preset threshold, or the ratio of the difference to the standard time interval is not equal to 0 and is less than the preset ratio (for example, 1%).

Of course, if the value is greater than the preset threshold or the preset ratio, or equal to 0, no normalization is performed.

Taking an aircraft system as an example, the data communication of the aircraft system is generally periodic, and the time interval of actual acquisition may jitter within a small deviation range. For example: the sending period of a bus message is 50ms (standard time interval), the time intervals for acquiring a plurality of continuous data packets are 50.013ms, 49.992ms and 50.021ms in sequence, and the time intervals between adjacent engineering parameter groups are: 50.013ms, 49.992ms, 50.021ms, which are different from the standard time interval (50ms) by 0 but less than a predetermined threshold (e.g., 1ms), the time interval can be 50ms by modifying the timestamp of the engineering parameter set with the later absolute timestamp in the two adjacent engineering parameter sets. By time arrangement, the time sequence of the recharge sending can be more conveniently controlled.

Secondly, the defect compensation comprises:

defect compensation is used for comparison and defect compensation in different bus messages, the operations of which include:

step c: from multiple buses

Selecting the bus message with the earliest transmission starting time as a first reference bus message;

for example, assume that 3 bus messages are sent with the respective start times: 12:24:34.000000s, 12:24:44.000000s, 12:24:34.002000s, the transmission start time of the 1 st bus message is the earliest and is the first reference bus message.

Step d: adding at least one engineering parameter group according to the sending period of the target bus message.

Wherein the target bus message comprises: generating a bus message to be dropped, and transmitting the bus message having a transmission start time later than that of the first reference bus message.

For example, the sending cycle of a bus message is 50ms, the time intervals of the corresponding engineering parameter sets are 50ms, 100ms and 50ms in sequence after time warping, the interval of 100ms indicates that packet loss occurs, and the message is a target bus message.

One set of engineering parameters needs to be complemented before the set of engineering parameters with the "interval of 100 ms". The value of the time interval may be the same as the value of the engineering parameter set "interval is 100 ms", and the data time interval after processing is 50ms, 50mms, 50ms, and 50 ms.

For another example, the transmission cycle of the message B is 50ms, the transmission start time of the message is 12:24:44.000000s, the transmission start time of the first reference bus message is 12:24:34.000000s, the transmission start time is different by 10 seconds, and the 10-second set of engineering parameters may be complemented for the message B, and the value of the set of engineering parameters may be the same as the set of engineering parameters corresponding to 12:24:44.000000 s.

Thus, after the addition is complete, the earliest absolute timestamp of the target bus message is equal to the earliest absolute timestamp of the first reference bus message, and each transmission cycle of the target bus message corresponds to one engineering parameter set.

Thirdly, the time alignment comprises:

time alignment is used for absolute timestamp adjustment between different bus messages, and the operation comprises the following steps:

step e: one bus message is selected from the plurality of bus messages as a second reference bus message.

For convenience, the first reference bus message and the second reference bus message may be the same bus message.

The time axis of the second reference bus message is a reference time axis, and the time point on the reference time axis includes the absolute time stamp of each engineering parameter group corresponding to the second reference bus message.

Step f: and time alignment is carried out on the absolute time stamp of each engineering parameter group in other bus messages and the time point of the reference time shaft.

Specifically, the engineering parameter set in which the time difference between the absolute timestamp and any time point on the reference time axis in the other bus messages is smaller than the preset difference may be aligned with the any time point.

When data of multiple messages need to be recharged simultaneously, data packets of different messages are sent asynchronously, and time axes need to be aligned to facilitate recharging scheduling.

For example, two bus messages with a period of 50ms, absolute timestamps on the time axis of the message A are 12:24:34.000000s, 12:24:34.050000s, 12:24:34.100000s and the like in sequence;

the absolute timestamps of the engineering parameter sets corresponding to the other message B are 12:24:34.00010s, 12:24:34.050010s, 12:24:34.100002s and the like in sequence.

Assuming that the message A is a second reference bus message and the preset difference value is 1ms, the time difference between 12:24:34.00010s and 12:24:34.000000s is less than 1ms, 12:24:34.00010s can be modified to 12:24:34.000000s, and so on, the absolute timestamp 12:24:34.050010s in the message B can be modified to 12:24:34.050000s, scheduling is carried out at the same time during the recharging scheduling, and the recharging sending time sequence is more convenient to control.

In summary, in the embodiment of the present invention, the data recharging unit runs in an upper computer (Windows environment) and is configured to load and pre-process the data records, issue the processed data files to the real-time excitation engine unit, and control the real-time excitation engine unit (e.g., start and stop of data recharging). The real-time excitation engine unit works in a lower computer (a real-time operating system environment), performs parallel (each message is scheduled according to an absolute timestamp) real-time excitation based on a data file issued by the data recharging unit, achieves the purpose that each bus message is sent to the tested equipment according to the time sequence in the data file, and reports the progress and the state of data recharging.

Its main advantage is as follows:

1, dividing a recharging process into two links of upper computer preparation processing and real-time excitation, wherein a real-time excitation engine unit is only responsible for scheduling and data transmission, and other works (grouping, preprocessing, packaging, sequencing and the like) are all preposed to a preparation stage of an upper computer, so that the scheduling performance is optimal;

2, unifying the formats of the original data records with different formats, and adapting the original data records generated by different data acquisition systems through a customized data format conversion module;

and 3, the real-time excitation engine unit runs in a real-time operating system, the timing resolution of the real-time operating system is less than 1us, and compared with a Windows operating system, the precision requirement of the time sequence control of data recharging can be better met.

4, the unified processing of the scheduling time sequence is realized through unified data sequencing and independent scheduling threads provided by the real-time excitation engine unit, and the performance bottleneck of concurrent scheduling of hundreds of threads in the traditional recharging scheme is avoided.

The invention also claims a data record recharging method based on the data record recharging system.

Referring to fig. 3, the method includes:

s1: the data recharging unit acquires a target data record file for data recharging;

specifically, original data records generated by different data acquisition systems can be acquired; and converting the format of the original data record generated by each data acquisition system into a uniform data format to obtain a target data record file.

For details, please refer to the above description, which is not repeated herein.

S2: the data recharging unit groups the engineering parameters in the target data record file according to the data definition of each bus message to obtain an engineering parameter group;

s3: the data recharging unit packages each engineering parameter group to obtain a corresponding binary data packet;

s4: the data recharging unit generates a data file;

in one example, the data file includes: and sorting the binary data packets according to the absolute time stamp.

In another example, the data file may also include relative time of day.

For the related description, please refer to the above description, which is not repeated herein.

S5: and the data recharging unit sends the data file to the real-time excitation engine unit.

The real-time excitation engine unit is used for executing independent scheduling threads and sending threads.

S6: and the scheduling thread acquires a binary data packet which is positioned between Nt and (N +1) t from the data file at the interval of the scheduling starting time in the Nth scheduling period.

Wherein t represents the duration of a scheduling period; the zeroth scheduling period corresponds to the zero relative time; n is an integer.

Assuming that t is 1ms, the scheduling thread acquires a binary data packet from the data file every 1 ms.

Specifically, if the data file includes the relative time, the scheduling thread may obtain, in the nth scheduling cycle, the binary data packet whose relative time is between Nt and (N +1) t from the data file.

Assuming that N is 0, the scheduling thread acquires all binary data packets with relative time between [0,1) ms in the 0 th ms (0 th scheduling period);

assuming that N is 1, the scheduling thread acquires all binary data packets with relative time between [1,2) ms in the 1 st ms (1 st scheduling period);

……

so on, it will not be described in detail.

If the data file does not contain the relative time, the relative time can be calculated by the scheduling thread according to the absolute timestamp, and then the binary data packet with the relative time between Nt and (N +1) t can be acquired from the data file in the Nth scheduling cycle.

S7: and the sending thread sends the binary data packets acquired by the scheduling thread to the tested device one by one.

For details, please refer to the above description, which is not repeated herein.

In other embodiments of the present invention, the method further includes:

and the data recharging unit sends a control instruction to the real-time excitation engine unit so as to control the real-time excitation engine unit to execute the operation corresponding to the control instruction.

In one example, the control instructions may include: at least one of a recharge start instruction, a recharge stop instruction, a pause instruction, a recharge progress setting instruction and a recharge progress reporting instruction.

In other embodiments of the present invention, the "preprocessing each engineering parameter set" may specifically include: at least one of time warping, defect compensation, and time alignment.

Wherein the time warping comprises:

calculating the time interval between two engineering parameter groups adjacent in time in the same bus message; adjusting the time interval between the engineering parameter groups which are adjacent in time and meet the preset conditions in the same bus message into a standard time interval; each bus message corresponds to a preset sending period, and the duration of the preset sending period is equal to the standard time interval;

wherein the preset conditions include: the difference value between the time interval of two adjacent engineering parameter groups and the standard time interval is not equal to 0 and is smaller than a preset threshold value, or the ratio of the difference value to the standard time interval is not equal to 0 and is smaller than a preset ratio value.

The defect compensation may include:

selecting a bus message with the earliest transmission start time from a plurality of bus messages as a first reference bus message;

adding at least one engineering parameter group according to the sending period of the target bus message; the target bus message includes: generating a bus message of a packet loss, and a bus message of which the transmission start time is later than that of the first reference bus message; after the adding is completed, the earliest absolute timestamp of the target bus message is equal to the earliest absolute timestamp of the first reference bus message, and each transmission cycle of the target bus message corresponds to one engineering parameter group.

The time alignment may include:

selecting one bus message from the plurality of bus messages as a second reference bus message; the time axis of the second reference bus message is a reference time axis; the time point on the reference time axis comprises absolute timestamps of all engineering parameter groups corresponding to the second reference bus message;

and time alignment is carried out on the absolute time stamp of each engineering parameter group in other bus messages and the time point of the reference time shaft.

Those of skill would further appreciate that the various illustrative components and model steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

The steps of a method or model described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, WD-ROM, or any other form of storage medium known in the art.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于航天器多器间总线数据传输的通路结构

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!