Data compression storage method, electronic equipment and storage medium

By dynamically selecting compression algorithms and parameters according to the flight trajectory and mode during the drone flight, adaptively compressing the image data of the drone is solved, and the problem that fixed compression algorithms in the prior art cannot compress and retain key information efficiently, achieving a more efficient compression effect.

CN120201198AActive Publication Date: 2025-06-24AXD (ANXINDA) MEMORY TECH CO LTD

Patent Information

Application Number
CN202510668064.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-06-24
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

The prior art uses fixed compression algorithms during drone flights, which cannot effectively compress image data, and is especially prone to losing key information during rapid movement.

Method used

By acquiring the aircraft's flight trajectory data and image data, marking the trajectory points using the labeling model category, determining the flight trajectory segment and the image data segment within the corresponding time period, and selecting appropriate compression algorithms and parameters for compression according to the flight mode.

Benefits of technology

Adaptive compression of image data is achieved according to the aircraft's flight method, improving compression efficiency and retaining key information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201198A_ABST
    Figure CN120201198A_ABST
Patent Text Reader

Abstract

The invention discloses a data compression and storage method, electronic equipment and a storage medium. The method comprises the following steps: acquiring flight path data and image data; performing category labeling on the trajectory points based on the flight trajectory parameters; when the types of the marked track points are different, determining the marked track points as track inflection points; determining at least one flight path segment based on the plurality of path inflection points, and determining an image data segment corresponding to each flight path segment; determining a corresponding flight mode based on the flight path parameters corresponding to all the path points in each flight path segment; determining a target compression mode of the corresponding image data segment based on the flight mode; and compressing the image data segments by adopting the target compression mode of each image data segment to obtain compressed image data. According to the method, the target compression mode of the corresponding image data segment is determined based on the flight mode corresponding to each flight path segment, and adaptive compression can be performed on the image data according to the flight mode, so that the compression quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly relates to a data compression and storage method, an electronic device, and a storage medium. Background Art

[0002] Currently, unmanned aerial vehicles (UAVs) are widely used in fields such as surveying and mapping, inspection, and security monitoring. During the mission execution of UAVs, a large amount of image data is continuously collected. For example, in the power inspection scenario, the UAV needs to take long-distance photos of transmission lines; in agricultural surveying and mapping, the UAV needs to perform high-resolution imaging of large areas of farmland. Therefore, it is necessary to efficiently compress the image data collected by the aircraft while ensuring that key information is not lost.

[0003] In the prior art, a preset compression algorithm is usually used to compress the image data of UAVs.

[0004] However, in the prior art, only one invariant compression algorithm is used during the flight of the UAV. However, the flight process of the UAV is variable, and using one compression algorithm cannot efficiently compress the image data, and key information in the image data is often lost when the UAV moves rapidly. Summary of the Invention

[0005] Aiming at the deficiencies of the prior art, the present application provides a data compression and storage method, an electronic device, and a storage medium. By determining the target compression method for the image data segment obtained during the time period corresponding to each flight trajectory segment based on the flight mode corresponding to each flight trajectory segment, and using the target compression method of each image data segment to compress the image data segment, the compressed image data can be obtained, which 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] To solve the above problems, the present invention provides the following technical solutions: In a first aspect, an embodiment of the present application provides a data compression and storage method, including: obtaining flight trajectory data and image data of an aircraft, where the flight trajectory data includes a plurality of trajectory points and the flight trajectory parameters corresponding to each trajectory point; Using a trained annotation model to perform category annotation on each of the trajectory points based on the flight trajectory parameters corresponding to the trajectory points, obtaining 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 the category of an annotated trajectory point is different from that of an adjacent annotated trajectory point, determining the annotated trajectory point as a trajectory inflection point, thereby obtaining a plurality of the trajectory inflection points; Determine at least one flight trajectory segment based on the multiple trajectory inflection points, and determine the image data segments obtained within the time period corresponding to each flight trajectory segment, wherein all the labeled trajectory points in one 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 the trajectory points in each flight trajectory segment; Determine the target compression mode of the image data segment obtained 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 by using the target compression mode of each image data segment, and splice the multiple compressed image data segments to obtain the compressed image data.

[0007] In some embodiments, the determining the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all the trajectory points in each flight trajectory segment includes: Calculate the kinematic parameters and geometric feature parameters corresponding to the flight trajectory segment based on the flight trajectory parameters corresponding to all the trajectory points in each flight trajectory segment; Use the trained flight mode determination model to determine the flight mode corresponding to the flight trajectory segment based on the kinematic parameters and geometric feature parameters corresponding to the flight trajectory segment.

[0008] In some embodiments, the kinematic parameters include the heading angle change range, the altitude change rate, and the average speed, the geometric feature parameters include the trajectory curvature, the horizontal projection length change value, and the altitude change value, and the flight modes include uniform horizontal flight, horizontal turn, climb, hover, and complex maneuver.

[0009] In some embodiments, the determining the target compression mode of the image data segment obtained within the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment includes: Determine the target compression algorithm of the image data segment obtained within the time period corresponding to the flight trajectory segment based on the preset rules and the flight mode corresponding to each flight trajectory segment; Determine the compression parameters in the target compression algorithm based on the flight trajectory parameters corresponding to all the trajectory points in the flight trajectory segment, where the compression parameters include the compression ratio and the quality factor; Determine the target compression mode of the image data segment obtained within the time period corresponding to the flight trajectory segment based on the target compression algorithm and the compression parameters.

