CN107742313B - Data compression method and device applied to vector space - Google Patents

Data compression method and device applied to vector space Download PDF

Info

Publication number
CN107742313B
CN107742313B CN201710883540.2A CN201710883540A CN107742313B CN 107742313 B CN107742313 B CN 107742313B CN 201710883540 A CN201710883540 A CN 201710883540A CN 107742313 B CN107742313 B CN 107742313B
Authority
CN
China
Prior art keywords
point
vector space
judged
determined
compressed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710883540.2A
Other languages
Chinese (zh)
Other versions
CN107742313A (en
Inventor
赵广斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaqin Technology Co Ltd
Original Assignee
Huaqin Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaqin Technology Co Ltd filed Critical Huaqin Technology Co Ltd
Priority to CN201710883540.2A priority Critical patent/CN107742313B/en
Publication of CN107742313A publication Critical patent/CN107742313A/en
Application granted granted Critical
Publication of CN107742313B publication Critical patent/CN107742313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Abstract

The embodiment of the invention discloses a data compression method and equipment applied to a vector space, which comprises the steps of obtaining a point to be judged; calculating the polar coordinates of the point to be judged according to the longitude and latitude coordinates of the point to be judged; calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function; and if the characteristic value is larger than a preset threshold value, taking the point to be determined as the current characteristic point, otherwise, removing the point to be determined from the vector space curve to be compressed. Therefore, for each point to be judged on the vector space curve to be compressed, whether the point to be judged is reserved or not is judged only according to the characteristic value obtained by calculation of the polar coordinate difference value between the point to be judged and the current characteristic point, the algorithm is simple, and the time complexity and the space complexity are low, so that the calculated amount in the data compression processing process is greatly reduced.

Description

Data compression method and device applied to vector space
Technical Field
The present invention relates to the field of computer data processing, and in particular, to a data compression method and apparatus applied to a vector space.
Background
In the engineering fields of traffic and Geographic mapping, GIS (Geographic Information System), and the like, a vector curve composed of spatial points is generally used to record various GPS tracks, mapping paths, coastlines, trends of river channels, and the like. Since a large storage space is required for storing all the collected data points and the calculation amount is large when performing subsequent processing (such as positioning or mapping), the vector curve is usually subjected to appropriate data compression on the basis of satisfying a certain compression accuracy so as to preserve the overall characteristics of the curve and reduce the required storage space.
In the prior art, there are two main types of commonly used vector space data compression algorithms: the douglas-pock algorithm, diaphragm method. Taking the douglas-pock algorithm as an example, the major idea of the douglas-pock algorithm is to connect a straight line between the starting point and the end point of a given curve, calculate the distance between all data points in the middle and the straight line, and find out the maximum distance. Comparing the maximum distance with a tolerance, and if the maximum distance is smaller than the tolerance, discarding all data points in the middle; if the maximum distance is larger than the tolerance, a data point corresponding to the maximum distance is reserved, the data point is used as a boundary to divide the curve into two sections, and the method is repeatedly used for each section. It can be seen that although the douglas-pock algorithm can effectively retain the characteristic points of the curve, the accuracy is high, each calculation process involves all data points between the starting point and the ending point on the curve, so the calculation amount is large, and when the starting point and the ending point of the curve are uncertain, starting compression from different starting points may cause inconsistent compression results.
Similarly, in the diaphragm method, for each data point, whether the data point is to be retained or not is determined by determining whether its position is within or outside the defined sector area. Although the method can dynamically adjust the tolerance according to whether the previous data point is deleted or not, the precision is higher, but the algorithm is more complex.
In summary, there is a need for a data compression method applied to a vector space to solve the technical problems of complex algorithm and large computation amount of the vector space data compression method in the prior art.
Disclosure of Invention
The invention provides a data compression method and equipment applied to a vector space, which are used for solving the technical problems of complex algorithm and large calculation amount of the vector space data compression method in the prior art.
The embodiment of the invention provides a data compression method applied to a vector space, which comprises the following steps:
acquiring a point to be judged, and calculating to obtain a polar coordinate of the point to be judged according to the longitude and latitude coordinates of the point to be judged; the point to be judged is a vector space point on a vector space curve to be compressed;
calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; the current characteristic point is a vector space point which is closest to the point to be determined on the vector space curve to be compressed and is reserved after compression processing;
calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function;
and if the characteristic value is determined to be larger than a preset threshold value, taking the point to be determined as the current characteristic point, otherwise, removing the point to be determined from the vector space curve to be compressed.
Optionally, the obtaining a point to be determined includes:
according to the extending direction of the vector space curve to be compressed, vector space points except a starting point and an end point on the vector space curve to be compressed are sequentially used as the points to be determined;
after the point to be determined is taken as the current feature point, the method further comprises the following steps:
returning to the step of acquiring the points to be judged until all the points to be judged are processed;
and taking the vector space curve formed by the starting point and the end point of the vector space curve to be compressed and the reserved vector space point as the compressed vector space curve.
Optionally, the characteristic function is:
T=Δρ*sinΔθ
wherein, T is the characteristic value, Δ ρ is a difference between the polar diameter of the point to be determined and the polar diameter of the current characteristic point, and Δ θ is a difference between the polar angle of the point to be determined and the polar angle of the current characteristic point.
Optionally, the characteristic function is:
Figure BDA0001419670600000031
wherein, T is the characteristic value, Δ ρ 'is a value obtained by normalizing a polar diameter difference between the polar diameter of the point to be determined and the polar diameter of the current characteristic point, and Δ θ' is a value obtained by normalizing a polar angle difference between the polar angle of the point to be determined and the polar angle of the current characteristic point.
Based on the same inventive concept, the present invention provides a computing device, comprising:
the acquisition module is used for acquiring a point to be judged; the point to be judged is a vector space point on a vector space curve to be compressed;
the calculation module is used for calculating to obtain the polar coordinates of the point to be judged according to the longitude and latitude coordinates of the point to be judged; calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function; the current characteristic point is a vector space point which is closest to the point to be determined on the vector space curve to be compressed and is reserved after compression processing;
and the processing module is used for taking the point to be determined as the current characteristic point if the characteristic value is determined to be larger than a preset threshold value, and otherwise, removing the point to be determined from the vector space curve to be compressed.
Optionally, the obtaining module is specifically configured to:
according to the extending direction of the vector space curve to be compressed, vector space points except a starting point and an end point on the vector space curve to be compressed are sequentially used as the points to be determined;
the processing module is further configured to:
returning to the step of acquiring the points to be judged until all the points to be judged are processed;
and taking the vector space curve formed by the starting point and the end point of the vector space curve to be compressed and the reserved vector space point as the compressed vector space curve.
Optionally, the characteristic function is:
T=Δρ*sinΔθ
wherein, T is the characteristic value, Δ ρ is a difference between the polar diameter of the point to be determined and the polar diameter of the current characteristic point, and Δ θ is a difference between the polar angle of the point to be determined and the polar angle of the current characteristic point.
Optionally, the characteristic function is:
Figure BDA0001419670600000041
wherein, T is the characteristic value, Δ ρ 'is a value obtained by normalizing a polar diameter difference between the polar diameter of the point to be determined and the polar diameter of the current characteristic point, and Δ θ' is a value obtained by normalizing a polar angle difference between the polar angle of the point to be determined and the polar angle of the current characteristic point.
Another embodiment of the present invention provides a computing device, which includes a memory for storing program instructions and a processor for calling the program instructions stored in the memory to execute any one of the above methods according to the obtained program.
Another embodiment of the present invention provides a computer storage medium having stored thereon computer-executable instructions for causing a computer to perform any one of the methods described above.
The data compression method applied to the vector space in the embodiment of the invention comprises the steps of obtaining a point to be judged; calculating to obtain the polar coordinates of the point to be judged according to the longitude and latitude coordinates of the point to be judged; calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function; and if the characteristic value is determined to be larger than a preset threshold value, taking the point to be determined as the current characteristic point, otherwise, removing the point to be determined from the vector space curve to be compressed. Therefore, for each point to be judged on the vector space curve to be compressed, whether the point to be judged is reserved or not is judged only according to the characteristic value obtained by calculation of the polar coordinate difference between the point to be judged and the current characteristic point closest to the point to be judged, the algorithm is simple, and the time complexity and the space complexity are low, so that the calculated amount in the data compression processing process is greatly reduced. In addition, as other vector space points except the current characteristic point on the vector space curve to be compressed do not need to be involved in the calculation process of any point to be determined on the vector space curve to be compressed, the data compression method provided by the embodiment of the invention is not only suitable for a non-real-time operation scene in which all vector space points on the vector space curve to be compressed are obtained integrally and then processed, but also suitable for a real-time operation scene in which all vector space points on the vector space curve to be compressed are obtained and processed one by one.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a data compression method applied to a vector space according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a comparison between the compression rate of a data compression method applied to a vector space according to an embodiment of the present invention and the compression rate of a Douglas-Pock algorithm in the prior art;
fig. 3 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiments of the present invention will be described in further detail with reference to the drawings attached hereto.
Fig. 1 shows a schematic flowchart corresponding to a data compression method applied to a vector space in an embodiment of the present invention, and as shown in fig. 1, the method includes:
s101, acquiring a point to be judged, and calculating to obtain a polar coordinate of the point to be judged according to the longitude and latitude coordinates of the point to be judged; the point to be judged is a vector space point on a vector space curve to be compressed;
step S102, calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; the current characteristic point is a vector space point which is closest to the point to be determined on the vector space curve to be compressed and is reserved after compression processing;
step S103, calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function;
and step S104, if the characteristic value is determined to be larger than a preset threshold value, taking the point to be determined as the current characteristic point, otherwise, removing the point to be determined from the vector space curve to be compressed.
Therefore, for each point to be judged on the vector space curve to be compressed, whether the point to be judged is reserved or not is judged only according to the characteristic value obtained by calculation of the polar coordinate difference between the point to be judged and the current characteristic point closest to the point to be judged, the algorithm is simple, and the time complexity and the space complexity are low, so that the calculated amount in the data compression processing process is greatly reduced. In addition, as other vector space points except the current characteristic point on the vector space curve to be compressed do not need to be involved in the calculation process of any point to be determined on the vector space curve to be compressed, the data compression method provided by the embodiment of the invention is not only suitable for a non-real-time operation scene in which all vector space points on the vector space curve to be compressed are obtained integrally and then processed, but also suitable for a real-time operation scene in which all vector space points on the vector space curve to be compressed are obtained and processed one by one.
The data compression method applied to the vector space in the embodiment of the present invention may be specifically executed by multiple types of computing devices with an operation function, for example, the data compression method may be implemented by a server-level computer, a desktop computer, a notebook computer, and various types of intelligent terminal devices (i.e., a mobile phone, a tablet computer, etc.), or may also be implemented by various types of embedded devices such as a car navigation device, and the like, which is not limited herein.
In the embodiment of the invention, the vector space curve to be compressed is composed of a plurality of continuous vector space points, wherein any vector space point on the curve corresponds to a longitude and latitude coordinate. According to different application scenes, the data of each vector space point in the vector space curve to be compressed can be acquired by different types of acquisition equipment and then sent to the computing equipment. Therefore, the computing device may store the data of all vector space points on the vector space curve to be compressed into the cache of the computing device after receiving the data, and then trigger to execute the above method flow, or may trigger to execute the above method flow immediately after receiving the data of the first vector space point (i.e., the starting point of the curve) on the vector space curve to be compressed sent by the acquisition device, which is not limited specifically here.
Specifically, in step S101, the computing device first acquires a point to be determined, which is a vector space point on a vector space curve to be compressed. And further, calculating to obtain the polar coordinates of the point to be judged according to the longitude and latitude coordinates of the point to be judged.
Taking the longitude and latitude coordinates of the point to be determined as pn={xn,ynFor example, the polar coordinates of the point to be determined are:
Figure BDA0001419670600000071
in step S102, the computing device first obtains a current feature point, where the current feature point is a vector space point on a vector space curve to be compressed, which is closest to a point to be determined and is reserved after compression processing, and then calculates a polar coordinate of the current feature point according to a longitude and latitude coordinate of the current feature point.
Similarly, if the longitude and latitude coordinate of the current feature point is pm={xm,ymFor example, the polar coordinates of the point to be determined are:
Figure BDA0001419670600000072
and then, calculating a polar coordinate difference value according to the polar coordinate of the point to be determined and the polar coordinate of the current characteristic point. If the polar coordinate of the point to be determined is p'nnn) Polar coordinates of current feature point are p'mmm) Then the polar difference is:
Figure BDA0001419670600000073
in step S103, the computing device substitutes the polar coordinate difference (i.e., the polar diameter difference and the polar angle difference) obtained in step S102 into the polar diameter and polar angle variables in the preset feature function, respectively, and computes a feature value.
It should be noted that, in the embodiment of the present invention, different feature functions may cause different convergence trends and sensitivities of different determination points, so that different compression effects may be achieved by selecting different feature functions, and a person skilled in the art may select a specific feature function according to actual needs, which is not limited specifically here.
The characteristic functions applicable to the embodiment of the present invention include, but are not limited to, the following two types: the characteristic function T ═ Δ ρ × sin Δ θ, characteristic function
Figure BDA0001419670600000081
Specifically, if the characteristic function is T ═ Δ ρ × sin Δ θ, the polar diameter difference and the polar angle difference in the polar coordinate difference may be substituted into the Δ ρ and Δ θ variables in the characteristic function, respectively. If the characteristic function is selected
Figure BDA0001419670600000082
Then, the polar diameter difference and the polar angle difference in the polar coordinate difference are subjected to dimensionless normalization processing respectively to obtain Δ ρ 'and Δ θ', and then are substituted into corresponding variables.
In step S104, if the computing device determines that the calculated feature value is greater than the preset threshold TtdAnd taking the point to be determined as the current characteristic point and reserving the point to be determined so as to execute subsequent processing. If the calculated characteristic value is less than the preset threshold value TtdAnd deleting the point to be determined from the vector space curve to be compressed.
In the embodiment of the invention, for the same characteristic function, different preset thresholds correspond to different compression ratios. Different feature functions are respectively corresponding to preset thresholds, and the preset thresholds corresponding to the different feature functions may have a large difference in numerical value or magnitude, so that a person skilled in the art specifically sets the preset thresholds according to the selected feature function and the required compression rate, and the setting is not specifically limited herein.
In the embodiment of the present invention, the steps S101 to S104 specifically describe a processing procedure of a point to be determined (i.e., a currently processed vector space point) on a spatial curve to be compressed, that is, after compression processing, the point to be determined is retained or deleted. If the feature value is calculated to determine that the point to be determined is reserved, the point to be determined is used as a new current feature point, that is, in the process of processing a certain vector space point after the determination point, if no other vector space point exists between the vector space point and the point to be determined, or other vector space points between the vector space point and the point to be determined are deleted, the point to be determined is used as the current feature point which is used as a comparison reference in step S102.
In an actual application scenario, the computing device defaults the start point and the end point on the vector space curve to be compressed as feature points to be reserved, and for other vector space points on the vector space curve to be compressed except the start point and the end point, the computing device sequentially takes the vector space points as the points to be determined in the above steps S101 to S104 according to the extending direction of the vector space curve to be compressed, and executes the above steps to determine whether the vector space points are reserved on the compressed vector space curve.
That is, after the computing device has finished processing a certain point to be determined by executing the above steps S101 to S104, it will return to step S101 to use the next vector space point that is continuous after the point to be determined as a new point to be determined, and execute the above steps S101 to S104 until all vector space points on the vector space curve to be compressed are processed in sequence, and further, the computing device will use the vector space curve formed by the start point and the end point of the vector space curve to be compressed and the remaining vector space points as the compressed vector space curve.
The data compression method in the embodiment of the invention is insensitive to historical data, when any vector space point on a vector space curve to be compressed is processed, only the data of the feature point closest to the vector space point is needed to be utilized, the data of other vector space points are not needed to be involved, and whether the vector space point is the feature point needing to be reserved can be determined only by calculating once, so that the time complexity and the space complexity are very low.
It should be emphasized that the data compression method in the embodiment of the present invention can be applied to both a non-real-time computing environment and a real-time computing environment. For example, in a real-time operation scenario, such as in an automotive GPS navigation application, each vector space point on a vector space curve to be compressed, which records an automobile driving track, is calculated in real time by a GPS satellite and sent to a navigation device, so that the navigation device also sends each data point to a computing device one by one during a process of acquiring data points in real time, and then the computing device sequentially compresses each data point received in real time. However, in the various data compression methods in the prior art, since calculation is required according to all data of the curve, the methods can only be applied in a non-real-time computing environment, that is, a compression process can only be triggered after all data on a vector space curve to be compressed are received.
Table 1 exemplarily shows time-consuming data obtained by compressing the same vector space curve to be compressed by using the douglas pock algorithm in the prior art and the data compression method in the embodiment of the present invention respectively under the condition of different compression rates.
Compression ratio Time consuming of the Douglas pock algorithm(s) Time consumption(s) of the data compression method in the embodiment of the present invention
49% 0.02 0.03
46% 0.03 0.03
40% 0.05 0.03
23% 0.27 0.03
17% 0.58 0.03
9% 1.30 0.03
6% 1.59 0.03
2% 4.17 0.03
1.50% 6.93 0.03
0.50% 13.56 0.03
0.30% 22.08 0.03
TABLE 1 time consuming comparison of data for Douglas Puck algorithm and data compression method of the present invention
It should be noted that the compression ratio in table 1 is inversely proportional to the compression degree, that is, the higher the compression ratio, the lower the compression degree, the greater the number of feature points retained on the vector space curve to be compressed, and vice versa.
Fig. 2 is a schematic diagram comparing compression time consumption plotted with a compression rate as an abscissa and time consumption as an ordinate according to the data in table 1, as can be seen from table 1 and fig. 2, when the compression rate is larger, the compression time consumption of the douglas-pock algorithm is still closer to that of the data compression method in the embodiment of the present invention, but as the compression rate is gradually reduced, the compression time consumption of the douglas-pock algorithm is significantly increased, while the compression time consumption of the data compression method in the embodiment of the present invention is still smaller and remains stable, and the data compression method in the embodiment of the present invention has the same compression speed under different compression rates.
In addition, the embodiment of the invention has high flexibility and sensitivity because various characteristic functions can be selected. Therefore, before the compression processing is carried out on the space curve to be compressed, the sensitivity judgment of the distribution of the characteristic points can be realized by adjusting the characteristic function and the threshold value when different application characteristics are applied, so that the compression precision is improved.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, fig. 3 is a schematic structural diagram of the computing device provided in the embodiment of the present invention, and as shown in fig. 3, the computing device 300 includes:
an obtaining module 301, configured to obtain a point to be determined; the point to be judged is a vector space point on a vector space curve to be compressed;
the calculating module 302 is configured to calculate a polar coordinate of the point to be determined according to the longitude and latitude coordinates of the point to be determined; calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function; the current characteristic point is a vector space point which is closest to the point to be determined on the vector space curve to be compressed and is reserved after compression processing;
and the processing module 303 is configured to, if it is determined that the feature value is greater than a preset threshold, use the point to be determined as the current feature point, and otherwise remove the point to be determined from the vector space curve to be compressed.
Optionally, the obtaining module 301 is specifically configured to:
according to the extending direction of the vector space curve to be compressed, vector space points except a starting point and an end point on the vector space curve to be compressed are sequentially used as the points to be determined;
the processing module 303 is further configured to:
returning to the step of acquiring the points to be judged until all the points to be judged are processed;
and taking the vector space curve formed by the starting point and the end point of the vector space curve to be compressed and the reserved vector space point as the compressed vector space curve.
Optionally, the characteristic function is:
T=Δρ*sinΔθ
wherein, T is the characteristic value, Δ ρ is a difference between the polar diameter of the point to be determined and the polar diameter of the current characteristic point, and Δ θ is a difference between the polar angle of the point to be determined and the polar angle of the current characteristic point.
Optionally, the characteristic function is:
Figure BDA0001419670600000121
wherein, T is the characteristic value, Δ ρ 'is a value obtained by normalizing a polar diameter difference between the polar diameter of the point to be determined and the polar diameter of the current characteristic point, and Δ θ' is a value obtained by normalizing a polar angle difference between the polar angle of the point to be determined and the polar angle of the current characteristic point.
Based on the same inventive concept, the embodiment of the present invention further provides another computing device, which may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like. The computing device may include a Central Processing Unit (CPU), memory, input/output devices, etc., the input devices may include a keyboard, mouse, touch screen, etc., and the output devices may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), etc.
The memory may include Read Only Memory (ROM) and Random Access Memory (RAM), and provides the processor with program instructions and data stored in the memory. In an embodiment of the present invention, the memory may be used to store a program of the above-described vector space-based data compression method.
The processor is used for executing the vector space-based data compression method according to the obtained program instructions by calling the program instructions stored in the memory.
Based on the same inventive concept, embodiments of the present invention provide a computer storage medium for storing computer program instructions for the above-mentioned computing device, which includes a program for executing the above-mentioned vector space-based data compression method.
The computer storage media may be any available media or data storage device that can be accessed by a computer, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
From the above, it can be seen that:
the data compression method applied to the vector space in the embodiment of the invention comprises the steps of obtaining a point to be judged; calculating to obtain the polar coordinates of the point to be judged according to the longitude and latitude coordinates of the point to be judged; calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function; and if the characteristic value is determined to be larger than a preset threshold value, taking the point to be determined as the current characteristic point, otherwise, removing the point to be determined from the vector space curve to be compressed. Therefore, for each point to be judged on the vector space curve to be compressed, whether the point to be judged is reserved or not is judged only according to the characteristic value obtained by calculation of the polar coordinate difference between the point to be judged and the current characteristic point closest to the point to be judged, the algorithm is simple, and the time complexity and the space complexity are low, so that the calculated amount in the data compression processing process is greatly reduced. In addition, as other vector space points except the current characteristic point on the vector space curve to be compressed do not need to be involved in the calculation process of any point to be determined on the vector space curve to be compressed, the data compression method provided by the embodiment of the invention is not only suitable for a non-real-time operation scene in which all vector space points on the vector space curve to be compressed are obtained integrally and then processed, but also suitable for a real-time operation scene in which all vector space points on the vector space curve to be compressed are obtained and processed one by one.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method of data compression applied to a vector space, the method comprising:
acquiring a point to be judged, and calculating to obtain a polar coordinate of the point to be judged according to the longitude and latitude coordinates of the point to be judged; the point to be judged is a vector space point on a vector space curve to be compressed;
calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; the current characteristic point is a vector space point which is closest to the point to be determined on the vector space curve to be compressed and is reserved after compression processing;
calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function;
and if the characteristic value is determined to be larger than a preset threshold value, taking the point to be determined as the current characteristic point, otherwise, removing the point to be determined from the vector space curve to be compressed.
2. The method according to claim 1, wherein the obtaining a point to be determined comprises:
according to the extending direction of the vector space curve to be compressed, vector space points except a starting point and an end point on the vector space curve to be compressed are sequentially used as the points to be determined;
after the point to be determined is taken as the current feature point, the method further comprises the following steps:
returning to the step of acquiring the points to be judged until all the points to be judged are processed;
and taking the vector space curve formed by the starting point and the end point of the vector space curve to be compressed and the reserved vector space point as the compressed vector space curve.
3. The method of claim 1, wherein the characterization function is:
Figure 778373DEST_PATH_IMAGE002
wherein T is the characteristic value,
Figure DEST_PATH_IMAGE003
is the difference value between the polar diameter of the point to be judged and the polar diameter of the current characteristic point,
Figure 177999DEST_PATH_IMAGE004
the difference value between the polar angle of the point to be determined and the polar angle of the current characteristic point is referred to.
4. The method of claim 1, wherein the characterization function is:
Figure 241770DEST_PATH_IMAGE006
wherein T is the characteristic value,
Figure DEST_PATH_IMAGE007
the value is obtained after normalization processing is carried out on the diameter difference value between the diameter of the point to be determined and the diameter of the current characteristic point,
Figure 784878DEST_PATH_IMAGE008
the polar angle difference between the polar angle of the point to be determined and the polar angle of the current characteristic point is normalized.
5. A compression device, comprising:
the acquisition module is used for acquiring a point to be judged; the point to be judged is a vector space point on a vector space curve to be compressed;
the calculation module is used for calculating to obtain the polar coordinates of the point to be judged according to the longitude and latitude coordinates of the point to be judged; calculating a polar coordinate difference value according to the polar coordinate of the point to be judged and the polar coordinate of the current characteristic point; calculating a characteristic value according to the polar coordinate difference value and a preset characteristic function; the current characteristic point is a vector space point which is closest to the point to be determined on the vector space curve to be compressed and is reserved after compression processing;
and the processing module is used for taking the point to be determined as the current characteristic point if the characteristic value is determined to be larger than a preset threshold value, and otherwise, removing the point to be determined from the vector space curve to be compressed.
6. The apparatus of claim 5, wherein the obtaining module is specifically configured to:
according to the extending direction of the vector space curve to be compressed, vector space points except a starting point and an end point on the vector space curve to be compressed are sequentially used as the points to be determined;
the processing module is further configured to:
returning to the step of acquiring the points to be judged until all the points to be judged are processed;
and taking the vector space curve formed by the starting point and the end point of the vector space curve to be compressed and the reserved vector space point as the compressed vector space curve.
7. The apparatus of claim 5, wherein the characterization function is:
Figure DEST_PATH_IMAGE009
wherein T is the characteristic value,
Figure 556220DEST_PATH_IMAGE003
is the difference value between the polar diameter of the point to be judged and the polar diameter of the current characteristic point,
Figure 611900DEST_PATH_IMAGE004
the difference value between the polar angle of the point to be determined and the polar angle of the current characteristic point is referred to.
8. The apparatus of claim 5, wherein the characterization function is:
Figure 162968DEST_PATH_IMAGE010
wherein T is the characteristic value,
Figure 181870DEST_PATH_IMAGE007
the value is obtained after normalization processing is carried out on the diameter difference value between the diameter of the point to be determined and the diameter of the current characteristic point,
Figure 767572DEST_PATH_IMAGE008
the polar angle difference between the polar angle of the point to be determined and the polar angle of the current characteristic point is normalized.
9. A computing device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to execute the method of any one of claims 1 to 4 in accordance with the obtained program.
10. A computer storage medium having computer-executable instructions stored thereon for causing a computer to perform the method of any one of claims 1 to 4.
CN201710883540.2A 2017-09-26 2017-09-26 Data compression method and device applied to vector space Active CN107742313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710883540.2A CN107742313B (en) 2017-09-26 2017-09-26 Data compression method and device applied to vector space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710883540.2A CN107742313B (en) 2017-09-26 2017-09-26 Data compression method and device applied to vector space

Publications (2)

Publication Number Publication Date
CN107742313A CN107742313A (en) 2018-02-27
CN107742313B true CN107742313B (en) 2021-02-09

Family

ID=61236001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710883540.2A Active CN107742313B (en) 2017-09-26 2017-09-26 Data compression method and device applied to vector space

Country Status (1)

Country Link
CN (1) CN107742313B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769361B (en) * 2018-07-24 2021-05-14 哈尔滨海能达科技有限公司 Method and device for compressing and decompressing positioning information
CN109544651B (en) * 2018-11-20 2020-03-24 深圳市墨者安全科技有限公司 Data compression method, image comparison method and device for image contrast
CN109947881B (en) * 2019-02-26 2023-10-27 广州城市规划技术开发服务部有限公司 POI weight judging method and device, mobile terminal and computer readable storage medium
EP3738080A1 (en) * 2019-04-01 2020-11-18 Google LLC Learning compressible features
CN112486928A (en) * 2020-11-25 2021-03-12 上海中通吉网络技术有限公司 Data compression method and device and terminal
CN113381767B (en) * 2021-06-25 2022-08-26 河北省科学院应用数学研究所 Method, terminal and storage medium for electrocardiogram data compression
CN114339251B (en) * 2021-12-29 2024-01-30 四创科技有限公司 Vector data compression transmission method and terminal
CN116248126B (en) * 2022-11-21 2024-04-16 华北理工大学 Vector data compression method based on minimum length loss
CN116505953B (en) * 2023-06-30 2023-09-08 湖南腾琨信息科技有限公司 Mass map data optimization compression processing method based on BIM and GIS

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102274040A (en) * 2010-06-10 2011-12-14 东软飞利浦医疗设备系统有限责任公司 Post-processing method for removing ring artifacts in CT (computed tomography) image
CN103913680A (en) * 2014-03-17 2014-07-09 上海交通大学 Partial discharging positioning method based on time delay error stochastic simulation and statistic analysis
CN106814450A (en) * 2017-03-16 2017-06-09 北京理工大学 A kind of self-adaption focusing method and system based on liquid lens
CN107015276A (en) * 2017-04-18 2017-08-04 吉林大学 A kind of adaptive time-frequency method noise-eliminating method based on improvement Hough transformation
CN107404653A (en) * 2017-05-23 2017-11-28 南京邮电大学 A kind of Parking quick determination method of HEVC code streams

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9563969B2 (en) * 2013-11-27 2017-02-07 Electronics And Telecommuncations Research Institute Method of generating implicit terrain data by performing lossless compression and lossy compression and electronic apparatus for performing the method
CN105761206A (en) * 2014-12-16 2016-07-13 富泰华工业(深圳)有限公司 Point cloud splicing method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102274040A (en) * 2010-06-10 2011-12-14 东软飞利浦医疗设备系统有限责任公司 Post-processing method for removing ring artifacts in CT (computed tomography) image
CN103913680A (en) * 2014-03-17 2014-07-09 上海交通大学 Partial discharging positioning method based on time delay error stochastic simulation and statistic analysis
CN106814450A (en) * 2017-03-16 2017-06-09 北京理工大学 A kind of self-adaption focusing method and system based on liquid lens
CN107015276A (en) * 2017-04-18 2017-08-04 吉林大学 A kind of adaptive time-frequency method noise-eliminating method based on improvement Hough transformation
CN107404653A (en) * 2017-05-23 2017-11-28 南京邮电大学 A kind of Parking quick determination method of HEVC code streams

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"The Hippo pathway controls polar cell fate through Notch signaling during Drosophila oogenesis";Hsi-Ju Chen等;《Development Biology》;20110615;page370-379 *
"合成孔径雷达原始数据压缩算法研究";朱永明;《中国优秀硕士学问论文全文数据库(电子期刊)信息科技辑》;20040315;I136-445 *

Also Published As

Publication number Publication date
CN107742313A (en) 2018-02-27

Similar Documents

Publication Publication Date Title
CN107742313B (en) Data compression method and device applied to vector space
JP7344389B2 (en) Cooperative positioning methods, devices, equipment and storage media
CN112233240B (en) Three-dimensional vector data slicing method and device of three-dimensional vector map and electronic equipment
CN111144511B (en) Image processing method, system, medium and electronic terminal based on neural network
CN107820314B (en) Dwknn position fingerprint positioning method based on AP selection
CN111310784B (en) Resource data processing method and device
CN108734325A (en) The evaluation method and device of planning path
CN109213836A (en) point data aggregation method and system
CN114140513A (en) Method and device for measuring area of agricultural land and computer equipment
EP3624397B1 (en) Node processing
CN110427506B (en) Spatial data boundary processing method and device, computer equipment and storage medium
CN108197531B (en) Road curve detection method, device and terminal
CN116453371B (en) Method and device for identifying returning of shared vehicle, computer equipment and storage medium
CN111221827B (en) Database table connection method and device based on graphic processor, computer equipment and storage medium
CN112633299B (en) Target detection method, network, device, terminal equipment and storage medium
CN110545521A (en) Online compression method and device for track data and computer readable storage medium
CN105868553B (en) Track data processing method
CN113902874A (en) Point cloud data processing method and device, computer equipment and storage medium
CN113282535A (en) Quantization processing method and device and quantization processing chip
CN110855577A (en) Method for judging unloading of edge computing task, server and storage medium
CN116245894B (en) Map segmentation method and device, electronic equipment and medium
CN116821885B (en) Data acquisition method, device, computer equipment and storage medium
CN111541985B (en) Internet of things terminal positioning method, internet of things terminal and storage medium
CN114998560B (en) Positive fault section three-dimensional attribute-based related wrinkle processing method and system
CN111210500B (en) Three-dimensional point cloud processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 201210 Building 1, 399 Keyuan Road, Zhangjiang High Tech Park, Pudong New Area, Shanghai

Applicant after: Huaqin Technology Co.,Ltd.

Address before: 201210 Building 1, 399 Keyuan Road, Zhangjiang High Tech Park, Pudong New Area, Shanghai

Applicant before: Huaqin Technology Co.,Ltd.

Address after: 201210 Building 1, 399 Keyuan Road, Zhangjiang High Tech Park, Pudong New Area, Shanghai

Applicant after: Huaqin Technology Co.,Ltd.

Address before: 201210 Building 1, 399 Keyuan Road, Zhangjiang High Tech Park, Pudong New Area, Shanghai

Applicant before: HUAQIN TELECOM TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant