Vector space data matching method based on genetic algorithm

Through the method based on the genetic algorithm, the weight of the multi-dimensional similarity index is automatically calculated, which solves the problem that the weight setting relies on experience in the existing technology and improves the accuracy and reliability of vector space data matching.

CN118643179APending Publication Date: 2024-09-13HENAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410872900.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

In existing multi-index vector space data matching methods, the setting of weights and thresholds mainly relies on the experience of cartographers, resulting in low accuracy of matching results and the existence of human errors.

Method used

A method based on genetic algorithms is used to determine the chromosome structure by obtaining similarity indicators in multiple dimensions, and use genetic algorithms to iteratively calculate the weight of the similarity indicators in each dimension, and automatically adjust the weights for data matching.

Benefits of technology

It effectively reduces the subjectivity of the matching method, improves the accuracy of the matching results, simplifies the algorithm, and has good scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643179A
    Figure CN118643179A
Patent Text Reader

Abstract

The invention relates to the technical field of data matching, in particular to a vector space data matching method based on a genetic algorithm, which comprises the following steps: acquiring comprehensive pipeline data and professional pipeline data in an urban underground pipeline database; acquiring a similarity index between the comprehensive pipeline data and the professional pipeline data in multiple dimensions, and determining a chromosome structure based on the similarity index; carrying out iteration by utilizing a genetic algorithm based on the chromosome structure until a set termination condition is met, and obtaining the weight of each similarity index under each dimension; and matching the comprehensive pipeline data with the professional pipeline data by using the weight of the similarity index and the similarity index under each dimension to obtain a matching result. According to the method, the subjectivity of a traditional matching method is effectively reduced, and relatively high matching correctness can be kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data matching, and in particular to a vector space data matching method based on a genetic algorithm. Background Art

[0002] Vector geographic spatial data matching is a key technology in map fusion. Its purpose is to find entities with the same name that describe the same feature in two sets of data. It is a key step in the subsequent fusion. Entities with the same name are different expressions of the same geographic entity in different spatial data. Spatial data matching is the process of identifying the same feature or set of features in the real world expressed in different sources by analyzing the differences and similarities of spatial entities. Most current studies use a single feature similarity index to calculate, and there are relatively few matching methods involving multiple indicators. Multi-indicator matching methods can comprehensively consider entity features and find entities with the same name more accurately.

[0003] In most of the current multi-index vector space data matching methods, when matching multi-source data based on multiple matching feature indicators such as geometric feature factor similarity and topological feature factor similarity, it is necessary to assign weights to each indicator or set a similarity threshold. However, the setting of the weights or thresholds of these indicators is mainly determined by the experience of cartographers. Due to the different data collection accuracies, the weights of matching feature indicators are also different. Relying solely on experience to determine the weights will lead to human errors, resulting in low accuracy of matching results. Summary of the invention

[0004] In order to solve the technical problem that the existing artificially set weights result in low precision of multi-source matching results, the purpose of the present invention is to provide a vector space data matching method based on a genetic algorithm, and the technical solution adopted is as follows:

[0005] Obtain comprehensive pipeline data and professional pipeline data from the urban underground pipeline database;

[0006] Obtain similarity indicators between comprehensive pipeline data and professional pipeline data in multiple dimensions, and determine the chromosome structure based on the similarity indicators;

[0007] Iterate using a genetic algorithm based on the chromosome structure until a set termination condition is met, and obtain the weight of each similarity index in each dimension;

[0008] The comprehensive pipeline data and the professional pipeline data are matched by using the weight of the similarity index and the similarity index under each dimension to obtain a matching result.

[0009] Preferably, the similarity index includes length similarity, distance similarity, topological similarity, direction similarity and shape similarity, and each similarity corresponds to a dimension of the similarity index.

[0010] Preferably, the number of latitudes of the similarity index is n, and the number of genes in the chromosome in the chromosome structure is n+2.

[0011] Preferably, the termination condition is to terminate the algorithm when the fitness value is greater than a set value or the number of iterations exceeds a set value.

[0012] Preferably, the matching of the comprehensive pipeline data and the professional pipeline data to obtain a matching result specifically includes:

[0013] For any comprehensive pipeline data and any professional pipeline data, a matching formula is used for matching, and the matching formula is:

[0014]