[0010] In some embodiments, the determining the target compression algorithm of the image data segment obtained within the time period corresponding to the flight trajectory segment based on the preset rules and the flight mode corresponding to each flight trajectory segment includes: Select at least two corresponding compression algorithms from a variety of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each said flight trajectory segment; For each of the said preselected compression algorithms, obtain the cost parameter of the said preselected compression algorithm; Calculate the size of the said image data segment after adopting the said preselected compression algorithm; Calculate the compression cost of the said preselected compression algorithm based on the size of the said image data segment after adopting the said preselected compression algorithm and the said cost parameter; Select a preselected compression algorithm as the target compression algorithm for the image data segment obtained during the time period corresponding to the said flight trajectory segment based on the compression cost of each of the said preselected compression algorithms.

[0011] In some embodiments, the selecting at least two corresponding compression algorithms from a variety of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each said flight trajectory segment includes: When the flight mode is uniform horizontal flight, select at least an inter-frame compression algorithm and a multi-resolution encoding algorithm from a variety of preset compression algorithms as preselected compression algorithms; When the flight mode is horizontal turning, select at least an inter-frame compression algorithm and a multi-view based compression algorithm from a variety of preset compression algorithms as preselected compression algorithms; When the flight mode is climbing, select at least a depth map based compression algorithm and a panoramic stitching based compression algorithm from a variety of preset compression algorithms as preselected compression algorithms; When the flight mode is hovering, select at least a region of interest based adaptive compression algorithm and a deep learning based static scene compression algorithm from a variety of preset compression algorithms as preselected compression algorithms; When the flight mode is complex maneuvering, select at least an artificial intelligence model based compression algorithm and a hybrid coding compression algorithm from a variety of preset compression algorithms as preselected compression algorithms.

[0012] In some embodiments, the method further includes: Use a trained scoring model to score each said trajectory inflection point based on the flight trajectory parameters corresponding to each said trajectory inflection point, and select multiple compression trajectory points from all said trajectory inflection points based on the score of each said trajectory inflection point; Determine and store the compressed flight trajectory data based on all said compression trajectory points and all flight trajectory parameters corresponding to each said compression trajectory point.

[0013] In some embodiments, the step of using the trained scoring model to score each of the trajectory inflection points based on the flight trajectory parameters corresponding to each of the trajectory inflection points, and selecting a plurality of compressed trajectory points from all the trajectory inflection points based on the scores of each of the trajectory inflection points includes: Inputting the flight trajectory parameters corresponding to each of the trajectory inflection points and the flight trajectory parameters corresponding to the trajectory points adjacent to each of the trajectory inflection points into the trained scoring model; In the trained scoring model, for each of the trajectory inflection points, calculating a plurality of difference metrics between the trajectory inflection point and the adjacent trajectory points based on the trajectory inflection point and the flight trajectory parameters corresponding to the adjacent trajectory points; Calculating the metric scores of each of the difference metrics between the trajectory inflection point and the adjacent trajectory points; Calculating the comprehensive score of the trajectory inflection point based on the metric scores of all the difference metrics corresponding to the trajectory inflection point; Selecting the first preset number of trajectory inflection points with the lowest or highest comprehensive scores from all the trajectory inflection points as the plurality of compressed trajectory points.

[0014] In a second aspect, an embodiment of the present application provides an electronic device, which includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable 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 execute the data compression and storage method as described in the first aspect.

[0015] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores an executable program, and the executable program is executed by a processor to implement the data compression and storage method as described in the first aspect.

[0016] The present application provides a data compression and storage method, an electronic device, and a storage medium. By determining the target compression method for the image data segment acquired during the time period corresponding to the 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, the compressed image data is obtained, which 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a schematic flowchart of the first embodiment of the data compression and storage method provided by the embodiment of the present application.

[0018] Figure 2 It is a schematic flowchart of the second implementation manner of the data compression and storage method provided by the embodiment of the present application.

[0019] Figure 3 It is a schematic structural diagram of the data compression and storage device provided by the embodiment of the present application.

[0020] Figure 4 It is a schematic structural diagram of an electronic device provided by the embodiment of the present application.

[0021] Figure 5 It is a structural block diagram of a computer-readable storage medium provided by the embodiment of the present application. Specific embodiments

[0022] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0023] In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality" means two or more unless otherwise specifically defined.

[0024] The present application provides a data compression and storage method, an electronic device and a storage medium. By determining the target compression method of the image data segment acquired during the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment, and compressing the image data segment by using the target compression method of each image data segment, the compressed image data can be obtained, and the image data can be adaptively compressed according to the flight mode of the aircraft, thereby improving the compression quality, that is, improving the compression efficiency and retaining key information.

[0025] Next, the data compression and storage method provided by the present application will be specifically described in conjunction with the drawings.

[0026] Please refer to Figure 1 , Figure 1 It is a schematic flowchart of the first implementation manner of the data compression and storage method provided by the embodiment of the present application. As Figure 1 shown, in some embodiments, the data compression and storage method includes: step S100 to step S700.

[0027] Step S100: Obtain the flight trajectory data and image data of the aircraft.

[0028] Among them, the flight trajectory data includes multiple trajectory points and the flight trajectory parameters corresponding to each trajectory point. The image data is obtained by the aircraft.

