Data compression storage method, electronic device and storage medium
By classifying the drone flight trajectory data and analyzing the trajectory point of the trajectory, selecting an appropriate compression algorithm to compress the image data segment, solving the problem that the drone image data cannot be compressed efficiently, and achieving efficient image data compression and key information retention.
Patent Information
- Application Number
- CN202510668064.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-23
AI Technical Summary
In the prior art, drones use an unchanged compression algorithm during flight, resulting in the inability to compress image data efficiently and lose key information during rapid movement.
By acquiring the aircraft's flight trajectory data and image data, the trained annotation model is used to classify the trajectory points, determine the trajectory inflection point, and select an appropriate compression algorithm based on the flight method to compress the image data segment, including inter-frame compression, multi-resolution coding, multi-view angles, depth maps, and adaptive compression of the region of interest, etc.
Adaptive compression is achieved according to the flight mode of the aircraft, improving compression efficiency and retaining key information, and improving compression quality.
Smart Images

Figure CN120201198B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data compression storage method, electronic equipment, and storage medium. Background Art
[0002] Drones are currently widely used in surveying, inspection, and security monitoring. During their missions, drones continuously collect large amounts of image data. For example, in power line inspections, drones must capture long-range images of transmission lines; in agricultural surveying, drones must capture high-resolution images of large expanses of farmland. Therefore, efficient compression of the image data collected by drones is crucial, while ensuring that critical information is not lost.
[0003] In the prior art, a preset compression algorithm is usually used to compress the image data of the drone.
[0004] However, in the existing technology, only one unchanging compression algorithm is used during the flight of the drone. However, the flight process of the drone is changeable, and the use of one compression algorithm cannot efficiently compress the image data, and often loses key information in the image data when the drone moves quickly. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present application provides a data compression and storage method, an electronic device, and a storage medium. The method determines the target compression method of the image data segment acquired within the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment, and compresses the image data segment using the target compression method of each image data segment to obtain compressed image data. The method can adaptively compress the image data according to the flight mode of the aircraft, thereby improving the compression quality, that is, improving the compression efficiency and retaining key information.
[0006] In order to solve the above problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a data compression and storage method, comprising: acquiring flight trajectory data and image data of an aircraft, wherein the flight trajectory data includes a plurality of trajectory points and a flight trajectory parameter corresponding to each trajectory point;
[0008] Using a trained labeling model to label the trajectory points according to flight trajectory parameters corresponding to each trajectory point, to obtain a plurality of labeled trajectory points, and determining a flight trajectory point sequence of the aircraft based on the plurality of labeled trajectory points;
[0009] In the flight trajectory point sequence, when the marked trajectory point is of a different category from an adjacent marked trajectory point, the marked trajectory point is determined as a trajectory inflection point, thereby obtaining a plurality of trajectory inflection points;
[0010] determining at least one flight trajectory segment based on the multiple trajectory inflection points, and determining an image data segment acquired within a time period corresponding to each flight trajectory segment, wherein all the marked trajectory points in one flight trajectory segment have the same category;
[0011] Determining the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment;
[0012] determining, based on the flight mode corresponding to each flight trajectory segment, a target compression mode for the image data segments acquired within a time period corresponding to the flight trajectory segment;
[0013] The target compression method of each image data segment is adopted to compress the image data segment, and multiple compressed image data segments are spliced together to obtain compressed image data.
[0014] In some embodiments, determining the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment includes:
[0015] Calculating kinematic parameters and geometric characteristic parameters corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment;
[0016] The trained flight mode determination model is used to determine the flight mode corresponding to the flight trajectory segment based on the kinematic parameters and geometric characteristic parameters corresponding to the flight trajectory segment.
[0017] In some embodiments, the kinematic parameters include the heading angle change range, altitude change rate and average speed, the geometric characteristic parameters include trajectory curvature, horizontal projection length change value and altitude change value, and the flight mode includes uniform level flight, level turn, climb, hovering and complex maneuvers.
[0018] In some embodiments, determining, based on the flight mode corresponding to each flight trajectory segment, a target compression mode for the image data segments acquired within a time period corresponding to the flight trajectory segment includes:
[0019] determining a target compression algorithm for image data segments acquired within a time period corresponding to each flight trajectory segment based on a preset rule and a flight mode corresponding to each flight trajectory segment;
[0020] determining compression parameters in a target compression algorithm based on flight trajectory parameters corresponding to all trajectory points in the flight trajectory segment, the compression parameters including a compression ratio and a quality factor;
[0021] A target compression method for the image data segment acquired within a time period corresponding to the flight trajectory segment is determined based on the target compression algorithm and the compression parameters.
[0022] In some embodiments, determining a target compression algorithm for image data segments acquired within a time period corresponding to each flight trajectory segment based on a preset rule and a flight mode corresponding to each flight trajectory segment includes:
[0023] selecting at least two corresponding compression algorithms from a plurality of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each of the flight trajectory segments;
[0024] For each of the preselected compression algorithms, obtaining a cost parameter of the preselected compression algorithm;
[0025] Calculating the size of the image data segment after applying the preselected compression algorithm;
[0026] calculating a compression cost of the preselected compression algorithm based on the size of the image data segment after applying the preselected compression algorithm and the cost parameter;
[0027] A preselected compression algorithm is selected based on the compression cost of each of the preselected compression algorithms as a target compression algorithm for the image data segment acquired within the time period corresponding to the flight trajectory segment.
[0028] In some embodiments, the selecting at least two corresponding compression algorithms from a plurality of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each flight trajectory segment includes:
[0029] When the flight mode is uniform level flight, at least an inter-frame compression algorithm and a multi-resolution encoding algorithm are selected from a plurality of preset compression algorithms as pre-selected compression algorithms;
[0030] When the flight mode is a horizontal turn, at least an inter-frame compression algorithm and a multi-view based compression algorithm are selected from a plurality of preset compression algorithms as pre-selected compression algorithms;
[0031] When the flight mode is climbing, selecting at least a depth map-based compression algorithm and a panoramic stitching-based compression algorithm from a plurality of preset compression algorithms as preselected compression algorithms;
[0032] When the flight mode is hovering, at least an adaptive compression algorithm based on a region of interest and a static scene compression algorithm based on deep learning are selected from a plurality of preset compression algorithms as pre-selected compression algorithms;
[0033] When the flight mode is a complex maneuver, at least an artificial intelligence model-based compression algorithm and a hybrid coding compression algorithm are selected as pre-selected compression algorithms from a plurality of preset compression algorithms.
[0034] In some embodiments, the method further comprises:
[0035] Using a trained scoring model to score each trajectory inflection point based on the flight trajectory parameters corresponding to each trajectory inflection point, and selecting a plurality of compressed trajectory points from all the trajectory inflection points based on the score of each trajectory inflection point;
[0036] Compressed flight trajectory data is determined and stored based on all the compressed trajectory points and all flight trajectory parameters corresponding to each of the compressed trajectory points.
[0037] In some embodiments, the step of using a trained scoring model to score each trajectory inflection point based on the flight trajectory parameters corresponding to each trajectory inflection point, and selecting a plurality of compressed trajectory points from all the trajectory inflection points based on the score of each trajectory inflection point, includes:
[0038] Inputting the flight trajectory parameters corresponding to each trajectory inflection point and the flight trajectory parameters corresponding to each trajectory point adjacent to each trajectory inflection point into the trained scoring model;
[0039] In the trained scoring model, for each trajectory inflection point, multiple gap indicators between the trajectory inflection point and adjacent trajectory points are calculated based on flight trajectory parameters corresponding to the trajectory inflection point and trajectory points adjacent to the trajectory inflection point;
[0040] Calculating an index score for each gap index between the trajectory inflection point and adjacent trajectory points;
[0041] Calculating a comprehensive score for the trajectory inflection point based on the indicator scores of all gap indicators corresponding to the trajectory inflection point;
[0042] A first preset number of trajectory inflection points with the lowest or highest comprehensive scores are selected from all the trajectory inflection points as the multiple compressed trajectory points.
[0043] In a second aspect, an embodiment of the present application provides an electronic device, comprising:
[0044] at least one processor; and,
[0045] a memory communicatively connected to the at least one processor; wherein,
[0046] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data compression storage method as described in the first aspect.
[0047] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the data compression storage method as described in the first aspect.
[0048] The present application provides a data compression and storage method, an electronic device, and a storage medium. The present application determines a target compression method for image data segments acquired within a time period corresponding to a flight trajectory segment based on the flight mode corresponding to each flight trajectory segment, and compresses the image data segment using the target compression method for each image data segment, thereby obtaining compressed image data. The present application can adaptively compress the image data according to the flight mode of the aircraft, thereby improving compression quality, that is, improving compression efficiency and retaining key information. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flow chart of the first implementation method of the data compression storage method provided in an embodiment of the present application.
[0050] Figure 2 This is a flow chart of the second implementation method of the data compression storage method provided in an embodiment of the present application.
[0051] Figure 3 It is a structural diagram of the data compression storage device provided in an embodiment of the present application.
[0052] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application.
[0053] Figure 5 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0055] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0056] The present application provides a data compression and storage method, an electronic device, and a storage medium. The method determines a target compression method for image data segments acquired within a time period corresponding to a flight trajectory segment based on the flight mode corresponding to each flight trajectory segment, and compresses the image data segment using the target compression method for each image data segment, thereby obtaining compressed image data. The method can adaptively compress the image data according to the flight mode of the aircraft, thereby improving compression quality, that is, improving compression efficiency and retaining key information.
[0057] The data compression storage method provided by this application will be described in detail below with reference to the accompanying drawings.
[0058] See also Figure 1 , Figure 1 This is a flow chart of the first embodiment of the data compression storage method provided in the embodiment of the present application. Figure 1 As shown, in some embodiments, the data compression storage method includes: steps S100 to S700.
[0059] Step S100: Acquire flight trajectory data and image data of the aircraft.
[0060] The flight trajectory data includes multiple trajectory points and the flight trajectory parameters corresponding to each trajectory point. The image data is acquired by the aircraft.
[0061] In some embodiments, flight trajectory parameters include the aircraft's position parameters, velocity parameters, attitude parameters, and timestamp corresponding to the trajectory points. Position parameters describe the specific location of the aircraft in three-dimensional space and may include longitude, latitude, and altitude. Velocity parameters may include the aircraft's instantaneous velocity and acceleration. Attitude parameters may include the aircraft's heading, pitch, and roll angles.
[0062] Step S200: using a trained labeling model to label the trajectory points based on the flight trajectory parameters corresponding to each trajectory point, to obtain a plurality of labeled trajectory points, and determining the flight trajectory point sequence of the aircraft based on the plurality of labeled trajectory points.
[0063] In some embodiments, the labeling model includes a trajectory point feature matrix determination module, a clustering module, and a flight trajectory point sequence determination module. The trajectory point feature matrix determination module is configured to determine a feature matrix for each trajectory point based on the flight trajectory parameters corresponding to each trajectory point. The clustering module is configured to cluster the feature matrices of all trajectory points to label each trajectory point with a category, thereby obtaining a plurality of labeled trajectory points. The flight trajectory point sequence determination module is configured to determine a flight trajectory point sequence for the aircraft based on the plurality of labeled trajectory points.
[0064] In some embodiments, the feature matrix of a trajectory point includes the values of the flight trajectory parameters corresponding to the trajectory point. For example, the feature matrix of a trajectory point includes the position parameter, velocity parameter, and attitude parameter corresponding to the trajectory point. The feature matrix may not include the timestamp corresponding to the trajectory point.
[0065] Optionally, each flight trajectory parameter is normalized to obtain a normalized value for each flight trajectory parameter, and a feature matrix is determined based on the normalized values of the flight trajectory parameters corresponding to the trajectory points. In this way, the influence of different parameter value ranges on subsequent calculations can be avoided.
[0066] Optionally, the difference between the original value of the flight trajectory parameter and the average value of the flight trajectory parameter is divided by the standard deviation of the flight trajectory parameter to obtain the standardized value of the flight trajectory parameter.
[0067] Optionally, the standardization process is a normalization process, in which the normalized value of the flight trajectory parameter can be obtained by dividing the difference between the original value of the flight trajectory parameter and the minimum value of the flight trajectory parameter by the difference between the maximum value of the flight trajectory parameter and the minimum value of the flight trajectory parameter.
[0068] The average value, standard deviation, maximum value and minimum value of the above-mentioned flight trajectory parameters are determined based on all values of the flight trajectory parameters in the flight trajectory data.
[0069] In some embodiments, in the clustering module, any one of the clustering methods such as the K-Means clustering method, the K-Medoids clustering method, the Gaussian mixture model clustering method, and the fuzzy C-means clustering method can be used to perform clustering based on the feature matrix of all trajectory points to label each trajectory point with a category.
[0070] In some embodiments, the number of categories in the clustering method can be preset or automatically determined based on the feature matrix of all trajectory points.
[0071] In some embodiments, based on the timestamp corresponding to each trajectory point, the trajectory point with the earliest timestamp can be marked as the trajectory starting point, and the trajectory point with the latest timestamp can be marked as the trajectory end point. Then, clustering is performed based on the feature matrix of other trajectory points to classify the other trajectory points.
[0072] In some embodiments, in the flight trajectory point sequence determination module, the flight trajectory point sequence of the aircraft is determined according to the timestamp corresponding to each marked trajectory point and in the order of the timestamps from earliest to latest.
[0073] Step S300: In the flight trajectory point sequence, when the category of a marked trajectory point is different from that of an adjacent marked trajectory point, the marked trajectory point is determined as a trajectory inflection point, thereby obtaining a plurality of trajectory inflection points.
[0074] Exemplarily, when in the flight trajectory point sequence, the categories from the 1st marked trajectory point to the 4th marked trajectory point are the first category, and the categories from the 5th marked trajectory point to the 7th marked trajectory point are the second category, the 4th marked trajectory point and the 5th marked trajectory point are determined as trajectory inflection points.
[0075] Step S400: determining at least one flight trajectory segment based on a plurality of trajectory inflection points, and determining image data segments acquired within a time period corresponding to each flight trajectory segment.
[0076] Among them, all the marked trajectory points in a flight trajectory segment have the same category.
[0077] In some embodiments, at least one flight trajectory segment is determined based on a trajectory starting point, a trajectory end point, and multiple trajectory inflection points. For example, a flight trajectory segment is determined based on a trajectory starting point and the first trajectory inflection point closest to the trajectory starting point, and the flight trajectory segment includes all trajectory points from the trajectory starting point to the first trajectory inflection point closest to the trajectory starting point. A flight trajectory segment is determined based on the second trajectory inflection point and the third trajectory inflection point, and the flight trajectory segment includes all trajectory points from the second trajectory inflection point to the third trajectory inflection point, and so on. A flight trajectory segment is determined based on the last trajectory inflection point and the trajectory end point, and the flight trajectory segment includes all trajectory points from the last trajectory inflection point to the trajectory end point.
[0078] In some embodiments, the time period corresponding to the flight trajectory segment can be determined based on the timestamps corresponding to all trajectory points in the flight trajectory segment, and then part of the image data acquired within the time period is extracted as the image data segment corresponding to the flight trajectory segment.
[0079] Step S500: determining the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment.
[0080] In some embodiments, step S500 includes steps S510 to S520.
[0081] Step S510: Calculating kinematic parameters and geometric characteristic parameters corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment.
[0082] In some embodiments, kinematic parameters include heading angle variation range, altitude change rate, and average speed. Geometric characteristic parameters include trajectory curvature, horizontal projection length change value, and altitude change value. Flight modes include uniform speed level flight, level turns, climbs, hovering, and complex maneuvers.
[0083] Optionally, the kinematic parameters also include a pitch angle variation range and a roll angle variation range, etc.
[0084] Step S520: using the trained flight mode determination model to determine the flight mode corresponding to the flight trajectory segment based on the kinematic parameters and geometric characteristic parameters corresponding to the flight trajectory segment.
[0085] Optionally, the flight mode determination model can be an artificial intelligence model such as a convolutional neural network model or a random forest model.
[0086] Step S600: determining a target compression mode for image data segments acquired within a time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment.
[0087] In some implementations, step S600 includes steps S610 to S630.
[0088] Step S610: determining a target compression algorithm for image data segments acquired within a time period corresponding to the flight trajectory segment based on preset rules and the flight mode corresponding to each flight trajectory segment.
[0089] In some embodiments, step S610 includes steps S611 to S615.
[0090] Step S611: selecting at least two corresponding compression algorithms from a plurality of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each flight trajectory segment.
[0091] In some embodiments, when the flight mode is uniform level flight, at least an inter-frame compression algorithm and a multi-resolution encoding algorithm are selected from a plurality of preset compression algorithms as pre-selected compression algorithms.
[0092] When flying at a constant speed and level, the similarity between adjacent frames is high, so this similarity can be used to improve compression efficiency. Inter-frame compression algorithms can exploit this high similarity and use block matching motion compensation for compression. Multi-resolution encoding algorithms can encode and compress image data at different resolution levels.
[0093] In some embodiments, when the flight mode is a horizontal turn, at least an inter-frame compression algorithm and a multi-view based compression algorithm are selected from a plurality of preset compression algorithms as pre-selected compression algorithms.
[0094] When flying in a horizontal turn, the similarity between adjacent frames is small, and the images may exhibit global rotation or scale changes. Multi-view compression algorithms can exploit the multi-view correlation of surrounding perspectives and select a reference image to perform parallax-compensated encoding on the other images for compression.
[0095] In some embodiments, when the flight mode is climbing, at least a depth map-based compression algorithm and a panoramic stitching-based compression algorithm are selected from a plurality of preset compression algorithms as pre-selected compression algorithms.
[0096] When the flight mode is climbing, the variations between adjacent frames are significant. Depth map-based compression algorithms can efficiently compress image data using depth information encoding. Panoramic stitching-based compression algorithms can extract image features and match overlapping areas to generate and compress a panoramic image.
[0097] In some embodiments, when the flight mode is hovering, at least an adaptive compression algorithm based on a region of interest and a static scene compression algorithm based on deep learning are selected from a plurality of preset compression algorithms as pre-selected compression algorithms.
[0098] When hovering, the drone typically captures an area of interest (ROI), where the similarity between adjacent frames is high. The ROI-based adaptive compression algorithm identifies the ROI and uses a lossless compression algorithm for that area, while a high-compression algorithm is used for the background area, significantly improving compression efficiency. The deep learning-based static scene compression algorithm extracts static area features from the image and efficiently compresses them. It can also provide customized compression for different types of static scenes.
[0099] In some embodiments, when the flight mode is complex maneuvers, at least an artificial intelligence model-based compression algorithm and a hybrid coding compression algorithm are selected as pre-selected compression algorithms from a plurality of preset compression algorithms.
[0100] Compression algorithms based on artificial intelligence models and hybrid coding compression algorithms are highly adaptable to complex image data and can achieve high compression efficiency.
[0101] In some embodiments, the preselected compression algorithms have a priority, and a compression algorithm with the highest priority may be selected based on the flight mode corresponding to each flight trajectory segment.
[0102] For example, when the flight mode is uniform level flight, the inter-frame compression algorithm is selected as the corresponding compression algorithm with the highest priority. When the flight mode is horizontal turning, the multi-perspective based compression algorithm is selected as the corresponding compression algorithm with the highest priority. When the flight mode is climbing, the depth map based compression algorithm is selected as the corresponding compression algorithm with the highest priority. When the flight mode is hovering, the region of interest based adaptive compression algorithm is selected as the corresponding compression algorithm with the highest priority. When the flight mode is complex maneuvers, the artificial intelligence model based compression algorithm is selected as the corresponding compression algorithm with the highest priority.
[0103] In some embodiments, the target compression algorithm corresponding to the flight mode can be determined directly based on preset rules. In this case, the preset rules include information about the correspondence between each flight mode and the target compression algorithm. The correspondence between the flight mode and the target compression algorithm can be determined by referring to the above-described correspondence between the flight mode and the corresponding compression algorithm with the highest priority.
[0104] Step S612: For each pre-selected compression algorithm, obtain a cost parameter of the pre-selected compression algorithm.
[0105] Optionally, the cost parameters include unit storage cost, unit retrieval cost, unit CPU computing cost, unit decompression time, etc. corresponding to the compression algorithm.
[0106] Step S613: Calculate the size of the image data segment after using the preselected compression algorithm.
[0107] In some implementations, default compression parameters corresponding to the preselected compression algorithm are used to calculate the size of the image data segment after the preselected compression algorithm is used.
[0108] Step S614: Calculate the compression cost of the preselected compression algorithm based on the size of the image data segment after the preselected compression algorithm is applied and the cost parameter.
[0109] In some implementations, compression cost=storage cost per unit time+single access cost+capacity occupancy cost+compression computing time cost.
[0110] Optionally, the storage cost per unit time=unit storage cost×the size of the image data segment after adopting a preselected compression algorithm.
[0111] Optionally, single access cost=(unit retrieval cost+unit decompression time)×size of the image data segment after adopting a preselected compression algorithm.
[0112] Optionally, the capacity occupancy cost=preset calculation coefficient×the size of the image data segment after adopting a preselected compression algorithm.
[0113] Optionally, compression calculation time cost=unit CPU calculation cost×size of the image data segment after adopting a preselected compression algorithm.
[0114] Step S615: selecting a preselected compression algorithm as a target compression algorithm for the image data segment acquired within the time period corresponding to the flight trajectory segment based on the compression cost of each preselected compression algorithm.
[0115] In some implementations, a preselected compression algorithm with the lowest compression cost is selected as the target compression algorithm.
[0116] In some implementations, a preselected compression algorithm is selected as a target compression algorithm based on the compression cost and priority of each preselected compression algorithm.
[0117] Optionally, when the compression costs of all preselected compression algorithms are lower than a preset cost, a preselected compression algorithm with the highest priority is selected as the target compression algorithm. When the compression cost of a preselected compression algorithm with the highest priority is higher than the preset cost, a preselected compression algorithm with the lowest compression cost is selected as the target compression algorithm.
[0118] Step S620: Determine compression parameters in the target compression algorithm based on the flight trajectory parameters corresponding to all trajectory points in the flight trajectory segment.
[0119] The compression parameters include compression ratio and quality factor.
[0120] Optionally, the compression parameters also include other parameters.
[0121] In some embodiments, a trained compression parameter determination model is used to determine the compression parameters in the target compression algorithm based on the flight trajectory parameters corresponding to all trajectory points in the flight trajectory segment. The compression parameter determination model can be an artificial intelligence model.
[0122] For example, when the calculated velocity standard deviation of all trajectory points in the flight trajectory segment is greater than a first preset value, the compression ratio is set to 80% of the default compression ratio. In this way, the compressed image data can be prevented from being too blurry.
[0123] In some embodiments, a determination is made as to whether a region of interest (ROI) needs to be identified in the target compression algorithm based on the flight trajectory parameters corresponding to all trajectory points in the flight trajectory segment, and a compression ratio and quality factor corresponding to the ROI are determined. For example, when the calculated altitude change rate of all trajectory points in the flight trajectory segment is greater than a second preset value, it is determined that the ROI needs to be identified in the target compression algorithm, and the compression ratio and quality factor corresponding to the ROI are adjusted to corresponding preset values to ensure clarity in the ROI.
[0124] Step S630: Determine a target compression method for the image data segment acquired within the time period corresponding to the flight trajectory segment based on the target compression algorithm and the compression parameters.
[0125] The target compression method is to compress the image data segment using a target compression algorithm with set compression parameters.
[0126] Step S700: compressing the image data segments using the target compression method of each image data segment, and splicing multiple compressed image data segments to obtain compressed image data.
[0127] In some implementations, the flight trajectory data may also be compressed.
[0128] See also Figure 2 , Figure 2 This is a flow chart of the second embodiment of the data compression storage method provided in the embodiment of the present application. Figure 2 As shown, in some implementations, the data compression storage method further includes steps S800 to S900.
[0129] Step S800: using the trained scoring model to score each trajectory inflection point based on the flight trajectory parameters corresponding to each trajectory inflection point, and selecting multiple compressed trajectory points from all trajectory inflection points based on the score of each trajectory inflection point.
[0130] When a flight trajectory sequence is long, there are usually many trajectory inflection points. Therefore, multiple trajectory inflection points can be selected from all trajectory inflection points as compression trajectory points. Some trajectory inflection points do not need to be compression trajectory points. This method can reduce the amount of calculation.
[0131] In some embodiments, step S800 includes steps S810 to S850.
[0132] Step S810: inputting the flight trajectory parameters corresponding to each trajectory inflection point and the flight trajectory parameters corresponding to the trajectory points adjacent to each trajectory inflection point into the trained scoring model.
[0133] When a trajectory inflection point is not the trajectory starting point or the trajectory ending point, there are two trajectory points adjacent to one trajectory inflection point.
[0134] Step S820: In the trained scoring model, for each trajectory inflection point, multiple gap indicators between the trajectory inflection point and adjacent trajectory points are calculated based on the flight trajectory parameters corresponding to the trajectory inflection point and the trajectory points adjacent to the trajectory inflection point.
[0135] Optionally, each flight trajectory parameter corresponds to a gap indicator.
[0136] Optionally, the plurality of gap indicators include relative distance, height difference and instantaneous speed difference.
[0137] Optionally, the multiple gap indicators may further include acceleration difference, heading angle difference, pitch angle difference, and roll angle difference.
[0138] Optionally, when there are two trajectory points adjacent to a trajectory inflection point, for a target flight trajectory parameter for which a gap index needs to be calculated, the absolute value of the difference between the target flight trajectory parameter of the trajectory inflection point and the target flight trajectory parameter of the first adjacent trajectory point is added to the absolute value of the difference between the target flight trajectory parameter of the trajectory inflection point and the target flight trajectory parameter of the second adjacent trajectory point to obtain a value of a gap index corresponding to the target flight trajectory parameter.
[0139] Step S830: Calculate the index score of each gap index between the trajectory inflection point and the adjacent trajectory points.
[0140] In some embodiments, step S830 includes steps S831 to S832.
[0141] Step S831: normalize each gap indicator to obtain multiple normalized gap indicators.
[0142] In this way, the dimensional differences of the gap indicators can be avoided from affecting the calculation results.
[0143] Step S832: Calculate the indicator score of each normalized gap indicator.
[0144] In some embodiments, in step S832 , an index score of each normalized gap index is calculated based on the normalized gap indexes of all trajectory inflection points.
[0145] In some implementations, the indicator score calculation formula for the gap indicator is:
[0146] ,
[0147] in, Indicates the The indicator score of each gap indicator, represents the number of inflection points of all trajectories, Indicates that in calculating The gap indicator The weight corresponding to the inflection point of the trajectory, represents the base of natural logarithms, Represents the natural logarithm.
[0148] In some embodiments, in a trained scoring model, the The characteristic matrix corresponding to the inflection point of the trajectory and / or The first turning point of the trajectory The value of the gap indicator is determined The characteristic matrix corresponding to the trajectory inflection point includes the values of the flight trajectory parameters corresponding to the trajectory inflection point.
[0149] For example, in the scoring model, a trained neural network is used to The characteristic matrix corresponding to the inflection point of the trajectory and / or The first turning point of the trajectory The value of the gap indicator is determined .
[0150] Optionally, Can be preset.
[0151] Optionally, you can The first turning point of the trajectory The value of the gap index is divided by the value of the inflection point of all trajectories. The sum of the values of the gap indicators is obtained .
[0152] Step S840: Calculate the comprehensive score of the trajectory inflection point based on the indicator scores of all gap indicators corresponding to the trajectory inflection point.
[0153] In some embodiments, the calculation formula for the comprehensive score of the trajectory inflection point is:
[0154] ,
[0155] ,
[0156] in, Indicates the The comprehensive score of the trajectory inflection point, Represents the total number of all gap indicators corresponding to the trajectory inflection points, Indicates the first The calculation coefficient is obtained by calculating the indicator score of each gap indicator.
[0157] Step S850: Selecting a first preset number of trajectory inflection points with the lowest or highest comprehensive scores from all trajectory inflection points as a plurality of compressed trajectory points.
[0158] Optionally, the comprehensive scores of all trajectory inflection points may be sorted in descending order, and a first preset number of trajectory inflection points may be selected as the plurality of compressed trajectory points.
[0159] Optionally, the comprehensive scores of all trajectory inflection points may be sorted in ascending order, and a first preset number of trajectory inflection points may be selected as the plurality of compressed trajectory points.
[0160] Step S900: Determine and store compressed flight trajectory data based on all compressed trajectory points and all flight trajectory parameters corresponding to each compressed trajectory point.
[0161] In some embodiments, compressed flight trajectory data is determined and stored based on all compressed trajectory points, the trajectory starting point, the trajectory ending point, all flight trajectory parameters corresponding to each compressed trajectory point, the flight trajectory parameters corresponding to the trajectory starting point, and the flight trajectory parameters corresponding to the trajectory ending point.
[0162] By compressing the flight trajectory data in the above manner, compared with existing general compression methods, more key information can be retained with the same number of compressed trajectory points, thereby improving the compression quality.
[0163] In some embodiments, data is also compressed based on the data type. Specifically, a target compression method is selected based on the data type and the corresponding information between the data type and the compression method to compress the data. For example, when the aircraft also acquires sound data, a target compression method is selected based on the sound data type and the corresponding information between the data type and the compression method to compress the sound data.
[0164] In summary, the data compression storage method provided by the embodiments of the present application has the following advantages:
[0165] 1. By determining a target compression method for image data segments acquired within a time period corresponding to each flight trajectory segment based on the flight mode corresponding to each flight trajectory segment, and compressing the image data segment using the target compression method for each image data segment, compressed image data is obtained. This method can adaptively compress image data according to the flight mode of the aircraft, thereby improving compression quality, that is, improving compression efficiency while retaining key information.
[0166] 2. By compressing the flight trajectory data in the above manner, compared with existing general compression methods, more key information can be retained with the same number of compressed trajectory points, thereby improving the compression quality.
[0167] See also Figure 3 , Figure 3 Schematic diagram of the structure of the data compression storage device provided in the embodiment of the present application. Figure 3As shown, the data compression storage device 300 includes an acquisition module 310 and a processing module 320 .
[0168] In some embodiments, the acquisition module 310 is used to acquire flight trajectory data and image data of the aircraft, where the flight trajectory data includes a plurality of trajectory points and flight trajectory parameters corresponding to each trajectory point.
[0169] In some embodiments, the processing module 320 is used to use a trained labeling model to classify the trajectory points based on the flight trajectory parameters corresponding to each trajectory point, thereby obtaining multiple labeled trajectory points, and determine a flight trajectory point sequence of the aircraft based on the multiple labeled trajectory points; in the flight trajectory point sequence, when the category of a labeled trajectory point is different from that of an adjacent labeled trajectory point, the labeled trajectory point is determined as a trajectory inflection point, thereby obtaining multiple trajectory inflection points; based on the multiple trajectory inflection points, at least one flight trajectory segment is determined, and image data segments acquired within a time period corresponding to each flight trajectory segment are determined, wherein all labeled trajectory points in a flight trajectory segment have the same category; based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment, a flight mode corresponding to each flight trajectory segment is determined; based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment, a target compression method for the image data segments acquired within the time period corresponding to the flight trajectory segment is determined based on the flight mode corresponding to each flight trajectory segment; the image data segment is compressed using the target compression method of each image data segment, and multiple compressed image data segments are spliced to obtain compressed image data.
[0170] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 400 includes: one or more processors 410 and a memory 420, Figure 4 A processor 410 is taken as an example.
[0171] In some embodiments, the processor 410 and the memory 420 may be connected via a bus or other means. Figure 4 The bus connection is taken as an example.
[0172] In some embodiments, the processor 410 is configured to obtain flight trajectory data and image data of an aircraft, where the flight trajectory data includes multiple trajectory points and flight trajectory parameters corresponding to each trajectory point; use a trained labeling model to classify the trajectory points based on the flight trajectory parameters corresponding to each trajectory point to obtain multiple labeled trajectory points, and determine a flight trajectory point sequence for the aircraft based on the multiple labeled trajectory points; in the flight trajectory point sequence, when a labeled trajectory point has a different category from an adjacent labeled trajectory point, determine the labeled trajectory point as a trajectory inflection point, thereby obtaining multiple trajectory inflection points; determine at least one flight trajectory segment based on the multiple trajectory inflection points, and determine image data segments acquired within a time period corresponding to each flight trajectory segment, wherein all labeled trajectory points in a flight trajectory segment have the same category; determine a flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment; determine a target compression method for image data segments acquired within the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment; compress the image data segment using the target compression method for each image data segment, and splice the multiple compressed image data segments to obtain compressed image data.
[0173] In some embodiments, memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the program instructions / modules of the data compression and storage method in the embodiments of the present application. Processor 410 executes the non-volatile software programs, instructions, and modules stored in memory 420 to execute various functional applications and data processing of electronic device 400, thereby implementing the data compression and storage method in the above-mentioned method embodiment.
[0174] In some embodiments, the memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device 400, etc. In addition, the memory 420 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely located relative to the processor 410, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0175] In some embodiments, one or more modules are stored in the memory 420, and when executed by one or more processors 410, the data compression storage method in any of the above method embodiments is executed, for example, the data compression storage method described above is executed. Figure 1 Method steps S100 to S700.
[0176] In some embodiments, the electronic device may be a chip.
[0177] In some embodiments, an aircraft includes the electronic device described above. While the aircraft is executing a flight plan, the electronic device may temporarily store image data and execute the data compression and storage method described above. Whenever a flight trajectory segment is determined, the electronic device compresses the image data segments acquired within the time period corresponding to the flight trajectory segment.
[0178] In some embodiments, the electronic device may temporarily store the image data, and execute the data compression and storage method described above every preset time interval to compress the temporarily stored image data.
[0179] In some embodiments, the electronic device may temporarily store the image data, and after the aircraft completes the flight plan, execute the data compression storage method described above to compress the temporarily stored image data.
[0180] In some embodiments, the electronic device may temporarily store the image data and execute the data compression storage method described above at a compression time point specified in the flight plan to compress the temporarily stored image data.
[0181] In some embodiments, the electronic device may temporarily store the image data, and when the remaining storage capacity is less than a preset capacity threshold, execute the data compression storage method described above to compress the temporarily stored image data.
[0182] Please refer to Figure 5 , Figure 5 The computer-readable storage medium 500 stores program code 510, which can be called by a processor to execute the data compression storage method described in the above method embodiment.
[0183] Computer-readable storage medium 500 may be an electronic memory such as flash memory, electrically erasable programmable read-only memory (EEPROM), a hard disk, or read-only memory (ROM). Alternatively, the computer-readable storage medium includes non-volatile computer-readable media. Computer-readable storage medium 500 has storage space for program code that executes any of the steps in the above-described data compression and storage method. This program code can be read from or written to one or more computer program products. The program code may, for example, be compressed in a suitable form.
[0184] The present application also provides a computer program product, including a computer program, which implements the above-mentioned data compression storage method when executed by a processor.
[0185] In summary, the present application provides a data compression storage method, an electronic device, and a storage medium, the data compression storage method comprising: obtaining flight trajectory data and image data of an aircraft, the flight trajectory data comprising a plurality of trajectory points and a flight trajectory parameter corresponding to each trajectory point; using a trained annotation model to perform category annotation on the trajectory points based on the flight trajectory parameter corresponding to each trajectory point, to obtain a plurality of annotated trajectory points, and determining a flight trajectory point sequence of the aircraft based on the plurality of annotated trajectory points; in the flight trajectory point sequence, when a annotated trajectory point has a different category from an adjacent annotated trajectory point, determining the annotated trajectory point as a trajectory inflection point, thereby obtaining to multiple trajectory inflection points; determine at least one flight trajectory segment based on the multiple trajectory inflection points, and determine the image data segments acquired within the time period corresponding to each flight trajectory segment, wherein all the marked trajectory points in a flight trajectory segment have the same category; determine the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment; determine the target compression mode for the image data segments acquired within the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment; compress the image data segments using the target compression mode for each image data segment, and splice multiple compressed image data segments to obtain compressed image data. The present application determines the target compression mode for the image data segments acquired within the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment, and compresses the image data segments using the target compression mode for each image data segment to obtain compressed image data. This application can adaptively compress the image data according to the flight mode of the aircraft, thereby improving compression quality, that is, improving compression efficiency and retaining key information.
[0186] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data compression storage method, characterized in that: include: Acquiring flight trajectory data and image data of the aircraft, wherein the flight trajectory data includes a plurality of trajectory points and flight trajectory parameters corresponding to each trajectory point; Using a trained labeling model to perform category labeling on the trajectory points based on flight trajectory parameters corresponding to each trajectory point to obtain a plurality of labeled trajectory points, and determining a flight trajectory point sequence of the aircraft based on the plurality of labeled trajectory points; In the flight trajectory point sequence, when the marked trajectory point is of a different category from an adjacent marked trajectory point, the marked trajectory point is determined as a trajectory inflection point, thereby obtaining a plurality of trajectory inflection points; determining at least one flight trajectory segment based on the multiple trajectory inflection points, and determining an image data segment acquired within a time period corresponding to each flight trajectory segment, wherein all the marked trajectory points in one flight trajectory segment have the same category; Determining the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment; determining, based on the flight mode corresponding to each flight trajectory segment, a target compression mode for the image data segments acquired within a time period corresponding to the flight trajectory segment; The target compression method of each image data segment is adopted to compress the image data segment, and multiple compressed image data segments are spliced together to obtain compressed image data.
2. The data compression storage method according to claim 1, wherein: The determining the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment includes: Calculating kinematic parameters and geometric characteristic parameters corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all trajectory points in each flight trajectory segment; The trained flight mode determination model is used to determine the flight mode corresponding to the flight trajectory segment based on the kinematic parameters and geometric characteristic parameters corresponding to the flight trajectory segment.
3. The data compression storage method according to claim 2, wherein: The kinematic parameters include the heading angle change range, altitude change rate and average speed; the geometric characteristic parameters include trajectory curvature, horizontal projection length change value and altitude change value; and the flight modes include uniform level flight, horizontal turn, climb, hovering and complex maneuvers.
4. The data compression storage method according to claim 1, wherein: The determining, based on the flight mode corresponding to each flight trajectory segment, a target compression mode for the image data segments acquired within a time period corresponding to the flight trajectory segment, includes: determining a target compression algorithm for image data segments acquired within a time period corresponding to each flight trajectory segment based on a preset rule and a flight mode corresponding to each flight trajectory segment; determining compression parameters in a target compression algorithm based on flight trajectory parameters corresponding to all trajectory points in the flight trajectory segment, the compression parameters including a compression ratio and a quality factor; A target compression method for the image data segment acquired within a time period corresponding to the flight trajectory segment is determined based on the target compression algorithm and the compression parameters.
5. The data compression storage method according to claim 4, characterized in that: The method of determining a target compression algorithm for image data segments acquired within a time period corresponding to each flight trajectory segment based on a preset rule and a flight mode corresponding to each flight trajectory segment includes: selecting at least two corresponding compression algorithms from a plurality of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each of the flight trajectory segments; For each of the preselected compression algorithms, obtaining a cost parameter of the preselected compression algorithm; Calculating the size of the image data segment after applying the preselected compression algorithm; calculating a compression cost of the preselected compression algorithm based on the size of the image data segment after applying the preselected compression algorithm and the cost parameter; A preselected compression algorithm is selected based on the compression cost of each of the preselected compression algorithms as a target compression algorithm for the image data segment acquired within the time period corresponding to the flight trajectory segment.
6. The data compression storage method according to claim 5, characterized in that: The selecting at least two corresponding compression algorithms from a plurality of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each flight trajectory segment includes: When the flight mode is uniform level flight, at least an inter-frame compression algorithm and a multi-resolution encoding algorithm are selected from a plurality of preset compression algorithms as pre-selected compression algorithms; When the flight mode is a horizontal turn, at least an inter-frame compression algorithm and a multi-view based compression algorithm are selected from a plurality of preset compression algorithms as pre-selected compression algorithms; When the flight mode is climbing, selecting at least a depth map-based compression algorithm and a panoramic stitching-based compression algorithm from a plurality of preset compression algorithms as preselected compression algorithms; When the flight mode is hovering, at least an adaptive compression algorithm based on a region of interest and a static scene compression algorithm based on deep learning are selected from a plurality of preset compression algorithms as pre-selected compression algorithms; When the flight mode is a complex maneuver, at least an artificial intelligence model-based compression algorithm and a hybrid coding compression algorithm are selected as pre-selected compression algorithms from a plurality of preset compression algorithms.
7. The data compression storage method according to claim 1, wherein: The method further comprises: Using a trained scoring model to score each trajectory inflection point based on the flight trajectory parameters corresponding to each trajectory inflection point, and selecting a plurality of compressed trajectory points from all the trajectory inflection points based on the score of each trajectory inflection point; Compressed flight trajectory data is determined and stored based on all the compressed trajectory points and all flight trajectory parameters corresponding to each of the compressed trajectory points.
8. The data compression storage method according to claim 7, characterized in that: The method of using a trained scoring model to score each trajectory inflection point based on the flight trajectory parameters corresponding to each trajectory inflection point, and selecting a plurality of compressed trajectory points from all the trajectory inflection points based on the score of each trajectory inflection point, includes: Inputting the flight trajectory parameters corresponding to each trajectory inflection point and the flight trajectory parameters corresponding to each trajectory point adjacent to each trajectory inflection point into the trained scoring model; In the trained scoring model, for each trajectory inflection point, multiple gap indicators are calculated between the trajectory inflection point and adjacent trajectory points based on the trajectory parameters corresponding to the trajectory inflection point and the trajectory points adjacent to the trajectory inflection point, the multiple gap indicators including relative distance, height difference, and instantaneous speed difference; Calculating an index score for each gap index between the trajectory inflection point and adjacent trajectory points; Calculating a comprehensive score for the trajectory inflection point based on the indicator scores of all gap indicators corresponding to the trajectory inflection point; A first preset number of trajectory inflection points with the lowest or highest comprehensive scores are selected from all the trajectory inflection points as the multiple compressed trajectory points.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data compression storage method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the data compression storage method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method for implementing machine-carried video compression and target tracking unitedly
CN101511022A
Video processing method, device, unmanned aerial vehicle and system
CN108702447A