CN113761083B - Image generation method and device based on national earth relation - Google Patents

Image generation method and device based on national earth relation Download PDF

Info

Publication number
CN113761083B
CN113761083B CN202010484977.0A CN202010484977A CN113761083B CN 113761083 B CN113761083 B CN 113761083B CN 202010484977 A CN202010484977 A CN 202010484977A CN 113761083 B CN113761083 B CN 113761083B
Authority
CN
China
Prior art keywords
country
nodes
node
virtual
national
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
CN202010484977.0A
Other languages
Chinese (zh)
Other versions
CN113761083A (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.)
Information Engineering University of PLA Strategic Support Force
Original Assignee
Information Engineering University of PLA Strategic Support Force
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 Information Engineering University of PLA Strategic Support Force filed Critical Information Engineering University of PLA Strategic Support Force
Priority to CN202010484977.0A priority Critical patent/CN113761083B/en
Publication of CN113761083A publication Critical patent/CN113761083A/en
Application granted granted Critical
Publication of CN113761083B publication Critical patent/CN113761083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Abstract

The invention relates to an image generation method and device based on country territory relation, belonging to the visual analysis technical field of territory relation, firstly, the method arranges the territory relation value between different countries and between the target country and other countries in the image; then, classifying the country nodes, carrying out region division on the images, regarding the country nodes as charged particles, calculating potential energy of each divided region, determining all equipotential lines under the same category by utilizing potential energy continuity, and determining contour lines containing all equipotential lines under the category; and finally, traversing the connection paths between every two country nodes in each category, adding proper virtual nodes, updating the connection paths, and avoiding the paths directly connected between the two country nodes from passing through the country nodes not belonging to the current category. The images generated by the method effectively and reasonably display the inter-country earth-edge relationship, are strong in visualization, and are beneficial to the inter-country earth-edge relationship analysis.

Description