[0029] In some embodiments, the flight trajectory parameters include the position parameters, speed parameters, attitude parameters, and timestamps of the aircraft corresponding to the trajectory points, etc. The position parameters are used to describe the specific position of the aircraft in three-dimensional space, and the position parameters may include longitude, latitude, and altitude, etc. The speed parameters may include the instantaneous speed and acceleration of the aircraft. The attitude parameters may include the heading angle, pitch angle, and roll angle of the aircraft, etc.

[0030] Step S200: Use the trained annotation model to perform category annotation on the trajectory points based on the flight trajectory parameters corresponding to each trajectory point, obtain multiple annotated trajectory points, and determine the flight trajectory point sequence of the aircraft based on the multiple annotated trajectory points.

[0031] In some embodiments, the annotation 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 used to determine the feature matrix of each trajectory point according to the flight trajectory parameters corresponding to each trajectory point. The clustering module is used to perform clustering based on the feature matrices of all trajectory points to perform category annotation on each trajectory point and obtain multiple annotated trajectory points. The flight trajectory point sequence determination module is used to determine the flight trajectory point sequence of the aircraft based on the multiple annotated trajectory points.

[0032] In some embodiments, the feature matrix of the trajectory point includes the values of the flight trajectory parameters corresponding to the trajectory point. For example, the feature matrix of the trajectory point includes the position parameters, speed parameters, and attitude parameters corresponding to the trajectory point. The feature matrix may not include the timestamp corresponding to the trajectory point.

[0033] Optionally, perform normalization processing on each type of flight trajectory parameter to obtain the normalized value of each type of flight trajectory parameter, and determine the feature matrix based on the normalized values of the flight trajectory parameters corresponding to the trajectory points. In this way, the influence brought by different parameter value ranges to subsequent calculations can be avoided.

[0034] Optionally, divide the difference between the original value of the flight trajectory parameter and the average value of this type of flight trajectory parameter by the standard deviation of this type of flight trajectory parameter to obtain the normalized value of this flight trajectory parameter.

[0035] Optionally, the normalization processing is normalization. At this time, the difference between the original value of the flight trajectory parameter and the minimum value of this type of flight trajectory parameter can be divided by the difference between the maximum value and the minimum value of this type of flight trajectory parameter to obtain the normalized value of this flight trajectory parameter.

[0036] The average value, standard deviation, maximum value, and minimum value of the above flight trajectory parameters are determined based on all the numerical values of this type of flight trajectory parameter in the flight trajectory data.

[0037] In some embodiments, in the clustering module, any one of clustering methods such as the K-Means clustering method, K-Medoids clustering method, Gaussian mixture model clustering method, and fuzzy C-means clustering method can be used to perform clustering based on the feature matrix of all trajectory points, so as to label the category of each trajectory point.

[0038] In some embodiments, the number of categories in the clustering method can be preset or automatically determined according to the feature matrix of all trajectory points.

[0039] In some embodiments, according to the timestamp corresponding to each trajectory point, the trajectory point with the earliest timestamp can be first labeled as the trajectory start point, and the trajectory point with the latest timestamp can be labeled as the trajectory end point, and then clustering can be performed based on the feature matrix of other trajectory points to label the category of other trajectory points.

[0040] In some embodiments, in the flight trajectory point sequence determination module, according to the timestamp corresponding to each labeled trajectory point, the flight trajectory point sequence of the aircraft is determined in the order of the earliest timestamp to the latest timestamp.

[0041] Step S300: In the flight trajectory point sequence, when the category of a labeled trajectory point is different from that of the adjacent labeled trajectory point, the labeled trajectory point is determined as a trajectory inflection point, thereby obtaining multiple trajectory inflection points.

[0042] Exemplarily, when in the flight trajectory point sequence, the category of the 1st to 4th labeled trajectory points is the first category, and the category of the 5th to 7th labeled trajectory points is the second category, the 4th labeled trajectory point and the 5th labeled trajectory point are determined as trajectory inflection points.

[0043] Step S400: Based on multiple trajectory inflection points, at least one flight trajectory segment is determined, and an image data segment obtained within the time period corresponding to each flight trajectory segment is determined.

[0044] Among them, the categories of all the labeled trajectory points in one flight trajectory segment are the same.

[0045] In some embodiments, at least one flight trajectory segment is determined based on a trajectory starting point, a trajectory ending point, and a plurality of trajectory inflection points. For example, one flight trajectory segment is determined based on the trajectory starting point and the first trajectory inflection point closest to the trajectory starting point, and this flight trajectory segment includes all the trajectory points from the trajectory starting point to the first trajectory inflection point closest to the trajectory starting point. One flight trajectory segment is determined based on the second trajectory inflection point and the third trajectory inflection point, and this flight trajectory segment includes all the trajectory points from the second trajectory inflection point to the third trajectory inflection point, and so on. One flight trajectory segment is determined based on the last trajectory inflection point and the trajectory ending point, and this flight trajectory segment includes all the trajectory points from the last trajectory inflection point to the trajectory ending point.

[0046] In some embodiments, based on the timestamps corresponding to all the trajectory points in the flight trajectory segment, the time period corresponding to the flight trajectory segment can be determined, and then a part of the data obtained within this time period in the image data is extracted as the image data segment corresponding to the flight trajectory segment.

[0047] Step S500: Determine the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all the trajectory points in each flight trajectory segment.

[0048] In some embodiments, step S500 includes step S510 to step S520.

[0049] Step S510: Calculate the kinematic parameters and geometric feature parameters corresponding to the flight trajectory segment based on the flight trajectory parameters corresponding to all the trajectory points in each flight trajectory segment.