[0015] Among them, Sim represents the matching degree, n represents the total number of dimensions of the similarity index, and W i represents the weight of the similarity index between the comprehensive pipeline data and the professional pipeline data in the i-th dimension, M i Represents the similarity index between the comprehensive pipeline data and the professional pipeline data in the i-th dimension.

[0016] The embodiments of the present invention have at least the following beneficial effects:

[0017] The present invention aims at map fusion and takes vector geographic spatial data as the object. On the basis of traditional similarity calculation, it effectively reduces the subjectivity of traditional matching methods by comprehensively using multiple similarity indicators and introducing genetic algorithms, and can maintain a high matching accuracy. The algorithm is simple and easy to understand, and has certain scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of steps of a vector space data matching method based on genetic algorithm provided by the present invention;

[0020] Figure 2 It is a flow chart of the genetic algorithm provided by the present invention;

[0021] Figure 3 A schematic diagram of the technical route flow provided by the present invention;

[0022] Figure 4 is a schematic diagram of the pipeline matching result provided by the present invention;

[0023] Figure 5 The present invention provides a schematic diagram of the structure of a computer device. DETAILED DESCRIPTION

[0024] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the vector space data matching method based on genetic algorithm proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0025] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0026] The following is a detailed description of a specific scheme of a vector space data matching method based on a genetic algorithm provided by the present invention in conjunction with the accompanying drawings.

[0027] See also Figure 1 , which shows a flowchart of a vector space data matching method based on a genetic algorithm provided by an embodiment of the present invention, the method comprising the following steps:

[0028] Step S100, obtaining comprehensive pipeline data and professional pipeline data in the urban underground pipeline database.

[0029] Taking the underground water supply line data of some cities as an example, the data contains two sets of data: comprehensive pipeline data and professional pipeline data. Both comprehensive pipeline data and professional pipeline data are vector geospatial data that describe pipeline entities in the same underground water supply pipeline network. It is necessary to use algorithms to identify the elements that express the same pipeline in the comprehensive pipeline data and professional pipeline data, and establish a matching relationship between them to promote data sharing of comprehensive pipeline data and professional pipeline data and the integration of water supply pipeline maps.

[0030] In this embodiment, as shown in Table 1, it is an information table (part) of comprehensive pipeline data, OBJECTID represents an object identifier, which can be used to uniquely represent a certain element. As shown in Table 2, it is an information table of professional pipeline data. It should be noted that only partial information examples are given in Table 2.

[0031] Table 1 Information table of comprehensive pipeline data

[0032] OBJECTID Material Pipe diameter Starting point code End point coding 50 plastic 100 145 580 51 plastic 50 252 253 61 cast iron 100 360 709 62 plastic 100 694 814 63 plastic 50 457 582 64 plastic 50 812 813 65 plastic 50 456 812

[0033] Table 2 Information table of professional pipeline data

[0034] OBJECTID Material Pipe diameter Starting point code End point coding 47 Galvanized Steel 40 159 332 48 PE pipe 50 127 670 49 Galvanized Steel 40 152 671 50 PE pipe 50 245 672 51 Galvanized Steel 40 279 1224 52 Galvanized Steel 40 171 673 53 Galvanized Steel 40 112 333

[0035] Step S200, obtaining similarity indices between the comprehensive pipeline data and the professional pipeline data in multiple dimensions, and determining the chromosome structure based on the similarity indices.

[0036] For integrated pipeline data and professional pipeline data, similarity indicators in multiple dimensions can be calculated between each integrated pipeline and each professional pipeline, and each dimension corresponds to a type of similarity indicator. In this embodiment, the similarity indicators include length similarity, distance similarity, topological similarity, direction similarity and shape similarity, and each type of similarity corresponds to a dimension of a similarity indicator.

[0037] Among them, the length similarity S in the similarity index in this embodiment is Length It can be expressed as:

[0038]

[0039] Among them, A and B represent vector data from two different sources, that is, A represents comprehensive pipeline data, and B represents professional pipeline data. Min and Max are functions for finding the minimum and maximum values, respectively. MinL(A,B) represents the minimum value between A and B, and MaxL(A,B) represents the maximum value between A and B.

[0040] In this embodiment, the distance similarity S Distance The Hausdorff distance between the comprehensive pipeline and the professional pipeline is used. The Hausdorff distance is a measure that describes the similarity of linear features. It is a definition form of the distance between two linear features and has been widely used in the field of linear vector space data matching.

[0041] In this embodiment, the direction similarity S Orientation It can be expressed as:

