A multi-classification sorting method based on time series data sets

By establishing position mapping tables and time mapping tables in avionics system, the problem of lack of multi-classification sorting methods in avionics system is solved, and rapid deletion, insertion and sorting is achieved, memory and time consumption is reduced, and real-time requirements are met. .

CN114089947BActive Publication Date: 2025-02-18CHINA HELICOPTER RES & DEV INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111391842.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-02-18
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

The lack of multi-classification sorting methods based on time series in avionics systems makes it difficult to quickly delete, insert and sort when processing data streams, thereby increasing memory and time consumption.

Method used

By establishing a location map and a time map table, insert data into a sub-dataset, and sorting and updating the mapping table based on data attributes, to quickly locate and delete the earliest data, while sorting it when inserting new data.

Benefits of technology

This method reduces memory overhead, shortens the sorting time, and meets the real-time requirement of avionics system for multi-categorized sorting of time data streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114089947B_ABST
    Figure CN114089947B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-classification sorting method based on a time series data set, comprising: establishing a position mapping table and a time mapping table; inserting first data into a sub-data set based on the position mapping table and the time mapping table; wherein the sub-data set is established according to the attributes of the first data; sorting the data in the sub-data set based on the attributes of the first data, and updating the position mapping table and the time mapping table based on the sequence of the sorted data; when the database is full, inputting the second data, and deleting the sub-data in the first data based on the position mapping table; wherein the sub-data is the data with the earliest writing time in the database; determining the moving direction of the remaining data in the database based on the size of the sub-data set and the position of the sub-data; moving the remaining data based on the moving direction to obtain a target position, and inserting the second data into the target position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer software technology, and in particular relates to a multi-classification sorting method based on a time series data set. Background Art

[0002] Sorting is to arrange the disorganized data elements in the order of keywords through a certain method. Sorting is a common operation in computers. Its purpose is to adjust a set of "disordered" record sequences into an "ordered" record sequence. It is a very important problem in the field of computer applications, and it is widely studied and applied. For example, sorting algorithms are widely used in data processing, databases, data compression, distributed computing, image processing, and computer graphics. At the same time, there are many sorting algorithms, and there are related algorithms in various fields, and there are also mature applications. However, on time series data, the application effect of traditional multi-sorting algorithms is often not very good.

[0003] Time series data streams are the most typical data in airborne avionics systems. Sensors are constantly generating streaming data. In a short period of time, a large amount of data arrives continuously at a very fast speed. The amount of data may often be infinite. The avionics system has no conditions to save the entire data. These data change dynamically over time. The airborne software needs to update the data in real time and sort the data by importance, distance, target attributes, etc. In the sorted data set, when a new data set comes, the earliest data needs to be removed and the new data set inserted into the sorted data set.

[0004] Although the sorting method is relatively mature, there is no multi-classification sorting method based on time series in avionics systems. Summary of the invention

[0005] The present invention quickly deletes, inserts and sorts data stream targets in an avionics system, thereby saving memory overhead and time consumption.

[0006] The present invention provides a multi-classification sorting method based on a time series data set, the method comprising:

[0007] Establishing location mapping table and time mapping table;

[0008] Inserting the first data into a sub-data set based on the location mapping table and the time mapping table; wherein the sub-data set is established according to the attributes of the first data;

[0009] The data in the sub-data set is sorted based on the attribute of the first data, and the position mapping table and the time mapping table are updated based on the sequence of the sorted data.

[0010] Preferably, the method further comprises:

[0011] In the case that the database is full, second data is input, and sub-data in the first data is deleted based on the position mapping table; wherein the sub-data is the data written into the database the earliest;

[0012] Determining a moving direction of the remaining data in the database based on the size of the sub-data set and the location of the sub-data;

[0013] The remaining data is moved based on the moving direction to obtain a target position, and the second data is inserted into the target position.

[0014] Preferably, the target position is a position in the target sub-data set.

[0015] Preferably, after inserting the second data into the target location, the method further includes:

[0016] The data in the target sub-dataset is sorted based on the attributes of the target sub-dataset, and the time mapping table and the location mapping table are updated based on the sequence of the sorted data.

[0017] Preferably, the establishing of the location mapping table comprises:

[0018] A position mapping table is established based on the position relationship between the first data and the sorted data.

[0019] Preferably, the establishing time mapping table includes:

[0020] A time mapping table is established based on the time relationship between the first data and the sorted data.

[0021] Preferably, the attributes of the first data are used to classify the first data.

[0022] Preferably, the time when the first data is written into the database is earlier than the time when the second data is written into the database.

[0023] Beneficial technical effects of the present invention:

[0024] The present invention proposes a multi-classification method based on time series. By suggesting a position mapping table and a time mapping table, the earliest data can be quickly located and eliminated. Then, based on the existing classification sorting, insertion and sorting are performed, which reduces memory overhead, shortens sorting time, and meets the real-time multi-classification sorting of time data streams processed by the onboard software of the avionics system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a flow chart provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] See also Figure 1 In the first embodiment, the present invention provides a multi-classification sorting method based on a time series data set, comprising:

[0027] Step 101: Create a location mapping table and a time mapping table.