[0050] In some embodiments, the kinematic parameters include the range of heading angle change, the rate of altitude change, and the average speed. The geometric feature parameters include the trajectory curvature, the change value of the horizontal projection length, and the change value of the altitude. The flight modes include level flight at a constant speed, horizontal turn, climb, hover, and complex maneuver.

[0051] Optionally, the kinematic parameters may also include the range of pitch angle change and the range of roll angle change, etc.

[0052] Step S520: Use the trained flight mode determination model to determine the flight mode corresponding to the flight trajectory segment based on the kinematic parameters and geometric feature parameters corresponding to the flight trajectory segment.

[0053] Optionally, the flight mode determination model can be an artificial intelligence model such as a convolutional neural network model or a random forest model.

[0054] Step S600: Determine the target compression mode of the image data segment obtained within the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment.

[0055] In some embodiments, step S600 includes steps S610 to S630.

[0056] Step S610: Determine a target compression algorithm for the image data segment acquired during the time period corresponding to the flight trajectory segment based on a preset rule and the flight mode corresponding to each flight trajectory segment.

[0057] In some embodiments, step S610 includes steps S611 to S615.

[0058] Step S611: Select at least two corresponding compression algorithms from a variety of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each flight trajectory segment.

[0059] In some embodiments, when the flight mode is uniform horizontal flight, at least select an inter-frame compression algorithm and a multi-resolution encoding algorithm from a variety of preset compression algorithms as preselected compression algorithms.

[0060] When the flight mode is uniform horizontal flight, the similarity between adjacent multiple frames of images is relatively large. Therefore, the similarity between multiple frames of images can be utilized to improve the compression efficiency. The inter-frame compression algorithm can utilize the high similarity between adjacent frame images and perform compression using the block matching motion compensation method. The multi-resolution encoding algorithm can encode and compress the image data at different resolution levels.

[0061] In some embodiments, when the flight mode is horizontal turning, at least select an inter-frame compression algorithm and a multi-view-based compression algorithm from a variety of preset compression algorithms as preselected compression algorithms.

[0062] When the flight mode is horizontal turning, the similarity between adjacent multiple frames of images is relatively small, and adjacent multiple frames of images will exhibit global rotation or scale change. The multi-view-based compression algorithm can utilize the multi-view correlation of the surrounding views, select a reference image to perform disparity compensation encoding on other images for compression.

[0063] In some embodiments, when the flight mode is climbing, at least select a depth map-based compression algorithm and a panoramic stitching-based compression algorithm from a variety of preset compression algorithms as preselected compression algorithms.

[0064] When the flight mode is climbing, the change between adjacent multiple frames of images is very large. In the depth map-based compression algorithm, depth information encoding can be used to efficiently compress the image data. In the panoramic stitching-based compression algorithm, image features can be extracted and overlapping regions can be matched to generate a panoramic image, and the panoramic image can be compressed.

[0065] In some embodiments, when the flight mode is hovering, at least select the adaptive compression algorithm based on the region of interest and the still-scene compression algorithm based on deep learning from a variety of preset compression algorithms as the preselected compression algorithms.

[0066] When the flight mode is hovering, it is generally for photographing the region of interest, and the similarity between adjacent multiple frames of images is very large. In the adaptive compression algorithm based on the region of interest, by identifying the region of interest, a lossless compression algorithm can be used for the region of interest, and a compression algorithm with a high compression ratio can be used for the background region, greatly improving the compression efficiency. In the still-scene compression algorithm based on deep learning, it is possible to extract the static region features in the image and perform efficient compression, and it can also perform customized compression for different types of still scenes.

[0067] In some embodiments, when the flight mode is complex maneuvering, at least select the compression algorithm based on the artificial intelligence model and the hybrid coding compression algorithm from a variety of preset compression algorithms as the preselected compression algorithms.

[0068] The compression algorithm based on the artificial intelligence model and the hybrid coding compression algorithm have strong adaptability to complex image data and can achieve high compression efficiency.

[0069] In some embodiments, the preselected compression algorithms have priorities. One corresponding compression algorithm with the highest priority can be selected based on the flight mode corresponding to each flight trajectory segment.

[0070] Exemplarily, when the flight mode is uniform horizontal flight, select the inter-frame compression algorithm as the corresponding compression algorithm with the highest priority. When the flight mode is horizontal turning, select the compression algorithm based on multiple perspectives as the corresponding compression algorithm with the highest priority. When the flight mode is climbing, select the compression algorithm based on the depth map as the corresponding compression algorithm with the highest priority. When the flight mode is hovering, select the adaptive compression algorithm based on the region of interest as the corresponding compression algorithm with the highest priority. When the flight mode is complex maneuvering, select the compression algorithm based on the artificial intelligence model as the corresponding compression algorithm with the highest priority.

[0071] In some embodiments, the target compression algorithm corresponding to the flight mode can be directly determined according to a preset rule. At this time, the preset rule includes the correspondence information between each flight mode and the target compression algorithm. The correspondence between the flight mode and the target compression algorithm can be determined with reference to the correspondence between the flight mode and the corresponding compression algorithm with the highest priority determined above.

[0072] Step S612: For each preselected compression algorithm, obtain the cost parameter of the preselected compression algorithm.

[0073] Optionally, the cost parameters include the unit storage cost, unit retrieval cost, unit CPU computing cost, and unit decompression time corresponding to the compression algorithm, etc.

[0074] Step S613: Calculate the size of the image data segment after adopting the preselected compression algorithm.