[0042]

[0043] Among them, Oriangle represents the direction angle of the data, Min(Oriangle A ,Oriangle B ) represents the minimum value of the azimuth between A and B, Max(Oriangle A ,Oriangle B ) represents the maximum value of the azimuth angle between A and B.

[0044] In this embodiment, the L2 distance between pipelines is used as the shape similarity. Shape It can be expressed as:

[0045]

[0046] Among them, M is the number of nodes of the reference arc segment; N is the number of nodes of the data to be matched; s can be described as: there are any two line elements A and B, and the vertex coordinate string sequence of A is Calculate the ratio of the distance between each vertex and the initial vertex to the total length of A, recorded as sequence Similarly, the vertex coordinate string sequence of B is The ratio sequence of the cumulative distance between the vertices of B and the initial vertex and the total length of B is: Merge two proportional sequences into an ordered sequence s: (s1, s2, ..., s M+N ), s i is the ratio of the cumulative length between the i-th node and the starting node to the total length of the data, s i+1 It represents the ratio of the cumulative length between the i+1th node and the starting node of the data to the total length of the data; X is the vector composed of the i-th node and the i+1th node on the reference data; Y is the vector composed of the i-th node and the i+1th node on the data to be matched.

[0047] In this embodiment, the topological similarity S between pipelines Topological It can be expressed as:

[0048]

[0049] Degree represents the node degree of the data, that is, the number of arcs directly connected to the node. A Head represents the number of arcs directly connected to the head node of pipeline A, Degree A Tail represents the number of arcs directly connected to the tail node of pipeline A. Similarly, Degree B Head represents the number of arcs directly connected to the head node of pipeline B, Degree B Tail represents the number of arcs directly connected to the tail node of pipeline B.

[0050] In this embodiment, ArcGIS Engine is used to obtain similarity indices in five dimensions between every two pipelines, forming a similarity index set S, which is expressed as S = {S length , S distance , S topological , S orientation , S shape}, where S lengthIndicates the length similarity between pipelines, S distance Indicates the distance similarity between pipelines, S topological represents the topological similarity between pipelines, S orientation Indicates the directional similarity between pipelines, S shape Indicates the shape similarity between pipelines.

[0051] After obtaining the similarity index between every two pipelines, the chromosome structure needs to be determined according to the number n of dimensions corresponding to the similarity index. The number of genes in the chromosome is n+2, that is, in this embodiment, the value of n is 5.

[0052] Step S300, iterating using a genetic algorithm based on the chromosome structure until a set termination condition is met, and obtaining the weight of each similarity index in each dimension.

[0053] It should be noted that the chromosome structure in the genetic algorithm mainly includes three parts: similarity threshold, buffer distance, and index weight. The real value is used as the chromosome gene value similarity threshold, and the value range of the similarity threshold is a floating point number between 0 and 1. In this embodiment, according to the data scale, the value of the buffer distance is set between 12 and 50, and the range of the index weight is a floating point number between 0 and 1. Among them, the index weight is also the weight corresponding to each similarity index. In other embodiments, the chromosome structure can also be changed according to demand, and genes can be added or reduced to adapt to different matching environments to improve the universality of the algorithm.

[0054] In this embodiment, it mainly includes a genetic algorithm part and a data matching part. In the first aspect, for the genetic algorithm part, such as Figure 2 As shown in the figure, the genetic algorithm originated from the computer simulation research on biological systems. It is a random global search optimization method that simulates the phenomena of replication, mutation and so on that occur in natural selection and inheritance. Starting from an arbitrary initial population, it produces a group of individuals that are more suitable for the environment through random selection, crossover and mutation operations, so that the population evolves to better and better areas in the search space, constantly multiplying and evolving, and finally converges to a group of individuals that are most adapted to the environment, thereby obtaining the optimal solution to the problem.

[0055] The genetic algorithm can be described as:

[0056] SGA=(C,E,P0,M,φ,Γ,Ψ,T)

[0057] Among them, C represents the individual encoding scheme; E represents the chromosome fitness function; P0 represents the initial population; M represents the population size; φ represents the selection operator; Γ represents the crossover operator; ψ represents the mutation operator; and T represents the termination condition.

[0058] First, we need to determine the three genetic operators at the core of the genetic algorithm, namely the selection operator, crossover operator, and mutation operator.