Image generation method and device based on national earth relation
Technical Field
The invention belongs to the technical field of visual analysis of earth edge relations, and particularly relates to an image generation method and device based on national earth edge relations.
Background
The earth edge relationship is a core problem of earth edge environment research, and is researched to build a relationship network between countries and analyze the network structure. At present, the research of the earth-centered relation mainly analyzes related data to obtain more accurate results by establishing a calculation model, but the expression of analysis conclusion is only remained in the forms of text report, data table and the like, so that the accurate description of the complex relation among countries is difficult to realize.
In the prior art, author Wen Huiqi et al published a paper with a space of "visual analysis research study of the geographical environment under big data" on the 12 th period of volume 43 of journal "mapping science", 12 months in 2018, and put forward a visual analysis method of geographical relation based on a bubble tree diagram in the paper, firstly, the method lays out bubble nodes representing countries according to geographical positions and displays the positional relation among the countries; then, constraint optimization is carried out by using the inter-country earth-edge influence, so that the development level of inter-country earth-edge relation is reflected on spatial distribution; packaging the bubble nodes according to the clustering relation to embody different hierarchical structures under the influence of the geographic relation of different countries; and finally, encoding the packaging contour line so that the packaging contour line can display multidimensional information as much as possible. The method embodies the spatial distribution and hierarchical clustering of the countries, and has the following defects:
1. the method only gives a simple principle introduction, and does not disclose specific implementation means;
2. in the bubble tree diagram obtained by the method, the problem that the connection path between the country nodes belonging to a certain category is partially overlapped with the country nodes not belonging to the category may exist, so that the problem that the country nodes not belonging to the category are not obviously displayed on the bubble tree diagram is caused, and the display effect of the country ground relation is poor.
Disclosure of Invention
The invention aims to provide an image generation method based on a national earth relation, which is used for solving the problem of poor image display effect of the existing national earth relation. Meanwhile, the invention provides an image generation device based on the national earth relation, so as to solve the problem of poor image display effect of the existing national earth relation.
Based on the above purpose, one technical scheme is as follows:
(1) Obtaining geographic positions of all countries, obtaining the value of the geographic relation between a target country and other countries, and laying out nodes of all countries in an image according to the geographic positions and the value of the geographic relation;
(2) Classifying the country nodes according to the set conditions into at least two categories; dividing the image to obtain a plurality of divided areas, regarding nodes of each country as charged particles, and calculating potential energy of each divided area;
for the country nodes belonging to each category, determining equipotential lines among the country nodes of the category according to the potential energy continuity of the divided areas, and determining contour lines of the category, wherein the contour lines comprise all equipotential lines and country nodes of the category;
(3) And traversing the connection paths between the two country nodes under each category, and when the current connection paths between the two country nodes pass through the country nodes of other categories, reconnecting the virtual nodes and the country nodes by adding proper virtual nodes between the two country nodes, and updating the connection paths so as to prevent the paths directly connected between the two country nodes from passing through the country nodes not under the current category.
The technical scheme of the image generating device based on the national earth relation is as follows:
the image generation method comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor is coupled with the memory, and the image generation method is realized when the processor executes the computer program.
The beneficial effects of the two technical schemes are as follows:
according to the image generation method, firstly, aiming at geographic positions among different countries and the value of the earth-edge relation between a target country and other countries, nodes of each country are distributed in an image; then, classifying the country nodes in the image, carrying out region division on the image, regarding the country nodes as charged particles, calculating potential energy of each divided region, and determining all equipotential lines in the same category by utilizing potential energy continuity so as to determine contour lines containing all equipotential lines in the category; and finally, traversing the connection paths between the nodes of the two countries under each category, adding proper virtual nodes, and updating the connection paths, so that the direct connection paths between the nodes of the two countries are prevented from passing through the nodes of the countries which do not belong to the current category. The method provided by the invention has the advantages that the generated images effectively and reasonably show the inter-country geographical relation, the visualization is strong, so that observers can clearly know the inter-country geographical relation at a glance, the problem that the country nodes are not clearly displayed is solved, and the analysis of the inter-country geographical relation is facilitated.
Further, in order to implement the layout of the nodes of each country, in step (1), according to the geographic location and the geographic relationship value, the layout of the nodes of each country in the image includes:
1) Taking the geographic position coordinates of each country as the initial position of each country node;
2) Calculating the attractive force between every two country nodes and coordinate displacement caused by the attractive force; calculating the repulsive force between the nodes of every two countries, and carrying out coordinate displacement caused by the repulsive force;
3) Judging whether the attractive force and the repulsive force between the two-country nodes reach balance or not, if not, repeating the step 2) to perform iterative calculation until the attractive force and the repulsive force between the two-country nodes reach balance, and determining the total moving distance of the country nodes;
4) And determining the final position of each country node in the image according to the total moving distance of each country node.
Further, to determine the gravitation of the nodes of each country, the gravitation of the nodes of each country is expressed as follows:
wherein F(s) i ,s j ,l k ) Representing a national node s i And s j Attraction between l k Is the edge between the nodes of two countries, r(s) i ,s j ) Represents the node distance of the country, d (l) k ) For the natural length of the edge, G 1 Representing the spring force coefficient.
Further, in order to determine the repulsive force applied to the nodes of each country, the repulsive force applied to the nodes of each country has the following formula:
wherein f(s) i ,s j ) Representing a national node s i And s j The repulsive force between the two points is C is a constant, the repulsive force is zero, G 2 Representing the repulsive force coefficient; m is m i 、m j To respectively represent national nodes s i And s j And K represents the national relationship constraint.
Further, in order to obtain the national relation constraint force, the calculation formula of the national relation constraint force is as follows:
wherein K' is a national node s i And s j The value of the earth's edge relation between the two.
Further, in order to avoid the problem that the country node is obscured by the connection path when the country node is displayed in the image, the step of updating the connection path in step (3) includes:
1) Acquiring starting point S in two national nodes 1 And target point S n Connection start point S 1 And target point S n Obtaining a virtual path S 1 S n
2) Judging virtual path S 1 S n Whether or not an obstacle is traversed, the obstacle being a national node not belonging to the current category;
3) When the virtual path S 1 S n When the virtual path passes through the obstacle, judging the size of the dividing area and the length of the truncated edge of the obstacle by the virtual path, and selecting the corresponding corner and buffer area to set a virtual node P i
4) Connecting virtual node P i And the starting point S 1 Obtaining a virtual path S 1 P i Continuing to judge the virtual path S 1 P i If the obstacle is penetrated, continuing to increase virtual nodes and updating virtual paths until all the virtual paths do not penetrate the obstacle;
connecting virtual node P i And target point S n Obtaining a virtual path P i S n Continuing to judge the virtual path P i S n If the obstacle is passed, the virtual nodes are continuously added, and the virtual paths are updated until all the virtual paths do not pass through the obstacle.
Further, in step 3), a virtual node P is set i The method of (1) is as follows:
virtual path S 1 S n Dividing the obstacle into A, B two areas, if any one of the A, B areas is triangular, directly adding a virtual node P outside the right-angle vertex of the triangle i
If A, B is trapezoidal, the side lengths of the upper and lower edges of the region A are i and j, respectively, and the sizes of the sides i and j are determined first, if i>j, selecting the vertex C of the upper bottom edge 1 Diagonal vertex C 3 Virtual node P is added outside vertex with short middle distance to virtual path i The method comprises the steps of carrying out a first treatment on the surface of the If i<j, selecting the vertex C of the lower bottom edge 2 Diagonal vertex C 4 Virtual node P is added outside vertex with short middle distance to virtual path i
Further, in order to ensure the updating effect of the connection path, the updated connection path is an optimal path, and the optimal path is obtained through minimizing a cost function, and the cost function has the following formula:
c(s j )=d(s i ,s j )·o(s i ,s j )
wherein c(s) j ) Representing the node s by the country i To national node s j Path cost s of (2) j For the national node s i D(s) i ,s j ) Representing two-country node s i 、s j Linear distance between, o (s i ,s j ) Representing the number of other country nodes between the country nodes.
Further, when the virtual path passes through two obstacles with overlapping portions at the same time, the two obstacles are regarded as one obstacle according to the sizes of the two obstacles, so as to determine a suitable virtual node, and therefore update efficiency of the connection path is improved.
Drawings
FIG. 1 is a flow chart of a layout of country nodes using geographic location and earth-bound relationships in an embodiment of the method of the present invention;
FIG. 2-1 is a schematic illustration of a first contour determination in a class of country nodes in an embodiment of the method of the present invention;
2-2 are second contour determination diagrams in certain classes of country nodes in an embodiment of the method of the present invention;
FIGS. 2-3 are third through fifth contour determination diagrams in a class of country nodes in an embodiment of the method of the present invention;
FIGS. 2-4 are schematic illustrations of contour drawing in an embodiment of the method of the present invention;
FIG. 3 is a flow chart of a country node boundary contour calculation in an embodiment of the method of the present invention;
FIG. 4 is a schematic diagram of a connection update between national nodes in an embodiment of the method of the present invention;
FIG. 5-1 is a schematic diagram illustrating the intersection of a virtual node pre-addition connection path with an obstacle in an embodiment of the method of the present invention;
FIG. 5-2 is a schematic diagram illustrating the intersection of a connection path with an obstacle after the addition of a virtual node in an embodiment of the method of the present invention;
FIG. 6-1 is a schematic diagram illustrating the intersection of a virtual node P1 with two obstacles before adding a connection path in an embodiment of the method of the present invention;
FIG. 6-2 is a schematic diagram illustrating the intersection of a connection path with an obstacle after the addition of a virtual node P1 in an embodiment of the method of the present invention;
fig. 6-3 are schematic diagrams illustrating the intersection of the connection paths and the obstacles after the virtual nodes P1 and P2 are added in the embodiment of the method of the present invention;
FIG. 7 is an overall process flow diagram in an embodiment of the method of the present invention;
FIG. 8 is a schematic diagram of an image generation apparatus in an embodiment of the apparatus of the present invention;
wherein the reference numerals in fig. 2-3 are as follows:
1. 2, 3, 4, 5 are equipotential lines in the same category.
Detailed Description
The following describes the embodiments of the present invention further with reference to the drawings.
Method embodiment:
the embodiment provides an image generation method based on national earth relation, which specifically comprises the following steps:
step one: the country is used as a node (hereinafter referred to as a country node), and the country node is laid out by using the geographic position and the earth-bound relation. As shown in fig. 1, the specific steps are as follows:
(1) And obtaining the geographic position coordinates of each country as the initial position of the nodes of each country.
(2) Calculating the attractive force between every two country nodes and coordinate displacement caused by the attractive force; and calculating the repulsive force between the nodes of two countries, and the coordinate displacement caused by the repulsive force.
The gravity calculation formula of the national node is as follows:
wherein F(s) i ,s j ,l k ) Representing a national node s i And s j Attraction between l k Is the edge between the nodes of two countries, r(s) i ,s j ) Represents the node distance of the country, d (l) k ) For the natural length of the edge, G 1 Representing the elastic coefficient, the ratio of stress to strain of the elastic coefficient on the physical knuckle is usually a constant value according to the difference of the node values.
The repulsive force calculation formula of the two-country node is as follows:
wherein f(s) i ,s j ) Representing a national node s i And s j The repulsive force between the two points is C is a constant, the repulsive force is zero, G 2 Representing the repulsive force coefficient, wherein the repulsive force coefficients among nodes with different physical properties are different, and normally take a constant value; m is m i 、m j To respectively represent national nodes s i And s j K represents the national relation constraint force, and the calculation formula is as follows:
in the formula, K' is the value of the inter-country earth-edge relationship, and in the embodiment, the value of the inter-country earth-edge relationship is quantitatively calculated by an event data analysis method. With national strength m i Representing the mass of the node, the national hard forces include basic forces (a 1i ) Economical strength (A) 2i ) Military forces (A) 3i ) And science and technology strength (A) 4i ) Obtained by the following formula:
in the above, the national basic strength, economic strength, military strength and scientific strength are respectively treated by taking the national land area, GDP, military expenditure and research and development expenditure as specific indexes and adopting min-max normalized dimensionless treatment, and the treatment formula is as follows:
wherein x is normalized data, x' is a sample original value, and min and max are sample minimum and maximum values respectively.
(3) Iterative calculation, repeating steps (2) and (3), when the attraction force and repulsion force are balanced (i.e., |F(s) i ,s j ,l k ) I is equal to i f (s i ,s j ) I), the national network structure is balanced; and calculating the total displacement of each initial node, determining the moving distance li of the country node, and finally displaying the final position of each country node in the image according to the moving distance li of each country node.
Step two: and classifying the country nodes, and calculating the outline of the country nodes under each category.
In this step, the principle of contour line determination is to assume country nodes as charged particles, then divide the image, calculate the potential energy of each area, and determine the contour line drawing by equipotential lines.
Specifically, all country nodes are first classified according to set conditions, in this embodiment, based on the score of the earth relation and the score of the interconnection index, a linear weighting method is adopted to calculate the comprehensive strength score of each target country based on the score of each index, and a K-means cluster analysis method is used to layer 63 countries along the line according to the development emphasis condition of interconnection, so that the countries are classified into five-way balanced type, political mutual trust type, trade smooth type, trade potential type, facility short plate type and six types to be enhanced. The calculation of the national comprehensive strength score is completed based on the weighted summation of the index system, and the index weights are shown in the following table.
National comprehensive strength index and weight table
As shown in fig. 2-1, two types of country nodes are shown, which can be distinguished by different colors, respectively. Then, for the same type of country nodes, starting from the country node closest to the center point c, other country nodes around the same are sequentially connected, and finally, the potential energy of the country nodes and the sides is calculated, and an equipotential line 1, an equipotential line 2, an equipotential line 3, an equipotential line 4 and an equipotential line 5 are determined, wherein the process is shown in fig. 2-1, fig. 2-2 and fig. 2-3, and contour lines of all country nodes around the equipotential line 1 to the equipotential line 5 and the equipotential line are drawn, as shown in fig. 2-4. The implementation flow of the step is shown in fig. 3, and the specific steps are as follows:
(1) selecting a group of country nodes, and adding a rectangular frame S as an active area for the country nodes;
(2) determining a center point c of the rectangular frame S;
(3) from the country node s nearest to the center point c i Initially, for all the country nodes in the frame S, find its neighbors S j Sum to s i Optimal route r(s) i ,s j );
(4) For all and national nodes s i Distance R 1 Calculating a cell potential E (pt) comprising s i Potential energy E(s) i ) Adding virtual edge s i →s j Potential energy E(s) i ,s j ) And subtracting potential energy E (k) of a nearby non-integrated member node k;
(5) traversing all country nodes, calculating potential energy of cell until contour line is determinedSo that it contains the aggregate node S in each S i
(6) And drawing a contour line along the potential energy continuous cells.
In this step, the core of the contour line drawing is the drawing of the equipotential lines, which divides the view space into grids, calculates the potential energy value of each grid unit, i.e., E (x, y) =c (C is a constant potential energy value), and ensures the continuity of the contour line through the continuity of the potential energy function.
In this step, the energy value (i.e., cell potential energy) of each grid is the sum of the influence forces of nodes in the nearby country, and the function takes the distance as a variable:
S p ={i|i∈S,r(s i ,p)<R 1 }
wherein E is p Representing the energy of the grid cell p; w (w) i Representative node s i Weight of (2), i.e. national firmness; r is R 0 For a distance of 1 energy, R 1 Distance at 0 energy; r(s) i P) represents the grid cell distance from the country node s i Is a distance of (2); s represents a set of all country nodes; s is S p Representing the center of the grid unit, R 1 Is a set of all national nodes within a radius range. Due to virtual edge s i →s j Potential energy E(s) i ,s j ) Can be regarded as the potential energy of a set of cell potential energies, and thus the virtual edge s i →s j Potential energy E(s) i ,s j ) The calculation method of (a) is the same as the calculation method of the potential energy of the cell, and the embodiment is not repeated; similarly, the method for calculating the potential energy E (k) of the non-integrated member node k nearby is the same as the method for calculating the potential energy of the cell, and will not be described in detail in this embodiment.
In this embodiment, in order to improve efficiency, before calculating the boundary of each group of country nodes, a rectangular frame is defined as a calculation area, so that the calculation area includes all the country nodes of the group; and the width is increased to R outside the frame 1 The buffer area of the frame is ensured to be not ignored; only the potential energy values of the country nodes and grid cells within the area need to be calculated, without having to consider the items outside the area.
Step three: and optimizing the connection paths among the country nodes under each category, and updating the connection paths.
Because the connection paths among the country nodes in different categories are preliminarily determined through the step two, in order to reduce the overlapping among the connection paths in different categories, when the path connection is carried out among the country nodes in the same category, the country nodes in other categories need to be intentionally bypassed, the connection paths are updated, and the connection paths in the current category are prevented from intersecting with the country nodes in other categories.
Based on the above considerations, the procedure of determining an updated connection path between two country nodes will be described by taking as an example two country nodes to be connected under the current category:
among the two country nodes, one country node is determined as a starting point, the other country node is determined as a target point, the starting point and the target point are connected first, and the condition that the connection path intersects with the other country node (i.e., the connection path passes through the country node) is judged; judging the adding position of the virtual node according to the segmentation condition of the edge to other country nodes; and then connecting the starting point and the virtual node, connecting the virtual node and the target point, and judging whether the two connecting paths pass through other national nodes or not respectively, if so, continuing to add the virtual node until the connecting paths are not intersected with other nodes.
In this step, the country nodes of the set are sequentially connected through the center, and this is used as an initial virtual path (i.e., connection path). To ensure the centralization and the aesthetic property of the final outline shape, the node closest to the center c of the active area is selected to start traversing from the initial point, and each virtual path is traversed so as to ensure that the virtual path between every two country nodes does not intersect with other country nodes. As shown in fig. 4, the specific steps for determining the virtual path are as follows:
(2) first connecting the starting point S 1 And target point S n
(2) Judging virtual path S 1 S n Whether to intersect with an obstacle (a national node not participating in the current path connection);
(3) judging the size of the dividing area of the virtual path to the obstacle, selecting the corresponding corner and buffer area to set a virtual node P according to the length of the truncated edge i
(4) Connecting virtual node P i Continuing to judge the intersection of the path and the obstacle with the starting point;
(5) repeating the steps 1-4 until the virtual node and the target point S n If the connecting line of (1) no longer intersects with the obstacle, the path planning is completed, S 1 、P 1 、P 2 、…、P k 、S n And (5) a connected fold line.
In the step (3), the selection schematic diagram of the virtual node position is shown in fig. 5-1 and fig. 5-2. Wherein the rectangle is the starting point S 1 And target point S n Obstacle in between, straight line S 1 S n Dividing it into A, B two regions, if any region in A, B is triangle (for example, region A in FIG. 5-1 is triangle), adding virtual node P outside right-angle vertex of triangle directly i The method comprises the steps of carrying out a first treatment on the surface of the Virtual node P i After addition, see again line S 1 P i The division of the obstacle is divided into two cases:
1) No segmentation obstacle;
2) The obstacle is still divided into A, B two areas, if A, B two areas are divided into two trapezoids, then further judgment is needed, and the specific method is as follows:
let the upper and lower bottom edges of the region A be i and j respectively, firstly judging the sizes of the edges i and j, if i>j, selecting C 1 、C 3 Distance from straight line (i.e. d (c) 1 )、d(c 3 ) Adding virtual nodes outside the shorter vertexes; if i<j, selecting C 2 、C 4 Distance from straight line (i.e. d (c) 2 )、d(c 4 ) A virtual node is added outside the shorter vertex.
In addition, when a plurality of obstacles intersect, the obstacles need to be considered as a whole for judgment, so that the path is prevented from passing through the overlapping position of the obstacles. For example, as shown in FIG. 6-1, the left obstacle has a length and a width of (l1+l2) and (w1+w2), respectively, the right obstacle has a length and a width of (l2+l3) and (w2+w3), respectively, and a straight line S 1 S n Passing through two obstacles with overlapping length and width of l2 and w2 respectively, and combining the two obstaclesThe obstacle is regarded as an obstacle with the total length and the total width of (l1+l2+l3) and (w1+w2+w3), and a virtual node P is determined according to the steps 1 As shown in FIG. 6-2, connection S 1 、P 1 Two points form a straight line S 1 P 1 Connection P 1 、S n Two points form a straight line P 1 S n The straight line does not pass through any obstacle and is connected with P 1 、S n Two points form a straight line P 1 S n The line still passes through an obstacle and, still according to the above steps, a virtual node P is determined 2 As shown in FIGS. 6-3, the connection P 1 、P 2 Two points form a straight line P 1 P 2 The method comprises the steps of carrying out a first treatment on the surface of the Connection P 2 、S n Form a straight line P 2 S n Neither of these lines passes through any obstacle.
In this embodiment, according to the principle of adding virtual nodes, when the positions of adding virtual nodes are different, there may be multiple path connection schemes to implement connection path update of two-country nodes, although multiple schemes can all avoid intersecting connection paths with other country nodes, some schemes are complicated, and there are more virtual nodes to be added, so that an optimal path connection scheme needs to be determined to find an optimal path. Based on this consideration, the optimal path of the present embodiment is found by minimizing the cost function:
c(s j )=d(s i ,s j )·o(s i ,s j )
wherein s is j For the national node s i Is the most adjacent point, c (s j ) Representing the node s by the country i To node s j Path cost of d(s) i ,s j ) Represents the straight line distance between the nodes of two countries, o (s i ,s j ) Representing the number of other nodes between the country nodes, which refer to the country nodes under the other categories through which the original connection path passes.
The method flow of the invention is shown in figure 7, the image generation method of the invention firstly lays out the nodes of each country in the image according to the geographic positions among different countries and the values of the geographic relation between the target country and other countries; then, classifying the country nodes in the image, carrying out region division on the image, regarding the country nodes as charged particles, calculating potential energy of each divided region, and determining all equipotential lines in the same category by utilizing potential energy continuity so as to determine contour lines containing all equipotential lines in the category; and finally, traversing the connection paths between the nodes of the two countries under each category, adding proper virtual nodes, and updating the connection paths, so that the direct connection paths between the nodes of the two countries are prevented from passing through the nodes of the countries which do not belong to the current category. The bubble tree diagram generated by the method effectively and reasonably displays the inter-country geographical relation, so that an observer can clearly know the inter-country geographical relation at a glance, the visualization of the image is strong, the problem that the country nodes are displayed indistinct is solved, and the inter-country geographical relation analysis is facilitated.
Finally, it should be noted that: the above embodiments are only for illustrating the technical aspects of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those of ordinary skill in the art that: modifications and equivalents may be made to the specific embodiments of the invention,
for example, the present embodiment is not limited to a specific method for classifying the country nodes, and as other embodiments, the country nodes may be classified by only using the earth relation score or the interconnection index score.
As another example, the present embodiment does not have to determine the optimal path between the nodes in two countries, and as another implementation manner, it is only necessary to update the connection path according to the content in the third step, and it is only necessary to select one connection scheme, so that the connection path can be prevented from intersecting with the nodes in other countries.
Therefore, any modification or equivalent which does not depart from the spirit and scope of the present invention should be construed to be included in the scope of the appended claims.
Device example:
the embodiment provides an image generating apparatus, as shown in fig. 8, including a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor is coupled to the memory, and the processor is configured to execute program instructions stored in the memory, so as to implement an image generating method in a method embodiment, and since the description of the method in the method embodiment is sufficiently clear and complete, the description of the method in the method embodiment is not repeated.
That is, the method in the above method embodiments should be understood that the flow of the image generation method may be implemented by computer program instructions. These computer program instructions may be provided to a processor, such as a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus, etc., such that the instructions, which execute via the processor, create means for implementing the functions specified in the above-described method flows.
Specifically, the image generating apparatus shown in fig. 8 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) and memories, and one or more storage media storing application programs or data. The memory and storage medium may be transitory or persistent. The program stored on the storage medium may include one or more modules (not shown), each of which may include a series of instruction operations in the data processing apparatus. Still further, the processor may be configured to communicate with a storage medium and execute a series of instruction operations in the storage medium on the image generation device.
The image generating apparatus of the present embodiment may further include one or more power supplies, one or more wired or wireless network interfaces; one or more input-output interfaces; and/or one or more operating systems. For example, windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
The processor referred to in this embodiment refers to a processing device such as a microprocessor MCU or a programmable logic device FPGA.
The memory referred to in this embodiment includes physical means for storing information, typically by digitizing the information and then storing the information in an electrical, magnetic, or optical medium. For example: various memories, RAM, ROM and the like for storing information by utilizing an electric energy mode; various memories for storing information by utilizing a magnetic energy mode, such as a hard disk, a floppy disk, a magnetic tape, a magnetic core memory, a bubble memory and a U disk; various memories, CDs or DVDs, which store information optically. Of course, there are other ways of storing, such as quantum storing, graphene storing, etc.
As another implementation manner, the image generating apparatus of this embodiment may further include a display for displaying the generated image.