[0075] In some embodiments, using the default compression parameters corresponding to the preselected compression algorithm, calculate the size of the image data segment after adopting the preselected compression algorithm.

[0076] Step S614: Calculate the compression cost of the preselected compression algorithm based on the size of the image data segment after adopting the preselected compression algorithm and the cost parameters.

[0077] In some embodiments, compression cost = storage cost per unit time + single access cost + capacity occupancy cost + compression computing time cost.

[0078] Optionally, storage cost per unit time = unit storage cost × size of the image data segment after adopting the preselected compression algorithm.

[0079] Optionally, single access cost = (unit retrieval cost + unit decompression time) × size of the image data segment after adopting the preselected compression algorithm.

[0080] Optionally, capacity occupancy cost = pre-designed calculation coefficient × size of the image data segment after adopting the preselected compression algorithm.

[0081] Optionally, compression computing time cost = unit CPU computing cost × size of the image data segment after adopting the preselected compression algorithm.

[0082] Step S615: Select one of the preselected compression algorithms as the target compression algorithm for the image data segment obtained during the time period corresponding to the flight trajectory segment based on the compression cost of each preselected compression algorithm.

[0083] In some embodiments, select one of the preselected compression algorithms with the minimum compression cost as the target compression algorithm.

[0084] In some embodiments, select one of the preselected compression algorithms as the target compression algorithm based on the compression cost and priority of each preselected compression algorithm.

[0085] Optionally, when the compression costs of all preselected compression algorithms are lower than the preset cost, select one of the preselected compression algorithms with the highest priority as the target compression algorithm. When the compression cost of the preselected compression algorithm with the highest priority is higher than the preset cost, select one of the preselected compression algorithms with the minimum compression cost as the target compression algorithm.

[0086] Step S620: Determine the compression parameters in the target compression algorithm based on the flight trajectory parameters corresponding to all the trajectory points in the flight trajectory segment.

[0087] Among them, the compression parameters include the compression ratio and the quality factor.

[0088] Optionally, the compression parameters further include other parameters.

[0089] In some embodiments, use a trained compression parameter determination model to determine the compression parameters in the target compression algorithm based on the flight trajectory parameters corresponding to all the trajectory points in the flight trajectory segment. The compression parameter determination model can be an artificial intelligence model.

[0090] Exemplarily, when the calculated standard deviation of the speeds of all the trajectory points within the flight trajectory segment is greater than a first preset value, set the compression ratio to 80% of the default compression ratio. In this way, it is possible to avoid the compressed image data from being too blurred.

[0091] In some embodiments, also determine whether it is necessary to identify the region of interest in the target compression algorithm based on the flight trajectory parameters corresponding to all the trajectory points in the flight trajectory segment, and determine the compression ratio and quality factor corresponding to the region of interest. For example, when the calculated height change rate of all the trajectory points within the flight trajectory segment is greater than a second preset value, determine that it is necessary to identify the region of interest in the target compression algorithm, and adjust the compression ratio and quality factor corresponding to the region of interest to the corresponding preset values to ensure the clarity of the region of interest.

[0092] Step S630: Determine the target compression method for the image data segment obtained during the time period corresponding to the flight trajectory segment based on the target compression algorithm and the compression parameters.

[0093] Among them, the target compression method is to compress the image data segment using the target compression algorithm with the set compression parameters.

[0094] Step S700: 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 the compressed image data.

[0095] In some embodiments, the flight trajectory data can also be compressed.

[0096] Please refer to Figure 2 , Figure 2 which is the flowchart of the second embodiment of the data compression and storage method provided by the embodiments of the present application. As Figure 2 shown, in some embodiments, this data compression and storage method further includes steps S800 to S900.

[0097] Step S800: Use the trained scoring model to score each trajectory inflection point based on the flight trajectory parameters corresponding to each trajectory inflection point, and select multiple compressed trajectory points from all the trajectory inflection points based on the scores of each trajectory inflection point.

[0098] When the flight trajectory sequence is long, there are generally many trajectory inflection points. Therefore, multiple trajectory inflection points can be selected from all the trajectory inflection points as compressed trajectory points. Some trajectory inflection points may not be compressed trajectory points. In this way, the computational amount can be reduced.

[0099] In some embodiments, step S800 includes step S810 to step S850.

[0100] Step S810: Input 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.

[0101] When the trajectory inflection point is not the starting point or the ending point of the trajectory, there are 2 trajectory points adjacent to a trajectory inflection point.

[0102] Step S820: In the trained scoring model, for each trajectory inflection point, calculate multiple difference metrics between the trajectory inflection point and the adjacent trajectory points based on the flight trajectory parameters corresponding to the trajectory inflection point and the adjacent trajectory points.

[0103] Optionally, each flight trajectory parameter corresponds to a difference metric.

[0104] Optionally, the multiple difference metrics include relative distance, height difference, and instantaneous velocity difference.

[0105] Optionally, the multiple difference metrics may also include acceleration difference, heading angle difference, pitch angle difference, roll angle difference, etc.

[0106] Optionally, when there are 2 trajectory points adjacent to a trajectory inflection point, for a target flight trajectory parameter for which the difference metric needs to be calculated, add 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 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 the value of a difference metric corresponding to the target flight trajectory parameter.

[0107] Step S830: Calculate the metric scores of each difference metric between the trajectory inflection point and the adjacent trajectory points.

[0108] In some embodiments, step S830 includes step S831 to step S832.

