Address matching method and matching system based on style conversion
Through the address matching method based on style conversion, the problem of lack of flexibility and adaptability of address matching methods in the existing technology is solved, and higher matching accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202411907354.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing address matching methods are based on discriminant methods, lack flexibility and adaptability, and it is difficult to provide accurate matching in complex and changing urban environments and constantly updated address information.
Adopt a style matching method based on style conversion, the source and style address are divided into regional parts and specific address parts through the address segmentation model. The style conversion model is used to convert the specific address part of the source address to the style that is consistent with the target address. Then Match the conversion address with the target address.
It improves the accuracy and flexibility of address matching, can better adapt to address formats and description styles in different regions, and enhances matching capabilities in complex environments.
Smart Images

Figure CN119357701A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of address matching, and more specifically, to an address matching method and a matching system based on style conversion. Background Art
[0002] Address matching refers to determining whether a pair of input addresses point to the same place. A common application is to input a non-standard source address and compare it with a standard address in the address database to determine whether it matches. This plays a vital role in urban governance and service systems. It ensures the accuracy and efficiency of information. For city managers, being able to accurately identify and locate each specific address is the basis for effective management and services.
[0003] However, despite the increasing importance of address matching, existing methods have some limitations. Currently, most address matching methods are discriminant-based, which means they rely on pre-set rules or patterns to identify and match addresses. Although this approach can provide fast matching results in some cases, it may lack flexibility and adaptability, especially when faced with complex and changing urban environments and constantly updated address information. Summary of the invention
[0004] The present invention aims at the technical problems existing in the prior art and provides an address matching method and a matching system based on style conversion.
[0005] According to a first aspect of the present invention, there is provided an address matching method based on style conversion, comprising: Based on the address segmentation model, the source address and the style address are segmented respectively to obtain the region part and the specific address part of the source address and the region part and the specific address part of the style address, wherein the description style of the specific address part of the style address is consistent with the description style of the specific address part of the target address; Input the specific address part of the source address and the specific address part of the style address into the style transfer model, perform style transfer on the specific address part of the source address, and obtain the specific address part of the candidate address; Concatenate the specific address portion of the candidate address and the regional portion of the style address to obtain a candidate address; The candidate address is compared with the target address. If they are completely consistent, the candidate address and the target address are matched successfully. Otherwise, the match fails.
[0006] Based on the above technical solution, the present invention can also make the following improvements.
[0007] Optionally, the training process of the style transfer model includes: Acquire multiple pieces of address data, each piece of address data including a specific address portion of a source address, a specific address portion of a style address, and a specific address portion of a candidate address; Extracting source address information, style address information and candidate address information from the specific address part of the source address, the specific address part of the style address and the specific address part of the candidate address respectively, wherein the source address information includes a key identifier and a description style of the source address, the style address information includes a key identifier and a description style of the style address, and the candidate address information includes a key identifier and a description style of the candidate address, and the description style of the style address is consistent with the description style of the candidate address; Constructing a training sample data set, wherein the training sample data set includes multiple training samples, each of which includes three parts, namely [specific address part of the source address, source address information], [specific address part of the style address, style address information], and [specific address part of the candidate address, candidate address information]; The style transfer model is trained based on the training sample data set to obtain a trained style transfer model.
[0008] Optionally, the style transfer model is a large language model, and the step of training the style transfer model based on the training sample data set to obtain a trained style transfer model includes: constructing a prompt word for each of the training samples based on the specific address part of the source address and the specific address part of the style address, inputting the prompt word for each of the training samples into a style conversion model, obtaining output content of the style conversion model, and extracting the specific address part of the candidate address from the output content; The loss function value of the style conversion model is calculated according to the specific address part of the candidate address output by the style conversion model and the specific address part of the candidate address in the training sample data set, and the style conversion model is optimized by the loss function value to obtain a trained style conversion model.
[0009] Optionally, the prompt word of each training sample is constructed according to the following template: Please generate the specific address part of the candidate address based on the specific address part of the source address and the specific address part of the style address; The specific address part of the source address: {the specific address part of the source address}; The specific address part of the style address: {the specific address part of the style address}; Please generate it step by step as follows: The first step is to analyze the key identifiers and description styles of the specific address part of the source address; The second step is to analyze the key identifiers and description styles of the specific address part of the style address; The third step is to generate the specific address part of the candidate address according to the source address information and the description style of the style address; The style transfer model constructs output content according to the following template: The first step is the specific address part of the source address: {the specific address part of the source address}; The key identifier is: {key identifier of the source address}; The description style is: {source address description style}; Step 2, style address: {style address} The key identifier is: the specific address part of the style address: {the specific address part of the style address}; The description style is: {description style of style address} The third step is to infer the candidate address information based on the source address information and the description style of the style address: The key identifier is: {key identifier of the candidate address}; The description style is: {description style of candidate address}; According to the candidate address information, generate the specific address part of the candidate address: {the specific address part of the candidate address}.
[0010] Optionally, the target address is used as the style address.
[0011] According to a second aspect of the present invention, there is provided an address matching system based on style conversion, comprising: a segmentation module, configured to segment the source address and the style address respectively based on the address segmentation model to obtain the region part and the specific address part of the source address and the region part and the specific address part of the style address, wherein the description style of the specific address part of the style address is consistent with the description style of the specific address part of the target address; A style conversion module, used for inputting the specific address part of the source address and the specific address part of the style address into the style conversion model, performing style conversion on the specific address part of the source address, and obtaining the specific address part of the candidate address; A splicing module, used for splicing the specific address part of the candidate address and the regional part of the style address to obtain a candidate address; The matching module is used to compare the candidate address with the target address. If they are completely consistent, the candidate address and the target address are matched successfully, otherwise, the match fails.
[0012] The present invention provides an address matching method and matching system based on style conversion, which respectively divides the source address and the style address to obtain the regional part and the specific address part; inputs the specific address part of the source address and the specific address part of the style address into the style conversion model to obtain the specific address part of the candidate address; splices the specific address part of the candidate address and the regional part of the style address to obtain the candidate address; compares the candidate address with the target address, and if they are completely consistent, the match is successful, otherwise, the match fails. The present invention converts the description style of the source address to be consistent with the description style of the target address, and then matches the source address after the conversion style with the target address, which improves the matching accuracy compared with the existing discriminant matching; and converts the style of the source address through the style conversion model, with almost no restrictions on the description style of the source address, thereby improving the flexibility and adaptability of address matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flow chart of an address matching method based on style conversion provided by the present invention; Figure 2 The overall flow chart of the address matching method based on style conversion provided by the present invention; Figure 3 This is a schematic diagram of a case study of an address matching method based on style transfer; Figure 4 This is the training flow chart of the style transfer model; Figure 5 A schematic diagram of a case study for training a style transfer model; Figure 6 A structural block diagram of an address matching system based on style conversion provided by the present invention. DETAILED DESCRIPTION
[0014] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0015] In urban service management, it is usually necessary to input the address of the computer resident, and then match the input address with the address in the address database to find the correct address. However, since the description style of the input address is inconsistent with that of the address in the address database, it increases the difficulty of address matching.
[0016] Almost all existing methods are discriminative address matching methods, which directly compare the features of the source address and the target address to determine whether the address pair matches. However, all discriminative address matching methods are limited by the incompleteness of the training set, and it is difficult for the model or algorithm to learn all the discriminative features. For example, the addresses in City B often have similar addresses as Room B1, Unit 4, Building 123, while the addresses in City D often have similar addresses as No. 4-5, Lane 123. The address matching method trained in City B has difficulty capturing or identifying the features of the addresses in City D, because information such as "lane" and "number" has never appeared in the training samples. Therefore, this type of address matching method is difficult to achieve the goal of being trained in area B and applicable in area D.
[0017] Therefore, the present invention provides an address matching method based on style conversion, such as Figure 1 As shown, the steps of the address matching method based on style conversion include: Step 1, based on the address segmentation model, the source address and the style address are segmented respectively to obtain the regional part and the specific address part of the source address and the regional part and the specific address part of the style address, wherein the description style of the specific address part of the style address is consistent with the description style of the specific address part of the target address.
[0018] in, Figure 2 The overall flow chart of the address matching method based on style transfer is shown, and Figure 3 A case diagram of an address matching method based on style transfer is shown, where a source address and a target address are first input.
[0019] like: Source address: 1-1201, C District, B District, A City; Target address: Room 01, 12th Floor, Building 1, C Community, No. 1, E Road, F Street, B District, A City, D Province.
[0020] Copy the target address as the style address, and use the address segmentation model to segment the source address and the style address into the regional part and the specific address part respectively, so as to obtain the regional part and the specific address part of the source address and the regional part and the specific address part of the style address.
[0021] The present invention uses the open source address model Mgeo as the address segmentation model. The Where / What model in the Mgeo model can segment the address into two parts, namely, the area part and the specific address part.
[0022] like: Source address: 1-1201, C District, District B, City A; The area after the division is: District B, City A, and the specific address is: District C 1-1201; Style address: Room 01, 12th Floor, Building 1, C Community, No. 1 E Road, F Street, B District, A City, D Province; The area after the division is: No. 1, E Road, F Street, B District, A City, D Province; Specific address: Room 01, 12th Floor, Building 1, Community C.
[0023] Step 2: Input the specific address part of the source address and the specific address part of the style address into the style transfer model, perform style transfer on the specific address part of the source address, and obtain the specific address part of the candidate address.
[0024] It can be understood that step 1 divides both the source address and the style address to obtain the regional part and the specific address part of the source address and the regional part and the specific address part of the style address. The specific address part of the source address and the specific address part of the style address are input into the trained style conversion model, and the specific address part of the source address is style converted to obtain the specific address part of the candidate address.
[0025] Among them, the present invention uses a large language model as a style transfer model. The large language model can understand and use language. This type of language model has been pre-trained with a large amount of text, and can generate text, summarize content, and perform translation, rewriting, classification, classification and analysis. The large language model described in the present invention refers to an open source large language model, such as ChatGLM-6b, Qwen-14b, etc. The present invention selects ChatGLM-6b as the style transfer model of the present invention.
[0026] Before using the style transfer model to convert the style of the source address, the style transfer model needs to be trained.
[0027] Exemplarily, the training process of the style transfer model includes: Step 21, obtaining multiple pieces of address data, each piece of address data includes a specific address portion of a source address, a specific address portion of a style address, and a specific address portion of a candidate address.
[0028] It can be understood that a training sample data set is collected, and the sample data set includes multiple address data. Each address data includes the specific address part of the source address, the specific address part of the style address and the specific address part of the candidate address. The specific address part of the source address, the specific address part of the style address and the specific address part of the candidate address can be segmented from the source address, the style address and the candidate address respectively through the segmentation model.
[0029] Step 22, extracting source address information, style address information and candidate address information from the specific address part of the source address, the specific address part of the style address and the specific address part of the candidate address respectively, wherein the source address information includes a key identifier and a description style of the source address, the style address information includes a key identifier and a description style of the style address, and the candidate address information includes a key identifier and a description style of the candidate address, and the description style of the style address is consistent with the description style of the candidate address.
[0030] Step 23, construct a training sample data set, wherein the training sample data set includes multiple training samples, each of which includes three parts, namely [specific address part of the source address, source address information], [specific address part of the style address, style address information], and [specific address part of the candidate address, candidate address information].
[0031] For more details, please refer to the training process of the style transfer model. Figure 4 and Figure 5 , including the following steps: First, obtain a training sample data set. The training sample data set includes multiple training samples. The processing method of each training sample is as follows.
[0032] Each piece of data in the training sample contains three parts, namely [specific address part of the source address, source address information], [specific address part of the style address, style address information], [specific address part of the candidate address, candidate address information]. The specific address part of the source address is the specific address part separated from the address collected by the business, and the source address information includes the key identifier and description style of the source address; the specific address part of the style address is the address consistent with the description style of the candidate address, and the style address information includes the key identifier and description style of the style address; the specific address part of the candidate address is the unified address corresponding to the source address in the address library, and the candidate address information includes the key identifier and description style of the candidate address.
[0033] There are only three types of key identifiers in the specific address part, namely: entity, number, and letter. For example, "ABC Community 1 Building 1 Unit 1B", "ABC Community" is the entity identifier, "1" in "1 Building" is the number identifier, and "B" in "1B" is the letter identifier.
[0034] In an address, the specific value of the key identifier is replaced with the corresponding identifier, which is the description style of this address. For example, "ABC Community 1 Building 1 Unit 1B" is replaced with the corresponding identifier as follows: number + "community" + number + "building" + number + "unit" + number + letter, which is the description style of the address.
[0035] like: Training sample 1: Specific address part of the source address: Room 1201, Building 1; Source address information: Key identifier: {1: number, 1201: number}; Description style: number + "Building" + number; Specific address part of the style address: Room 03, 5th Floor, Building 2; Style address information: Key identifier: {2: number, 5: number, 03: number}; Description style: number + "Building" + number + "Floor" + number + "Room"; Specific address part of the candidate address: Room 01, 12th Floor, Building 1; Candidate address information: Key identifier: {1: number, 12: number, 01: number} Description style: number + "Building" + number + "Floor" + number + "Room" That is, the source address and the candidate address point to the same location, and the description style of the style address should be consistent with the description style of the candidate address.
[0036] Step 24: Train the style conversion model based on the training sample dataset to obtain a trained style conversion model.
[0037] It can be understood that after obtaining the training sample dataset, the style conversion model is trained based on the training sample dataset. In the present invention, a large language model is used as the style conversion model. In order to enable the large language model to accurately output the desired content, the present invention constructs the prompt words of the large language model and defines the format of the output content of the large language model based on the specific address part of the source address and the specific address part of the style address.
[0038] Exemplarily, the style conversion model is a large language model, and step 24, training the style conversion model based on the training sample dataset to obtain a trained style conversion model, includes: Step 241: Construct the prompt words of each training sample based on the specific address part of the source address and the specific address part of the style address, input the prompt words of each training sample into the style conversion model, obtain the output content of the style conversion model, and extract the specific address part of the candidate address from the output content.
[0039] Specifically, according to the specific address part of the source address and the chicken leg address part of the style address, construct training prompt words and output content based on the chain of thought: According to the training sample, construct the prompt words according to the following template: Please generate the specific address part of the candidate address based on the specific address part of the source address and the specific address part of the style address: The specific address part of the source address: {the specific address part of the source address}; The specific address part of the style address: {the specific address part of the style address}; Please generate it step by step as follows: The first step is to analyze the key identifiers and description styles of the specific address part of the source address; The second step is to analyze the key identifiers and description styles of the specific address part of the style address; The third step is to generate the specific address part of the candidate address based on the source address information and the description style of the style address.
[0040] like: “ Please generate the specific address part of the candidate address based on the specific address part of the source address and the specific address part of the style address: The specific address part of the source address: Building 1, 1201; The specific address part of the style address: Room 03, Floor 5, Building 2; Please generate it step by step as follows: The first step is to analyze the key identifiers and description styles of the source address; The second step is to analyze the key identifiers and description styles of the style address; The third step is to generate candidate addresses based on the source address information and the description style of the style address.
[0041] Accordingly, the style transfer model constructs output content according to the following template: The first step is the specific address part of the source address: {the specific address part of the source address}; The key identifier is: {key identifier of the source address}; The description style is: {source address description style}; Step 2, style address: {style address} The key identifier is: the specific address part of the style address: {the specific address part of the style address}; The description style is: {description style of style address} The third step is to infer the candidate address information based on the source address information and the description style of the style address: The key identifier is: {key identifier of the candidate address}; The description style is: {description style of candidate address}; According to the candidate address information, generate the specific address part of the candidate address: {the specific address part of the candidate address}.
[0042] Step 1, the specific address part of the source address: Room 1201, Building 1; The key identifiers are: {1: number, 1201: number}; The description style is: number + "Building" + number; Step 2, the specific address part of the style address: Room 03, 5th Floor, Building 2; The key identifiers are: {2: number, 5: number, 03: number}; The description style is: number + "Building" + number + "Floor" + number + "Room"; Step 3, based on the source address information and the description style of the style address, the candidate address information can be inferred: The key identifiers are: {1: number, 12: number, 01: number}; The description style is: number + "Building" + number + "Floor" + number + "Room"; Based on the candidate address information, generate the specific address part of the candidate address: Room 01, 12th Floor, Building 1.
[0043] Step 242, calculate the loss function value of the style conversion model according to the specific address part of the candidate address output by the style conversion model and the specific address part of the candidate address in the training sample dataset. Specifically, the loss function value is used to optimize the style conversion model to obtain the trained style conversion model.
[0044] It can be understood that after constructing the prompt words for each training sample in the training sample dataset, input the prompt words of each training sample into the large language model. According to the output content of the large language model and the constructed output content, calculate the loss through the loss function, and reduce the loss function based on the optimizer自带 by the large language model, so that the output of the large language model gradually approaches the expected output content, and obtain the trained style conversion model.
[0045] In Step 1, the area part and the specific address part of the source address to be matched and the area part and the specific address part of the style address are respectively obtained through the segmentation model. Construct the prompt words according to the specific address part of the input source address and the specific address part of the style address.
[0046] For example, input: [Unit 1-1201, Community C, Room 01, 12th Floor, Building 1, Community C]; Construct the prompt words: " Please generate the specific address part of the candidate address according to the specific address part of the source address and the specific address part of the style address: The specific address part of the source address: Unit 1-1201, Community C; The specific address part of the style address: Room 01, Floor 12, Building 1, Residential District C; Please generate it step by step as follows: The first step is to analyze the key identifiers and description styles of the source address; The second step is to analyze the key identifiers and description styles of the style address; The third step is to generate the specific address part of the candidate address based on the source address information and the description style of the style address.
[0047] Step 3: Concatenate the specific address portion of the candidate address and the regional portion of the style address to obtain a candidate address.
[0048] It is understandable that a prompt word is constructed according to the specific address part of the source address to be matched and the specific address part of the style address, and the prompt word is input into the style transfer model to obtain the output content of the style transfer model.
[0049] For example, if the above prompt words are input into the style transfer model, the output of the style transfer model may be as follows: “ The first step is the specific address part of the source address: C community 1-1201; The key identifier is: {Ccell: entity, 1: number, 1201: number}; The description style is: entity + number + "-" + number; Step 2: The specific address part of the style address: Room 01, 12th Floor, Building 1, Community C; The key identifier is: {Cell: entity, 1: number, 12: number, 01: number}; The description style is: entity + number + "building" + number + "floor" + number + "room"; In the third step, based on the source address information and the description style of the style address, the specific address part of the candidate address information can be inferred: The key identifier is: {Cell: entity, 1: number, 12: number, 01: number}; The description style is: entity + number + "building" + number + "floor" + number + "room"; Based on the candidate address information, a candidate address is generated: Room 01, Floor 12, Building 1, Community C".
[0050] The specific address part of the candidate address is extracted from the output content of the style transfer model, and then the regional part of the style address is concatenated with the specific address part of the candidate address to obtain the entire candidate address. Then, the description style of the candidate address is consistent with the description style of the target address.
[0051] Step 4: compare the candidate address with the target address. If they are completely consistent, the candidate address and the target address are matched successfully. Otherwise, the match fails.
[0052] It is understandable that the concatenated candidate address is compared with the target address. If the concatenated candidate address is completely consistent with the target address, it is considered that the source address and the target address point to the same location and the match is output successfully; otherwise, the match fails.
[0053] For example, the specific address part of the candidate address extracted from step 3 is: "Room 01, Floor 12, Building 1, Community C", and the regional part of the style address is "No. 1, Road E, Street F, District B, City A, Province D".
[0054] The candidate address after splicing is: "Room 01, 12th Floor, Building 1, C Community, No. 1, E Road, F Street, B District, A City, D Province"; The target address is: "Room 01, 12th Floor, Building 1, C Community, No. 1, E Road, F Street, B District, A City, D Province"; If the concatenated candidate address and the target address are completely consistent, the output match is successful; otherwise, if any character of the concatenated candidate address and the target address is inconsistent, the output match fails.
[0055] Figure 6 The present invention provides an address matching system based on style conversion, the system comprising: A segmentation module 601 is used to segment the source address and the style address respectively based on the address segmentation model to obtain the region part and the specific address part of the source address and the region part and the specific address part of the style address, wherein the description style of the specific address part of the style address is consistent with the description style of the specific address part of the target address; A style conversion module 602 is used to input the specific address part of the source address and the specific address part of the style address into a style conversion model, perform style conversion on the specific address part of the source address, and obtain the specific address part of the candidate address; A concatenation module 603 is used to concatenate the specific address portion of the candidate address and the regional portion of the style address to obtain a candidate address; The matching module 604 is used to compare the candidate address with the target address. If they are completely consistent, the candidate address and the target address are matched successfully, otherwise, the match fails.
[0056] It can be understood that the address matching system based on style conversion provided by the present invention corresponds to the address matching method based on style conversion provided by the aforementioned embodiments. The relevant technical features of the address matching system based on style conversion can refer to the relevant technical features of the address matching method based on style conversion, which will not be repeated here.
[0057] The embodiment of the present invention provides an address matching method and matching system based on style conversion, which regards two addresses with different descriptions but pointing to the same location as two addresses with the same key identifier but different description styles. Therefore, an address matching method is proposed to convert the style of one address into the style of another address, and then determine whether the addresses match based on whether the key identifiers are completely consistent. In the process of style conversion, the style conversion model focuses on the extraction of key identifiers and whether the key identifiers of the addresses are consistent, while reducing the weight of specific descriptive word features in the description style, so that the style conversion model can correctly distinguish the same geographical element in different regions, improve the flexibility and applicability of the style conversion model, and achieve higher matching accuracy in scenarios where training and application are in different regions.
[0058] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0059] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0060] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0061] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0062] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0063] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0064] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An address matching method based on style conversion, characterized in that: include: Based on the address segmentation model, the source address and the style address are segmented respectively to obtain the region part and the specific address part of the source address and the region part and the specific address part of the style address, wherein the description style of the specific address part of the style address is consistent with the description style of the specific address part of the target address; The specific address part of the source address and the specific address part of the style address are input into the style transfer model, and the style transfer is performed on the specific address part of the source address to obtain the specific address part of the candidate address; Concatenate the specific address portion of the candidate address and the regional portion of the style address to obtain a candidate address; The candidate address is compared with the target address. If they are completely consistent, the candidate address and the target address are matched successfully. Otherwise, the match fails.
2. The address matching method based on style conversion according to claim 1, characterized in that: The training process of the style transfer model includes: Acquire multiple pieces of address data, each piece of address data including a specific address portion of a source address, a specific address portion of a style address, and a specific address portion of a candidate address; Extracting source address information, style address information and candidate address information from the specific address part of the source address, the specific address part of the style address and the specific address part of the candidate address respectively, wherein the source address information includes a key identifier and a description style of the source address, the style address information includes a key identifier and a description style of the style address, and the candidate address information includes a key identifier and a description style of the candidate address, and the description style of the style address is consistent with the description style of the candidate address; Constructing a training sample data set, wherein the training sample data set includes multiple training samples, each of which includes three parts, namely [specific address part of the source address, source address information], [specific address part of the style address, style address information], and [specific address part of the candidate address, candidate address information]; The style transfer model is trained based on the training sample data set to obtain a trained style transfer model.
3. The address matching method based on style conversion according to claim 2, characterized in that: The style conversion model is a large language model, and the style conversion model is trained based on the training sample data set to obtain a trained style conversion model, including: constructing a prompt word for each of the training samples based on the specific address part of the source address and the specific address part of the style address, inputting the prompt word for each of the training samples into a style conversion model, obtaining output content of the style conversion model, and extracting the specific address part of the candidate address from the output content; The loss function value of the style conversion model is calculated according to the specific address part of the candidate address output by the style conversion model and the specific address part of the candidate address in the training sample data set, and the style conversion model is optimized by the loss function value to obtain a trained style conversion model.
4. The address matching method based on style conversion according to claim 3 is characterized in that: The prompt words of each training sample are constructed according to the following template: Please generate the specific address part of the candidate address based on the specific address part of the source address and the specific address part of the style address; The specific address part of the source address: {the specific address part of the source address}; The specific address part of the style address: {the specific address part of the style address}; Please generate it step by step as follows: The first step is to analyze the key identifiers and description styles of the specific address part of the source address; The second step is to analyze the key identifiers and description styles of the specific address part of the style address; The third step is to generate the specific address part of the candidate address according to the source address information and the description style of the style address; The style transfer model constructs output content according to the following template: The first step is the specific address part of the source address: {the specific address part of the source address}; The key identifier is: {key identifier of the source address}; The description style is: {source address description style}; Step 2, style address: {style address} The key identifier is: the specific address part of the style address: {the specific address part of the style address}; The description style is: {description style of style address} The third step is to infer the candidate address information based on the source address information and the description style of the style address: The key identifier is: {key identifier of the candidate address}; The description style is: {description style of candidate address}; According to the candidate address information, generate the specific address part of the candidate address: {the specific address part of the candidate address}.
5. The address matching method based on style conversion according to claim 1, characterized in that: The target address is used as the style address.
6. An address matching system based on style conversion, characterized in that: include: a segmentation module, configured to segment the source address and the style address respectively based on the address segmentation model to obtain the region part and the specific address part of the source address and the region part and the specific address part of the style address, wherein the description style of the specific address part of the style address is consistent with the description style of the specific address part of the target address; A style conversion module, used for inputting the specific address part of the source address and the specific address part of the style address into the style conversion model, performing style conversion on the specific address part of the source address, and obtaining the specific address part of the candidate address; A splicing module, used for splicing the specific address part of the candidate address and the regional part of the style address to obtain a candidate address; The matching module is used to compare the candidate address with the target address. If they are completely consistent, the candidate address and the target address are matched successfully, otherwise, the match fails.
Citation Information
Patent Citations
Address fuzzy matching method and device, address processing method and device and electronic equipment
CN114328808A
Address element identification method fusing sentence pattern information
CN115048931A
Address matching method and device
CN115470307A
Address element correction method and device, electronic equipment and storage medium
CN117556810A
Address standardization method and device, storage medium and equipment
CN117763072A