A method, apparatus, device, and readable storage medium for address fuzzy matching
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2024-08-23
- Publication Date
- 2026-07-17
Smart Images

Figure CN119127966B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of address matching technology, and in particular to a method, apparatus, device and readable storage medium for fuzzy address matching. Background Technology
[0002] Driven by digital technologies, the financial industry is undergoing unprecedented transformation. The expansion of the online user base has brought new growth opportunities to financial institutions, but it has also brought new challenges and risks, particularly the professionalization and evolution of fraudulent activities. Organized fraud, due to its tight organization and high degree of concealment, has become a significant risk point in financial fraud prevention. By analyzing the correlations between customer address information, customer relationship models can be constructed to assist in identifying fraudulent groups.
[0003] In financial lending scenarios, modeling and fuzzy matching of customer address information is an effective method. Currently, mainstream address matching methods are mainly divided into address matching based on structural parsing and address matching based on semantic representation.
[0004] Among them, the structural parsing method extracts address elements, parses the address description syntax pattern, constructs an address structure tree, and then enumerates the rule structure, performing matching using a dictionary approach. However, the structural parsing method relies on a standardized address database and manual exhaustive enumeration of address structures, making it difficult to handle non-standard addresses, thus limiting matching accuracy.
[0005] Address matching based on semantic representation transforms address semantic expression and matching algorithms into deep learning modeling. By training and optimizing the address language model, it captures textual semantic features to support address matching. Although this method improves accuracy through deep learning, it is time-consuming to perform pairwise calculations when dealing with large-scale data processing, making it difficult to adapt to all scenarios. Summary of the Invention
[0006] This application provides a method, apparatus, device, and readable storage medium for fuzzy address matching, which solves the technical problems of existing address matching methods that rely on standardized address databases and manual exhaustive address structures, making it difficult to handle non-standard addresses, resulting in limited matching accuracy, and that when dealing with large-scale data processing, pairwise calculations are time-consuming and difficult to adapt to all scenarios.
[0007] In view of the above, the first aspect of this application provides a method for fuzzy address matching, the method comprising:
[0008] Get the target address text to be matched;
[0009] After preprocessing the target address text, the recall address is filtered and matched based on the preset POI database and preset rule template;
[0010] If the filtering and matching fails, the target address text is parsed based on the entity recognition model, and an address map is constructed based on the address element parsing results.
[0011] Based on a preset graph attention network model, and combined with the address graph, the target address text is vector-encoded and its features are extracted to obtain the address feature vector of the target address text.
[0012] Search the vector database for at least one nearest neighbor address vector of the address feature vector, and calculate the matching degree between the nearest neighbor address vector and the address feature vector based on a preset matching model;
[0013] If the matching degree is higher than a preset threshold, then the address information corresponding to the nearest address vector is used as the fuzzy matching result of the target address text matching.
[0014] Optionally, the step of preprocessing the target address text and then filtering and matching the retrieved addresses based on a preset POI database and a preset rule template includes:
[0015] The target address text is cleaned and preprocessed to unify its format.
[0016] The preprocessed target address text is matched with a preset POI database to obtain several matching recall addresses;
[0017] Determine whether the target address text and the matched recall addresses have the same POI element or the same address hierarchy information.
[0018] Optionally, after preprocessing the target address text, the process of filtering and matching the retrieved addresses based on a preset POI database and preset rule templates further includes:
[0019] If the target address text and one of the matched recall addresses have the same POI element or the same address hierarchy information, then the matched recall address is parsed based on the entity recognition model, and an address map is constructed based on the address element parsing results.
[0020] Optionally, if the filtering and matching fails, the target address text is parsed based on the entity recognition model, and an address map is constructed based on the address element parsing results, including:
[0021] If the target address text does not have the same POI element or the same address hierarchy information among the matched recall addresses, then the target address text is parsed based on the BERT model pre-trained in the address entity corpus to obtain the address element parsing result of the target address text.
[0022] Based on the address element parsing results, an address graph is constructed using the address element as the parent node to determine the associated path of the target address text.
[0023] Optionally, the step of performing vector encoding and feature extraction on the target address text based on a preset graph attention network model and in conjunction with the address graph to obtain the address feature vector of the target address text includes:
[0024] After converting the address elements contained in the associated path into a computable format, the node2vec random walk strategy is used to randomly sample from each node in the associated path to obtain a node sequence, and the address embedding vector corresponding to the node sequence is generated through the skip-gram model.
[0025] The address embedding vector is used as input to a preset graph attention network model, and the preset graph attention network model outputs an address feature vector, which integrates address semantics and address hierarchy structure information.
[0026] Optionally, the step of searching for at least one nearest neighbor address vector of the address feature vector in the vector database and calculating the matching degree between the nearest neighbor address vector and the address feature vector based on a preset matching model specifically includes:
[0027] The IVF-FLAT method is used to search for the nearest neighbor address vectors of at least one address feature vector in the vector database;
[0028] The matching degree between the nearest neighbor address vector and the address feature vector is calculated based on a preset matching model.
[0029] Optionally, the preset matching model is specifically:
[0030] Calculate the similarity score between the address feature vector and the nearest neighbor address vector, and the overlap score between the address feature vector and the nearest neighbor address vector, respectively.
[0031] The similarity score and the overlap score are summed based on a preset harmonic coefficient to obtain the matching degree between the nearest neighbor address vector and the address feature vector.
[0032] A second aspect of this application provides an address fuzzy matching apparatus, the apparatus comprising:
[0033] The acquisition unit is used to acquire the target address text to be matched.
[0034] The first matching unit is used to preprocess the target address text and then filter and match the recall address based on a preset POI database and a preset rule template.
[0035] The first processing unit is used to perform element parsing on the target address text based on the entity recognition model and construct an address map based on the address element parsing results if the filtering and matching fails.
[0036] The feature extraction unit is used to perform vector encoding and feature extraction on the target address text based on a preset graph attention network model and in combination with the address graph, so as to obtain the address feature vector of the target address text;
[0037] The second matching unit is used to search for at least one nearest neighbor address vector of the address feature vector in the vector database, and calculate the matching degree between the nearest neighbor address vector and the address feature vector based on a preset matching model.
[0038] The second processing unit is used to take the address information corresponding to the nearest address vector as the fuzzy matching result of the target address text matching if the matching degree is higher than a preset threshold.
[0039] Optionally, the first matching unit is specifically used for:
[0040] The target address text is cleaned and preprocessed to unify its format.
[0041] The preprocessed target address text is matched with a preset POI database to obtain several matching recall addresses;
[0042] Determine whether the target address text and the matched recall addresses have the same POI element or the same address hierarchy information.
[0043] Optionally, it also includes:
[0044] The third processing unit is used to perform element parsing on the matched recall addresses based on the entity recognition model if the target address text and a plurality of matched recall addresses have the same POI element or the same address hierarchy information, and to construct an address map based on the address element parsing results.
[0045] Optionally, the first processing unit is specifically used for:
[0046] If the target address text does not have the same POI element or the same address hierarchy information among the matched recall addresses, then the target address text is parsed based on the BERT model pre-trained in the address entity corpus to obtain the address element parsing result of the target address text.
[0047] Based on the address element parsing results, an address graph is constructed using the address element as the parent node to determine the associated path of the target address text.
[0048] Optionally, the feature extraction unit is specifically used for:
[0049] After converting the address elements contained in the associated path into a computable format, the node2vec random walk strategy is used to randomly sample from each node in the associated path to obtain a node sequence, and the address embedding vector corresponding to the node sequence is generated through the skip-gram model.
[0050] The address embedding vector is used as input to a preset graph attention network model, and the preset graph attention network model outputs an address feature vector, which integrates address semantics and address hierarchy structure information.
[0051] Optionally, the feature extraction unit is further configured to:
[0052] The address feature vector is stored in the vector database.
[0053] Optionally, the second matching unit is specifically used for:
[0054] The IVF-FLAT method is used to search for at least one nearest neighbor address vector of the address feature vector in the vector database;
[0055] The matching degree between the nearest neighbor address vector and the address feature vector is calculated based on a preset matching model, wherein the preset matching model is specifically:
[0056]
[0057] Where r1 and r2 are preset harmonic coefficients, This represents the similarity score between the address feature vector and the nearest neighbor address vector. The overlap score between the address feature vector and the nearest neighbor address vector is represented by G, which is the function for calculating the number of overlapping elements in the address pair, L is the function for calculating the length of the address element corresponding to the address feature vector, and k is the preset type of key address element.
[0058] A third aspect of this application provides an address fuzzy matching device, the device comprising a processor and a memory:
[0059] The memory is used to store program code and transmit the program code to the processor;
[0060] The processor is configured to execute the steps of the address fuzzy matching method as described in the first aspect above, according to the instructions in the program code.
[0061] A fourth aspect of this application provides a computer-readable storage medium for storing program code for performing the method described in the first aspect above.
[0062] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0063] This application provides a method, apparatus, device, and readable storage medium for fuzzy address matching. By extracting address elements from the target address text and constructing an address graph, it utilizes a graph attention network model to extract address feature vectors that integrate address semantic and structural information, thus better handling non-standard addresses. Simultaneously, it applies a vector database to perform nearest neighbor address vector matching search, eliminating the need to consider time consumption issues. Finally, it filters the desired fuzzy matching address based on a preset threshold. This solves the technical problems of existing address matching methods, which rely on standardized address databases and manual exhaustive enumeration of address structures, making it difficult to handle non-standard addresses and resulting in limited matching accuracy. Furthermore, it addresses the technical problems of long pairwise computation time when dealing with large-scale data processing, making it difficult to adapt to all scenarios. Attached Figure Description
[0064] Figure 1 This is a flowchart of the address fuzzy matching method in the embodiments of this application;
[0065] Figure 2 This is a schematic diagram of the address fuzzy matching device in the embodiments of this application;
[0066] Figure 3 This is a schematic diagram of the address fuzzy matching device in the embodiments of this application. Detailed Implementation
[0067] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0068] This application designs an address fuzzy matching method, apparatus, device, and readable storage medium, which solves the technical problems of existing address matching methods that rely on standardized address databases and manual exhaustive address structures, making it difficult to handle non-standard addresses, resulting in limited matching accuracy, and that when dealing with large-scale data processing, pairwise calculations are time-consuming and difficult to adapt to all scenarios.
[0069] For easier understanding, please refer to Figure 1 , Figure 1 This is a flowchart of the address fuzzy matching method in the embodiments of this application, such as... Figure 1 As shown, specifically:
[0070] Step S1: Obtain the target address text to be matched;
[0071] Step S2: After preprocessing the target address text, the recall address is filtered and matched based on the preset POI database and preset rule template;
[0072] Step S3: If the filtering and matching fails, the target address text is parsed based on the entity recognition model, and an address map is constructed based on the address element parsing results.
[0073] Step S4: Based on the preset graph attention network model and combined with the address map, perform vector encoding and feature extraction on the target address text to obtain the address feature vector of the target address text;
[0074] Step S5: Search for at least one nearest neighbor address vector of an address feature vector in the vector database, and calculate the matching degree between the nearest neighbor address vector and the address feature vector based on a preset matching model;
[0075] Step S6: If the matching degree is higher than the preset threshold, the address information corresponding to the neighboring address vector is used as the fuzzy matching result of the target address text matching.
[0076] Furthermore, step S2 specifically includes:
[0077] Step S21: Clean and format-unify the target address text.
[0078] It should be noted that the address text is cleaned by removing useless symbols, spaces, etc.
[0079] Standardize the format, such as converting all text to the same language or encoding format.
[0080] Step S22: Match the preprocessed target address text with the preset POI database to obtain several matching recall addresses;
[0081] It should be noted that the preprocessed address text is used for matching with the POI database. The POI (Points of Interest) database is a spatial database containing geographic location information and attribute information, primarily used to provide geographic location information for maps.
[0082] Filter out the possible recall addresses.
[0083] Step S23: Determine whether the target address text and several matched recall addresses have the same POI element or the same address hierarchy information.
[0084] It should be noted that the analysis should examine whether there are identical POI elements or address hierarchy information between the target address text and the recall address.
[0085] Determine if further matching processing is needed.
[0086] Furthermore, step S2 is followed by:
[0087] If the target address text and several matched recall addresses have the same POI element or the same address hierarchy information, then the entity recognition model is used to parse the elements of the matched recall addresses, and an address map is constructed based on the address element parsing results.
[0088] It should be noted that an entity recognition model is used to parse the elements of the recall address.
[0089] Construct an address map for subsequent feature extraction.
[0090] Furthermore, step S3 specifically includes:
[0091] If there are no recall addresses with the same POI elements or the same address hierarchy information among the target address text and the matched recall addresses, then the target address text is parsed based on the BERT model pre-trained in the address entity corpus to obtain the address element parsing result of the target address text.
[0092] Based on the address element parsing results, an address graph is constructed using the address element as the parent node to determine the associated path of the target address text.
[0093] It should be noted that a pre-trained BERT model is used to parse the elements of the target address text.
[0094] Based on the parsing results, an address map is constructed to determine the associated paths.
[0095] Because address syntax has a hierarchical structure, and the order of parsed address elements naturally expresses this hierarchical relationship, this scheme utilizes these relationships to construct the associated edges between address elements. We perform the above operation on each piece of data in the historical address database. Each address forms a path after being associated through the hierarchical structure, and all address paths eventually form a huge undirected address graph.
[0096] Building an address map requires a large amount of collected historical address data and is part of the modeling phase. Once the address map is built, in actual business use, this phase only needs to generate the associated paths of the current address.
[0097] Furthermore, step S4 specifically includes:
[0098] After converting the address elements contained in the associated path into a computable format, the node2vec random walk strategy is used to randomly sample from each node in the associated path to obtain a node sequence. Then, the address embedding vector corresponding to the node sequence is generated through the skip-gram model.
[0099] The address embedding vector is used as the input to the preset graph attention network model, and the preset graph attention network model outputs the address feature vector. The address feature vector is fused with address semantics and address hierarchical structure information.
[0100] It should be noted that the address element is converted into a computable format.
[0101] A node2vec strategy is used to perform a random walk and generate a node sequence.
[0102] Address embedding vectors are generated using the skip-gram model.
[0103] Input the embedded vector into the graph attention network model to extract address feature vectors that integrate semantics and hierarchical structure.
[0104] The graph attention network model adopts a dual-tower structure, with parameters shared between the left and right sub-structures. Further explanation of how the model is used is needed. During the model training phase, this solution uses a large dataset of address pairs accumulated from business operations (Data B) as input. The dataset format is like {(Address A, Address B, Label)}, for example, {(“No. 316 Laoshan Road, Pudong New Area, Shanghai”, “No. 316 Laoshan Road, Lujiazui Street, Pudong New Area, Shanghai, Ping An Technology Business Building”, matching), (“No. 316 Laoshan Road, Pudong New Area, Shanghai, Ping An Technology Business Building”, “No. 206 Kaibin Road, Xuhui District, Shanghai, not matching)…}. The model undergoes supervised training and outputs feature vectors and similarity scores for address pairs. During the model inference phase, i.e., the actual business application phase, the model input is a single address, and the model output is the feature vector of that address.
[0105] Furthermore, step S4 also includes:
[0106] Store the address feature vectors in a vector database.
[0107] Furthermore, step S5 specifically includes:
[0108] The IVF-FLAT method is used to search for the nearest neighbor address vectors of at least one address feature vector in the vector database;
[0109] The matching degree between the nearest neighbor address vector and the address feature vector is calculated based on a preset matching model. The preset matching model is as follows:
[0110]
[0111] Where r1 and r2 are preset harmonic coefficients, This represents the similarity score between an address feature vector and its nearest neighbor address vectors. This represents the overlap score between the address feature vector and the nearest neighbor address vector. G is the function for calculating the number of overlapping elements in the address pair, L is the function for calculating the length of the address element corresponding to the address feature vector, and k is the preset key address element type.
[0112] It should be noted that the IVF-FLAT method is used to search for nearest neighbor address vectors in the vector database.
[0113] A pre-defined matching model is used to calculate the matching degree between the target address feature vector and the nearest neighbor address vector.
[0114] The matching model takes into account both similarity and overlap scores.
[0115] First, the vector database is searched to obtain the set of address vectors Vk = {v1, v2, v3, ...} that are spatially K nearest neighbors to the feature vector vc. The vector search uses the IVF_FLAT method, dividing the vectors in the vector database into nlist units. During the search, the distance between the target vector and the center point of these nlist units is calculated first, obtaining the nearest nprobe units. Then, the closest vector is calculated within each unit. This method avoids calculating the distance between the target vector and every vector in the vector database, further improving search efficiency.
[0116] The current address vector vc and its nearest neighbor address vector vi are fed into the trained matching model to obtain the matching score.
[0117] Because a pair of address vectors may be close in vector space due to a large number of overlapping address elements, in real-world scenarios, matching the "key" address elements generates greater business value. For example, in practical business scenarios, the matching value of addresses containing the same POI element will be higher than that of addresses containing Province, City, District, or Town elements. A typical example is that we would prefer to get a match between the address pairs "Ping An Technology Business Building, No. 316 Laoshan Road, Lujiazui Street, Pudong New Area, Shanghai" and "Ping An Technology Business Building, Pudong New Area, Shanghai" rather than "No. 316 Laoshan Road, Lujiazui Street, Pudong New Area, Shanghai" and "No. 500 Laoshan Road, Lujiazui Street, Pudong New Area, Shanghai". Therefore, this solution incorporates the above considerations into the matching scoring process, adding a score for the overlap of "key" address elements in addition to calculating the similarity score of the address pair vectors.
[0118] Please see Figure 2 , Figure 2 This is a schematic diagram of the address fuzzy matching device in the embodiments of this application, as shown below. Figure 2 As shown, specifically:
[0119] Acquisition unit 201 is used to acquire the target address text to be matched;
[0120] The first matching unit 202 is used to preprocess the target address text and then filter and match the recall address based on the preset POI database and preset rule template.
[0121] The first processing unit 203 is used to perform element parsing on the target address text based on the entity recognition model and construct an address map based on the address element parsing results if the filtering and matching fails.
[0122] The feature extraction unit 204 is used to perform vector encoding and feature extraction on the target address text based on a preset graph attention network model and in combination with the address map, so as to obtain the address feature vector of the target address text.
[0123] The second matching unit 205 is used to search for the nearest neighbor address vector of at least one address feature vector in the vector database, and calculate the matching degree between the nearest neighbor address vector and the address feature vector based on a preset matching model.
[0124] The second processing unit 206 is used to take the address information corresponding to the neighboring address vector as the fuzzy matching result of the target address text matching if the matching degree is higher than a preset threshold.
[0125] Furthermore, the first matching unit 202 is specifically used for:
[0126] The target address text is cleaned and its format is standardized through preprocessing.
[0127] The preprocessed target address text is matched with a preset POI database to obtain several matching recall addresses;
[0128] Determine whether the target address text has the same POI element or the same address hierarchy information as several matched recall addresses.
[0129] Furthermore, it also includes:
[0130] The third processing unit is used to perform element parsing on the matched recall addresses based on the entity recognition model if the target address text and several matched recall addresses have the same POI element or the same address hierarchy information, and to construct an address map based on the address element parsing results.
[0131] Furthermore, the first processing unit 203 is specifically used for:
[0132] If there are no recall addresses with the same POI elements or the same address hierarchy information among the target address text and the matched recall addresses, then the target address text is parsed based on the BERT model pre-trained in the address entity corpus to obtain the address element parsing result of the target address text.
[0133] Based on the address element parsing results, an address graph is constructed using the address element as the parent node to determine the associated path of the target address text.
[0134] Furthermore, the feature extraction unit 204 is specifically used for:
[0135] After converting the address elements contained in the associated path into a computable format, the node2vec random walk strategy is used to randomly sample from each node in the associated path to obtain a node sequence. Then, the address embedding vector corresponding to the node sequence is generated through the skip-gram model.
[0136] The address embedding vector is used as the input to the preset graph attention network model, and the preset graph attention network model outputs the address feature vector. The address feature vector is fused with address semantics and address hierarchical structure information.
[0137] Furthermore, the feature extraction unit 204 is also used for:
[0138] Store the address feature vectors in a vector database.
[0139] Furthermore, the second matching unit 205 is specifically used for:
[0140] The IVF-FLAT method is used to search for the nearest neighbor address vectors of at least one address feature vector in the vector database;
[0141] The matching degree between the nearest neighbor address vector and the address feature vector is calculated based on a preset matching model. The preset matching model is as follows:
[0142]
[0143] Where r1 and r2 are preset harmonic coefficients, This represents the similarity score between an address feature vector and its nearest neighbor address vectors. This represents the overlap score between the address feature vector and the nearest neighbor address vector. G is the function for calculating the number of overlapping elements in the address pair, L is the function for calculating the length of the address element corresponding to the address feature vector, and k is the preset key address element type.
[0144] This application also provides another address fuzzy matching device, such as... Figure 3 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The terminal can be any terminal device including mobile phones, tablets, personal digital assistants (PDAs), point-of-sales terminals (POS), in-vehicle computers, etc. Taking a mobile phone as an example:
[0145] Figure 3 This is a block diagram illustrating a portion of the structure of a mobile phone related to the terminal provided in the embodiments of this application. (Reference) Figure 3 The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090, etc. Those skilled in the art will understand that... Figure 3 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0146] The following is combined with Figure 3 A detailed introduction to each component of a mobile phone:
[0147] The RF circuit 1010 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 1080; additionally, it transmits uplink data to the base station. Typically, the RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the RF circuit 1010 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Messaging Service (SMS).
[0148] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1020 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0149] The input unit 1030 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 1031), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1080, and can also receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, other input devices 1032 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0150] The display unit 1040 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1040 may include a display panel 1041, which may optionally be configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 1041. Further, a touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it transmits the information to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides corresponding visual output on the display panel 1041 according to the type of touch event. Although in Figure 3 In this embodiment, the touch panel 1031 and the display panel 1041 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.
[0151] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1041 according to the ambient light level, and the proximity sensor can turn off the display panel 1041 and / or the backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0152] The audio circuit 1060, speaker 1061, and microphone 1062 provide an audio interface between the user and the mobile phone. The audio circuit 1060 converts the received audio data into electrical signals and transmits them to the speaker 1061, where the speaker 1061 converts them into sound signals for output. On the other hand, the microphone 1062 converts the collected sound signals into electrical signals, which are then received by the audio circuit 1060, converted into audio data, and then processed by the processor 1080 before being transmitted via the RF circuit 1010 to, for example, another mobile phone, or the audio data can be output to the memory 1020 for further processing.
[0153] WiFi is a short-range wireless transmission technology. Through the WiFi module 1070, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 3 The WiFi module 1070 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the essence of the invention.
[0154] The processor 1080 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 1020 and calls data stored in the memory 1020 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1080.
[0155] The mobile phone also includes a power supply 1090 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0156] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0157] In this embodiment of the application, the processor 1080 included in the terminal also has the following functions:
[0158] Step S1: Obtain the target address text to be matched;
[0159] Step S2: After preprocessing the target address text, the recall address is filtered and matched based on the preset POI database and preset rule template;
[0160] Step S3: If the filtering and matching fails, the target address text is parsed based on the entity recognition model, and an address map is constructed based on the address element parsing results.
[0161] Step S4: Based on the preset graph attention network model and combined with the address map, perform vector encoding and feature extraction on the target address text to obtain the address feature vector of the target address text;
[0162] Step S5: Search for at least one nearest neighbor address vector of an address feature vector in the vector database, and calculate the matching degree between the nearest neighbor address vector and the address feature vector based on a preset matching model;
[0163] Step S6: If the matching degree is higher than the preset threshold, the address information corresponding to the neighboring address vector is used as the fuzzy matching result of the target address text matching.
[0164] Furthermore, step S2 specifically includes:
[0165] Step S21: Clean and format-unify the target address text.
[0166] Step S22: Match the preprocessed target address text with the preset POI database to obtain several matching recall addresses;
[0167] Step S23: Determine whether the target address text and several matched recall addresses have the same POI element or the same address hierarchy information.
[0168] Furthermore, step S2 is followed by:
[0169] If the target address text and several matched recall addresses have the same POI element or the same address hierarchy information, then the entity recognition model is used to parse the elements of the matched recall addresses, and an address map is constructed based on the address element parsing results.
[0170] Furthermore, step S3 specifically includes:
[0171] If there are no recall addresses with the same POI elements or the same address hierarchy information among the target address text and the matched recall addresses, then the target address text is parsed based on the BERT model pre-trained in the address entity corpus to obtain the address element parsing result of the target address text.
[0172] Based on the address element parsing results, an address graph is constructed using the address element as the parent node to determine the associated path of the target address text.
[0173] Furthermore, step S4 specifically includes:
[0174] After converting the address elements contained in the associated path into a computable format, the node2vec random walk strategy is used to randomly sample from each node in the associated path to obtain a node sequence. Then, the address embedding vector corresponding to the node sequence is generated through the skip-gram model.
[0175] The address embedding vector is used as the input to the preset graph attention network model, and the preset graph attention network model outputs the address feature vector. The address feature vector is fused with address semantics and address hierarchical structure information.
[0176] Furthermore, step S4 also includes:
[0177] Store the address feature vectors in a vector database.
[0178] Furthermore, step S5 specifically includes:
[0179] The IVF-FLAT method is used to search for the nearest neighbor address vectors of at least one address feature vector in the vector database;
[0180] The matching degree between the nearest neighbor address vector and the address feature vector is calculated based on a preset matching model. The preset matching model is as follows:
[0181]
[0182] Where r1 and r2 are preset harmonic coefficients, This represents the similarity score between an address feature vector and its nearest neighbor address vectors. This represents the overlap score between the address feature vector and the nearest neighbor address vector. G is the function for calculating the number of overlapping elements in the address pair, L is the function for calculating the length of the address element corresponding to the address feature vector, and k is the preset key address element type.
[0183] This application also provides a computer-readable storage medium for storing program code that executes any one of the implementation methods of the address fuzzy matching method described in the foregoing embodiments.
[0184] This application provides a method, apparatus, device, and readable storage medium for fuzzy address matching. By extracting address elements from the target address text and constructing an address graph, the method utilizes a graph attention network model to extract address feature vectors that integrate address semantic and structural information, thus better handling non-standard addresses. Simultaneously, it applies a vector database for nearest-neighbor address vector matching, eliminating the need to consider time consumption issues. Finally, it filters the desired fuzzy matching address based on a preset threshold. This solves the technical problems of existing address matching methods, such as reliance on standardized address databases and manual exhaustive enumeration of address structures, difficulty in handling non-standard addresses leading to limited matching accuracy, and the time-consuming pairwise calculations required for large-scale data processing, making them unsuitable for all scenarios.
[0185] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0186] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0187] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0188] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0189] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0190] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0191] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0192] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A fuzzy address matching method, characterized in that, include: Get the target address text to be matched; After preprocessing the target address text, the recall address is filtered and matched based on the preset POI database and preset rule template; If the filtering and matching fails, the target address text is parsed based on the entity recognition model, and an address map is constructed based on the address element parsing results. Based on the preset graph attention network model and combined with the address graph, the target address text is vector encoded and features are extracted to obtain the address feature vector of the target address text. Specifically, the address elements contained in the associated path are converted into a computable format, and then random sampling is performed based on the node2vec random walk strategy, starting from each node in the associated path, to obtain a node sequence. The address embedding vector corresponding to the node sequence is generated through the skip-gram model. The address embedding vector is used as the input of a preset graph attention network model, and the preset graph attention network model outputs an address feature vector, which integrates address semantics and address hierarchy structure information. Searching for at least one nearest neighbor address vector of the address feature vector in the vector database, and calculating the matching degree between the nearest neighbor address vector and the address feature vector based on a preset matching model, specifically includes: using the IVF-FLAT method to search for at least one nearest neighbor address vector of the address feature vector in the vector database; The matching degree between the nearest neighbor address vector and the address feature vector is calculated based on a preset matching model. Specifically, the preset matching model is as follows: the similarity score between the address feature vector and the nearest neighbor address vector, and the overlap score between the address feature vector and the nearest neighbor address vector are calculated respectively. The similarity score and the overlap score are summed based on a preset harmonic coefficient to obtain the matching degree between the nearest neighbor address vector and the address feature vector. If the matching degree is higher than a preset threshold, then the address information corresponding to the nearest address vector is used as the fuzzy matching result of the target address text matching.
2. The address fuzzy matching method according to claim 1, characterized in that, After preprocessing the target address text, the process of filtering and matching the retrieved addresses based on a preset POI database and preset rule templates includes: The target address text is cleaned and preprocessed to unify its format. The preprocessed target address text is matched with a preset POI database to obtain several matching recall addresses; Determine whether the target address text and the matched recall addresses have the same POI element or the same address hierarchy information.
3. The address fuzzy matching method according to claim 2, characterized in that, After preprocessing the target address text, the process of filtering and matching recall addresses based on a preset POI database and preset rule templates further includes: If the target address text and one of the matched recall addresses have the same POI element or the same address hierarchy information, then the matched recall address is parsed based on the entity recognition model, and an address map is constructed based on the address element parsing results.
4. The address fuzzy matching method according to claim 2, characterized in that, If the filtering and matching fails, the target address text is parsed based on the entity recognition model, and an address map is constructed based on the address element parsing results, including: If the target address text does not have the same POI element or the same address hierarchy information among the matched recall addresses, then the target address text is parsed based on the BERT model pre-trained in the address entity corpus to obtain the address element parsing result of the target address text. Based on the address element parsing results, an address graph is constructed using the address element as the parent node to determine the associated path of the target address text.
5. An address fuzzy matching device, characterized in that, include: The acquisition unit is used to acquire the target address text to be matched. The first matching unit is used to preprocess the target address text and then filter and match the recall address based on a preset POI database and a preset rule template. The first processing unit is used to perform element parsing on the target address text based on the entity recognition model and construct an address map based on the address element parsing results if the filtering and matching fails. The feature extraction unit is used to perform vector encoding and feature extraction on the target address text based on a preset graph attention network model and in combination with the address graph, to obtain the address feature vector of the target address text. Specifically, it is used to convert the address elements contained in the associated path into a computable format, and then, based on the node2vec random walk strategy, randomly sample from each node in the associated path to obtain a node sequence. The unit then generates the address embedding vector corresponding to the node sequence through the skip-gram model, and uses the address embedding vector as the input of the preset graph attention network model. The preset graph attention network model outputs the address feature vector, which integrates address semantics and address hierarchy structure information. The second matching unit is used to search for at least one nearest neighbor address vector of the address feature vector in the vector database, and calculate the matching degree between the nearest neighbor address vector and the address feature vector based on a preset matching model. Specifically, it is used to search for at least one nearest neighbor address vector of the address feature vector in the vector database using the IVF-FLAT method, and calculate the matching degree between the nearest neighbor address vector and the address feature vector based on the preset matching model. The preset matching model specifically calculates the similarity score between the address feature vector and the nearest neighbor address vector, and the overlap score between the address feature vector and the nearest neighbor address vector, respectively. The similarity score and the overlap score are summed based on a preset harmonic coefficient to obtain the matching degree between the nearest neighbor address vector and the address feature vector. The second processing unit is used to take the address information corresponding to the nearest address vector as the fuzzy matching result of the target address text matching if the matching degree is higher than a preset threshold.
6. An address fuzzy matching device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the address fuzzy matching method according to any one of claims 1-4 according to the instructions in the program code.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the address fuzzy matching method according to any one of claims 1-4.