[0109] Step S831: Perform normalization processing on each difference metric to obtain multiple normalized difference metrics.

[0110] In this way, the influence of the dimensional differences of each gap index on the calculation result can be avoided.

[0111] Step S832: Calculate the index score of each gap index after normalization processing.

[0112] In some embodiments, in step S832, based on the gap indexes after normalization processing of all trajectory inflection points, calculate the index score of each gap index after normalization processing.

[0113] In some embodiments, the calculation formula for the index score of the gap index is: , where, represents the index score of the th gap index, represents the number of all trajectory inflection points, represents the weight corresponding to the th trajectory inflection point when calculating the th gap index, represents the base of the natural logarithm, represents the natural logarithm.

[0114] In some embodiments, in the trained scoring model, the th feature matrix corresponding to the trajectory inflection point and / or the value of the th gap index of the th trajectory inflection point can be used to determine . The feature matrix corresponding to the trajectory inflection point includes the values of the flight trajectory parameters corresponding to the trajectory inflection point.

[0115] Exemplarily, in the scoring model, the trained neural network is used to determine based on the feature matrix corresponding to the th trajectory inflection point and / or the value of the th gap index of the th trajectory inflection point.

[0116] Optionally, can be preset.

[0117] Optionally, the value of the th gap index of the th trajectory inflection point can be divided by the sum of the values of the th gap indexes of all trajectory inflection points to obtain .

[0118] Step S840: Calculate the comprehensive score of the trajectory inflection point based on the index scores of all gap indexes corresponding to the trajectory inflection point.

[0119] In some embodiments, the calculation formula for the comprehensive score of the trajectory inflection point is; , , wherein, represents the comprehensive score of the th trajectory inflection point, represents the total number of all gap indicators corresponding to the trajectory inflection point, represents the calculation coefficient calculated based on the index score of the th gap indicator corresponding to the trajectory inflection point.

[0120] Step S850: Select the first preset number of trajectory inflection points with the lowest or highest comprehensive scores from all trajectory inflection points as multiple compressed trajectory points.

[0121] Optionally, the comprehensive scores of all trajectory inflection points can be sorted in descending order, and the first preset number of trajectory inflection points selected therefrom are used as multiple compressed trajectory points.

[0122] Optionally, the comprehensive scores of all trajectory inflection points can be sorted in ascending order, and the first preset number of trajectory inflection points selected therefrom are used as multiple compressed trajectory points.

[0123] Step S900: Determine and store the compressed flight trajectory data based on all compressed trajectory points and all flight trajectory parameters corresponding to each compressed trajectory point.

[0124] In some embodiments, the compressed flight trajectory data is determined and stored based on all compressed trajectory points, the trajectory start point, the trajectory end point, all flight trajectory parameters corresponding to each compressed trajectory point, the flight trajectory parameters corresponding to the trajectory start point, and the flight trajectory parameters corresponding to the trajectory end point.

[0125] Through the above method for compressing flight trajectory data, compared with the existing general compression methods, more key information can be retained with the same number of compressed trajectory points, thereby improving the compression quality.

[0126] In some embodiments, the data is also compressed according to the data type. Specifically, a corresponding target compression method is selected to compress the data according to the data type and the corresponding information between the data type and the compression method. For example, when the aircraft also acquires sound data, a corresponding target compression method is selected to compress the sound data according to the type of the sound data and the corresponding information between the data type and the compression method.

[0127] In summary, the data compression and storage method provided by the embodiments of the present application has the following advantages: 1. By determining the target compression method of the image data segment obtained during the 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 of each image data segment, the compressed image data can be obtained, which 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.

[0128] 2. Through the above method of compressing flight trajectory data, compared with the existing general compression method, more key information can be retained with the same number of compressed trajectory points, thereby improving the compression quality.

[0129] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of the data compression and storage device provided by the embodiment of the present application. As Figure 3 shown, the data compression and storage device 300 includes an acquisition module 310 and a processing module 320.

[0130] In some embodiments, the acquisition module 310 is used to acquire the flight trajectory data and image data of the aircraft, and the flight trajectory data includes a plurality of trajectory points and the flight trajectory parameters corresponding to each trajectory point.

[0131] In some embodiments, the processing module 320 is used to perform class annotation on the trajectory points based on the flight trajectory parameters corresponding to each trajectory point by using a trained annotation model to obtain a plurality of annotated trajectory points, and determine the flight trajectory point sequence of the aircraft based on the plurality of annotated trajectory points; in the flight trajectory point sequence, when the class of the annotated trajectory point is different from that of the adjacent annotated trajectory point, the annotated trajectory point is determined as a trajectory inflection point, so as to obtain a plurality of trajectory inflection points; determine at least one flight trajectory segment based on the plurality of trajectory inflection points, and determine the image data segment obtained during the time period corresponding to each flight trajectory segment, wherein all the annotated trajectory points in one flight trajectory segment have the same class; determine the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all the trajectory points in each flight trajectory segment; determine the target compression method of the image data segment obtained during the time period corresponding to each flight trajectory segment based on the flight mode corresponding to each flight trajectory segment; compress the image data segment using the target compression method of each image data segment, and splice the plurality of compressed image data segments to obtain the compressed image data.

[0132] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of an electronic device provided by the embodiment of the present application. As Figure 4 shown, the electronic device 400 includes: one or more processors 410 and a memory 420, Figure 4 Taking one processor 410 as an example in

[0133] In some embodiments, the processor 410 and the memory 420 may be connected via a bus or other means. Figure 4 Taking the connection via the bus as an example.