Claims (10)

1. The image generation method based on the national earth relation is characterized by comprising the following steps of:
(1) Obtaining geographic positions of all countries, obtaining the value of the geographic relation between a target country and other countries, and laying out nodes of all countries in an image according to the geographic positions and the value of the geographic relation;
(2) Classifying the country nodes according to the set conditions into at least two categories; dividing the image to obtain a plurality of divided areas, regarding nodes of each country as charged particles, and calculating potential energy of each divided area;
for the country nodes belonging to each category, determining equipotential lines among the country nodes of the category according to the potential energy continuity of the divided areas, and determining the contour lines of the category, wherein the contour lines comprise all equipotential lines and country nodes of the category, and the specific steps are as follows:
(1) selecting a group of country nodes, and adding a rectangular frame S as an active area for the country nodes;
(2) determining a center point c of the rectangular frame S;
(3) from the country node s nearest to the center point c i Initially, for all the country nodes in the frame S, find its neighbors S j Sum to s i Optimal route r(s) i ,s j );
(4) For all and national nodes s i Distance R 1 Is a cell of a computerThe potential energy E (pt) of the cell, which comprises s i Potential energy E(s) i ) Adding virtual edge s i →s j Potential energy E(s) i ,s j ) And subtracting potential energy E (k) of a nearby non-integrated member node k;
(5) traversing all country nodes, calculating potential energy of cell until equipotential lines are determinedSo that it contains the aggregate node S in each S i
(6) Drawing contour lines along potential energy continuous cells;
(3) And traversing the connection paths between the two country nodes under each category, and when the current connection paths between the two country nodes pass through the country nodes of other categories, reconnecting the virtual nodes and the country nodes by adding proper virtual nodes between the two country nodes, and updating the connection paths so as to prevent the paths directly connected between the two country nodes from passing through the country nodes not under the current category.
2. The image generation method based on the national earth relation according to claim 1, wherein in the step (1), laying out each national node in the image according to the geographical position and the earth relation value comprises:
1) Taking the geographic position coordinates of each country as the initial position of each country node;
2) Calculating the attractive force between every two country nodes and coordinate displacement caused by the attractive force; calculating the repulsive force between the nodes of every two countries, and carrying out coordinate displacement caused by the repulsive force;
3) Judging whether the attractive force and the repulsive force between the two-country nodes reach balance or not, if not, repeating the step 2) to perform iterative calculation until the attractive force and the repulsive force between the two-country nodes reach balance, and determining the total moving distance of the country nodes;
4) And determining the final position of each country node in the image according to the total moving distance of each country node.
3. The image generation method based on the national earth relation according to claim 2, wherein the gravitation formula of each national node is as follows:
wherein F(s) i ,s j ,l k ) Representing a national node s i And s j Attraction between l k Is the edge between the nodes of two countries, r(s) i ,s j ) Represents the node distance of the country, d (l) k ) For the natural length of the edge, G 1 Representing the spring force coefficient.
4. The image generation method based on the national earth relation according to claim 2, wherein the repulsive force formula applied to each national node is as follows:
wherein f(s) i ,s j ) Representing a national node s i And s j The repulsive force between the two points is C is a constant, the repulsive force is zero, G 2 Representing the repulsive force coefficient; m is m i 、m j To respectively represent national nodes s i And s j And K represents the national relationship constraint.
5. The image generation method based on national earth relations according to claim 4, wherein the calculation formula of the national relation constraint force is as follows:
wherein K is For the national node s i And s j The value of the earth's edge relation between the two.
6. The image generation method based on national earth relations according to claim 1, wherein in the step (3), the step of updating the connection path comprises:
1) Acquiring starting point S in two national nodes 1 And target point S n Connection start point S 1 And target point S n Obtaining a virtual path S 1 S n
2) Judging virtual path S 1 S n Whether or not an obstacle is traversed, the obstacle being a national node not belonging to the current category;
3) When the virtual path S 1 S n When the virtual path passes through the obstacle, judging the size of the dividing area and the length of the truncated edge of the obstacle by the virtual path, and selecting the corresponding corner and buffer area to set a virtual node P i
4) Connecting virtual node P i And the starting point S 1 Obtaining a virtual path S 1 P i Continuing to judge the virtual path S 1 P i If the obstacle is penetrated, continuing to increase virtual nodes and updating virtual paths until all the virtual paths do not penetrate the obstacle;
connecting virtual node P i And target point S n Obtaining a virtual path P i S n Continuing to judge the virtual path P i S n If the obstacle is passed, the virtual nodes are continuously added, and the virtual paths are updated until all the virtual paths do not pass through the obstacle.
7. The image generation method based on national earth relations as claimed in claim 6, wherein the virtual node P is set in step 3) i The method of (1) is as follows:
virtual path S 1 S n Dividing the obstacle into A, B two areas, if any one of the A, B areas is triangular, directly adding a virtual node P outside the right-angle vertex of the triangle i
If A, B is trapezoidal, the side lengths of the upper and lower edges of the region A are i and j, respectively, and the sizes of the sides i and j are determined first, if i>j, selecting the vertex C of the upper bottom edge 1 Diagonal vertex C 3 Virtual node P is added outside vertex with short middle distance to virtual path i The method comprises the steps of carrying out a first treatment on the surface of the If i<j, selecting the vertex C of the lower bottom edge 2 Diagonal vertex C 4 Virtual node P is added outside vertex with short middle distance to virtual path i
8. The image generation method based on national earth relations according to claim 1 or 6, wherein the updated connection path is an optimal path, which is obtained by minimizing a cost function, the cost function being formulated as follows:
c(s j )=d(s i ,s j )·o(s i ,s j )
wherein c(s) j ) Representing the node s by the country i To national node s j Path cost s of (2) j For the national node s i D(s) i ,s j ) Representing two-country node s i 、s j Linear distance between, o (s i ,s j ) Representing the number of other country nodes between the country nodes.
9. The image generation method based on national earth's relationship according to claim 6, wherein when the virtual path passes through two obstacles having overlapping portions at the same time, the two obstacles are regarded as one obstacle according to the sizes of the two obstacles to determine an appropriate virtual node.
10. Image generation device based on national earth relations, comprising a memory and a processor, and a computer program stored on the memory and running on the processor, the processor being coupled to the memory, characterized in that the processor implements the image generation method according to any of claims 1-9 when executing the computer program.
CN202010484977.0A 2020-06-01 2020-06-01 Image generation method and device based on national earth relation Active CN113761083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010484977.0A CN113761083B (en) 2020-06-01 2020-06-01 Image generation method and device based on national earth relation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010484977.0A CN113761083B (en) 2020-06-01 2020-06-01 Image generation method and device based on national earth relation