[0059] The selection operation selects excellent individuals from the old population with a certain probability to form a new population to reproduce the next generation of individuals. The probability of an individual being selected is related to the fitness value. The higher the individual fitness value, the greater the probability of being selected.

[0060] In this embodiment, the value of the fitness function (F function) is the F-score (F-Score) of the chromosome, which represents the fitness of the chromosome:

[0061]

[0062]

[0063] Among them, F-score represents the fitness of the chromosome, that is, the F score of the chromosome, Precision represents accuracy, Recall represents recall, TP represents the number of correctly detected matches, FP represents the number of incorrectly detected matches, and FN represents the number of undetected matches.

[0064] Calculate the fitness value of each individual, and calculate the probability of each individual being selected based on the fitness value. Use a selection method (such as roulette selection, competitive selection, or ranking selection) to select individuals from the current population and build a new population.

[0065] Crossover operation refers to randomly selecting two individuals from the population, and through the exchange and combination of two chromosomes, the excellent characteristics of the parent generation are passed on to the offspring, thereby producing new excellent individuals.

[0066] The crossover operator uses the hybrid crossover method (BLX-alpha), and the gene values ​​in the offspring chromosomes come from:

[0067]

[0068] Among them, Ch i is the i-th gene generated for the offspring, α i is a value randomly selected from [0,1] for the ith gene, and is the value of the i-th gene in the father and mother, and Random[] is an operator that selects a random value in the interval.

[0069] Randomly select two individuals from the current population as parents; generate crossover points in the two parents according to the selected crossover method (such as single-point crossover, multi-point crossover or uniform crossover). Exchange the parts of the parent chromosomes after the crossover point to generate new daughter chromosomes; add the generated daughter chromosomes to the new population.

[0070] The mutation operation is to prevent the algorithm from falling into a local optimal solution during the optimization process. During the search process, it is necessary to mutate the individuals and give some values ​​in the gene sequence a new value within the allowed range.

[0071] The mutation operator uses real number mutation to assign a random value to each gene. If it is less than the mutation parameter, the gene mutates, and the number of mutated genes remains:

[0072] N=μ(NP-1)N G

[0073] Where N is the number of mutations, μ is the mutation rate, NP is the number of chromosomes, and N G is the number of genes in each chromosome.

[0074] For each individual in the current population, mutation is performed at a certain mutation rate; according to the selected mutation method (such as single-point mutation, multi-point mutation or uniform mutation), the gene positions in the individual are randomly selected for mutation; the mutated individuals are added to the new population.

[0075] Then, complete the three main classes of genetic algorithms: chromosome class, population class, and the rest of the GA class. Initialize the population and chromosomes. The chromosome is initialized by giving a random value within the allowed range. The value range of the initialized chromosome specifically includes:

[0076] t∈[0,1]

[0077] β∈R +

[0078] W=[w1,w2,w3,…,w i ,…,w n ],w i ∈[0,1]

[0079] Among them, t represents the similarity threshold, β represents the buffer distance, and R + represents a positive real number, W represents the weight of the similarity index, w i represents the weight of the similarity index under the i-th dimension, w n Represents the weight of the similarity index under the nth dimension.

[0080] Set the termination condition. The termination condition is to terminate the algorithm when the fitness value is greater than the set value or the number of iterations exceeds the set value.

[0081] Finally, the iteration begins, generating new individuals through selection, crossover, and mutation operations; the new individuals form the next generation population until the stop condition is met. Finally, the weight of the similarity index between each two pipelines in each dimension is obtained, which can be expressed as Results = {wlength ,w distance ,w topological ,w orientation ,w shape}, where they represent the weights corresponding to length similarity, distance similarity, topological similarity, direction similarity, and shape similarity respectively.

[0082] This embodiment divides the data into training data and test data, uses the training data for the operation of the genetic algorithm, and continuously iterates the training data through the genetic algorithm code until the iteration termination condition is reached or the iteration is stopped when the maximum iteration round is reached, and finally a set of optimal similarity index weights can be generated. Then the optimal similarity index weights are applied to the test data, which is conducive to the matching operation of the test data for the pipeline data, and the matching pipeline pairs on the test data are found, and finally the matching results are displayed in the map data.

[0083] Step S400, using the weight of the similarity index and the similarity index under each dimension, the comprehensive pipeline data and the professional pipeline data are matched to obtain a matching result.