[0134] In some embodiments, the processor 410 is configured to obtain flight trajectory data and image data of the aircraft. The flight trajectory data includes a plurality of trajectory points and flight trajectory parameters corresponding to each trajectory point. The processor uses a trained annotation model to perform class annotation on the trajectory points based on the flight trajectory parameters corresponding to each trajectory point, obtaining a plurality of annotated trajectory points, and determines a flight trajectory point sequence of the aircraft based on the plurality of annotated trajectory points. In the flight trajectory point sequence, when the category of an annotated trajectory point is different from that of an adjacent annotated trajectory point, the annotated trajectory point is determined as a trajectory inflection point, thereby obtaining a plurality of trajectory inflection points. The processor determines at least one flight trajectory segment based on the plurality of trajectory inflection points, and determines an image data segment obtained within the time period corresponding to each flight trajectory segment, where all the annotated trajectory points in one flight trajectory segment have the same category. The processor determines the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all the trajectory points in each flight trajectory segment. The processor determines the target compression mode of the image data segment obtained within the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment. The processor compresses the image data segment using the target compression mode of each image data segment, and splices the plurality of compressed image data segments to obtain compressed image data.

[0135] In some embodiments, the 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 program instructions / modules of the data compression and storage method in the embodiments of the present application. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the non-volatile software programs, instructions, and modules stored in the memory 420, that is, implements the data compression and storage method in the above method embodiments.

[0136] In some embodiments, the memory 420 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to 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 magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 420 may optionally include a memory remotely provided with respect to the processor 410, and these remote memories may be connected to the controller through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0137] In some embodiments, one or more modules are stored in the memory 420 and, when executed by one or more processors 410, perform the data compression storage method in any of the above method embodiments. For example, perform the Figure 1 method steps S100 to S700 described above.

[0138] In some embodiments, the electronic device may be a chip.

[0139] In some embodiments, an aircraft includes the electronic device as described above. During the process of the aircraft executing a flight plan, the electronic device may temporarily store image data and perform the data compression storage method as described above. Whenever a flight trajectory segment is determined, the image data segment acquired during the time period corresponding to the flight trajectory segment is compressed.

[0140] In some embodiments, the electronic device may temporarily store image data and perform the data compression storage method as described above at every preset time interval to compress the temporarily stored image data.

[0141] In some embodiments, the electronic device may temporarily store image data and, after the aircraft finishes the flight plan, perform the data compression storage method as described above to compress the temporarily stored image data.

[0142] In some embodiments, the electronic device may temporarily store image data and perform the data compression storage method as described above at a compression time point specified in the flight plan to compress the temporarily stored image data.

[0143] In some embodiments, the electronic device may temporarily store image data and, when the remaining storage capacity is less than a preset capacity threshold, perform the data compression storage method as described above to compress the temporarily stored image data.

[0144] Please refer to Figure 5 , Figure 5It is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code 510 is stored in the computer-readable storage medium 500, and the program code 510 can be called by a processor to execute the data compression storage method described in the above method embodiment.

[0145] The computer-readable storage medium 500 may be an electronic memory such as a flash memory, an electrically erasable programmable read-only memory (EEPROM), a hard disk, or a read-only memory (ROM). Optionally, the computer-readable storage medium includes a non-volatile computer-readable medium. The computer-readable storage medium 500 has a storage space for program code that executes any method step in the above data compression storage method. These program codes can be read out from or written into one or more computer program products. The program code can be compressed in an appropriate form, for example.

[0146] The present application also provides a computer program product, including a computer program, which implements the above data compression storage method when executed by a processor.

[0147] In summary, the present application provides a data compression and storage method, an electronic device, and a storage medium. The data compression and storage method includes: obtaining flight trajectory data and image data of an aircraft, where the flight trajectory data includes a plurality of trajectory points and flight trajectory parameters corresponding to each trajectory point; using a trained annotation model to perform class annotation on the trajectory points based on the flight trajectory parameters 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 the category of an annotated trajectory point is different from that of an adjacent annotated trajectory point, determining the annotated trajectory point as a trajectory inflection point, thereby obtaining a plurality of trajectory inflection points; determining at least one flight trajectory segment based on the plurality of trajectory inflection points, and determining an image data segment obtained within the time period corresponding to each flight trajectory segment, where all the annotated 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 the trajectory points in each flight trajectory segment; determining the target compression mode of the image data segment obtained within the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment; compressing the image data segment using the target compression mode of each image data segment, and splicing a plurality of compressed image data segments to obtain compressed image data. The present application determines the target compression mode of the image data segment obtained 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 mode of each image data segment, thereby obtaining compressed image data, which 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.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and 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 and storage method, characterized in that, Including: Obtain the flight trajectory data and image data of the aircraft, where the flight trajectory data includes a plurality of trajectory points and the flight trajectory parameters corresponding to each trajectory point; Use the trained annotation model to perform category annotation on each of the trajectory points based on the flight trajectory parameters corresponding to the trajectory points, obtain a plurality of annotated trajectory points, and determine the flight trajectory point sequence of the aircraft based on the plurality of annotated trajectory points; In the flight trajectory point sequence, when the category of the annotated trajectory point is different from that of the adjacent annotated trajectory point, determine the annotated trajectory point as a trajectory inflection point, so as to obtain a plurality of the trajectory inflection points; Determine at least one flight trajectory segment based on the plurality of trajectory inflection points, and determine the image data segment obtained during the time period corresponding to each flight trajectory segment, where the categories of all the annotated trajectory points in one flight trajectory segment are the same; Determine the flight mode corresponding to each flight trajectory segment based on the flight trajectory parameters corresponding to all the trajectory points in each flight trajectory segment; Determine the target compression mode of the image data segment obtained during 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 by using the target compression mode of each image data segment, and splice the plurality of compressed image data segments to obtain the compressed image data.