Publications (2)

Publication Number Publication Date
CN113761083A CN113761083A (en) 2021-12-07
CN113761083B true CN113761083B (en) 2023-12-01

Family

ID=78782612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010484977.0A Active CN113761083B (en) 2020-06-01 2020-06-01 Image generation method and device based on national earth relation

Country Status (1)

Country Link
CN (1) CN113761083B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727656A (en) * 2008-10-31 2010-06-09 李德毅 Image segmenting method based on data field
CN104067308A (en) * 2012-01-25 2014-09-24 英特尔公司 Object selection in an image
CN104238560A (en) * 2014-09-26 2014-12-24 深圳市科松电子有限公司 Method and system for planning nonlinear paths
CN104462204A (en) * 2014-08-27 2015-03-25 北京工商大学 Visualization method of two sorts of associated hierarchical data
CN108304536A (en) * 2018-01-29 2018-07-20 中国科学院地理科学与资源研究所 A kind of geographical environmental simulation of the geographical environmental element of coupling and predicting platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003016463A (en) * 2001-07-05 2003-01-17 Toshiba Corp Extracting method for outline of figure, method and device for pattern inspection, program, and computer- readable recording medium with the same stored therein

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727656A (en) * 2008-10-31 2010-06-09 李德毅 Image segmenting method based on data field
CN104067308A (en) * 2012-01-25 2014-09-24 英特尔公司 Object selection in an image
CN104462204A (en) * 2014-08-27 2015-03-25 北京工商大学 Visualization method of two sorts of associated hierarchical data
CN104238560A (en) * 2014-09-26 2014-12-24 深圳市科松电子有限公司 Method and system for planning nonlinear paths
CN108304536A (en) * 2018-01-29 2018-07-20 中国科学院地理科学与资源研究所 A kind of geographical environmental simulation of the geographical environmental element of coupling and predicting platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
大数据下的地缘环境可视分析研究探讨;温荟琦 等;《测绘科学》;第43卷(第12期);77-84 *

