CN117830458A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN117830458A
CN117830458A CN202211180893.3A CN202211180893A CN117830458A CN 117830458 A CN117830458 A CN 117830458A CN 202211180893 A CN202211180893 A CN 202211180893A CN 117830458 A CN117830458 A CN 117830458A
Authority
CN
China
Prior art keywords
data
graphic data
graph
graphics
original
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.)
Pending
Application number
CN202211180893.3A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information 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 Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202211180893.3A priority Critical patent/CN117830458A/en
Publication of CN117830458A publication Critical patent/CN117830458A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a data processing method and device, and relates to the technical field of computers. One embodiment of the method comprises the following steps: the method comprises the steps of obtaining original graphic data to be processed, carrying out non-closed line segment processing and winding line segment processing on the original graphic data, and generating first graphic data, wherein the first graphic data comprises one or more graphics; determining a desired pattern from the first pattern data according to the area of the pattern, and generating second pattern data containing the desired pattern; and determining a stacking point to be deleted based on the point density information of the second graph data, deleting the stacking point to be deleted to obtain third graph data, and taking the third graph data as a data processing result. According to the embodiment, gaps among the fences can be avoided, the problems of flying lines, self-intersection, multiple faces and the like of the drawn fences are repaired, the using effect of the fences is improved, and the problem of abnormal positioning of the fences is solved.

Description

