Address matching method and related device
Through address hierarchical analysis methods and administrative division corrections, the accuracy and efficiency of address matching technology are improved, and the problem of poor matching effect caused by inconsistent address hierarchy in the existing technology is solved, and efficient address matching result output is achieved.
Patent Information
- Application Number
- CN202310751643.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-24
AI Technical Summary
The existing address matching technology lacks semantic limitations in standard address structure, resulting in poor matching effect of address texts. Especially when address levels are inconsistent, it is difficult for the similarity calculation to accurately reflect the actual similarity.
Using an address-level analysis method, by obtaining the feature information after address-level resolution, the model is trained to improve the accuracy of address matching, and the preset administrative division names and encodings are used to correct and complete the address in model training to ensure the address Standardization and integrity of information.
It improves the accuracy and efficiency of address matching, reduces the difficulty of model training, realizes the breadth and real-timeness of applicable scenarios, and meets the performance requirements of online deployment.
Smart Images

Figure CN119180271A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to an address matching method and related devices. Background Art
[0002] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0003] The application scenarios of address matching technology based on artificial intelligence are very wide. Address matching technology can be seen in the fields of navigation, logistics, financial risk control, etc. At present, when performing address matching, address text is generally treated as a string without semantics for similarity matching. However, this method generally lacks semantic restrictions on the standard address structure. For example, when calculating the semantic similarity of "This movie is very good, and I am looking forward to the second part" and "This movie is very bad, and I will not watch the second part even if there is a second part", there is no need to consider the hierarchical restrictions when calculating the semantic similarity of these two sentences. The semantics of the whole sentence can be directly used for calculation. However, address text is quite special. For example, the overlap between the two texts "Hilton Hotel, Chaoyang County, Chaoyang City, Liaoning Province" and "Hilton Hotel, Chaoyang District, Beijing" is very high, but due to the restrictions of the standard address structure, the similarity between the two is very low. If the matching is directly based on the string, the address matching effect is poor. Summary of the invention
[0004] The present application provides an address matching method and related devices, which can improve the accuracy of address matching.
[0005] In the first aspect, the present application provides an address matching method, which can be applied to the field of artificial intelligence and mainly includes:
[0006] First, obtain the first address information after address level parsing. Then, input the first address information into the first model to obtain the first feature information, wherein the first model is trained based on the sample library after address level parsing. Then, obtain the second feature information corresponding to each address information in the address library. Finally, perform similarity calculation based on the first feature information and the second feature information corresponding to each address information in the address library to obtain the address matching result.
[0007] In the present application, on the first hand, compared with extracting feature information directly based on the string information corresponding to the address text, the present application adopts explicit prompt information of the address level, and uses the first address information after parsing based on the address level as the input information of the first model, and outputs the corresponding first feature information, thereby reducing the difficulty of model training, improving the training effect of the first model, and improving the training accuracy of the first model. On the second hand, the first model is trained based on the sample library after address level parsing, which reduces the learning difficulty of the first model to identify and parse the address level, improves the recognition accuracy of the first model for address information, and further improves the accuracy of address matching. On the third hand, by inputting each address information in the address library into the first model in advance for feature output, when the first address information is input online in real time, the second feature information corresponding to each address information in the address library can be directly matched and calculated for similarity, and the address matching result can be output in real time, thereby meeting the performance requirements of online deployment, reducing latency, and achieving a wide range of applicable scenarios.
[0008] In a possible implementation of the first aspect, the first model is trained using a first loss function, where the first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
[0009] In this possible implementation, the first loss function is used to train the first model, so that the difference between the predicted value and the true value of the sample similarity is continuously reduced, thereby enhancing the rationality and explanatory power of the first model. In addition, a preset threshold is used to set the true value of the similarity between two samples, so that the final effect of address matching can be flexibly set.
[0010] In a possible implementation of the first aspect, the first model is trained using a first loss function, and the first loss function is used to indicate the difference between a real order and a predicted order in sorting of similarities between the first sample pair and the second sample pair.
[0011] In this possible implementation, the first loss function is used to indicate the difference between the actual order and the predicted order of the similarity of two samples in sorting, so as to evaluate whether the sorting results are consistent, so that the first model is suitable for the address sorting scenario, that is, the address matching result corresponds to the sorting result that is most similar to the input address information.
[0012] In a possible implementation manner of the first aspect, obtaining first address information after address hierarchy resolution includes:
[0013] Obtaining second address information to be matched;
[0014] Parsing the second address information to be matched according to the address level to obtain the parsed second address information;
[0015] The parsed second address information is corrected based on the name and code of the preset administrative division to obtain the corrected second address information;
[0016] The corrected second address information is completed based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
[0017] In this possible implementation, after obtaining the second address information to be matched, the second address information is parsed using the address hierarchy to ensure the stability of the address parsing. Subsequently, the parsed second address information is corrected based on the name and code of the preset administrative division to improve the parsed second address information based on the name and code of the preset administrative division. Finally, the corrected second address information is completed based on the address hierarchy to complete the information of the second address information based on the address hierarchy, unify the address information input into the first model, and realize the standardization of the information input of the first model.
[0018] In a possible implementation manner of the first aspect, the parsed second address information is corrected based on the name and code of the preset administrative division to obtain the corrected second address information, including:
[0019] For each piece of address information included in the parsed second address information, determining whether the address information exists in a dictionary tree, and obtaining a determination result, the dictionary tree being constructed based on the name of a preset administrative division;
[0020] If the judgment result is yes, then determine whether the address information is unique in the dictionary tree;
[0021] If yes, then adding the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the corrected second address information;
[0022] If not, the parsed second address information is corrected according to the address information of the parent node or the child node of the address information to obtain the corrected second address information;
[0023] If the judgment result is no, the address information is modified to the default information.
[0024] In this possible implementation, for the second address information after parsing, since the second address information is obtained based on the address hierarchy parsing, it corresponds to different address hierarchies and contains multiple address information, and for each address information, there may be multiple names corresponding to the dictionary tree composed of the names of the preset administrative divisions. Therefore, when it is determined that the second address information after parsing exists in the dictionary tree, it is necessary to determine whether the address information is unique in the dictionary tree. If it is not unique, the name corresponding to the address information can be determined by checking the address information of the parent node or child node of the address information to determine the name corresponding to the address information in the preset administrative division, and improve the second address information after parsing.
[0025] In a possible implementation manner of the first aspect, completing the corrected second address information based on the address hierarchy to obtain the first address information parsed based on the address hierarchy includes:
[0026] Based on the hierarchical order of the address levels, the corrected second address information is hierarchically sorted to obtain hierarchically sorted second address information;
[0027] Determining whether the second address information after hierarchical sorting includes address information of each level;
[0028] If not, at least one missing level is screened out from the hierarchically sorted second address information, and the missing levels are completed according to the address information of at least one parent node corresponding to each missing level to obtain the first address information after address level resolution.
[0029] In this possible implementation, the corrected second address information is first sorted based on the hierarchical order of the address hierarchy, so as to filter out the missing hierarchical information from the corrected second address information based on each layer of address information in the address hierarchy. The missing hierarchical information can be further completed by checking the address information of the corresponding parent node to obtain the improved first address information, thereby completing the address information.
[0030] In a possible implementation manner of the first aspect, the address database includes a risky address database.
[0031] In this possible implementation, a risky address library is added to the address library, and risky addresses can be identified for the input second address information based on the risky address library, further expanding the usage scenarios.
[0032] In a second aspect, the present application provides a model training method, the method is used to train a first model, the method comprising:
[0033] Obtaining first address information after address level resolution;
[0034] Inputting the first address information into the first model to obtain first feature information, wherein the first model is trained based on a sample library after address hierarchical parsing;
[0035] Obtaining second characteristic information corresponding to each piece of address information in the address database;
[0036] Calculate the similarity between the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result;
[0037] The first model is trained according to the first loss function until a preset condition is met, thereby obtaining a trained first model.
[0038] In a possible implementation of the second aspect, the first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
[0039] In a possible implementation manner of the second aspect, the first loss function is used to indicate the difference between a true order and a predicted order of the similarity between the first sample pair and the similarity between the second sample pair in ranking.
[0040] In a possible implementation manner of the second aspect, obtaining first address information after address hierarchy resolution includes:
[0041] Obtaining second address information to be matched;
[0042] Parsing the second address information to be matched according to the address level to obtain the parsed second address information;
[0043] The parsed second address information is corrected based on the name and code of the preset administrative division to obtain the corrected second address information;
[0044] The corrected second address information is completed based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
[0045] In a possible implementation manner of the second aspect, the parsed second address information is corrected based on the name and code of the preset administrative division to obtain the corrected second address information, including:
[0046] For each piece of address information included in the parsed second address information, determining whether the address information exists in a dictionary tree, and obtaining a determination result, the dictionary tree being constructed based on the name of a preset administrative division;
[0047] If the judgment result is yes, then determine whether the address information is unique in the dictionary tree;
[0048] If yes, then adding the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the corrected second address information;
[0049] If not, the parsed second address information is corrected according to the address information of the parent node or the child node of the address information to obtain the corrected second address information;
[0050] If the judgment result is no, the address information is modified to the default information.
[0051] In a possible implementation manner of the second aspect, completing the corrected second address information based on the address hierarchy to obtain the first address information parsed based on the address hierarchy includes:
[0052] Based on the hierarchical order of the address levels, the corrected second address information is hierarchically sorted to obtain hierarchically sorted second address information;
[0053] Determining whether the second address information after hierarchical sorting includes address information of each level;
[0054] If not, at least one missing level is screened out from the hierarchically sorted second address information, and the missing levels are completed according to the address information of at least one parent node corresponding to each missing level to obtain the first address information after address level resolution.
[0055] In a possible implementation manner of the second aspect, the address database includes a risky address database.
[0056] In the present application, the model training method can be used to implement the steps in various possible implementation methods of the first aspect. For the specific implementation methods of the second aspect of the embodiment of the present application and certain steps in the various possible implementation methods of the second aspect, as well as the beneficial effects brought about by each possible implementation method, you can refer to the description of the various possible implementation methods in the first aspect, and will not be repeated here one by one.
[0057] In a third aspect, the present application provides an address matching device, including:
[0058] An address information acquisition module, used to acquire first address information after address level resolution;
[0059] A feature information acquisition module, used to input the first address information into a first model to obtain first feature information, wherein the first model is trained based on a sample library after address hierarchical parsing;
[0060] The feature information acquisition module is also used to acquire the second feature information corresponding to each address information in the address database;
[0061] The address information matching module is used to calculate the similarity between the first characteristic information and the second characteristic information corresponding to each piece of address information in the address database to obtain an address matching result.
[0062] In a possible implementation of the third aspect, the first model is trained using a first loss function, where the first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
[0063] In a possible implementation of the third aspect, the first model is trained using a first loss function, and the first loss function is used to indicate the difference between the actual order and the predicted order of the similarity of the first sample pair and the similarity of the second sample pair in sorting.
[0064] In a possible implementation manner of the third aspect, the address information acquisition module is further used to:
[0065] Obtaining second address information to be matched;
[0066] Parsing the second address information to be matched according to the address level to obtain the parsed second address information;
[0067] The parsed second address information is corrected based on the name and code of the preset administrative division to obtain the corrected second address information;
[0068] The corrected second address information is completed based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
[0069] In a possible implementation manner of the third aspect, the address information acquisition module is further used to:
[0070] For each piece of address information included in the parsed second address information, determining whether the address information exists in a dictionary tree, and obtaining a determination result, the dictionary tree being constructed based on the name of a preset administrative division;
[0071] If the judgment result is yes, then determine whether the address information is unique in the dictionary tree;
[0072] If yes, then adding the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the corrected second address information;
[0073] If not, the parsed second address information is corrected according to the address information of the parent node or the child node of the address information to obtain the corrected second address information;
[0074] If the judgment result is no, the address information is modified to the default information.
[0075] In a possible implementation manner of the third aspect, the address information acquisition module is further used to:
[0076] Based on the hierarchical order of the address levels, the corrected second address information is hierarchically sorted to obtain hierarchically sorted second address information;
[0077] Determining whether the second address information after hierarchical sorting includes address information of each level;
[0078] If not, at least one missing level is screened out from the hierarchically sorted second address information, and the missing levels are completed according to the address information of at least one parent node corresponding to each missing level to obtain the first address information after address level resolution.
[0079] In a possible implementation manner of the third aspect, the address database includes a risky address database.
[0080] In the third aspect of the present application, the various modules included in the address matching device can also be used to implement the steps in the various possible implementation methods of the first aspect. For the specific implementation methods of the third aspect of the embodiment of the present application and the various possible implementation methods of the third aspect, as well as the beneficial effects brought about by each possible implementation method, you can refer to the description of the various possible implementation methods in the first aspect, and will not be repeated here one by one.
[0081] In a fourth aspect, the present application provides a model training device, the model training device is used to train a first model, the device comprising:
[0082] An address information acquisition module, used to acquire first address information after address level resolution;
[0083] A feature information acquisition module, used to input the first address information into a first model to obtain first feature information, wherein the first model is trained based on a sample library after address hierarchical parsing;
[0084] The feature information acquisition module is also used to acquire the second feature information corresponding to each address information in the address database;
[0085] An address information matching module, used to calculate similarity based on the first feature information and the second feature information corresponding to each piece of address information in the address database, to obtain an address matching result;
[0086] The first model training module is used to train the first model according to the first loss function until a preset condition is met to obtain the trained first model.
[0087] In a possible implementation of the fourth aspect, the first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
[0088] In a possible implementation manner of the fourth aspect, the first loss function is used to indicate the difference between a true order and a predicted order in ranking of the similarity of the first sample pair and the similarity of the second sample pair.
[0089] In a possible implementation manner of the fourth aspect, the address information acquisition module is further used to:
[0090] Obtaining second address information to be matched;
[0091] Parsing the second address information to be matched according to the address level to obtain the parsed second address information;
[0092] The parsed second address information is corrected based on the name and code of the preset administrative division to obtain the corrected second address information;
[0093] The corrected second address information is completed based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
[0094] In a possible implementation manner of the fourth aspect, the address information acquisition module is further used to:
[0095] For each piece of address information included in the parsed second address information, determining whether the address information exists in a dictionary tree, and obtaining a determination result, the dictionary tree being constructed based on the name of a preset administrative division;
[0096] If the judgment result is yes, then determine whether the address information is unique in the dictionary tree;
[0097] If yes, then adding the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the corrected second address information;
[0098] If not, the parsed second address information is corrected according to the address information of the parent node or the child node of the address information to obtain the corrected second address information;
[0099] If the judgment result is no, the address information is modified to the default information.
[0100] In a possible implementation manner of the fourth aspect, the address information acquisition module is further used to:
[0101] Based on the hierarchical order of the address levels, the corrected second address information is hierarchically sorted to obtain hierarchically sorted second address information;
[0102] Determining whether the second address information after hierarchical sorting includes address information of each level;
[0103] If not, at least one missing level is screened out from the hierarchically sorted second address information, and the missing levels are completed according to the address information of at least one parent node corresponding to each missing level to obtain the first address information after address level resolution.
[0104] In a possible implementation manner of the fourth aspect, the address database includes a risky address database.
[0105] In the fourth aspect of the present application, the modules included in the training device of the model can also be used to implement the steps in the various possible implementation methods of the second aspect. For the specific implementation methods of the fourth aspect of the embodiment of the present application and the various possible implementation methods of the fourth aspect, as well as the beneficial effects brought about by each possible implementation method, you can refer to the description of the various possible implementation methods in the second aspect, and will not be repeated here one by one.
[0106] In a fifth aspect, an embodiment of the present application provides an execution device, which may include a processor, the processor and a memory are coupled, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the address matching method of the first aspect is implemented. For the steps executed by the execution device in each possible implementation method of the processor executing the first aspect, please refer to the first aspect above for details, and no further description is given here.
[0107] In a sixth aspect, an embodiment of the present application provides a training device, which may include a processor, the processor and a memory are coupled, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the training method of the model of the second aspect described above is implemented. For the steps performed by the training device in each possible implementation method of the processor performing the second aspect, please refer to the second aspect for details, and no further description is given here.
[0108] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method of the above-mentioned first aspect or any possible implementation of the first aspect, or the computer executes the above-mentioned second aspect or any possible implementation of the second aspect.
[0109] In an eighth aspect, an embodiment of the present application provides a circuit system, which includes a processing circuit, and the processing circuit is configured to execute the method of the above-mentioned first aspect or any possible implementation of the first aspect, or the processing circuit is configured to execute the above-mentioned second aspect or any possible implementation of the second aspect.
[0110] In the ninth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method of the above-mentioned first aspect or any possible implementation of the first aspect, or enables the computer to execute the above-mentioned second aspect or any possible implementation of the second aspect.
[0111] In a tenth aspect, the present application provides a chip system, including a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method of the first aspect or any possible implementation of the first aspect, or to enable a computer to execute the method of the second aspect or any possible implementation of the second aspect. The chip system can be composed of a chip, or it can include a chip and other discrete devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0112] Figure 1 A schematic diagram of the structure of the artificial intelligence main framework applied in the embodiment of the present application;
[0113] Figure 2 A system architecture diagram provided for an embodiment of the present application;
[0114] Figure 3 A flowchart of an address matching method provided in an embodiment of the present application;
[0115] Figure 4 Another system architecture diagram provided for an embodiment of the present application;
[0116] Figure 5a A flowchart of the currently used address matching method is shown below;
[0117] Figure 5b A flowchart of the currently used address matching method is shown below;
[0118] Figure 5c A flowchart of the currently used address matching method is shown below;
[0119] Figure 6 Another flowchart of the address matching method provided in the embodiment of the present application;
[0120] Figure 7 A schematic diagram of a process for correcting second address information provided in an embodiment of the present application;
[0121] Figure 8 A schematic diagram of a process for completing the second address information provided in an embodiment of the present application;
[0122] Fig. 9 A structural schematic diagram of the first model currently used;
[0123] Fig.10 A structural schematic diagram of a first model provided in an embodiment of the present application;
[0124] Fig.11 A flowchart of a training method for a model provided in an embodiment of the present application;
[0125] Fig.12 A schematic diagram of a structure of a training method for a model provided in an embodiment of the present application;
[0126] Fig.13 A schematic diagram of a test set provided in an embodiment of the present application;
[0127] Fig.14 A schematic diagram of the structure of an address matching device provided in an embodiment of the present application;
[0128] Fig.15 A schematic diagram of a structure of a training device for a model provided in an embodiment of the present application;
[0129] Fig.16 A schematic diagram of the structure of an execution device provided in an embodiment of the present application;
[0130] Fig.17 A schematic diagram of the structure of a training device provided in an embodiment of the present application;
[0131] Fig.18 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0132] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0133] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices.
[0134] The term "and / or" in this application can be a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0135] It should also be noted that, in some alternative implementations, the functions / acts noted may occur out of the order of the drawings. For example, two figures shown in succession may in fact occur substantially simultaneously or may sometimes be performed in the reverse order, depending on the functions / acts involved.
[0136] In the embodiments of the present application, unless otherwise specified, the meaning of "at least one" refers to one or more, and the meaning of "plurality" refers to two or more. It is understood that in the present application, "when", "if" and "if" all refer to the device making corresponding processing under certain objective circumstances, and do not limit the time, nor do they require that there must be a judgment action when the device is implemented, nor do they mean that there are other limitations. In addition, the special word "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described as "exemplary" is not necessarily interpreted as being superior or better than other embodiments.
[0137] The address matching method provided in this application can be applied to the field of computer technology, especially the field of artificial intelligence (AI). AI is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robots, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.
[0138] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0139] First, the overall workflow of the artificial intelligence system is described. Figure 1 , Figure 1 This is a structural diagram of the artificial intelligence main framework applied in the embodiment of the present application. The above artificial intelligence theme framework is explained below from the two dimensions of "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis). Among them, the "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, the data undergoes a condensation process of "data-information-knowledge-wisdom". The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the industrial ecology process of the system.
[0140] (1) Infrastructure
[0141] The infrastructure provides computing power support for the artificial intelligence system, enables communication with the outside world, and is supported by the basic platform. It communicates with the outside world through sensors; computing power is provided by smart chips, such as central processing units (CPU), neural-network processing units (NPU), graphics processing units (GPU), application specific integrated circuits (ASIC) or field programmable gate arrays (FPGA) and other hardware acceleration chips; the basic platform includes distributed computing frameworks and networks and other related platform guarantees and support, which can include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.
[0142] (2) Data
[0143] The data on the upper layer of the infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, video, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.
[0144] (3) Data processing
[0145] Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.
[0146] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0147] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0148] Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.
[0149] (4) General ability
[0150] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as an algorithm or a general system, for example, translation, text analysis, computer vision processing (such as image recognition, target detection, etc.), speech recognition, etc.
[0151] (5) Smart products and industry applications
[0152] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical applications. Its application areas mainly include: smart manufacturing, smart transportation, smart home, smart medical care, smart security, autonomous driving, smart terminals, etc.
[0153] The embodiments of the present application involve a large number of neural network-related applications. In order to better understand the solutions of the embodiments of the present application, the relevant terms and concepts of the neural network that may be involved in the embodiments of the present application are first introduced below.
[0154] (1) Neural Network
[0155] A neural network can be composed of neural units. For example, a neural unit can be a unit with the form x. s The output of the operation unit can be shown as follows:
[0156]
[0157] Where, s = 1, 2, ... n, n is a natural number greater than 1, W s For x s , b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
[0158] (2) Deep Neural Networks
[0159] Deep Neural Network (DNN), also known as multi-layer neural network, can be understood as a neural network with many hidden layers. There is no special metric for "many" here. According to the position of different layers of DNN, the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer.
[0160] Although DNN looks complicated, the work of each layer is not complicated. In simple terms, it can be expressed as the following linear relationship: in, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer is just an input vector After such a simple operation, the output vector Since DNN has many layers, the coefficient W and the offset vector The number of these parameters is also very large. The definition of these parameters in DNN is as follows: Take the coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscripts correspond to the output third layer index 2 and the input second layer index 4. In summary, the coefficients from the kth neuron in the L-1th layer to the jth neuron in the Lth layer are defined as It should be noted that the input layer does not have a W parameter. In a deep neural network, more hidden layers allow the network to better describe complex situations in the real world. Theoretically, the more parameters a model has, the higher its complexity and the greater its "capacity", which means it can complete more complex learning tasks. Training a deep neural network is the process of learning the weight matrix, and its ultimate goal is to obtain the weight matrix of all layers of the trained deep neural network (the weight matrix formed by many layers of vector W).
[0161] (3) Loss function
[0162] In the process of training a neural network, because we hope that the output of the neural network is as close as possible to the value we really want to predict, we can compare the current network's predicted value with the target value we really want, and then update the weight matrix of each layer of the neural network according to the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the neural network). For example, if the network's predicted value is high, adjust the weight matrix to make it predict lower, and keep adjusting until the neural network can predict the target value we really want. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value", which is the loss function or objective function, which are important equations used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the neural network becomes a process of minimizing this loss as much as possible.
[0163] In the training process of the neural network, the back propagation (BP) algorithm can be used to correct the size of the parameters in the initial neural network model, so that the reconstruction error loss of the neural network model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the parameters in the initial neural network model are updated by back propagating the error loss information, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, which aims to obtain the optimal parameters of the neural network model, such as the weight matrix.
[0164] (4) Back propagation algorithm
[0165] The error back propagation (BP) algorithm can be used to correct the size of the parameters in the initial model during the training process, so that the error loss of the model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the parameters in the initial model are updated by back propagating the error loss information, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, aiming to obtain the optimal model parameters, such as the weight matrix.
[0166] (5) Matrix multiplication operation
[0167] Matrix multiplication is a binary operation that obtains a third matrix from two matrices. The third matrix is the product of the first two, and is often called a matrix product. Matrices can be used to represent linear mappings, and matrix products can be used to represent the composition of linear mappings.
[0168] (6) Points of Interest
[0169] In the geographic information system, a point of interest (POI) contains at least the following four basic information: name, type, longitude, and latitude. A POI can represent a house, a shop, a square, a community, a public toilet, a bus stop, etc.
[0170] The present application can be applied to various application scenarios using the address matching method provided by the present application. Specifically, as an example, for example, in various scenarios where address query and navigation, address identification (identification of risky addresses, etc.), identification of express addresses, etc. are required. The application scenarios of the embodiments of the present application are not exhaustively listed here.
[0171] Before introducing the address matching method provided in the embodiment of the present application in detail, Figure 2 The system architecture provided in the embodiments of the present application is introduced.
[0172] See also Figure 2 , Figure 2 A system architecture diagram provided for an embodiment of the present application. Figure 2 In the illustrated embodiment, the system architecture 200 includes a database 230 and a client device 240. The data collection device 260 is used to collect data and store it in the database 230. The training module 202 generates a target model / rule 201 based on the data maintained in the database 230. The following will describe in more detail how the training module 202 obtains the target model / rule 201 based on the data. The target model / rule 201 is the target model mentioned in the following embodiments of the present application. For details, refer to the following Figure 6-Figure 15 Related description in .
[0173] The calculation module 211 may include a training module 202. The target model / rule 201 obtained by the training module 202 may be applied to different systems or devices. Figure 2 In the embodiment, the execution device 210 is configured with a transceiver 212, which may be a wireless transceiver, an optical transceiver or a wired interface (such as an I / O interface), etc., to interact with external devices. A "user" may input data to the transceiver 212 through a client device 240. For example, the client device 240 may send a target task to the execution device 210, request the execution device to train a neural network, and send a database for training to the execution device 210.
[0174] The execution device 210 can call data, codes, etc. in the data storage system 250 , and can also store data, instructions, etc. in the data storage system 250 .
[0175] The calculation module 211 processes the input data using the target model / rule 201. Specifically, in a possible implementation, please refer to Figure 3 , Figure 3 A flowchart of an address matching method provided in an embodiment of the present application is shown in FIG. Figure 2 The execution device 210 shown in the figure is executed, specifically, it is executed by the calculation module 211. The calculation module 211 is used to: S1, obtain the first address information after the address level resolution; S2, input the first address information into the first model to obtain the first feature information, wherein the first model is trained based on the sample library after the address level resolution; S3, obtain the second feature information corresponding to each address information in the address library; S4, perform similarity calculation based on the first feature information and the second feature information corresponding to each address information in the address library to obtain the address matching result.
[0176] Finally, the transceiver 212 returns the output result of the target model to the client device 240. For example, the user can input the first address information to be matched through the client device 240, and the target model outputs the feature information corresponding to the first address information. Then, the address matching result with the first address information is obtained through the calculation module 211 and fed back to the client device 240.
[0177] More deeply, the training module 202 can obtain corresponding target models / rules 201 for different tasks based on different data to provide users with better results.
[0178] In the attached Figure 2 In the case shown in , the data input into the execution device 210 can be determined based on the user's input data. For example, the user can operate in the interface provided by the transceiver 212. In another case, the client device 240 can automatically input data into the transceiver 212 and obtain the result. If the client device 240 automatically inputs data and needs to obtain the user's authorization, the user can set the corresponding authority in the client device 240. The user can view the results output by the execution device 210 on the client device 240, and the specific presentation form can be specific methods such as interface display and information output. The client device 240 can also serve as a data collection terminal to store the collected data associated with the target task into the database 230.
[0179] The training or updating process mentioned in the present application can be performed by the training module 202. It is understandable that the training process of the neural network is to learn the way to control the spatial transformation, more specifically, to learn the weight matrix. The purpose of training the neural network is to make the output of the neural network as close to the expected value as possible. Therefore, the weight vector of each layer of the neural network in the neural network can be updated according to the difference between the predicted value and the expected value of the current network (of course, the weight vector can usually be initialized before the first update, that is, the parameters of each layer in the deep neural network are pre-configured). For example, if the predicted value of the network is too high, the value of the weight in the weight matrix is adjusted to reduce the predicted value, and after continuous adjustment, the value output by the neural network is close to or equal to the expected value. Specifically, the difference between the predicted value and the expected value of the neural network can be measured by a loss function or an objective function. Taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference. The training of the neural network can be understood as the process of minimizing the loss as much as possible. The process of updating the weight of the starting network and training the serial network in the following embodiments of the present application can refer to this process, which will not be repeated below.
[0180] like Figure 2 As shown, the target model / rule 201 is obtained by training according to the training module 202. The target model / rule 201 may include deep convolutional neural networks (DCNN), recurrent neural networks (RNNS) and the like in the embodiment of the present application. The neural network mentioned in the present application may include various types, such as deep neural network (DNN), convolutional neural network (CNN), recurrent neural network (RNN) or residual network other neural networks.
[0181] In the training phase, the database 230 can be used to store sample sets for training. The execution device 210 generates a target model / rule 201 for processing samples, and iteratively trains the target model / rule 201 using the sample set in the database to obtain a mature target model / rule 201, which is specifically represented by a neural network. The neural network obtained by the execution device 210 can be applied to different systems or devices.
[0182] In the inference stage, the execution device 210 can call the data, code, etc. in the data storage system 250, or store the data, instructions, etc. in the data storage system 250. The data storage system 250 can be placed in the execution device 210, or the data storage system 250 can be an external memory relative to the execution device 210. The calculation module 211 can process the samples obtained by the execution device 210 through the neural network to obtain the prediction result. The specific expression form of the prediction result is related to the function of the neural network.
[0183] It should be noted that the attached Figure 2 This is only an exemplary schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. Figure 2 In the embodiment, the data storage system 250 is an external memory relative to the execution device 210. In other scenarios, the data storage system 250 may also be placed in the execution device 210.
[0184] The target model / rule 201 trained by the training module 202 can be applied to different systems or devices, such as mobile phones, tablet computers, laptops, augmented reality (AR) / virtual reality (VR), vehicle terminals, etc., and can also be servers or cloud devices.
[0185] The target model / rule 201 in the embodiment of the present application may be a model for executing the address matching method provided in the present application, that is, the target model / rule 201 may be a neural network provided in the present application for generating feature information corresponding to address information. Specifically, the target model provided in the embodiment of the present application may include one or more networks such as CNN, deep convolutional neural networks (DCNN), recurrent neural networks (RNN), etc.
[0186] See also Figure 4 , Figure 4 Another system architecture diagram provided for an embodiment of the present application. In system architecture 400, execution device 210 is implemented by one or more servers, and optionally cooperates with other computing devices, such as data storage, routers, load balancers, etc.; execution device 210 can be arranged at one physical site, or distributed at multiple physical sites. Execution device 210 can use data in data storage system 250, or call program code in data storage system 250 to implement the following of the present application. Fig.11 Corresponding steps of a training method for a computing device.
[0187] Users can operate their respective user devices (e.g., local device 401 and local device 402) to interact with execution device 210. Each local device can represent any computing device, such as a personal computer, a computer workstation, a smart phone, a tablet computer, a smart camera, a smart car or other type of cellular phone, a media consumption device, a wearable device, a set-top box, a game console, etc.
[0188] The local device of each user can interact with the execution device 210 through a communication network of any communication mechanism / communication standard, and the communication network can be a wide area network, a local area network, a point-to-point connection, or any combination thereof. Specifically, the communication network may include a wireless network, a wired network, or a combination of a wireless network and a wired network. The wireless network includes, but is not limited to: a fifth generation mobile communication technology (5th-Generation, 5G) system, a long term evolution (long termevolution, LTE) system, a global system for mobile communication (global system for mobile communication, GSM) or a code division multiple access (code division multiple access, CDMA) network, a wideband code division multiple access (wideband code division multiple access, WCDMA) network, wireless fidelity (wireless fidelity, WiFi), Bluetooth (bluetooth), Zigbee protocol (Zigbee), radio frequency identification technology (radio frequency identification, RFID), long range (Lora) wireless communication, near field communication (near field communication, NFC) in any one or more combinations. The wired network may include a fiber optic communication network or a network composed of a coaxial cable, etc.
[0189] In another implementation, one or more aspects of the execution device 210 may be implemented by each local device, for example, the local device 401 may provide local data or feedback calculation results to the execution device 210. The local device may also be referred to as a computing device.
[0190] It should be noted that all functions of the execution device 210 can also be implemented by the local device. For example, the local device 401 implements the functions of the execution device 210 and provides services to its own user, or provides services to the user of the local device 402.
[0191] The application scenarios of address matching technology are very wide, and address matching technology can be seen in the fields of navigation, logistics, and financial risk control. In order to better understand the technical solution provided by the embodiment of the present application, the currently used address matching method is first introduced below.
[0192] (1) Method 1
[0193] See also Figure 5a , Figure 5a A flowchart of a currently used address matching method is shown, including the following steps 501a to 505a.
[0194] Step 501a, the execution device obtains data and cleans the text addresses contained in the data.
[0195] Step 502a, the execution device standardizes the cleaned text address to obtain a standardized address.
[0196] Step 503a, the execution device performs similarity calculation between the standardized address and the official address in the address database, and outputs the official address with the highest similarity. The similarity calculation method includes a string similarity calculation method and a semantic similarity calculation method.
[0197] Step 504a: The execution device obtains the latitude and longitude information corresponding to the official address with the highest similarity based on the geographic information system.
[0198] Step 505a, repeatedly executing steps 501a to 504aa, until the longitude and latitude information corresponding to the two text addresses are obtained, and the two longitude and latitude information are measured and matched in terms of physical space distance.
[0199] It is understandable that address matching technology requires address element parsing and standardization, and mapping with the huge address database in the GIS system through address similarity calculation, converting the standard text address into longitude and latitude coordinates, and completing the measurement and matching of physical space distance.
[0200] However, this method has the following disadvantages:
[0201] a) The string similarity calculation method used in this method is mainly to match or measure the similarity between two strings. However, when matching text with voice information based on string similarity, the text can only be hard matched as a character without semantics, which can easily cause wrong-level matching at the address level and have a greater impact on the similarity calculation results.
[0202] b) The semantic similarity calculation method adopted by this method mainly measures the similarity between texts or documents based on semantic meaning rather than symbol matching, using corpus-based and knowledge-based methods. Among them, the corpus-based method involves learning the similarity between words and sentences using information obtained from the corpus, and the knowledge-based similarity learns the similarity between words by using information derived from the semantic network.
[0203] This method can learn the similarity between texts based on model training. However, during the training process, the model is difficult to learn. It not only needs to learn the semantic similarity between texts, but also needs to learn the address level parsing, the weight distribution of texts at different address levels, etc., which makes the model training difficult and the accuracy low. In addition, due to the difficulty of model training, the semantic similarity calculation method needs to rely on a large amount of text prediction to complete the model training.
[0204] (2) Method 2
[0205] See also Figure 5b , Figure 5b A flowchart of a currently used address matching method is shown, including the following steps 501b to 502b.
[0206] Step 501b: The execution device obtains a first vector corresponding to the first address and a second vector corresponding to the second address, wherein each address includes at least one binary sequence extracted from the corresponding address.
[0207] Step 502b, the execution device performs weighting according to the position of the binary sequence in the address to calculate the similarity between the first vector and the second vector, wherein when performing weighting, the weight of the first binary sequence in the address is higher than the weight of the later binary sequence in the address.
[0208] This method mainly calculates similarity based on binary sequences to improve the accuracy of address similarity matching. However, this method mainly calculates similarity based on binary sequences and lacks the participation of a supervision model, resulting in poor results.
[0209] (3) Method 3
[0210] See also Figure 5c , Figure 5c A flowchart of a currently used address matching method is shown, including the following steps 501c to 505c.
[0211] Step 501c: The execution device obtains address information to be matched.
[0212] Step 502c: The execution device divides the address information into nine levels of address structure.
[0213] Step 503c: The execution device determines the longitude and latitude corresponding to the first seven levels of addresses obtained by the division.
[0214] Step 504c: the execution device performs address matching on the first seven levels of addresses according to the determined longitude and latitude.
[0215] Step 505c: The execution device performs address matching on the latter two levels of addresses according to the names of the latter two levels of addresses obtained through division.
[0216] Step 506c: The execution device determines an address that matches the address information based on the addresses that match the first seven levels of addresses and the addresses that match the last two levels of addresses.
[0217] This method matches the first seven levels of address information to be matched by longitude and latitude, and matches the last two levels of address information to be matched by name, which can improve the efficiency of address matching. However, this method relies on the GIS system to complete the address matching, and cannot be pluggable. Once the GIS system is not coordinated, it will not work. In addition, this method only uses 9 levels of address hierarchy to parse the address information, and the degree of precision is low.
[0218] In order to solve the above problems, the embodiment of the present application provides an address matching method. The following describes the specific implementation process of the reasoning phase and the training phase of the address matching method provided in the embodiment of the present application in combination with the accompanying drawings and application scenarios.
[0219] 1. Reasoning Stage
[0220] In the embodiment of the present application, the inference stage describes how the execution device 210 uses the target model / rule 201 to process the collected information data to generate a prediction result. For details, please refer to Figure 6 , Figure 6 Another flowchart diagram of the address matching method provided in an embodiment of the present application, the method can be completed by a target model, and the method can be implemented by a target model, including steps 601 to 607.
[0221] Step 601: The execution device obtains second address information to be matched.
[0222] In the embodiment of the present application, the execution device may obtain the second address information to be matched in a variety of ways. For example, in the address query scenario, the execution device may obtain the second address information to be queried input by the user.
[0223] It is understandable that, in actual application, the execution device may obtain the second address information in a variety of ways to be applicable to a variety of application scenarios, which is only used as an example and is not limited here.
[0224] Step 602: The execution device parses the second address information to be matched based on the address level to obtain the parsed second address information.
[0225] In the embodiment of the present application, after acquiring the second address information to be matched, the execution device parses the second address information to be matched based on the address hierarchy, so that the address information input to the first model adopts the structure of the address hierarchy, avoiding the need for the first model to actively learn the address information using the address hierarchy during execution, thereby improving the recognition accuracy of the first model for the address information. The second address information obtained by the execution device after parsing only includes the address text information and the corresponding label.
[0226] In an optional implementation, the execution device parses the input second address information to be matched based on a model constructed at the address level, and outputs the parsed second address information.
[0227] In this implementation, the execution device may construct an address resolution model based on a multi-level address hierarchy to convert input address text information into address text information and corresponding label information.
[0228] Optionally, the address resolution model may adopt models such as CRF++, Bert+GlobalPointer, and Bert+CRF.
[0229] It is understandable that in actual application, a suitable address resolution model may be selected according to actual needs to resolve the input address information. This is only an example and is not intended to be limiting.
[0230] In an optional implementation, the execution device may parse the second address information to be matched based on a 16-level address hierarchy.
[0231] Compared to Figure 5c The method described above uses only 9 levels of address hierarchy to parse the address information, which is a method with a low level of precision. In this implementation, after obtaining the second address information to be matched, the execution device parses the second address information based on the 16-level address hierarchy, achieving a more refined design at the address hierarchy.
[0232] Exemplarily, the label content of each level included in the address level may be specifically shown in the following Table 1.
[0233] Label Interpretation PROVINCE(PROV) Province CTI city DISTRICT district DEVZONE Economic Zone TOWN town COMMUNITY Community ROAD street ROADNO Street Number POI Square / community, etc. HOUSENO House Number CELLNO Building No. FLOORNO floor ROMMNO Room Number ASSIST Auxiliary Information REDUNDANT Redundant Information OTHERINFO Additional Information
[0234] Table 1
[0235] The auxiliary information mainly includes information such as 500m to the east, and the redundant information mainly includes information such as punctuation marks, such as the “-” in unit 4-501.
[0236] Corresponding to the actual address information, for example, it can be specifically shown in the following Table 2.
[0237] address Label address Label Zhejiang PROV Zhejiang PROV River PROV River PROV Province PROV Province PROV Hangzhou CTI - REDUNDANT state CTI lake CTI city CTI state CTI coast DISTRICT - REDUNDANT River DISTRICT install DISTRICT district DISTRICT lucky DISTRICT Colorful POI Deliver TOWN Many POI shop TOWN north POI town TOWN Garden POI Nine POI # HOUSENO state POI - REDUNDANT Chang POI # CELLNO large POI - REDUNDANT wide POI # ROMMNO field POI # HOUSENO Dong HOUSENO # CELLNO Number CELLNO
[0238] Table 2
[0239] As shown in Table 2, considering the sensitivity of specific address information, the specific numbers or numbers corresponding to the house number (HOUSENO), house number (CELLNO), house number (ROMMNO), etc. are set to the special symbol "#", among which the specific forms of the numbers or special symbols can be customized. This is only for illustration and not limitation.
[0240] It is understandable that the specific number of levels used in the address hierarchy and the label content of each level can be set according to actual needs. This is only for example and not limited. In addition, optionally, the embodiment of the present application can also use a higher level of address hierarchy to parse the address information, such as 21, 22, etc. It should be understood that the higher the level of the address hierarchy, the better. The higher the level, the lower the robustness. The level of the address hierarchy can be set according to actual needs.
[0241] Step 603: The execution device corrects the parsed second address information based on the name and code of the preset administrative division to obtain corrected second address information.
[0242] In an embodiment of the present application, after the execution device parses the second address information based on the address level, it can further modify the parsed second address information based on the name and code of the preset administrative division. The main purpose of the modification is to modify the address text information in the parsed second address information to the standard name corresponding to the preset administrative division and add the corresponding code. Therefore, the main content of the modified second address information includes the address text information before modification, the standard address text information corresponding to the preset administrative division, the code and the label.
[0243] It should be noted that, since the current standard administrative divisions can only be refined to the first n levels, for the subsequent levels, the embodiments of the present application use pre-set labels to distinguish. Therefore, the preset administrative divisions can use the names and codes of the standard administrative divisions in the first n levels as shown in Table 1, and the subsequent levels use the pre-set levels and codes. It is understandable that the embodiments of the present application can further refine the address information and improve the accuracy of address resolution and matching by adopting multi-level administrative divisions. In addition, it should be understood that in actual applications, labels, names and codes of preset administrative divisions are all used to distinguish address information at different address levels, and can be in a variety of forms, which are not limited here.
[0244] In an optional implementation, the execution device modifies the parsed second address information based on the name and code of the preset administrative division, and the method for obtaining the modified second address information specifically includes:
[0245] The execution device determines, for each piece of address information included in the parsed second address information, whether the address information exists in a dictionary tree, and obtains a determination result, wherein the dictionary tree is formed based on the name of a preset administrative division;
[0246] If the judgment result is yes, the execution device judges whether the address information is unique in the dictionary tree;
[0247] If yes, the execution device adds the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the corrected second address information;
[0248] If not, the execution device modifies the parsed second address information according to the address information of the parent node or the child node of the address information to obtain the modified second address information;
[0249] If the judgment result is no, the execution device modifies the address information to the default information.
[0250] In this implementation, the execution device constructs a dictionary tree based on the name of the preset administrative division, and verifies each address information contained in the second address information after parsing in the form of a tree. For each address information contained in the second address information after parsing, if the information is matched in the dictionary tree, there may be a phenomenon of duplicate names due to address names in different provinces. For example, assuming that the address information is "Xi'an", it may correspond to Xi'an City or Xi'an District. Therefore, the execution device needs to further determine whether the information is unique. If it is unique, the execution device directly adds the information to the second address information to obtain the standard name corresponding to the address information in the preset administrative division. If it is not unique, the execution device needs to verify the information of its parent node or child node to determine the specific level corresponding to the address information. For example, if the parent node of "Xi'an" corresponds to "Shaanxi" or "Shaanxi Province", the corresponding standard name can be determined to be "Xi'an City", and if the parent node of "Xi'an" corresponds to "Mudanjiang" or "Mudanjiang City", the corresponding standard name can be determined to be "Xi'an District".
[0251] For example, see Figure 7 , Figure 7 A schematic diagram of a process for correcting the second address information provided in an embodiment of the present application. Figure 7 As shown, for each address information in the parsed second address information, the execution device can obtain the modified second address information by including steps 701 to 707.
[0252] Step 701, the execution device inputs address information.
[0253] Step 702: The execution device determines whether the address information belongs to specific tag information. If yes, step 703 is executed. If no, the execution device adds default information to the parsed second address information.
[0254] In this step, in a specific implementation, the specific tag information includes the address information of the first n levels in the address hierarchy. It can be understood that step 702 is an optional step. In actual application, it can be set to only modify the address information of the first n levels in the address hierarchy. The size of n can be set according to actual needs.
[0255] Step 703, the execution device determines whether the address information exists in the dictionary tree. If yes, step 704 is executed. If not, the execution device modifies the address information to the default information.
[0256] Step 704: The execution device determines whether the address information is unique in the dictionary tree. If yes, step 705 is executed. If no, step 706 is executed.
[0257] Step 705: The execution device adds the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the corrected second address information.
[0258] Step 706, the execution device determines whether the parent node or child node of the address information in the dictionary tree meets the first condition. If yes, execute step 707. If not, the execution device modifies the address information according to the default rule.
[0259] In this step, when the execution device determines that the address information is not unique in the dictionary tree, the execution device verifies the information of the parent node or child node of each address information. For example, assuming that there are two nodes in the dictionary tree that are both "Xi'an", the standard name corresponding to the node is determined by verifying its parent node or child node. If the execution device determines that there is no match, the address information is corrected according to the default rule.
[0260] Step 707: The execution device modifies the address information according to the matching result of the parent node or the child node of the address information in the dictionary tree to obtain the modified address information.
[0261] Exemplarily, assuming that the input address information is "Xi'an", the execution device verifies that the node of "Xi'an" in the dictionary tree is not unique. At this time, the execution device can verify the parent node or child node of the node. If the execution device verifies that the parent node is "Shaanxi Province", it can be confirmed that the standard name corresponding to the address information in the preset administrative division is "Xi'an City", and the code corresponding to "Xi'an City" is obtained, and the standard name and code are added to the corrected second address information. If the execution device verifies that the parent node is "Mudanjiang City", it can be confirmed that the standard name corresponding to the address information in the preset administrative division is "Xi'an District", and the code corresponding to "Xi'an District" is obtained, and the standard name and code are added to the corrected second address information. In addition, there is also a situation where if the parent nodes corresponding to "Xi'an" are missing, you can further trace back and select the parent node of the next level for verification, or you can also select the child node of the node for verification. If the child node is true, you can select the next level of the child node for further judgment. The specific operation method can be set according to actual needs to ensure that the specific address information corresponding to the node can be determined by checking the child node or parent node of the node, and is not limited here.
[0262] Optionally, the default rule may be to complete the address information according to the address information with the highest search probability, or to complete the address information by selecting the name and code corresponding to the last index of all identical address information in the dictionary tree according to the index.
[0263] The embodiment of the present application constructs a dictionary tree and adopts prefix matching and other methods to match each level or each address information. Specifically, assuming that the input address information is "Shenzhen", the execution device can first match the associated tree through "Shen", and assuming that it matches "Shenzhen" and "Zhou", etc., then "Shenzhen" can be matched to the branch of "Shenzhen", and the branch of "Zhou" is not considered to match the corresponding node. It should be understood that in actual application, the method of completing the corrected second address information can be set according to actual needs. This is only one example method and is not limited.
[0264] Step 604: The execution device completes the corrected second address information based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
[0265] In the embodiment of the present application, after the execution device corrects the parsed second address information based on the name and code of the preset administrative division and obtains the corrected second address information, the execution device further verifies the integrity of the corrected second address information at the address level based on the information of each level in the address level. If the execution device verifies that the address information of a certain address level is missing, the address information of the level needs to be corrected, and the missing address information is filled into the missing address level.
[0266] In an optional implementation, for example, see Figure 8 , Figure 8 A schematic diagram of a process for completing the second address information provided in an embodiment of the present application. Figure 8 As shown, the execution device can obtain the first address information after resolution based on the address hierarchy by including steps 801 to 803.
[0267] Step 801: The execution device hierarchically sorts the corrected second address information based on the hierarchical order of the address levels to obtain hierarchically sorted second address information.
[0268] Step 802: The execution device determines whether the second address information after hierarchical sorting contains address information of each level. If yes, the current hierarchical state is maintained. If no, step 803 is executed.
[0269] Step 803, the execution device selects at least one missing level from the hierarchically sorted address information, and traces the address information of each level upward, returns to step 802, and completes the address information according to the information of the parent node of each address information.
[0270] Among them, when the execution device traces upward to obtain the parent node information of the address information, if the information of the parent node still cannot meet the complete address hierarchy such as province, city, district / county, township / town, etc., the execution device can trace back again based on the parent node of the address information to obtain the information of the previous node of the parent node.
[0271] It should be noted that, in the absence of valid address information, the deeper the traceback is, the higher the probability of mismatching the execution device is. Therefore, in the embodiment of the present application, the deepest traceback is two levels. It should be understood that in actual application, the number of levels of traceback can be set according to actual needs, and it is not limited here.
[0272] In an optional implementation, after executing step 803, the execution device may further perform a secondary check based on the completed address information at each level to eliminate redundant nodes.
[0273] In this implementation, if there is too much missing address information in the corrected second address, the execution device cannot determine the unique address information, and there may be a situation where the same city corresponds to two provinces. Optionally, the execution device can choose to use the last address information in the index order as the missing address information. Alternatively, the execution device can filter out more suitable information based on the pre-statistical information and the actual scenario. For example, assuming that in the scenario of identifying risky addresses, the address information with the highest frequency of risky addresses in the candidate address information can be used as the missing address information.
[0274] In an optional implementation, the upward tracing of the execution device is verified based on the encoding.
[0275] In this implementation method, for each level of address information, the execution device obtains the encoding information of the address information, and then determines the encoding information of the previous level or parent node of the address information based on the encoding information, and completes the standard name of the missing parent node's address information based on the encoding information.
[0276] It is understandable that the code of each address information in the preset administrative division is unique. In the case where the name of the address information is the same, the execution device can identify the unique address information through the code. For example, Nanshan District, if it corresponds to Shenzhen City, its code is 440305, and if it corresponds to Hegang City, its code is 230404. The two Nanshan Districts represent completely different areas in terms of address.
[0277] Exemplarily, assuming that the second address information to be matched is "West Gate, West District, Lizhiyuan Apartment, Yangmei Road, Bantian Street, Shenzhen, Guangdong Province", the parsed second address information obtained after the execution device performs parsing based on the address hierarchy can be shown in Table 3 below. The parsed second address information is corrected based on the name and code of the preset administrative division, and the corrected second address information obtained can be shown in Table 4 below. The corrected second address information is completed based on the address hierarchy, and the first address information parsed based on the address hierarchy can be shown in Table 5 below.
[0278] Address Information Label Guangdong Province PROV Shenzhen CITY Bantian Street TOWN Yangmei Road ROAD Lizhiyuan Apartment West District West Gate POI
[0279] Table 3
[0280] Address Information Standard address information coding Label Guangdong Province Guangdong Province 44 PROV Shenzhen Shenzhen 4403 CITY Bantian Street Bantian Street 440307013 TOWN Yangmei Road NONE NONE ROAD Lizhiyuan Apartment West District West Gate NONE NONE POI
[0281] Table 4
[0282] Address Information Standard address information coding Label Guangdong Province Guangdong Province 44 PROV Shenzhen Shenzhen 4403 CITY Longgang District Longgang District 440307 DISTRICT Bantian Street Bantian Street 440307013 TOWN Yangmei Road NONE NONE ROAD Lizhiyuan Apartment West District West Gate NONE NONE POI
[0283] Table 5
[0284] Step 605: The execution device inputs the first address information into the first model to obtain first feature information.
[0285] In the embodiment of the present application, after the execution device parses, corrects and completes the second address information to be matched and obtains the first address information, it inputs the first address information after address level parsing into the first model and outputs the first feature information. The first model is obtained by training the sample library after address level parsing.
[0286] In an optional implementation, the first model adopts a pre-trained model.
[0287] In this implementation, the first model may use a pre-training model (Pre-Training Model, PTM) to obtain the first feature information, such as MacBERT, Mengzi, Roformer_Chinese_Sim, generative pre-training (generative Pre-Training, GPT) and other models.
[0288] Exemplarily, the specific structure of the first model is described below.
[0289] First, we will introduce the currently commonly used models. Fig. 9 , Fig. 9 This is a structural diagram of the first model currently used. Fig. 9 In general, two or more addresses are input into the first model at the same time, and the corresponding feature vectors are input. Fig.10 , Fig.10A schematic diagram of the structure of the first model provided in the embodiment of the present application. Fig.10 In the first model, a single piece of first address information is input into the first model respectively to obtain corresponding first feature information.
[0290] Compared with inputting two pieces of address information into the first model at the same time, the first model is more difficult to learn. However, considering the needs of online deployment, inputting a single piece of address information into the first model can obtain the first feature information corresponding to the single piece of address information, so as to facilitate the subsequent calculation of address similarity directly based on the converted historical feature information. If the method of inputting two or more addresses at the same time is adopted, the corresponding feature information can only be directly obtained when two or more addresses are input at the same time. Otherwise, each time it needs to be re-input into the first model to re-output the corresponding first feature information, thereby increasing the delay of online operation.
[0291] Step 606: The execution device obtains second characteristic information corresponding to each piece of address information in the address database.
[0292] In the embodiment of the present application, the execution device obtains the second feature information corresponding to each address information in the address library, and calculates the similarity with the first feature information corresponding to the second address information to be matched to obtain the address matching result.
[0293] In an optional implementation, the execution device inputs each piece of address information in the address library into the first model to obtain the second feature information corresponding to each piece of address information.
[0294] In this implementation, the execution device outputs features of each address in the address library through the first model in advance.
[0295] It can be understood that each piece of address information in the address database is standardized based on the address level. The execution device converts each piece of address information in the address database in the offline stage, so as to directly calculate the similarity between the first feature information and each piece of address information in the address database in the online stage.
[0296] In addition, it is understandable that there is no requirement for the execution order of step 606 and steps 601 to 605.
[0297] Step 607: The execution device performs similarity calculation based on the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result.
[0298] In the embodiment of the present application, the execution device calculates the similarity between the first feature information and the second feature information corresponding to each address information in the address library to obtain an address matching result. The specific form of the address matching result can be set in combination with a specific application scenario. For example, in an address query scenario, the address matching result can be the address information most similar to the input second address information, or the ranking result of the similarity of n pieces of address information similar to the input second address information. The specific form can be set according to actual needs and is not limited here.
[0299] Corresponding to the actual application scenario, in order to adapt to the needs of online deployment, assuming that an address query is to be performed, the execution device obtains the second address information, and then obtains the first address information through parsing, correction and completion, and then inputs the first address information into the first model to obtain the first feature information, and performs similarity calculation with the matrix information corresponding to the address library generated in the offline stage to obtain the address matching result.
[0300] It should be understood that in the offline stage, the execution device calls the address level parsing model to perform hierarchical parsing on the addresses in the address library, and parses the address information consisting of provinces, cities, districts / counties, townships / towns / streets, etc. according to the address level, and then inputs the information parsed based on the address level into the first model to obtain the feature information corresponding to each address information in the address library. In the online stage, the execution device parses the address where the current transaction occurs based on the address level to obtain the parsed information, and then obtains the most similar address information from the address library. Then, the execution device inputs the parsed information into the first model, outputs the feature vector, and performs similarity calculations with the feature vectors corresponding to the several address information obtained from the address library, and outputs the address matching result.
[0301] In an optional implementation, after the execution device obtains the similarity using the feature vector output by the first model, the execution device may adjust the matching result of the similarity using a preset rule.
[0302] In this implementation, in order to improve the accuracy of similarity between address information, in a specific scenario, the execution device can use preset rules to adjust the matching results of similarity. For example, when calculating the similarity between two address information and another address information, if the two address information correspond to the same building or community, the calculated result may be that both address information have a high similarity with the other address information. At this time, the execution device can make fine adjustments based on the distance of the house number, and further identify the address information with a higher similarity based on the distance between the two address information and the other address information in terms of the building number and the room number.
[0303] 2. Training Phase
[0304] In the embodiment of the present application, the training phase describes the process of how the training module 202 generates a mature neural network using the data set in the database 230. For details, please refer to Fig.11 , Fig.11 A flow chart of a model training method provided in an embodiment of the present application. The model training method provided in an embodiment of the present application may include:
[0305] Step 1101: The training device obtains second address information to be matched.
[0306] In the embodiment of the present application, the training device obtains a data set of the second address information to be matched, divides the data set into a training set, a validation set, and a test set, trains the first model with the training set, adjusts the parameters with the validation set, and evaluates the performance with the test set. The data division ratio of the training set, validation set, and test set can be set according to actual needs and is not limited here.
[0307] In an optional implementation, the training device may obtain the data set of the second address to be matched in the following manner:
[0308] S1. The training device obtains a standard address library, a preset address library, and a fraudulent address library.
[0309] Specifically, the standard address library is based on preset administrative divisions, including information such as the standard names of national administrative divisions. The preset address library is address information obtained based on historical information and actual applications, such as transaction addresses of shopping malls, information on synonyms, etc. The fraud address library is an address library based on risky addresses, such as addresses where fraudulent transactions have occurred, such as stolen credit cards and delivery addresses.
[0310] S2. The training device uses the address information in the preset address library as seed information to crawl and obtain the expected text information rich in addresses.
[0311] S3. The training device mines address aliases based on the standard address library, the preset address library, the fraudulent address library, and the crawled address-rich text expected information, and builds an address alias library.
[0312] Specifically, the training device mines address aliases from address-rich text corpus according to certain rules and quickly builds an address alias library. For example, Baicao Garden and Single Apartment often have overlapping points in address, so it can be determined that the two addresses are likely to be very close in space. By mining explicit addresses, for example, if the name of an official address is followed by brackets, it can be determined with a high probability that the content in the brackets is the alias of the official address. Assuming Single Apartment (Baicao Garden), it can be known that "Single Apartment" and "Baicao Garden" are equivalent POIs (the same real address).
[0313] S4. The training device trains the first model based on the standard address library, the preset address library, the fraudulent address library, the crawled expected text information rich in addresses, and the address alias library.
[0314] Specifically, the training device uses the text corpus to fine-tune the first model (eg, a BERT series derivative model) so that the first model can learn rich address semantic information.
[0315] Among them, when the training device trains the first model based on text prediction, some special methods can be used. For example, part of the information in the address information is covered, and the specific information covered is predicted through the context information. Assuming that the information of Longgang District and Bantian Street is identified from the context, it can be confirmed that the address information corresponds to Bantian Street with a high probability, so as to enhance the first model's learning ability for address information. In addition, for the specific building number, room number and other numbers corresponding to the address hierarchy, since sensitive information is involved, they can be replaced with special symbols or numbers in actual applications. When the training device is trained based on the address library, for the same number, the same symbol is filled in to represent the same meaning, so as to achieve the training effect.
[0316] In the embodiment of the present application, the specific implementation method of the training device executing step 1101 can be referred to in Figure 6 The description of the specific implementation method of step 601 in the corresponding embodiment is not repeated here.
[0317] Step 1102: The training device parses the second address information to be matched based on the address level to obtain the parsed second address information.
[0318] Step 1103: The training device corrects the parsed second address information based on the name and code of the preset administrative division to obtain corrected second address information.
[0319] Step 1104: the training device execution device completes the corrected second address information based on the address hierarchy to obtain the first address information after parsing based on the address hierarchy.
[0320] Step 1105: The training device inputs the first address information into the first model to obtain first feature information.
[0321] Step 1106: The training device obtains second feature information corresponding to each piece of address information in the address database.
[0322] Step 1107: The training device calculates similarity based on the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result.
[0323] In the embodiment of the present application, the specific implementation method of the training device executing steps 1102 to 1107 can be referred to Figure 6 The description of the specific implementation method of steps 602 to 607 in the corresponding embodiment is not repeated here.
[0324] Step 1108: The training device trains the first model according to the first loss function until a preset condition is met, thereby obtaining a trained first model.
[0325] In the embodiment of the present application, the training device is pre-configured with training data. After obtaining the prediction result of the address matching result, the training device can calculate the function value of the first loss function according to the prediction result and the expected result, and update the parameter value of the first model to be trained according to the function value of the first loss function and the back propagation algorithm to complete a training of the first model to be trained.
[0326] For example, see Fig.12 , Fig.12 A structural diagram of a training method for a model provided in an embodiment of the present application. The training device may repeatedly execute steps 1101 to 1107 multiple times to implement iterative training of a first model to be trained until a preset condition is met to obtain a trained first model, wherein the preset condition may be a convergence condition for reaching a first loss function, or the number of iterations of steps 1101 to 1107 reaches a preset number of times.
[0327] In the embodiments of the present application, not only a specific implementation method of the model's reasoning process is provided, but also a specific implementation method of the model's training process is provided, thereby expanding the application scenarios of the present solution.
[0328] The complete process of training the first model by the training device according to the loss function is described in detail below.
[0329] 1. The training device collects the data set, obtains the required original data set and its corresponding category labels, and divides the training set, validation set, and test set into proportional quantities, which are used for subsequent training, validation, and evaluation of the model.
[0330] 2. Train the device to build the first model.
[0331] 3. The training device inputs the data of the training set into the first model, trains the first model using the first loss function, updates the recognition model through the back propagation algorithm, and uses the data of the validation set to screen out the optimal first model.
[0332] (1) Determine the first loss function
[0333] In an optional implementation, the first loss function is obtained based on the difference between the predicted value and the true value of the similarity between the two samples, and the true value is obtained based on the size relationship between the predicted value and the preset threshold of the similarity between the two samples.
[0334] In this implementation, the first loss function is mainly applicable to the scenario of matching the similarity of address information. The training device uses the first loss function to train the first model and outputs the information with the highest similarity. After the training device inputs the training set into the first model and outputs the corresponding feature information, it inputs the feature information and label information into the first loss function for training. The label information refers to the true value of the similarity between the address information, and the content of the label information mainly includes the information that the training device marks the similarity or matching degree of the address pair based on the address library.
[0335] Exemplarily, the specific content of the tag may include [address 1, address 2, tag], where the tag may be [match, partial match, mismatch] or [match, mismatch].
[0336] Exemplarily, the formula of the first loss function is specifically:
[0337]
[0338] Among them, loss(A,B,Y) represents the loss value between the predicted value of the similarity between sample A and sample B and the true label information Y, A′ represents the first feature information corresponding to sample A, and B′ represents the first feature information corresponding to sample B. Y represents the true label information corresponding to the similarity between A′ and B′. In formula (1), assuming that the maximum threshold is 0.8 and the minimum threshold is 0.6, Y=1 means that A′ and B′ are completely matched, Y=0.7 means that A′ and B′ are partially matched, and Y=0.5 means that A′ and B′ do not match. The closer the value of Y is to 1, the more similar A′ and B′ are.
[0339] In an embodiment of the present application, the training device obtains the true value of the similarity between sample A and sample B, matches and maps the true value with the label information Y, and then, through the first loss function, makes the predicted value distribution of the similarity between sample pairs A and B approach the set Y value to enhance the prediction accuracy of the first model. For example, the training device determines based on actual experience that when the true value of the similarity between sample pairs is greater than or equal to the maximum threshold of 0.8, it is a complete match, when it is between the minimum threshold of 0.6 and the maximum threshold of 0.8, it is a partial match, and when it is less than or equal to the minimum threshold of 0.6, it is a complete mismatch. Then, by setting the mapping relationship between the threshold and the label information Y, Y=1 can be used to indicate that A and B are completely matched, Y=0.7 indicates that A and B are partially matched, and Y=0.5 indicates that A and B are not matched, so that the predicted value of the similarity between sample pairs A and B is close to the true value.
[0340] It is understandable that formula (1) is only one example of the first loss function. In practical applications, the range of the maximum threshold and the minimum threshold and the specific value of the true label information Y can be set according to actual needs, and no limitation is made here. In another optional implementation, the first loss function is used to indicate the difference between the actual order and the predicted order of the similarity of the first sample pair and the similarity of the second sample pair in sorting.
[0341] In this implementation, the first loss function is mainly applicable to the scenario of sorting the similarity of address information. The training device uses the first loss function to train the first model and outputs a number of address information with similarity ranging from high to low.
[0342] Exemplarily, the formula of the first loss function is specifically:
[0343]
[0344] Among them, sim(i,j) represents the true value of the similarity between the first sample pair i and j, sim(k,l) represents the true value of the similarity between the second sample pair k and l, μ k represents the characteristic value of the output after sample k is input into the first model, cosine_sim(μ k -μ l ) represents the predicted value of the similarity between the second sample pair k and l, cosine_sim(μ i -μ j ) represents the predicted value of the similarity between the first sample pair i and j.
[0345] It can be understood that the first loss function shown in formula (2) is mainly used to obtain the difference between the actual ranking order and the predicted ranking order of the sample pairs in terms of similarity, and is used to evaluate the consistency of the ranking results of the two pairs of sample pairs in terms of similarity.
[0346] (2) The training device trains the first model according to the first loss function
[0347] After the loss function is determined, the training device trains the first model using the training set, verifies it on the validation set, and saves the network model parameters that perform best on the validation set.
[0348] It can be understood that compared to the training device directly inputting the address information into the first model for training, in the embodiment of the present application, the sample sets used by the training device to train the first model are all samples that have been parsed at the address level, so as to reduce the training difficulty of the first model and improve the first model's recognition accuracy of address information.
[0349] In addition, optionally, before inputting the two corresponding address information into the first model, the training device will first compare the two address information and delete the corresponding identical information at the first several levels of the address information to reduce the difficulty of training the first model.
[0350] For example, assuming that the address information of two samples is "Building 27, Phase 3, Poly Garden, 7th Road, Nanhai District, Foshan City, Guangdong Province" and "Building 26, Phase 3, Poly Garden, Haiqi Road, Nanhai District, Foshan City, Guangdong Province", before the two samples are input into the first model, the information of "Nanhai District, Foshan City, Guangdong Province" can be deleted, and the remaining information can be parsed only based on the address level to reduce the processing difficulty of the model and improve the accuracy of the model prediction.
[0351] It should be understood that in actual application, the number of levels to be deleted can be selected according to specific needs. This is only one implementation method and is not limited.
[0352] In an optional implementation, the specific process of the training device training the first model according to the first loss function is:
[0353] Based on the back propagation algorithm, the first model is trained using the first loss function, and after the training is completed, the first model with the smallest first loss value is saved.
[0354] It is understandable that during the training of the first model, the training device can update the parameters of the first model through the error back propagation algorithm. Simply put, the training device can correct the size of the parameters in the initial noise reduction classification network during the training of the first model through the error back propagation algorithm, so that the error loss becomes smaller and smaller. Specifically, the forward transmission of the input signal until the output will generate error loss, and the parameters in the initial first model are updated by back propagating the error loss information, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, which aims to obtain the optimal parameters of the neural network model, such as the weight matrix.
[0355] 4. The training device uses the data of the test set to test the prediction performance of the first model to obtain the final recognition accuracy of the first model. When the recognition accuracy of the first model reaches the set threshold, the data to be predicted is input into the first model for recognition; otherwise, return to the third step until the recognition accuracy of the first model reaches the set threshold.
[0356] For example, see Fig.13 , Fig.13 A schematic diagram of a test set provided in an embodiment of the present application. Fig.13 In the test, the training equipment used 2944 test set data to test the prediction performance of the first model. The test showed that the accuracy of screening out the most similar address information from the address library exceeded 80%, which can meet the requirements of high concurrency and low latency, and the average online response time is within 30ms.
[0357] exist Figures 1 to 13 On the basis of the corresponding embodiments, in order to better implement the above solutions of the embodiments of the present application, the following also provides related devices for implementing the above solutions. Fig.14 , Fig.14 A schematic diagram of the structure of an address matching device provided in an embodiment of the present application: The address matching device 1400 comprises an address information acquisition module 1401 , a feature information acquisition module 1402 and an address information matching module 1403 .
[0358] in:
[0359] The address information acquisition module 1401 is used to acquire first address information after resolution based on the address hierarchy;
[0360] The feature information acquisition module 1402 is used to input the first address information into the first model to obtain the first feature information, wherein the first model is trained based on the sample library after address hierarchical parsing;
[0361] The characteristic information acquisition module 1402 is further used to acquire the second characteristic information corresponding to each address information in the address database;
[0362] The address information matching module 1403 is used to calculate the similarity between the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result.
[0363] In one possible implementation, the first model is trained using a first loss function, where the first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
[0364] In a possible implementation, the first model is trained using a first loss function, and the first loss function is used to indicate the difference between the actual order and the predicted order of the similarity of the first sample pair and the similarity of the second sample pair in sorting.
[0365] In a possible implementation, the address information obtaining module 1401 is further used to:
[0366] Obtaining second address information to be matched;
[0367] Parsing the second address information to be matched according to the address level to obtain the parsed second address information;
[0368] The parsed second address information is corrected based on the name and code of the preset administrative division to obtain the corrected second address information;
[0369] The corrected second address information is completed based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
[0370] In a possible implementation, the address information obtaining module 1401 is further used to:
[0371] For each piece of address information included in the parsed second address information, determining whether the address information exists in a dictionary tree, and obtaining a determination result, the dictionary tree being constructed based on the name of a preset administrative division;
[0372] If the judgment result is yes, then determine whether the address information is unique in the dictionary tree;
[0373] If yes, then adding the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the corrected second address information;
[0374] If not, the parsed second address information is corrected according to the address information of the parent node or the child node of the address information to obtain the corrected second address information;
[0375] If the judgment result is no, the address information is modified to the default information.
[0376] In a possible implementation, the address information obtaining module 1401 is further used to:
[0377] Based on the hierarchical order of the address levels, the corrected second address information is hierarchically sorted to obtain hierarchically sorted second address information;
[0378] Determining whether the second address information after hierarchical sorting includes address information of each level;
[0379] If not, at least one missing level is screened out from the hierarchically sorted second address information, and the missing levels are completed according to the address information of at least one parent node corresponding to each missing level to obtain the first address information after address level resolution.
[0380] In a possible implementation, the address database includes a risky address database.
[0381] It should be noted that the information interaction, execution process, etc. between the modules / units in the address matching device 1400 are the same as those in the present application. Figure 6 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0382] The present application also provides a model training device, see Fig.15 , Fig.15 A schematic diagram of a structure of a model training device provided in an embodiment of the present application, the model training device 1500 may include:
[0383] The address information acquisition module 1501 is used to acquire first address information after resolution based on the address hierarchy;
[0384] The feature information acquisition module 1502 is used to input the first address information into the first model to obtain the first feature information, wherein the first model is trained based on the sample library after address hierarchical parsing;
[0385] The characteristic information acquisition module 1502 is further used to acquire the second characteristic information corresponding to each address information in the address database;
[0386] The address information matching module 1503 is used to calculate the similarity between the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result;
[0387] The first model training module 1504 is used to train the first model according to the first loss function until a preset condition is met to obtain a trained first model.
[0388] In a possible implementation, the first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
[0389] In a possible implementation, the first loss function is used to indicate the difference between the actual order and the predicted order of the similarity between the first sample pair and the similarity between the second sample pair in ranking.
[0390] In a possible implementation, the address information obtaining module 1501 is further used to:
[0391] Obtaining second address information to be matched;
[0392] Parsing the second address information to be matched according to the address level to obtain the parsed second address information;
[0393] The parsed second address information is corrected based on the name and code of the preset administrative division to obtain the corrected second address information;
[0394] The corrected second address information is completed based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
[0395] In a possible implementation, the address information obtaining module 1501 is further used to:
[0396] For each piece of address information included in the parsed second address information, determining whether the address information exists in a dictionary tree, and obtaining a determination result, the dictionary tree being constructed based on the name of a preset administrative division;
[0397] If the judgment result is yes, then determine whether the address information is unique in the dictionary tree;
[0398] If yes, then adding the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the corrected second address information;
[0399] If not, the parsed second address information is corrected according to the address information of the parent node or the child node of the address information to obtain the corrected second address information;
[0400] If the judgment result is no, the address information is modified to the default information.
[0401] In a possible implementation, the address information obtaining module 1501 is further used to:
[0402] Based on the hierarchical order of the address levels, the corrected second address information is hierarchically sorted to obtain hierarchically sorted second address information;
[0403] Determining whether the second address information after hierarchical sorting includes address information of each level;
[0404] If not, at least one missing level is screened out from the hierarchically sorted second address information, and the missing levels are completed according to the address information of at least one parent node corresponding to each missing level to obtain the first address information after address level resolution.
[0405] In a possible implementation, the address database includes a risky address database.
[0406] It should be noted that the information interaction, execution process, etc. between the modules / units in the model training device 1500 are the same as those in the present application. Fig.11 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0407] Next, an execution device provided by an embodiment of the present application is introduced. Fig.16 , Fig.16 This is a schematic diagram of a structure of an execution device provided in an embodiment of the present application. The execution device 1600 can be specifically a vehicle, a mobile robot, a monitoring data processing device, or other devices, etc., which are not limited here. Specifically, the execution device 1600 includes: a receiver 1601, a transmitter 1602, a processor 1603, and a memory 1604 (wherein the number of processors 1603 in the execution device 1600 can be one or more, Fig.16 In the example of FIG. 1603 , the processor 1603 may include an application processor 16031 and a communication processor 16032. In some embodiments of the present application, the receiver 1601, the transmitter 1602, the processor 1603 and the memory 1604 may be connected via a bus or other means.
[0408] The memory 1604 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1603. A portion of the memory 1604 may also include a non-volatile random access memory (NVRAM). The memory 1604 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0409] The processor 1603 controls the operation of the execution device. In a specific application, the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0410] The method disclosed in the above embodiment of the present application can be applied to the processor 1603, or implemented by the processor 1603. The processor 1603 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1603. The above processor 1603 can be a general processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 1603 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined to execute. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1604, and the processor 1603 reads the information in the memory 1604 and completes the steps of the above method in combination with its hardware.
[0411] The receiver 1601 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device. The transmitter 1602 can be used to output digital or character information through the first interface; the transmitter 1602 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 1602 can also include a display device such as a display screen.
[0412] In one embodiment of the present application, the application processor 16031 in the processor 1603 is used to execute Figures 6 to 10 The address matching method executed by the execution device in the corresponding embodiment. It should be noted that the specific manner in which the application processor 16031 executes the above steps is different from the specific manner in which the application processor 16031 executes the above steps. Figures 6 to 10 The corresponding method embodiments are based on the same concept, and the technical effects they bring are the same as those in this application. Figures 6 to 10 The corresponding method embodiments are the same. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0413] The present application also provides a training device. Fig.17 , Fig.17 A structural diagram of a training device provided for an embodiment of the present application. Specifically, the training device 1700 is implemented by one or more servers, and the training device 1700 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1722 (for example, one or more processors) and memory 1732, and one or more storage media 1730 (for example, one or more mass storage devices) storing application programs 1742 or data 1744. Among them, the memory 1732 and the storage medium 1730 can be short-term storage or permanent storage. The program stored in the storage medium 1730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the training device. Furthermore, the central processing unit 1722 can be configured to communicate with the storage medium 1730 to execute a series of instruction operations in the storage medium 1730 on the training device 1700.
[0414] The training device 1700 may also include one or more power supplies 1726, one or more wired or wireless network interfaces 1750, one or more input and output interfaces 1758, and / or, one or more operating systems 1741, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0415] In the embodiment of the present application, the central processor 1722 is used to execute Figures 11 to 13 The training method of the model executed by the training device in the corresponding embodiment. It should be noted that the specific manner in which the central processor 1722 executes the above steps is different from the specific manner in which the central processor 1722 executes the above steps in the present application. Figures 11 to 13 The corresponding method embodiments are based on the same concept, and the technical effects brought by them are the same as those in the embodiments of the present application. Figures 11 to 13 The corresponding method embodiments are the same. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0416] The present application also provides a computer program product which, when executed on a computer, enables the computer to execute the above Figures 6 to 10The method described in the embodiment shown in the figure executes the steps executed by the device, or causes the computer to execute the above-mentioned Figures 11 to 13 The illustrated embodiment describes the steps performed by the training device in the method.
[0417] The present application also provides a computer-readable storage medium in which a program for signal processing is stored. When the program is run on a computer, the computer executes the above-mentioned Figures 6 to 10 The method described in the embodiment shown in the figure executes the steps executed by the device, or causes the computer to execute the above-mentioned Figures 11 to 13 The illustrated embodiment describes the steps performed by the training device in the method.
[0418] The address matching device, model training device, execution device and training device provided in the embodiment of the present application can be specifically a chip, and the chip includes: a processing unit and a communication unit, the processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit. The processing unit can execute the computer execution instructions stored in the storage unit to enable the chip to execute the above Figures 6 to 10 The address matching method described in the embodiment shown in the figure, or, to enable the chip to perform the above Figures 11 to 13 The training method of the model described in the illustrated embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0419] Specifically, see Fig.18 , Fig.18 A schematic diagram of the structure of a chip provided in an embodiment of the present application, the chip can be expressed as a neural network processor NPU 1800, NPU 1800 is mounted on the host CPU (Host CPU) as a coprocessor, and the host CPU assigns tasks. The core part of the NPU is the operation circuit 1803, which is controlled by the controller 1804 to extract matrix data from the memory and perform multiplication operations.
[0420] In some implementations, the operation circuit 1803 includes multiple processing units (Process Engine, PE) inside. In some implementations, the operation circuit 1803 is a two-dimensional systolic array. The operation circuit 1803 can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the operation circuit 1803 is a general-purpose matrix processor.
[0421] For example, assume there is an input matrix A, a weight matrix B, and an output matrix C. The operation circuit takes the corresponding data of matrix B from the weight memory 1802 and caches it on each PE in the operation circuit. The operation circuit takes the matrix A data from the input memory 1801 and performs matrix operations with matrix B. The partial results or final results of the obtained matrix are stored in the accumulator 1808.
[0422] The unified memory 1806 is used to store input data and output data. The weight data is directly transferred to the weight memory 1802 through the direct memory access controller (DMAC) 1805. The input data is also transferred to the unified memory 1806 through the DMAC.
[0423] BIU stands for Bus Interface Unit 1810 , which is used for the interaction between the AXI bus and the DMAC and instruction fetch buffer (IFB) 1809 .
[0424] The bus interface unit 1810 (Bus Interface Unit, BIU for short) is used for the instruction fetch memory 1809 to obtain instructions from the external memory, and is also used for the storage unit access controller 1805 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0425] DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 1806 or to transfer weight data to the weight memory 1802 or to transfer input data to the input memory 1801.
[0426] The vector calculation unit 1807 includes multiple operation processing units, and further processes the output of the operation circuit when necessary, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as Batch Normalization, pixel-level summation, upsampling of feature planes, etc.
[0427] In some implementations, the vector calculation unit 1807 can store the processed output vector to the unified memory 1806. For example, the vector calculation unit 1807 can apply a linear function and / or a nonlinear function to the output of the operation circuit 1803, such as linear interpolation of the feature plane extracted by the convolution layer, and then, for example, a vector of accumulated values to generate an activation value. In some implementations, the vector calculation unit 1807 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1803, for example, for use in a subsequent layer in a neural network.
[0428] An instruction fetch buffer 1809 connected to the controller 1804 is used to store instructions used by the controller 1804;
[0429] Unified memory 1806, input memory 1801, weight memory 1802 and instruction fetch memory 1809 are all on-chip memories. External memories are private to the NPU hardware architecture.
[0430] in, Figures 6 to 10 The operations of each layer in the target model shown can be performed by the operation circuit 1803 or the vector calculation unit 1807.
[0431] The processor mentioned in any of the above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more processors for controlling the above Figures 6 to 10 The illustrated embodiment describes an integrated circuit for executing a program of the address matching method.
[0432] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0433] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0434] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0435] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. An address matching method, characterized in that: include: Obtaining first address information after address level resolution; Inputting the first address information into a first model to obtain first feature information, wherein the first model is trained based on a sample library after address hierarchical parsing; Obtaining second characteristic information corresponding to each piece of address information in the address database; A similarity calculation is performed based on the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result.
2. The method according to claim 1, characterized in that The first model is trained using a first loss function, where the first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
3. The method according to claim 1, characterized in that The first model is trained by using a first loss function, and the first loss function is used to indicate the difference between the actual order and the predicted order of the similarity of the first sample pair and the similarity of the second sample pair in sorting.
4. The method according to any one of claims 1 to 3, characterized in that: The obtaining of first address information after address level resolution includes: Obtaining second address information to be matched; Parsing the second address information to be matched according to the address level to obtain parsed second address information; Correcting the parsed second address information based on the name and code of the preset administrative division to obtain corrected second address information; The corrected second address information is completed based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
5. The method according to claim 4, characterized in that The step of correcting the parsed second address information based on the name and code of the preset administrative division to obtain the corrected second address information includes: For each of the address information contained in the parsed second address information, determining whether the address information exists in a dictionary tree to obtain a determination result, wherein the dictionary tree is formed based on the name of a preset administrative division; If the judgment result is yes, then judging whether the address information is unique in the dictionary tree; If yes, then adding the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the revised second address information; If not, the parsed second address information is corrected according to the address information of the parent node or the child node of the address information to obtain corrected second address information; If the judgment result is no, the address information is modified to default information.
6. The method according to claim 4 or 5, characterized in that: The step of completing the corrected second address information based on the address hierarchy to obtain the first address information parsed based on the address hierarchy includes: Based on the hierarchical order of the address levels, hierarchically sorting the modified second address information to obtain hierarchically sorted second address information; Determining whether the second address information after the hierarchical sorting includes address information of each level; If not, at least one missing level is filtered out from the hierarchically sorted second address information, and the missing level is completed according to the address information of at least one parent node corresponding to each missing level to obtain the first address information after address hierarchy resolution.
7. The method according to any one of claims 1 to 6, characterized in that: The address database includes a risky address database.
8. A model training method, characterized in that: The method is used to train a first model, and the method includes: Obtaining first address information after address level resolution; Inputting the first address information into a first model to obtain first feature information, wherein the first model is trained based on a sample library after address hierarchical parsing; Obtaining second characteristic information corresponding to each piece of address information in the address database; Calculate similarity between the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result; The first model is trained according to a first loss function until a preset condition is met, thereby obtaining a trained first model.
9. The method according to claim 8, characterized in that The first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
10. The method according to claim 8, characterized in that The first loss function is used to indicate the difference between the actual order and the predicted order of the similarity between the first sample pair and the similarity between the second sample pair in ranking.
11. An address matching device, characterized in that: include: An address information acquisition module, used to acquire first address information after address level resolution; A feature information acquisition module, used to input the first address information into a first model to obtain first feature information, wherein the first model is trained based on a sample library after address hierarchical parsing; The feature information acquisition module is also used to acquire the second feature information corresponding to each address information in the address database; The address information matching module is used to calculate the similarity between the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result.
12. The device according to claim 11, characterized in that The first model is trained using a first loss function, where the first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
13. The device according to claim 11, characterized in that The first model is trained by using a first loss function, and the first loss function is used to indicate the difference between the actual order and the predicted order of the similarity of the first sample pair and the similarity of the second sample pair in sorting.
14. The device according to any one of claims 11 to 13, characterized in that The address information acquisition module is also used for: Obtaining second address information to be matched; Parsing the second address information to be matched according to the address level to obtain parsed second address information; Correcting the parsed second address information based on the name and code of the preset administrative division to obtain corrected second address information; The corrected second address information is completed based on the address hierarchy to obtain the first address information parsed based on the address hierarchy.
15. The device according to claim 14, characterized in that The address information acquisition module is also used for: For each of the address information contained in the parsed second address information, determining whether the address information exists in a dictionary tree to obtain a determination result, wherein the dictionary tree is formed based on the name of a preset administrative division; If the judgment result is yes, then judging whether the address information is unique in the dictionary tree; If yes, then adding the name and code of the preset administrative division corresponding to the address information to the second address information to obtain the revised second address information; If not, the parsed second address information is corrected according to the address information of the parent node or the child node of the address information to obtain corrected second address information; If the judgment result is no, the address information is modified to default information.
16. The device according to claim 14 or 15, characterized in that The address information acquisition module is also used for: Based on the hierarchical order of the address levels, hierarchically sorting the modified second address information to obtain hierarchically sorted second address information; Determining whether the second address information after the hierarchical sorting includes address information of each level; If not, at least one missing level is filtered out from the hierarchically sorted second address information, and the missing level is completed according to the address information of at least one parent node corresponding to each missing level to obtain the first address information after address hierarchy resolution.
17. The device according to any one of claims 11 to 16, characterized in that The address database includes a risky address database.
18. A model training device, characterized in that: The model training device is used to train the first model, and the device includes: An address information acquisition module, used to acquire first address information after address level resolution; A feature information acquisition module, used to input the first address information into a first model to obtain first feature information, wherein the first model is trained based on a sample library after address hierarchical parsing; The feature information acquisition module is also used to acquire the second feature information corresponding to each address information in the address database; An address information matching module, configured to calculate similarity between the first feature information and the second feature information corresponding to each piece of address information in the address database to obtain an address matching result; The first model training module is used to train the first model according to a first loss function until a preset condition is met to obtain a trained first model.
19. The device according to claim 18, characterized in that The first loss function is obtained based on the difference between a predicted value and a true value of the similarity between two samples, and the true value is obtained based on the size relationship between the predicted value and a preset threshold of the similarity between the two samples.
20. The device according to claim 18, characterized in that The first loss function is used to indicate the difference between the actual order and the predicted order of the similarity between the first sample pair and the similarity between the second sample pair in ranking.
21. An execution device, characterized in that: comprising a processor and a memory, the processor being coupled to the memory, The memory is used to store programs; The processor is configured to execute the program in the memory so that the execution device executes the method according to any one of claims 1 to 7.
22. A training device, characterized in that comprising a processor and a memory, the processor being coupled to the memory, The memory is used to store programs; The processor is used to execute the program in the memory so that the training device performs the method according to any one of claims 8 to 10.
23. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7, or the computer is enabled to execute the method according to any one of claims 8 to 10.
24. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 7, or the method according to any one of claims 8 to 10.
Citation Information
Cited By
Address query method and device based on user habits
CN119988451A