Also Published As

Publication number Publication date
CN113761083A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN109410327B (en) BIM and GIS-based three-dimensional city modeling method
Yan et al. A multi-parameter approach to automated building grouping and generalization
Rashid Space syntax: A network-based configurational approach to studying urban morphology
Dogan et al. Urbano: A new tool to promote mobility-aware urban design, active transportation modeling and access analysis for amenities and public transport
LU102117A1 (en) Method and system for measuring mountain view visible area in city
CN112784002B (en) Virtual scene generation method, device, equipment and storage medium
KR20100136604A (en) Real-time visualization system of 3 dimension terrain image
Chang et al. Legible simplification of textured urban models
CN113066157A (en) Data grading request rendering method and system based on CIM platform
Sileryte et al. Automated generation of versatile data model for analyzing urban architectural void
Mazurkiewicz et al. Not arbitrary, systematic! average-based route selection for navigation experiments
Tušar et al. Visualizing 4D approximation sets of multiobjective optimizers with prosections
Halik Challenges in converting the Polish topographic database of built-up areas into 3D virtual reality geovisualization
Liu et al. An intelligent modeling framework to optimize the spatial layout of ocean moored buoy observing networks
Lin et al. Drawing road networks with mental maps
CN113761083B (en) Image generation method and device based on national earth relation
Sharma et al. Development of ‘3D city models’ using IRS satellite data
Rodgers Graph drawing techniques for geographic visualization
Glander et al. Concepts for automatic generalization of virtual 3D landscape models
Chang et al. Hierarchical simplification of city models to maintain urban legibility.
JP2005115639A (en) Creation method and program of occurrence limit line of sediment disaster, evacuation reference line, and warning reference line, caution evacuation support system of sediment disaster
Wang et al. Mountainous village relocation planning with 3D GIS virtual imaging space model and neural network
Morgan et al. Using binary space partitioning to generate urban spatial patterns
CN117576915B (en) Intelligent road design system based on virtual simulation technology
Shakaev et al. View-Dependent Level of Detail for Real-Time Rendering of Large Isosurfaces

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
GR01 Patent grant
GR01 Patent grant