[0084] In terms of data matching, the present invention takes out comprehensive pipeline data and professional pipeline data from the existing urban underground pipeline database, extracts their respective similarity index values ​​and converts them into chromosome structures, and obtains the weight of the similarity index through genetic algorithm iteration. The matching degree between every two pipelines can be finally obtained by combining the similarity index, and the matching pipeline is found based on the matching degree.

[0085] For any comprehensive pipeline data and any professional pipeline data, a matching formula is used for matching, and the matching formula is:

[0086]

[0087] Among them, Sim represents the matching degree, n represents the total number of dimensions of the similarity index, and W i represents the weight of the similarity index between the comprehensive pipeline data and the professional pipeline data in the i-th dimension, M i Represents the similarity index between the comprehensive pipeline data and the professional pipeline data in the i-th dimension.

[0088] It should be noted that for any integrated pipeline, the matching degree between the integrated pipeline and each professional pipeline can be calculated. The professional pipeline corresponding to the maximum matching degree is the professional pipeline that matches the integrated pipeline. The pipeline matching process combined with the genetic algorithm is as follows: Figure 3 As shown. Figure 4The figure shows the matching results of integrated pipelines and professional pipelines. The text in the figure indicates the types of integrated pipeline nodes and professional pipeline nodes.

[0089] In summary, the advantages of the present invention are: first, in the matching process, only the geometric features of the data (including geometry, topology and context information criteria) are used, so that matching can be smoothly implemented in data lacking semantic information. Second, instead of manually determining the spatial similarity threshold, standard weight and buffer distance, these values ​​are obtained in the algorithm through iteration of the genetic algorithm, which does not rely on manual labor, thereby preventing human subjectivity from reducing the matching effectiveness during the matching process. Third, the present invention can detect corresponding objects in different data sets without relying on any input parameters.

[0090] The present invention also provides a vector space data matching system based on a genetic algorithm. The system and a vector space data matching method embodiment based on a genetic algorithm have the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0091] The present application also provides a computer device. Figure 5 , which shows a schematic diagram of the structure of a computer device provided by an embodiment of the present invention, the computer device includes a memory 501, a processor 502, and a computer program 503 stored in the memory 501 and running on the processor 502, wherein when the processor 502 executes the computer program 503, the computer device can execute any one of the vector space data matching methods based on genetic algorithms introduced above.

[0092] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer device, the computer device can execute any one of the vector space data matching methods based on genetic algorithms described above.

[0093] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer device, the computer device can execute any one of the vector space data matching methods based on genetic algorithms described above.

[0094] In the embodiments provided in the present application, it should be understood that the provided computer device, computer program product and computer-readable storage medium are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the methods provided above and will not be repeated here.

[0095] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A vector space data matching method based on genetic algorithm, It is characterized in that The method comprises the following steps: Obtain comprehensive pipeline data and professional pipeline data from the urban underground pipeline database; Obtain similarity indicators between comprehensive pipeline data and professional pipeline data in multiple dimensions, and determine the chromosome structure based on the similarity indicators; Iterate using a genetic algorithm based on the chromosome structure until a set termination condition is met, and obtain the weight of each similarity index in each dimension; The comprehensive pipeline data and the professional pipeline data are matched by using the weight of the similarity index and the similarity index under each dimension to obtain a matching result.

2. According to claim 1, a vector space data matching method based on genetic algorithm, It is characterized in that The similarity index includes length similarity, distance similarity, topological similarity, direction similarity and shape similarity, and each similarity corresponds to a dimension of the similarity index.

3. The vector space data matching method based on genetic algorithm according to claim 1, It is characterized in that The number of latitudes of the similarity index is n, and the number of genes in the chromosome in the chromosome structure is n+2.

4. The vector space data matching method based on genetic algorithm according to claim 1, It is characterized in that The termination condition is to terminate the algorithm when the fitness value is greater than a set value or the number of iterations exceeds a set value.

5. The vector space data matching method based on genetic algorithm according to claim 1, It is characterized in that The matching of the comprehensive pipeline data and the professional pipeline data to obtain a matching result specifically includes: For any comprehensive pipeline data and any professional pipeline data, a matching formula is used for matching, and the matching formula is: Among them, Sim represents the matching degree, n represents the total number of dimensions of the similarity index, and W i represents the weight of the similarity index between the comprehensive pipeline data and the professional pipeline data in the i-th dimension, M i Represents the similarity index between the comprehensive pipeline data and the professional pipeline data in the i-th dimension.