Data processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus.
Background
The current proposal for drawing the fence is directly based on Web-GIS (networked geographic information system) and JTS (core algorithm of spatial data operation).
In the prior art, the inventor finds that at least the following problems exist in the prior art:
gaps among the fences are easy to generate, so that the drawn fences have the problems of flying lines, self-intersecting, multiple faces and the like, the using effect of the fences is affected, and abnormal positioning of the fences is caused.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a data processing method and apparatus, which can avoid generating gaps between fences, repair the problems of flying lines, self-intersecting, multiple surfaces, etc. existing in drawn fences, improve the use effect of the fences, and solve the problem of abnormal positioning of the fences.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided a data processing method.
A data processing method, comprising: acquiring original graphic data to be processed, carrying out non-closed line segment processing and winding line segment processing on the original graphic data, and generating first graphic data, wherein the first graphic data comprises one or more graphics; determining a desired graph from the first graph data according to the area of the graph, and generating second graph data containing the desired graph; and determining a stacking point to be deleted based on the point density information of the second graph data, deleting the stacking point to be deleted to obtain third graph data, and taking the third graph data as a data processing result.
Optionally, the original graphic data includes one or more graphics, each graphics includes longitude values and latitude values of a plurality of points, and before the processing of the non-closed line segment and the processing of the wound line segment on the original graphic data, the method further includes: checking the original graphic data, wherein the checking comprises whether the original graphic data is empty or not and whether the original graphic data accords with space logic or not; and under the condition that the original graphic data is not null and accords with space logic, carrying out precision processing on longitude values and latitude values of a plurality of points in the original graphic data according to preset numerical precision.
Optionally, the performing non-closed line segment processing and wound line segment processing on the original graphic data to generate first graphic data includes: shifting each graph in the original graph data to a first direction by a preset first threshold value, processing the shifted first graph data by using a buffer area algorithm, and shifting each graph to a second direction by the preset first threshold value to delete a non-closed line segment in the original graph data, wherein the second direction is opposite to the first direction; and performing thinning processing on the original graph data processed by the non-closed line segment based on a preset second threshold value so as to process the winding line segment in the original graph data and generate the first graph data.
Optionally, the determining the expected graph from the first graph data according to the area of the graph, and generating second graph data including the expected graph includes: identifying one or more graphics in the first graphics data and calculating the area of each of the graphics; and deleting the graphics except the expected graphics from the first graphics data by taking the graphics with the largest area as the expected graphics, and generating the second graphics data.
Optionally, the determining the stacking point to be deleted based on the point density information of the second graphic data, deleting the stacking point to be deleted, and obtaining third graphic data includes: determining a region to be denoised in the second graph data based on a preset third threshold value, wherein the point density information of the region to be denoised is larger than the preset third threshold value; determining a center point of the region to be denoised according to a preset algorithm; and taking points except the center point in the region to be denoised as the stacking points to be deleted, deleting the stacking points to be deleted, and obtaining the third graphic data.
Optionally, before the third graphic data is used as a data processing result, the method includes: and verifying the service validity of the third graphic data based on a preset fourth threshold value and the attribute information of the original graphic data, and determining that the verification is passed.
Optionally, the attribute information of the original graphic data includes a type and an area of the original graphic data, and the verifying the service validity of the third graphic data based on a preset fourth threshold and the attribute information of the original graphic data and determining that the verification is passed includes: calculating the average area of all the graphic data in the database, which is consistent with the type and the area of the original graphic data; calculating the ratio of the area of the expected graph to the average area, and verifying the service effectiveness of the third graph data based on the preset fourth threshold and the ratio; if the ratio is greater than or equal to the preset fourth threshold, the verification is passed, otherwise, the verification is not passed.
According to another aspect of an embodiment of the present invention, there is provided a data processing apparatus.
A data processing apparatus comprising: the first graphic data generation module is used for acquiring original graphic data to be processed, carrying out non-closed line segment processing and winding line segment processing on the original graphic data, and generating first graphic data, wherein the first graphic data comprises one or more graphics; a second graphic data generating module for determining a desired graphic from the first graphic data according to an area of the graphic, and generating second graphic data containing the desired graphic; and the data processing result generation module is used for determining a to-be-deleted accumulation point based on the point density information of the second graph data, deleting the to-be-deleted accumulation point to obtain third graph data, and taking the third graph data as a data processing result.
Optionally, the raw graphic data includes one or more graphics, each graphic including longitude values and latitude values of a plurality of points, the apparatus further comprising a preprocessing module for: checking the original graphic data, wherein the checking comprises whether the original graphic data is empty or not and whether the original graphic data accords with space logic or not; and under the condition that the original graphic data is not null and accords with space logic, carrying out precision processing on longitude values and latitude values of a plurality of points in the original graphic data according to preset numerical precision.
Optionally, the first graphics data generating module is further configured to: shifting each graph in the original graph data to a first direction by a preset first threshold value, processing the shifted first graph data by using a buffer area algorithm, and shifting each graph to a second direction by the preset first threshold value to delete a non-closed line segment in the original graph data, wherein the second direction is opposite to the first direction; and performing thinning processing on the original graph data processed by the non-closed line segment based on a preset second threshold value so as to process the winding line segment in the original graph data and generate the first graph data.
Optionally, the second graphics data generating module is further configured to: identifying one or more graphics in the first graphics data and calculating the area of each of the graphics; and deleting the graphics except the expected graphics from the first graphics data by taking the graphics with the largest area as the expected graphics, and generating the second graphics data.
Optionally, the data processing result generating module is further configured to: determining a region to be denoised in the second graph data based on a preset third threshold value, wherein the point density information of the region to be denoised is larger than the preset third threshold value; determining a center point of the region to be denoised according to a preset algorithm; and taking points except the center point in the region to be denoised as the stacking points to be deleted, deleting the stacking points to be deleted, and obtaining the third graphic data.
Optionally, the system further comprises a service validity verification module for: and verifying the service validity of the third graphic data based on a preset fourth threshold value and the attribute information of the original graphic data, and determining that the verification is passed.
Optionally, the attribute information of the original graphic data includes a type and an area of the original graphic data, and the service validity verification module is further configured to: calculating the average area of all the graphic data in the database, which is consistent with the type and the area of the original graphic data; calculating the ratio of the area of the expected graph to the average area, and verifying the service effectiveness of the third graph data based on the preset fourth threshold and the ratio; if the ratio is greater than or equal to the preset fourth threshold, the verification is passed, otherwise, the verification is not passed.
According to yet another aspect of an embodiment of the present invention, an electronic device is provided.
An electronic device, comprising: one or more processors; and the memory is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the data processing method provided by the embodiment of the invention.
According to yet another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer readable medium having stored thereon a computer program which, when executed by a processor, implements a data processing method provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: carrying out non-closed line segment processing and winding line segment processing on the original graphic data by acquiring the original graphic data to be processed to generate first graphic data, wherein the first graphic data comprises one or more graphics; determining a desired pattern from the first pattern data according to the area of the pattern, and generating second pattern data containing the desired pattern; the technical scheme that the stacking points to be deleted are determined based on the point density information of the second graphic data, the stacking points to be deleted are deleted, the third graphic data are obtained, and the third graphic data are used as data processing results can avoid generating gaps among the rails, repair the problems of flying lines, self-intersecting, multiple faces and the like of the drawn rails, improve the using effect of the rails, and solve the problem of abnormal positioning of the rails.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a data processing method according to one embodiment of the invention;
FIG. 2 is a flow diagram of a data processing method according to one embodiment of the invention;
FIG. 3 is a schematic illustration of a non-closed segment process, according to one embodiment of the invention;
FIG. 4 is a schematic diagram of a desired graphic determination before and after according to one embodiment of the invention;
FIG. 5 is a schematic diagram of a stacking point before and after deletion, according to one embodiment of the invention;
FIG. 6 is a flow diagram of graphics rendering, according to one embodiment of the invention;
FIG. 7 is a schematic diagram of the main modules of a data processing apparatus according to one embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 9 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main steps of a data processing method according to an embodiment of the present invention.
As shown in fig. 1, the data processing method according to an embodiment of the present invention mainly includes the following steps S101 to S103.
Step S101: and acquiring the original graph data to be processed, performing non-closed line segment processing and winding line segment processing on the original graph data, and generating first graph data, wherein the first graph data comprises one or more graphs. The graphics data may be, among other things, graphics data drawn for sites, roadways, and other polygons.
The raw graphic data may include one or more graphics, each of which may include longitude and latitude values for a plurality of points.
The processing of the non-closed line segment and the processing of the winding line segment are performed on the original graphic data, and before the first graphic data is generated, the method may further include: checking the original graphic data, and checking whether the original graphic data is empty or not and whether the original graphic data accords with space logic or not; and under the condition that the original graphic data is not empty and accords with the space logic, carrying out precision processing on the longitude values and the latitude values of a plurality of points in the original graphic data according to the preset numerical precision.
The processing of the non-closed line segment and the processing of the winding line segment are performed on the original graphic data, and the generation of the first graphic data may include: shifting each graph in the original graph data to a first direction by a preset first threshold value, processing the shifted first graph data by using a buffer area algorithm, and shifting each graph to a second direction by the preset first threshold value so as to delete a non-closed line segment in the original graph data, wherein the second direction is opposite to the first direction; and performing thinning processing on the original graph data processed by the non-closed line segments based on a preset second threshold value so as to process the winding line segments in the original graph data and generate first graph data. The first direction may be a direction pointing toward the inside of the graphic, and the second direction may be a direction pointing toward the outside of the graphic.
Step S102: and determining a desired pattern from the first pattern data according to the area of the pattern, and generating second pattern data containing the desired pattern.
Determining a desired pattern from the first pattern data according to an area of the pattern, generating second pattern data containing the desired pattern may include: identifying one or more graphics in the first graphics data and calculating an area of each graphic; and deleting the graphics except the expected graphics from the first graphics data to generate second graphics data by taking the graphics with the largest area as the expected graphics.
Step S103: and determining a stacking point to be deleted based on the point density information of the second graph data, deleting the stacking point to be deleted to obtain third graph data, and taking the third graph data as a data processing result.
Determining the stacking point to be deleted based on the point density information of the second graphic data, and deleting the stacking point to be deleted to obtain third graphic data may include: determining a region to be denoised in the second graphic data based on a preset third threshold, wherein the point density information of the region to be denoised is larger than the preset third threshold; determining a center point of a region to be denoised according to a preset algorithm; and taking points except the center point in the region to be denoised as stacking points to be deleted, and deleting the stacking points to be deleted to obtain third graphic data.
Before the third graphic data is used as the data processing result, the method may include: and verifying the service validity of the third graphic data based on the preset fourth threshold value and the attribute information of the original graphic data, and determining that the verification is passed.
The attribute information of the original graphic data may include a type and an area of the original graphic data.
Verifying the service availability of the third graphic data based on the preset fourth threshold and the attribute information of the original graphic data, and determining that the verification is passed may include: calculating the average area of all the graphic data consistent with the type and the area of the original graphic data in the database; calculating the ratio of the area of the expected graph to the average area, and verifying the service effectiveness of the third graph data based on a preset fourth threshold and the ratio; if the ratio is greater than or equal to a preset fourth threshold, the verification is passed, otherwise, the verification is not passed.
FIG. 2 is a flow diagram of a data processing method according to one embodiment of the invention.
As shown in fig. 2, in one embodiment, the original graphics data is checked to see if the original graphics data is empty and if the original graphics data conforms to spatial logic; and under the condition that the original graphic data is not empty and accords with the space logic, carrying out precision processing on the longitude values and the latitude values of a plurality of points in the original graphic data according to the preset numerical precision. Specifically, the original graphic data in the entry is checked, it is determined that the original graphic data is not empty (i.e., there is an object in the entry), and each point in the original graphic data conforms to spatial logic, which may include that each point is represented by a longitude value and a latitude value. If the original graphic data is not empty and accords with the space logic, checking passing, otherwise, checking not passing. And under the condition that the original graphic data passes verification, carrying out longitude and latitude alignment processing (namely precision processing) on each point in the original graphic data, namely unifying the longitude value and the latitude value of each point to a preset numerical precision (such as 14 bits after decimal point) through JTS buffer algorithm, and if the precision of the longitude value or the latitude value is insufficient, carrying out processing by supplementing 0 after the longitude value or the latitude value. The result of the precision processing is that the precision of the longitude value and the latitude value of all points reaches 14 bits after the decimal point, thereby avoiding the generation of a graph gap. JTS is a set of open source Java APIs (application program interfaces) that provide a set of core algorithms for spatial data manipulation, and buffers are regions within a specified distance around elements (points, lines, or polygons).
In one embodiment, each graph in the original graph data is shifted to a first direction by a preset first threshold value, the shifted first graph data is processed by a buffer algorithm, and then each graph is shifted to a second direction by the preset first threshold value to delete a non-closed line segment in the original graph data, wherein the second direction is opposite to the first direction. Specifically, for the situation that a flying line (one more non-closed line segment is located at a certain position of a regular graph) exists in a graph, non-closed line segment processing is performed on original graph data, namely, each point of the graph is offset to the interior (i.e. a first direction) of the graph by a certain threshold value e (i.e. a preset first threshold value) by using a JTS buffer zone algorithm, each point of the graph is offset to the exterior (i.e. a second direction) of the graph by the same threshold value e, and the irregular flying line is deleted in the processing process by utilizing the characteristic of the buffer zone algorithm, so that the regular graph is left. Fig. 3 shows schematic diagrams before and after the non-closed line segment processing according to an embodiment of the present invention, where fig. 3 (a) is graphic data before the non-closed line segment processing, and fig. 3 (b) is graphic data after the non-closed line segment processing. The value of e can be based on parameter adjustment carried out by the existing data, and can cover most of scenes in the fence drawing scene.
In one embodiment, based on a preset second threshold value, thinning is performed on the original graph data after the non-closed line segment processing to process the winding line segment in the original graph data, so as to generate first graph data. Specifically, since most of topology errors are generated by winding line segments due to dot stacking, the original graphic data after non-closed line segment processing is subjected to thinning processing based on a threshold value of 0.0 (namely a preset second threshold value), so that first graphic data is generated, and a plurality of stacked dots can be thinned into a small number of dots, thereby avoiding most of topology errors. The thinning is a process of minimizing the number of data points under the condition of ensuring that the shape of a vector curve is unchanged, namely, sampling and simplifying the curve, taking a limited number of points on the curve, changing the points into broken lines, and keeping the original shape to a certain extent, wherein two commonly used thinning algorithms are a Douglas-Peuker algorithm and a vertical distance limit value method.
In one embodiment, one or more graphics (i.e., facets) in the first graphics data are identified and the area of each graphic is calculated; and deleting the graphics except the expected graphics from the first graphics data to generate second graphics data by taking the graphics with the largest area as the expected graphics. Specifically, whether a plurality of graphics (i.e., a plurality of planes) exist in the first graphics data may be determined first, if only one graphics exists in the first graphics data, the graphics may be the desired graphics (i.e., the desired plane), and if a plurality of graphics exist in the first graphics data, each graphics may be identified by using the JTS buffer algorithm, the area of each graphics may be calculated, and according to the actual scene drawn, one graphics with the largest area may be selected as the estimated desired graphics. Fig. 4 shows schematic diagrams of the expected graph before and after determining the expected graph according to an embodiment of the present invention, where fig. 4 (a) is graph data before determining the expected graph, and fig. 4 (b) is graph data after determining the expected graph and deleting the graphs other than the expected graph. The expected graph can be used as a surface for identifying and using the coverage range of the express service in the actual application service, and second graph data is generated based on the expected graph.
In one embodiment, determining a region to be denoised in the second graphic data based on a preset third threshold, wherein the point density information of the region to be denoised is greater than the preset third threshold; determining a center point of a region to be denoised according to a preset algorithm; and taking points except the center point in the region to be denoised as stacking points to be deleted, and deleting the stacking points to be deleted to obtain third graphic data. Specifically, based on a preset third threshold value, taking a region with the point density information of the second graphic data larger than the preset third threshold value as a region to be denoised, determining the center point of each region to be denoised through a JTS buffer area algorithm, deleting points except the center point (namely, stacking points to be deleted) for each region to be denoised, and completing the noise point processing of the second graphic data to generate third graphic data. Fig. 5 shows schematic diagrams before and after stacking point deletion (i.e., noise processing), fig. 5 (a) is graphic data before stacking point deletion, and fig. 5 (b) is graphic data after stacking point deletion. The noise point of the second graphic data can be processed through the thinning logic, the stacking points and the stacking points are removed by utilizing the distance between the points, the whole thinning result is achieved, and the actual editing and use of a user are facilitated.
In one embodiment, based on the preset fourth threshold value and the attribute information of the original graphic data, verifying the service validity of the third graphic data, and determining that the verification is passed, the service validity may be the actual existence meaning of the graphic, and the attribute information of the original graphic data may include the type (such as the site type, the road area type, etc.) and the area of the original graphic data. Specifically, the graphic data which are consistent with the types and the areas of the original graphic data are obtained from the database, the average area of all the graphic data which are consistent with the types and the areas of the original graphic data in the database is calculated, the ratio of the area occupied by the expected graphic to the average area is calculated, the ratio is compared with a preset fourth threshold (such as 1%), if the ratio is larger than or equal to the preset fourth threshold, the verification is passed, the third graphic data have the graphic actual existence meaning, the third graphic data are used as the data processing result, otherwise, the verification is not passed, and the third graphic data do not have the graphic actual existence meaning.
FIG. 6 is a flow diagram of graphics rendering, according to one embodiment of the invention.
As shown in fig. 6, in one embodiment, the fence is graphically drawn, and it is determined whether the graphic data of the fence is capped (i.e., whether there is a flying line, a noise point, multiple surfaces, etc.), if so, the graphic data is processed by the data processing method according to the embodiment of the present invention, and if not, the graphic data is directly subjected to denoising processing, so as to obtain the fence storage data that can be practically applied.
Fig. 7 is a schematic diagram of main modules of a data processing apparatus according to an embodiment of the present invention.
As shown in fig. 7, a data processing apparatus 700 according to an embodiment of the present invention mainly includes: a first graphic data generating module 701, a second graphic data generating module 702, and a data processing result generating module 703.
The first graphic data generating module 701 is configured to obtain original graphic data to be processed, perform non-closed line segment processing and wound line segment processing on the original graphic data, and generate first graphic data, where the first graphic data includes one or more graphics.
The second graphic data generating module 702 is configured to determine a desired graphic from the first graphic data according to the area of the graphic, and generate second graphic data including the desired graphic.
The data processing result generating module 703 is configured to determine a stacking point to be deleted based on the point density information of the second graphic data, delete the stacking point to be deleted, obtain third graphic data, and use the third graphic data as a data processing result.
In one embodiment, the raw graphic data may include one or more graphics, each of which may include longitude and latitude values for a plurality of points, the apparatus further including a preprocessing module (not shown) for: checking the original graphic data, and checking whether the original graphic data is empty or not and whether the original graphic data accords with space logic or not; and under the condition that the original graphic data is not empty and accords with the space logic, carrying out precision processing on the longitude values and the latitude values of a plurality of points in the original graphic data according to the preset numerical precision.
In one embodiment, the first graphics data generation module 701 is specifically configured to: shifting each graph in the original graph data to a first direction by a preset first threshold value, processing the shifted first graph data by using a buffer area algorithm, and shifting each graph to a second direction by the preset first threshold value so as to delete a non-closed line segment in the original graph data, wherein the second direction is opposite to the first direction; and performing thinning processing on the original graph data processed by the non-closed line segments based on a preset second threshold value so as to process the winding line segments in the original graph data and generate first graph data.
In one embodiment, the second graphics data generation module 702 is specifically configured to: identifying one or more graphics in the first graphics data and calculating an area of each graphic; and deleting the graphics except the expected graphics from the first graphics data to generate second graphics data by taking the graphics with the largest area as the expected graphics.
In one embodiment, the data processing result generating module 703 is specifically configured to: determining a region to be denoised in the second graphic data based on a preset third threshold, wherein the point density information of the region to be denoised is larger than the preset third threshold; determining a center point of a region to be denoised according to a preset algorithm; and taking points except the center point in the region to be denoised as stacking points to be deleted, and deleting the stacking points to be deleted to obtain third graphic data.
In one embodiment, the system may further include a service validity verification module (not shown in the figure) for: and verifying the service validity of the third graphic data based on the preset fourth threshold value and the attribute information of the original graphic data, and determining that the verification is passed.
In one embodiment, the attribute information of the original graphic data may include a type and an area of the original graphic data, and the service validity verification module (not shown in the drawings) is specifically configured to: calculating the average area of all the graphic data consistent with the type and the area of the original graphic data in the database; calculating the ratio of the area of the expected graph to the average area, and verifying the service effectiveness of the third graph data based on a preset fourth threshold and the ratio; if the ratio is greater than or equal to a preset fourth threshold, the verification is passed, otherwise, the verification is not passed.
In addition, the specific implementation of the data processing apparatus in the embodiments of the present invention has been described in detail in the above data processing method, and thus the description thereof will not be repeated here.
Fig. 8 illustrates an exemplary system architecture 800 in which a data processing method or data processing apparatus of an embodiment of the present invention may be applied.
As shown in fig. 8, a system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves as a medium for providing communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 805 through the network 804 using the terminal devices 801, 802, 803 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 801, 802, 803, such as a graphics rendering class application, a fence rendering application, a graphics class application, an instant messaging tool, a mailbox client, social platform software, and the like (by way of example only).
The terminal devices 801, 802, 803 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 805 may be a server providing various services, such as a background management server (by way of example only) that provides support for a graphical rendering website browsed by a user using the terminal devices 801, 802, 803. The background management server can acquire the original graphic data to be processed from the received data such as the data processing request, and perform non-closed line segment processing and line segment winding processing on the original graphic data to generate first graphic data, wherein the first graphic data comprises one or more graphics; determining a desired pattern from the first pattern data according to the area of the pattern, and generating second pattern data containing the desired pattern; and determining a to-be-deleted stacking point based on the point density information of the second graphic data, deleting the to-be-deleted stacking point to obtain third graphic data, processing the third graphic data as a data processing result and the like, and feeding back the processing result (such as the data processing result-only an example) to the terminal equipment.
It should be noted that, the data processing method provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the data processing apparatus is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, there is illustrated a schematic diagram of a computer system 900 suitable for use in implementing a terminal device or server in accordance with an embodiment of the present invention. The terminal device or server shown in fig. 9 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU) 901, which can execute various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
The following components are connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 901.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprises a first graphic data generation module, a second graphic data generation module and a data processing result generation module. The names of these modules do not limit the module itself in some cases, and for example, the first graphics data generating module may also be described as "a module for acquiring raw graphics data to be processed, performing non-closed line segment processing and winding line segment processing on the raw graphics data, and generating the first graphics data".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: the method comprises the steps of obtaining original graphic data to be processed, carrying out non-closed line segment processing and winding line segment processing on the original graphic data, and generating first graphic data, wherein the first graphic data comprises one or more graphics; determining a desired pattern from the first pattern data according to the area of the pattern, and generating second pattern data containing the desired pattern; and determining a stacking point to be deleted based on the point density information of the second graph data, deleting the stacking point to be deleted to obtain third graph data, and taking the third graph data as a data processing result.
According to the technical scheme of the embodiment of the invention, the original graphic data to be processed is obtained, the non-closed line segment processing and the winding line segment processing are carried out on the original graphic data, and the first graphic data is generated, wherein the first graphic data comprises one or more graphics; determining a desired pattern from the first pattern data according to the area of the pattern, and generating second pattern data containing the desired pattern; and determining a stacking point to be deleted based on the point density information of the second graph data, deleting the stacking point to be deleted to obtain third graph data, and taking the third graph data as a data processing result. Can avoid producing the gap between the rail, repair the flying line that the rail of drawing exists, from crossing, multiaspect scheduling problem, improve the result of use of rail, solved the unusual problem of location of rail.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of data processing, comprising:
acquiring original graphic data to be processed, carrying out non-closed line segment processing and winding line segment processing on the original graphic data, and generating first graphic data, wherein the first graphic data comprises one or more graphics;
determining a desired graph from the first graph data according to the area of the graph, and generating second graph data containing the desired graph;
and determining a stacking point to be deleted based on the point density information of the second graph data, deleting the stacking point to be deleted to obtain third graph data, and taking the third graph data as a data processing result.
2. The method of claim 1, wherein the raw graphic data comprises one or more graphics, each graphics comprising longitude and latitude values for a plurality of points, wherein the non-closed segment processing and the wound segment processing are performed on the raw graphic data, and wherein prior to generating the first graphic data, further comprising:
checking the original graphic data, wherein the checking comprises whether the original graphic data is empty or not and whether the original graphic data accords with space logic or not;
and under the condition that the original graphic data is not null and accords with space logic, carrying out precision processing on longitude values and latitude values of a plurality of points in the original graphic data according to preset numerical precision.
3. The method of claim 1, wherein the performing the non-closed segment processing and the wound segment processing on the raw graphic data to generate the first graphic data comprises:
shifting each graph in the original graph data to a first direction by a preset first threshold value, processing the shifted first graph data by using a buffer area algorithm, and shifting each graph to a second direction by the preset first threshold value to delete a non-closed line segment in the original graph data, wherein the second direction is opposite to the first direction;
and performing thinning processing on the original graph data processed by the non-closed line segment based on a preset second threshold value so as to process the winding line segment in the original graph data and generate the first graph data.
4. A method according to any one of claims 1-3, wherein said determining a desired pattern from said first pattern data in accordance with an area of the pattern, generating second pattern data containing said desired pattern, comprises:
identifying one or more graphics in the first graphics data and calculating the area of each of the graphics;
and deleting the graphics except the expected graphics from the first graphics data by taking the graphics with the largest area as the expected graphics, and generating the second graphics data.
5. The method according to claim 1, wherein determining a to-be-deleted pile-up point based on the point density information of the second graphic data, and deleting the to-be-deleted pile-up point, to obtain third graphic data, comprises:
determining a region to be denoised in the second graph data based on a preset third threshold value, wherein the point density information of the region to be denoised is larger than the preset third threshold value;
determining a center point of the region to be denoised according to a preset algorithm;
and taking points except the center point in the region to be denoised as the stacking points to be deleted, deleting the stacking points to be deleted, and obtaining the third graphic data.
6. The method according to claim 1, wherein before the third graphic data is treated as a result of the data processing, comprising:
and verifying the service validity of the third graphic data based on a preset fourth threshold value and the attribute information of the original graphic data, and determining that the verification is passed.
7. The method according to claim 6, wherein the attribute information of the original graphic data includes a type and an area of the original graphic data, wherein the verifying the service validity of the third graphic data based on a preset fourth threshold and the attribute information of the original graphic data, and determining that the verification is passed, comprises:
calculating the average area of all the graphic data in the database, which is consistent with the type and the area of the original graphic data;
calculating the ratio of the area of the expected graph to the average area, and verifying the service effectiveness of the third graph data based on the preset fourth threshold and the ratio;
if the ratio is greater than or equal to the preset fourth threshold, the verification is passed, otherwise, the verification is not passed.
8. A data processing apparatus, comprising:
the first graphic data generation module is used for acquiring original graphic data to be processed, carrying out non-closed line segment processing and winding line segment processing on the original graphic data, and generating first graphic data, wherein the first graphic data comprises one or more graphics;
a second graphic data generating module for determining a desired graphic from the first graphic data according to an area of the graphic, and generating second graphic data containing the desired graphic;
and the data processing result generation module is used for determining a to-be-deleted accumulation point based on the point density information of the second graph data, deleting the to-be-deleted accumulation point to obtain third graph data, and taking the third graph data as a data processing result.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202211180893.3A 2022-09-27 2022-09-27 Data processing method and device Pending CN117830458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211180893.3A CN117830458A (en) 2022-09-27 2022-09-27 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211180893.3A CN117830458A (en) 2022-09-27 2022-09-27 Data processing method and device