[0028] In the embodiment of the present application, a position mapping table is established based on the position relationship between the first data and the sorted data; and a time mapping table is established based on the time relationship between the first data and the sorted data.

[0029] Step 102: insert the first data into the sub-data set based on the location mapping table and the time mapping table.

[0030] The sub-dataset is established according to the attributes of the first data.

[0031] Step 103: Sort the data in the sub-data set based on the attribute of the first data, and update the position mapping table and the time mapping table based on the sequence of the sorted data.

[0032] The attribute of the first data is used to classify the first data.

[0033] Step 104: when the database is full, input the second data, and delete the sub-data in the first data based on the location mapping table;

[0034] The sub-data is the data written into the database earliest; the time when the first data is written into the database is earlier than the time when the second data is written into the database.

[0035] Step 105: determine the moving direction of the remaining data in the database based on the size of the sub-data set and the position of the sub-data; move the remaining data based on the moving direction to obtain a target position, and insert the second data into the target position.

[0036] Step 106: Sort the data in the target sub-dataset based on the attributes of the target sub-dataset, and update the time mapping table and the location mapping table based on the sequence of the sorted data.

[0037] Embodiment 2: A multi-classification sorting method based on a time series data set proposed by the present invention mainly includes four modules:

[0038] Location Map

[0039] Among them, the avionics system has no conditions to save all the time flow data, and the onboard software needs to update the data in real time, remove the excessive data according to time, and sort it. However, after sorting, the data set is not sorted by time, and the earliest data set cannot be directly removed. The present invention establishes a position mapping table to index the data, which saves memory and can quickly locate the time attribute of each data. The value mapped by the mapping table is the position of the data set in the sequence after sorting. When a new sequence comes, the earliest data is removed through the mapping table, the mapping table is updated, and the data set is updated. This is a positive deletion process.

[0040] Time Mapping Table

[0041] Among them, in order to establish a connection between the data and the location mapping table and quickly update it, the present invention simultaneously records the time sequence of each data in the data set. Since the earliest data in the data needs to be eliminated, the earliest data set can be quickly located through the location mapping table. However, as the data is sorted, the location mapping table needs to be updated. By establishing a time mapping table, the location of the location mapping table can be directly located. When the data sorting position changes, the data set is updated, followed by the time mapping table, and then the location mapping table is updated. In this way, the reverse update is completed.

[0042] Sub-dataset size statistics table

[0043] Among them, the data source in the onboard software is a data source of known classification. When the classification and sorting order of the data set are known, the number of data in each sub-classification can be recorded. When a new data arrives, its category is determined by known attributes, and then the new data set is inserted into the head of its category by calculating the number of known data sets, and the location mapping table and time mapping table are updated at the same time.

[0044] Multi-category sorting

[0045] Among them, the present invention classifies time series data and adopts a mapping table method to record the time and location information of the data, which can quickly locate the earliest data and eliminate it, and then quickly insert new data into the sorted data according to the classification, and then perform bubble sort under its sub-classification.

[0046] In the third embodiment, it is assumed that the size of the data set is 10, and there are 3 classification categories, which are A, AA, and AAA in order, as shown in Table 1.

[0047] Table 1

[0048]

[0049] When new data fff arrives, proceed as follows:

[0050] 1. Through the position mapping table, delete the position where the earliest data in the position mapping table is located, that is, position 6, and update the number of sub-data categories by 2.

[0051] 2. Calculate the starting position of the fff category, 5+2=7, move the data, and determine the direction of data movement.

[0052] 3. Insert new data fff to position 8, and update the time mapping table, position mapping table, and sub-dataset size.

[0053] 4. Sort the subcategories, update the location mapping table and time mapping table, and obtain Table 2.

[0054] Table 2

[0055]

[0056] The present invention performs multi-classification sorting on a time series data set, establishes a time mapping table and a location mapping table, and quickly inserts a new data set into the middle data set according to the number of sub-class data sets, and the new data is sorted only in its own classification. The present invention provides a method for sorting a time series data set, saves memory overhead, and shortens sorting time.

Claims

1. A multi-classification sorting method based on time series data set, characterized in that: The method comprises: Establishing a location mapping table and a time mapping table; wherein the location mapping table records the sorting order of data in a data set, and the time mapping table records the time order of data being written into the data set, wherein the data set includes a plurality of sub-data sets, and the sub-data sets are classified and sorted in the data set according to the attributes of the sub-data sets; Inserting the first data into a sub-data set based on the location mapping table and the time mapping table; The data in the sub-data set are sorted based on the attributes of the first data, and the position mapping table and the time mapping table are updated based on the sequence of the sorted data; the attributes of the first data are different from the attributes of the sub-data set.

2. The method according to claim 1, characterized in that The method further comprises: In the case where the data set is full, second data is input, and sub-data in the first data is deleted based on the position mapping table; wherein the sub-data is the data written into the data set the earliest; According to the classification of the sub-data set, the second data is inserted into the completed sorted data, and then bubble sort is performed under its sub-classification, and the position mapping table and the time mapping table are updated based on the sequence of the sorted data.

3. The method according to claim 2, characterized in that The time when the first data is written into the data set is earlier than the time when the second data is written into the data set.

Citation Information

Patent Citations

  • File management method and device

    CN108932271A