2. The data compression and 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 the trajectory points in each flight trajectory segment includes: Calculate the kinematic parameters and geometric feature parameters corresponding to the flight trajectory segment based on the flight trajectory parameters corresponding to all the trajectory points in each flight trajectory segment; Use the trained flight mode determination model to determine the flight mode corresponding to the flight trajectory segment based on the kinematic parameters and geometric feature parameters corresponding to the flight trajectory segment.

3. The data compression and storage method according to claim 2, wherein The kinematic parameters include the range of heading angle change, the height change rate, and the average speed, the geometric feature parameters include the trajectory curvature, the horizontal projection length change value, and the height change value, and the flight modes include uniform horizontal flight, horizontal turn, climb, hover, and complex maneuver.

4. The data compression and storage method according to claim 1, wherein The determining the target compression mode of the image data segment obtained during the time period corresponding to the flight trajectory segment based on the flight mode corresponding to each flight trajectory segment includes: Determine the target compression algorithm of the image data segment obtained during the time period corresponding to the flight trajectory segment based on the preset rules and the flight mode corresponding to each flight trajectory segment; Determine the compression parameters in the target compression algorithm based on the flight trajectory parameters corresponding to all the trajectory points in the flight trajectory segment, where the compression parameters include the compression ratio and the quality factor; Determine the target compression mode of the image data segment obtained during the time period corresponding to the flight trajectory segment based on the target compression algorithm and the compression parameters.

5. The data compression and storage method according to claim 4, wherein The determining the target compression algorithm of the image data segment obtained during the time period corresponding to the flight trajectory segment based on the preset rules and the flight mode corresponding to each flight trajectory segment includes: Select at least two corresponding compression algorithms from a variety 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, obtain the cost parameter of the preselected compression algorithm; Calculate the size of the image data segment after adopting the preselected compression algorithm; Calculate the compression cost of the preselected compression algorithm based on the size of the image data segment after adopting the preselected compression algorithm and the cost parameter; Select a preselected compression algorithm as the target compression algorithm for the image data segment obtained during the time period corresponding to the flight trajectory segment based on the compression cost of each of the preselected compression algorithms.

6. The data compression and storage method according to claim 5, wherein The step of selecting at least two corresponding compression algorithms from a variety of preset compression algorithms as preselected compression algorithms based on the flight mode corresponding to each of the flight trajectory segments includes: When the flight mode is level flight at a constant speed, at least select an inter-frame compression algorithm and a multi-resolution encoding algorithm from a variety of preset compression algorithms as preselected compression algorithms; When the flight mode is a horizontal turn, at least select an inter-frame compression algorithm and a multi-view based compression algorithm from a variety of preset compression algorithms as preselected compression algorithms; When the flight mode is climbing, at least select a depth map-based compression algorithm and a panoramic stitching-based compression algorithm from a variety of preset compression algorithms as preselected compression algorithms; When the flight mode is hovering, at least select a region of interest-based adaptive compression algorithm and a deep learning-based still scene compression algorithm from a variety of preset compression algorithms as preselected compression algorithms; When the flight mode is a complex maneuver, at least select an artificial intelligence model-based compression algorithm and a hybrid coding compression algorithm from a variety of preset compression algorithms as preselected compression algorithms.

7. The data compression and storage method according to claim 1, wherein The method further includes: Use a trained scoring model to score each of the trajectory inflection points based on the flight trajectory parameters corresponding to each of the trajectory inflection points, and select multiple compression trajectory points from all the trajectory inflection points based on the scores of each of the trajectory inflection points; Determine and store the compressed flight trajectory data based on all the compression trajectory points and all the flight trajectory parameters corresponding to each of the compression trajectory points.

8. The data compression and storage method according to claim 7, wherein The step of using a trained scoring model to score each of the trajectory inflection points based on the flight trajectory parameters corresponding to each of the trajectory inflection points, and selecting multiple compression trajectory points from all the trajectory inflection points based on the scores of each of the trajectory inflection points includes: Input the flight trajectory parameters corresponding to each of the trajectory inflection points and the flight trajectory parameters corresponding to the trajectory points adjacent to each of the trajectory inflection points into the trained scoring model; In the trained scoring model, for each of the trajectory inflection points, calculate multiple difference metrics between the trajectory inflection point and the adjacent trajectory points based on the trajectory inflection point and the flight trajectory parameters corresponding to the trajectory points adjacent to the trajectory inflection point; Calculate the metric scores of each of the difference metrics between the trajectory inflection point and the adjacent trajectory points; Calculate the comprehensive score of the trajectory inflection point based on the metric scores of all the difference metrics corresponding to the trajectory inflection point; From all of the trajectory inflection points, select the first preset number of trajectory inflection points with the lowest or highest comprehensive score as the multiple compressed trajectory points.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable 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 execute 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

  • Video transmission method and device based on Wi-Fi, automatic aircraft and storage medium

    CN118200492A

  • Apparatus and method for transmitting airplane image

    KR1020120025654A

Cited By

  • Dynamic sampling vehicle track processing method and device, medium and equipment

    CN121861876A