Publications (1)

Publication Number Publication Date
CN117830458A true CN117830458A (en) 2024-04-05

Family

ID=90519569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211180893.3A Pending CN117830458A (en) 2022-09-27 2022-09-27 Data processing method and device

Country Status (1)

Country Link
CN (1) CN117830458A (en)

Similar Documents

Publication Publication Date Title
CN107643984B (en) Method and apparatus for outputting information
CN109684624B (en) Method and device for automatically identifying order address road area
CN110766348B (en) Method and device for combining goods picking tasks
CN112487331A (en) Page generation method and device, storage medium and electronic equipment
CN107708185B (en) Information generation method and equipment
CN117830458A (en) Data processing method and device
CN112256254A (en) Method and device for generating layout code
CN113222205A (en) Path planning method and device
CN110119721B (en) Method and apparatus for processing information
CN110807784B (en) Method and device for segmenting an object
CN112949880B (en) Method and device for generating recommended route
CN111383293A (en) Image element vectorization method and device
CN109087097B (en) Method and device for updating same identifier of chain code
CN116347346B (en) Fence drawing method and device
CN112396081A (en) Data fusion method and device
CN113284174A (en) Method and device for processing pictures
CN110276567A (en) The method and apparatus for checking ground region identification code based on automated guided vehicle
CN115412595B (en) Request processing method and device, electronic equipment and storage medium
CN113362097B (en) User determination method and device
CN113239687B (en) Data processing method and device
CN111815656B (en) Video processing method, apparatus, electronic device and computer readable medium
CN114926830B (en) Screen image recognition method, apparatus, device and computer readable medium
CN115981910B (en) Method, apparatus, electronic device and computer readable medium for processing exception request
CN112697155B (en) Method and device for generating lane boundary line
CN112650528B (en) Personalized algorithm generation method, device, electronic equipment and computer readable medium

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