CN115345174A - Address information matching method, device and equipment - Google Patents

Address information matching method, device and equipment Download PDF

Info

Publication number
CN115345174A
CN115345174A CN202210993894.3A CN202210993894A CN115345174A CN 115345174 A CN115345174 A CN 115345174A CN 202210993894 A CN202210993894 A CN 202210993894A CN 115345174 A CN115345174 A CN 115345174A
Authority
CN
China
Prior art keywords
model
address information
preset
strategy
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210993894.3A
Other languages
Chinese (zh)
Inventor
陈欢
祝慧佳
郭亚
唐锦阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210993894.3A priority Critical patent/CN115345174A/en
Publication of CN115345174A publication Critical patent/CN115345174A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/088Non-supervised learning, e.g. competitive learning

Abstract

The embodiment of the specification discloses a method, a device and equipment for matching address information, wherein the method comprises the following steps: obtaining a target model, and performing model training on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, wherein the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographical region prediction in an address and a sub-strategy of address distance prediction; performing model training on the first model based on a preset model structure adjusting strategy and second sample data corresponding to the preset model structure adjusting strategy to obtain a trained second model, wherein the second model is used for matching the semantics of the address information; and matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.

Description

Address information matching method, device and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for matching address information.
Background
Semantic matching of text information is an application with important practical significance, particularly address matching, and the address matching is an important task and can be used for verifying authenticity and consistency of address information in many scenes. Address matching is a very challenging task, because specific address information contains rich expression forms, in an actual application scenario, in order to match address information of different forms in a correlated manner, an address matching mechanism needs to be introduced, and addresses of different input forms can be normalized through the address matching mechanism, so that service problems under many address-related scenarios are solved.
The address matching mechanism has been studied for a long time, and the conventional address matching method is mainly based on a certain rule and an approximate string matching manner, for example, an address element-based method can be used for matching addresses, that is, firstly, address information is analyzed into different address elements, and then, according to whether the corresponding address elements are consistent, whether two pieces of address information are consistent is judged by matching with a set threshold, however, the above manner can only process addresses with very standardized forms, in most practical service scenes, the address forms are rich and diverse, and it is difficult to directly judge the consistency of the address information according to differences in character patterns, and therefore, a technical scheme capable of accurately and effectively performing semantic matching on the rich and diverse address information needs to be provided.
Disclosure of Invention
The embodiment of the specification aims to provide a technical scheme capable of carrying out accurate and effective semantic matching on rich and diverse address information.
In order to implement the above technical solution, the embodiments of the present specification are implemented as follows:
an embodiment of the present specification provides a method for matching address information, where the method includes: and acquiring a target model, wherein the target model is used for matching the semantics of the text information. Model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, and the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic area prediction in an address and a sub-strategy of address distance prediction. And model training is carried out on the first model based on a preset model structure adjusting strategy and second sample data corresponding to the preset model structure adjusting strategy to obtain a trained second model, and the second model is used for a model for matching the semantics of the address information. And matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.
An address information matching device provided by an embodiment of the present specification, the device includes: and the initial model acquisition module is used for acquiring a target model, and the target model is used for matching the semantics of the text information. The first training module performs model training on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, wherein the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic region prediction in an address and a sub-strategy of address distance prediction. And the second training module is used for carrying out model training on the first model based on a preset model structure adjusting strategy and second sample data corresponding to the preset model structure adjusting strategy to obtain a trained second model, and the second model is used for carrying out a model for matching the semantics of the address information. And the address information matching module is used for matching the semantics of the two pieces of acquired address information based on the second model so as to determine whether the two pieces of address information are the same or not and obtain a matching result of the two pieces of address information.
An embodiment of the present specification provides an address information matching apparatus, where the address information matching apparatus includes: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: and acquiring a target model, wherein the target model is used for matching the semantics of the text information. Model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, and the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic area prediction in an address and a sub-strategy of address distance prediction. And performing model training on the first model based on a preset model structure adjusting strategy and second sample data corresponding to the preset model structure adjusting strategy to obtain a trained second model, wherein the second model is used for matching the semantics of the address information. And matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.
Embodiments of the present specification also provide a storage medium for storing computer-executable instructions, which when executed by a processor implement the following processes: and acquiring a target model, wherein the target model is used for matching the semantics of the text information. Model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, and the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic area prediction in an address and a sub-strategy of address distance prediction. And performing model training on the first model based on a preset model structure adjusting strategy and second sample data corresponding to the preset model structure adjusting strategy to obtain a trained second model, wherein the second model is used for matching the semantics of the address information. And matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a diagram illustrating an embodiment of a method for matching address information according to the present disclosure;
FIG. 2 is a diagram illustrating another embodiment of a method for matching address information;
FIG. 3 is a schematic diagram of a statement feature determination process according to the present description;
FIG. 4 is a schematic diagram of a fine-tuning process for address information according to the present disclosure;
FIG. 5 is a block diagram illustrating an embodiment of an apparatus for matching address information;
fig. 6 is an embodiment of an address information matching apparatus according to the present disclosure.
Detailed Description
The embodiment of the specification provides a method, a device and equipment for matching address information.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without making any creative effort shall fall within the protection scope of the present specification.
Example one
As shown in fig. 1, an execution subject of the method may be a terminal device or a server, where the terminal device may be a certain terminal device such as a mobile phone and a tablet computer, and may also be a computer device such as a notebook computer or a desktop computer, or may also be an IoT device (specifically, a smart watch, an in-vehicle device, and the like). The server may be an independent server, or a server cluster formed by a plurality of servers, and the server may be a background server of financial service or online shopping service, or a background server of an application program. In this embodiment, a server is taken as an example to describe in detail, and for the execution process of the terminal device, reference may be made to the following relevant contents, which are not described herein again. The method specifically comprises the following steps:
in step S102, a target model for a model for matching the semantics of the text information is acquired.
The target model may be a model for matching semantics of text information, that is, it may be determined whether the semantics expressed by the two text information are the same, where the text information may be information presented by preset language words and characters, for example, information formed by chinese words, numbers, and designated symbols (such as "+", "#", "-", "+", and the like), which may be specifically set according to an actual situation, and this is not limited in this specification.
In implementation, semantic matching of text information is an application with important practical significance, especially address matching, and the address matching is an important task and can be used for verifying authenticity and consistency of address information in many scenes, such as a delivery address of express delivery, a business address of a merchant and the like. Address matching is a very challenging task because a rich expression form is included in specific address information, for example, chinese address information in the country is generally composed of elements such as province, city, district, county, street, name, house number, alias, remark, etc., and the expression form may be different for different users even if the same address is used. In practical application scenarios, in order to associate and match different forms of address information, an address matching mechanism needs to be introduced, and addresses of different input forms can be normalized through the address matching mechanism, so that service problems in many address-related scenarios are solved.
The address matching mechanism has been studied for a long time, and the conventional address matching method is mainly based on a certain rule and an approximate string matching mode, for example, whether two address strings are similar or not can be judged by calculating a distance, and some researchers use an address element-based method to match addresses, that is, firstly, address information is analyzed into different address elements, and then whether two address information are consistent or not is judged by matching with a set threshold value according to whether corresponding address elements are consistent or not. The embodiment of the present specification provides an implementable technical solution, which may specifically include the following contents:
the target model for matching the semantics of the text information can be obtained in various ways, for example, an algorithm for matching the semantics of the text information can be selected, and the target model can be constructed through the algorithm, so that the target model can be obtained, and at this time, the target model can be a model which is not subjected to model training; for another example, a target model which is published or openly used currently and matches semantics of text information may be obtained, where the target model has been model-trained, and at this time, the target model (e.g., BERT model, etc.) may be directly applied to a corresponding scene or service, where the target model may be obtained by performing model training using published sample data (e.g., specified data which can be searched through a network, or data in a specified database which can be publicly used, etc.); for another example, a currently published or openly used target model for matching semantics of text information may be obtained, where the target model is not subjected to model training, and at this time, the target model includes a certain model structure, initialized model parameters, and the like, which may be specifically set according to an actual situation, and this is not limited in the embodiments of the present specification.
In step S104, model training is performed on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, where the preset training strategy includes one or more of a sub-strategy for identifying a false address, a sub-strategy for predicting a preset geographic area in an address, and a sub-strategy for predicting an address distance.
In this embodiment, the preset training strategy may be a strategy that is preset and used for performing model training on the target model so that the trained model can have a certain function, and in this embodiment, the preset training strategy may be a strategy that migrates the target model that can implement semantic matching on the text information to the model that can implement semantic matching on the address information, that is, the preset training strategy may migrate the target model from a general text information semantic space to an address semantic space. The sub-strategy of the false address identification may be a strategy of presetting a certain amount of false address information and training a target model through the false address information so that the target model has the capability of identifying real and false address information. The sub-strategy for predicting the preset geographic area in the address can be a strategy of presetting or selecting a certain amount of address information, shielding or removing one or more pieces of geographic area information contained in a proper amount of address information, and then training a target model through the processed address information and the rest unprocessed address information so that the target model has the capability of complementing or restoring the geographic area information missing in the address information. The sub-strategy for address distance prediction may be a strategy that sets or selects a certain number of address information pairs in advance, and trains a target model through the address information pairs, so that the target model has the capability of determining the distance between two pieces of address information in the address information pairs. The first sample data may include multiple types, and the first sample data may be a preset certain amount of false address information corresponding to a sub-policy identified by a false address, may also be a preset address information and remaining unprocessed address information corresponding to a sub-policy predicted by a preset geographical area in an address, or may also be a preset address information or a certain amount of address information corresponding to a sub-policy predicted by an address distance, or the like, which may be specifically set according to an actual situation, and this is not limited in this description embodiment.
In the implementation, in consideration of the data characteristics that the acquired target model may not accurately represent short text information, especially the data characteristics that the target model may not accurately represent address information, a training task related to the address information may be set for the target model, so that the trained model can generate a better semantic representation for the address information. Taking a sub-strategy comprising false address recognition in the training strategy as an example, a certain amount of false address information can be acquired as first sample data, the first sample data can be input into a target model, the first sample data is judged to be real address information or false address information based on the sub-strategy and the target model of the false address recognition, then model parameters in the target model can be adjusted according to the obtained judgment result, and finally a trained model, namely the first model, can be obtained. In addition, the training strategy may further include another certain sub-strategy, or may include two of the three sub-strategies, or may include the three sub-strategies, and the like, and the specific processing procedure may refer to the meaning of each sub-strategy and the processing procedure in the above example, and is not described herein again. By the method, the trained model can generate better semantic representation of the address information.
In step S106, model training is performed on the first model based on the preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model, where the second model is used as a model for matching semantics of address information.
The preset model structure adjusting strategy can be that a certain amount of address information is selected, and the model structure of the model is adjusted in the process of model training of the current model through the address information, so that the finally obtained model can better learn the interaction process of semantic information with different granularities of two pieces of address information. The first sample data may be address information, specifically, a certain amount of address information selected from a preset model structure adjustment policy, and may be specifically set according to an actual situation, which is not limited in the embodiment of the present specification.
In implementation, the first model already has certain address information matching capability through the processing of step S104, compared with the original target model, the current first model has a certain degree of adjustment of model parameters, i.e. the model parameters have changed, and the model comprises not only the model parameters but also a model structure, the model structure of the first model and the object model being hardly changed, on the basis of which, on the basis of the processing of step S104, the model structure of the first model (or the target model) can also be appropriately adjusted, specifically, a model structure adjustment policy may be preset, based on which a certain amount of address information may be acquired as second sample data, the second sample data may be input into the first model, and considering that the address information corresponding to the second sample data carries geographic area information (or administrative area information) and detailed address information, in order to prevent forgetting in the deep transform nested structure of the first model, character features and word features in address information corresponding to the second sample data can be explicitly fused with the sentence features through a gating mechanism and are subjected to deep interactive coding, and finally the sentence features are accessed into a classification layer of the first model, so as to train and adjust the model structure of the first model, finally obtain a second model after training, the deep interactive coded statement features can be statement features obtained by processing the statement features through character features and word features in address information based on a Multi-Head Attention mechanism, obtaining processing results through fusion and standardization processing of the obtained results, carrying out forward propagation on the processing results, and carrying out fusion and standardization processing.
It should be noted that the foregoing processing manner is only an optional processing manner, and in practical applications, other various processing manners may also be included, for example, a manner that multiple sub-tasks are jointly constrained may be used, so that a spatial semantic relationship between address information may be effectively captured, an administrative hierarchy element of the address information and a membership relationship between administrative partitions may be learned without depending on external information, so as to semantically represent a single word in the address information and context environment information thereof, and maintain a true relationship between two address information in a high-dimensional space, which may be specifically set according to practical situations, and this is not limited in this specification.
In step S108, matching processing is performed on the semantics of the two pieces of address information obtained based on the second model to determine whether the two pieces of address information are the same, so as to obtain a matching result of the two pieces of address information.
In implementation, by the above manner, the model parameters and the model structure of the second model are both adjusted to a certain extent, so that the second model can be used for matching the semantics of the address information, and thus, the second model can be deployed in corresponding services. When a matching request of two pieces of address information is obtained, the two pieces of address information may be input into the second model, and the semantics of the two pieces of address information are matched by the second model, so as to determine whether the two pieces of address information are the same, if so, the same matching result may be output, and if not, the different matching results may be output, which may be specifically set according to an actual situation, and this is not limited in the embodiments of the present specification.
The embodiment of the specification provides a matching method of address information, a model used for matching the semantics of text information is obtained by obtaining a target model, the target model is then subjected to model training based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, the preset training strategy comprises one or more of a sub-strategy of false address recognition, a sub-strategy of preset geographic region prediction in an address and a sub-strategy of address distance prediction, model training is performed on the first model based on second sample data corresponding to a preset model structure adjustment strategy and a preset model structure adjustment strategy to obtain a trained second model, the second model is used for matching the semantics of the address information, finally, matching processing can be performed on the semantics of the obtained two address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information, thus, according to the geographic information and the characteristics of semantic strings in the address information, a processing mode of the target model is designed in a targeted manner, how well the two address information matching models are matched in a certain address information learning mode, and further, so that the address information in the address information has a certain degree of unsupervisable learning process, and the address information interaction between the two address models can be obtained.
Example two
As shown in fig. 2, an execution subject of the method may be a terminal device or a server, where the terminal device may be a certain terminal device such as a mobile phone and a tablet computer, and may also be a computer device such as a notebook computer or a desktop computer, or may also be an IoT device (specifically, a smart watch, an in-vehicle device, and the like). The server may be an independent server, or a server cluster formed by a plurality of servers, and the server may be a background server of financial service or online shopping service, or a background server of an application program. In this embodiment, a server is taken as an example to describe in detail, and for the execution process of the terminal device, reference may be made to the following relevant contents, which are not described herein again. The method specifically comprises the following steps:
in step S202, a target model trained based on a preset text corpus is obtained, where the preset text corpus includes a corpus composed of texts of a web encyclopedia presented based on preset language characters, and the target model is used as a model for matching semantics of text information.
The target model is a BERT model, the BERT model is a transform-based coder (Encoder), the main model structure is the stack of the transforms, a corresponding number of hidden vectors are obtained through the transform coder of each transform layer in the BERT model and are transmitted to the next transform layer, and the hidden vectors are transmitted layer by layer until the final output result.
In implementation, a model structure of the BERT model for matching semantics of text information may be selected, the BERT model may be constructed by a corresponding algorithm, and the BERT model may be trained using a preset text corpus composed of texts of a web encyclopedia presented based on preset language characters, so as to obtain a trained BERT model, i.e., a target model. Or, a trained target model may be directly obtained, where the target model may be obtained by performing model training using a preset text corpus composed of texts of a web encyclopedia presented based on preset language characters, and the like, and may be specifically set according to an actual situation, which is not limited in the embodiments of the present specification.
Deep pre-training can be performed on the data set of the address information according to the language model knowledge of the general preset language characters learned by the target model, so that the target model learns the domain knowledge related to the address information, which may be specifically referred to the processing in step S204 described below.
In step S204, model training is performed on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, where the preset training strategy includes one or more of a sub-strategy for identifying a false address, a sub-strategy for predicting a preset geographic area in an address, and a sub-strategy for predicting an address distance.
The specific processing in step S204 may refer to relevant contents in the first embodiment, and is not described herein again.
In practical applications, the specific processing of step S204 may also be implemented in many different ways, and 3 types of specific processing ways are provided below, and specific reference may be made to types one to three below.
The type one is as follows: if the preset training strategy includes a sub-strategy for identifying a false address, the specific processing of step S204 can be referred to the processing of step A2 to step A6.
In step A2, a plurality of different first preselected address information are acquired, and a preset number of first preselected address information are selected from the plurality of different first preselected address information.
In implementation, the first preselected address information may be obtained in a variety of different manners, for example, the address information may be collected by purchasing from a user, and the collected address information is used as the first preselected address information, or the address information may be crawled from the internet by a web crawler, and the crawled address information may be used as the first preselected address information, which may be specifically set according to actual situations, and this is not limited in this embodiment of the specification.
A preset number of first preselected address information may be selected from a plurality of different first preselected address information according to a preset certain selection rule, or a preset number of first preselected address information may be randomly selected from a plurality of different first preselected address information, or a preset number of first preselected address information may be selected from a plurality of different first preselected address information based on a preset selection probability, where the preset number may be set according to an actual situation, for example, the preset number may be 50% of a total number of the plurality of different first preselected address information, or the preset number may be 60% of the total number of the plurality of different first preselected address information, and the preset number may be set according to an actual situation, and this is not limited by the embodiments of the present specification.
In step A4, the first preset geographical area information in the preset number of first pre-selected address information is removed, and the remaining part is spliced with the second preset geographical area information to obtain the preset number of second pre-selected address information.
The first preset geographic region information may be information of an administrative region, and the administrative region may be a region of a country or a region classified for convenience of administrative management, for example, an administrative region such as a province, a city, a county, a town, etc. The second preset geographical area information may also be information of an administrative area.
In an implementation, a preset number of first pre-selected address information may be removed from the first pre-selected geographic area information to obtain a preset number of first pre-selected address information (i.e., the remaining portion) lacking administrative area information. Then, a preset number of first preselected address information lacking administrative region information and a second preset geographical region information set in a preselected manner can be spliced to generate a formally complete address information, which is the preset number of second preselected address information.
It should be noted that the second preset geographic area information may be address information that is derived from different address information from the first preselected address information, or administrative area information that is preset, and may be specifically set according to actual situations, for example, 50% of the total number of first preselected address information may be selected from a plurality of different first preselected address information, and two first preselected address information may be selected from 50% of the first preselected address information, where the two first preselected address information are, for example: removing first preset geographical area information in first preselected address information, removing first preset geographical area information in a second preselected address information, splicing a part of the second first preselected address information, from which the first preset geographical area information is removed, into first preset geographical area information in the first preselected address information, generating new address information, splicing a part of the first preselected address information, from which the first preset geographical area information is removed, into first preset geographical area information in the second preselected address information, generating another new address information, for example, removing the first preset geographical area information from the first preset geographical area information in the second preselected address information, splicing a part of the first preselected address information, from which the first preset geographical area information is removed, into the first preset geographical area information in the first preselected address information, and generating another new address information, for example, "removing the first preset geographical area information from the first preset geographical area information" from the walking street of the Hubeiyuansu bridge in the area of south China Taoise district, south China, province, and the other country, namely, "removing the first preset geographical area information from the walking street of the Hubeiyuansu bridge, and the south China Taoise bridge, and the other country; the method comprises the steps of removing first preset geographical area information of a Hami hotel beside a wetland park at Yizhou district Hami district of Xinjiang Uygur district, splicing the 'north lake of the drum district lake of south Jing city of Jiangsu province' with the 'Hami hotel beside the wetland park', generating new address information of the 'Hami hotel beside the lake north lake of the drum district lake of south Jing city of Jiangsu province', splicing the 'Yizhou district Yizhou way welcome road of the Hami district of south Jing city of Xinjiang Uygur district' with the 'Hoygur bridge walking street facing the Uygur square', and so on, generating new address information of 'Hoygur bridge walking street facing the Hoygur square' of the Yizhou district Hami district of Xinjiang Uygur city, and obtaining second preset number of pre-selected address information.
In step A6, a preset number of second preselected address information and a preset number of first preselected address information except the preset number of first preselected address information in a plurality of different first preselected address information are used as first sample data, and the first sample data is used for model training of the target model, so as to predict whether the address information corresponding to the first sample data is real through the target model, and obtain a trained first model.
Type two: the preset training policy includes a sub-policy predicted by a preset geographic area in the address, and the specific processing of step S204 may refer to the processing of step B2 and step B4 below.
In step B2, a plurality of different third preselected address information is acquired.
The third preselected address information may be different from the second preselected address information, or may be partially the same as, partially different from, or partially the same as the second preselected address information, or the like, and may be specifically set according to an actual situation, which is not limited in this embodiment of the present specification.
In implementation, the third preselected address information may be obtained in a variety of different manners, for example, the address information may be collected by purchasing from a user, and the collected address information is used as the third preselected address information, or the address information may be crawled from the internet by a web crawler, and the crawled address information may be used as the third preselected address information, which may be specifically set according to actual situations, which is not limited in this embodiment of the specification.
In step B4, removing the preset geographic area information from the plurality of different third preselected address information, using the remaining part as the first sample data, and performing model training on the target model using the first sample data, so as to predict the removed preset geographic area information from the third preselected address information by using the target model, thereby obtaining the trained first model.
The preset geographic area information removed from the third preselected address information may be one administrative area or a plurality of administrative areas, for example, geographical area information of provinces in the third preselected address information is removed, specifically, the address information "jiangsu province" in wuyue plaza across the northwest Hubei lion bridge walking street in Nanjing city of Jiangsu province is removed, or the address information "Nanjing city" therein may also be removed, and the like, and the preset geographic area information may be specifically set according to actual situations. The preset geographical area information may be information of an administrative area.
In implementation, one or more pieces of geographical area information can be randomly masked from a plurality of different pieces of third preselected address information, and then the masked geographical area information is predicted according to the remaining parts by using the target model, so that the third preselected address information is restored.
Type three: if the preset training strategy includes a sub-strategy of address distance prediction, the specific processing of step S204 may refer to the processing of step C2 and step C4 described below.
In step C2, a plurality of different pairs of preselected address information are acquired, and the distance between two preselected address information in each pair of preselected address information is acquired.
In implementation, considering that the main task of the target model is to determine whether two pieces of address information are matched, the pre-training task may also be designed in a form of inputting two pieces of address information to satisfy a common model structure, that is, a plurality of different pairs of pre-selected address information may be obtained. For the two pieces of address information, the relative distance between the two pieces of address information can be calculated according to respective longitude and latitude information.
In step C4, a plurality of different pairs of preselected address information are respectively input into the target model, a distance interval in which a distance between two pieces of preselected address information in each pair of preselected address information is located is predicted through the target model, and the distance between two pieces of preselected address information in each pair of preselected address information is used as a training label to perform model training on the target model, so as to obtain a trained first model.
The distance intervals may be set according to an actual situation, specifically, for example, a plurality of distance intervals within 100 meters, 100 meters to 1 kilometer, 1 kilometer to 5 kilometers, 5 kilometers to 10 kilometers, more than 10 kilometers, and the like, which are only one optional dividing manner.
In implementation, if the target model is directly used as a regression task to predict the value of the relative distance, the difficulty of implementation may be relatively high for the target model, and for this reason, the processing procedure may be simplified, different distance information may be binned to obtain a plurality of different distance intervals, then the plurality of different pairs of preselected address information are respectively input into the target model, the distance interval in which the distance between two preselected address information in each pair of preselected address information is located is predicted by the target model, and the distance between two preselected address information in each pair of preselected address information is used as a training tag to perform model training on the target model to obtain a trained first model, so that the task of predicting the target of the target model is converted into a relatively easy classification task.
After the above processing, the obtained first model already has a certain address information identification capability, and then the model structure (or network structure) of the first model may be modified on the basis, and the first model may be refined on the specified sample data, which may be specifically referred to in the following processing from step S206 to step S212.
In step S206, the semantic entities included in the address information pairs corresponding to the second sample data are identified based on the pre-trained address entity identification model, so as to obtain the semantic entities included in the address information pairs corresponding to each second sample data.
In implementation, as shown in fig. 3, for the hierarchical structure information included in the address information, the address information may be divided into 3 parts, each part may be a semantic entity (or address entity), and each of the 3 parts may be administrative region information, detailed house number information, other information (such as alias), and the like. The address entity recognition model can be trained in advance through sample data, so that information capable of recognizing different address entities contained in the address information is obtained. Different address entities have influence on the judgment of consistency of two address information to different degrees, and by the mode, the target model can learn different distinguishing capabilities aiming at different semantic blocks in a finer granularity.
In step S208, performing maximal pooling on different types of semantic entities included in each address information in the address information pair, performing fusion processing and classification processing on the data after maximal pooling through the same type of semantic entities included in the address information pair, inputting the processed data into a full link layer in the first model, and obtaining a statement feature obtained by interactively encoding statements included in the second sample data.
In implementation, as shown in fig. 3, the semantic entities of different types included in each address information in the address information pair are respectively subjected to maximum pooling, and the same type of semantic entities included in the address information pair are used to perform fusion processing and classification processing on the data after maximum pooling, specifically, when two address information are divided into twoAfter being respectively calculated out the aggregation codes of the three semantic entities, the three semantic entities can pass through
Figure BDA0003804763310000101
A fusion process is carried out in which, among others,
Figure BDA0003804763310000102
and
Figure BDA0003804763310000103
the codes after the maximal pooling of the same semantic entity of the two address information are respectively represented, the original codes of the two semantic entities, the bitwise subtraction value of the two codes and the bitwise multiplication value of the two codes are spliced together to be used as the fusion representation of the interacted same semantic entity of different addresses, and finally the processed data is input into a full connection layer in a first model to obtain the coding information of the two address information after the deep interaction, namely the sentence characteristics obtained after interactive coding of the sentences contained in the second sample data.
In step S210, the features of the characters included in the second sample data and the sentence features obtained after the interactive encoding of the sentences included in the second sample data are fused through a preset gate control mechanism, so as to obtain fused features.
In implementation, as shown in fig. 4, the feature of the character included in the second sample data and the sentence feature obtained by interactively coding the sentence included in the second sample data may be fused through a preset gating mechanism (i.e., an InputGate in fig. 4), so as to obtain the fused feature.
In step S212, the fused features are input into a network layer for classification in the first model, so as to adjust a model structure of the first model, and model training is performed on the first model, so as to obtain a trained second model.
In implementation, as shown in fig. 4, the fused features are accessed to a network layer for classification in a first model, so as to perform classification prediction, adjust the model structure of the first model, and perform model training on the first model, thereby obtaining a trained second model.
In step S214, the semantics of the two pieces of address information are subjected to matching processing based on the second model to determine whether the two pieces of address information are the same, so as to obtain a matching result of the two pieces of address information.
The embodiment of the specification provides a matching method of address information, a target model is obtained and used for a model for matching semantics of text information, then model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, the preset training strategy comprises one or more of sub-strategies of false address recognition, sub-strategies of preset geographic region prediction in an address and sub-strategies of address distance prediction, model training is carried out on the first model based on second sample data corresponding to a preset model structure adjustment strategy and a preset model structure adjustment strategy to obtain a trained second model, the second model is used for a model for matching semantics of the address information, finally, matching processing can be carried out on the semantics of the obtained two pieces of address information based on the second model to determine whether the two pieces of address information are the same or not, a matching result of the two pieces of address information is obtained, and then according to the geographic information and semantic characteristics of character strings in the address information, a processing mode of the target model is designed in a targeted manner, matching is carried out on the semantics of a large amount of the two pieces of address information, so as to determine whether the address information has a matching of the address information has a certain degree of interaction of the address information, and further, and how to obtain the matching information of the address information in a process of which the address information has no supervision of the address information, and how to obtain the address information matching the address information.
EXAMPLE III
Based on the same idea, the foregoing method for matching address information provided in the embodiments of the present specification further provides an apparatus for matching address information, as shown in fig. 5.
The address information matching device comprises: an initial model obtaining module 501, a first training module 502, a second training module 503, and an address information matching module 504, wherein:
an initial model obtaining module 501, configured to obtain a target model, where the target model is a model for matching semantics of text information;
a first training module 502, configured to perform model training on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, where the preset training strategy includes one or more of a sub-strategy for false address identification, a sub-strategy for predicting a preset geographic area in an address, and a sub-strategy for predicting an address distance;
a second training module 503, configured to perform model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model, where the second model is used as a model for matching semantics of address information;
the address information matching module 504 performs matching processing on the semantics of the two pieces of acquired address information based on the second model to determine whether the two pieces of address information are the same, so as to obtain a matching result of the two pieces of address information.
In this embodiment of the present specification, the initial model obtaining module 501 obtains a target model trained based on a preset text corpus, where the preset text corpus includes a corpus formed by texts of a web encyclopedia presented based on preset language characters.
In this embodiment of the present specification, the preset training strategy includes a sub-strategy of false address identification, and the first training module 502 includes:
the first information selection unit is used for acquiring a plurality of different first preselected address information and selecting a preset number of first preselected address information from the different first preselected address information;
the information splicing unit is used for removing first preset geographical area information in a preset number of first pre-selection address information, and splicing the rest part with second preset geographical area information to obtain a preset number of second pre-selection address information;
and the first training unit is used for taking a preset number of second preselected address information and first preselected address information except the preset number of first preselected address information in the plurality of different first preselected address information as first sample data, and performing model training on the target model by using the first sample data so as to predict whether the address information corresponding to the first sample data is real through the target model, thereby obtaining a trained first model.
In an embodiment of this specification, the first preset geographic area information is information of an administrative area.
In this embodiment of the present specification, the preset training strategy includes a sub-strategy for predicting a preset geographic area in an address, and the first training module 502 includes:
a second information acquisition unit that acquires a plurality of different third preselected address information;
the second training unit removes preset geographic area information in a plurality of different third preselected address information, uses the rest part as first sample data, and performs model training on the target model by using the first sample data, so as to predict the removed preset geographic area information in the third preselected address information through the target model, and obtain the trained first model.
In this embodiment of the present specification, the preset training strategy includes a sub-strategy for address distance prediction, and the first training module 502 includes:
the third information acquisition unit is used for acquiring a plurality of different preselected address information pairs and acquiring the distance between two pieces of preselected address information in each preselected address information pair;
and the third training unit is used for respectively inputting the different preselected address information pairs into the target model, predicting a distance interval where the distance between two preselected address information in each preselected address information pair is located through the target model, and performing model training on the target model by taking the distance between two preselected address information in each preselected address information pair as a training label to obtain the trained first model.
In this embodiment of the present specification, the second training module 503 includes:
the fusion unit is used for performing fusion processing on the characteristics of the characters contained in the second sample data and the sentence characteristics obtained after interactive coding of the sentences contained in the second sample data through a preset gating mechanism to obtain fused characteristics;
and the training unit is used for inputting the fused features into a network layer for classification in the first model so as to adjust the model structure of the first model and perform model training on the first model to obtain a trained second model.
In an embodiment of this specification, the apparatus further includes:
the entity determining module is used for identifying semantic entities contained in the address information pairs corresponding to the second sample data based on a pre-trained address entity identification model to obtain the semantic entities contained in the address information pairs corresponding to each second sample data;
the feature determination module is used for respectively performing maximum pooling on different types of semantic entities contained in each address information in the address information pair, performing fusion processing and classification processing on the data subjected to maximum pooling through the same type of semantic entities contained in the address information pair, inputting the processed data into a full-connection layer in the first model, and obtaining a statement feature obtained after interactive encoding of statements contained in the second sample data.
In the embodiment of the present specification, the target model is a BERT model.
An embodiment of the present specification provides an address information matching apparatus, where a target model is obtained, the target model is used for a model for matching semantics of text information, then, the target model is model-trained based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, the preset training strategy includes one or more of a sub-strategy for false address recognition, a sub-strategy for predicting a preset geographic region in an address, and a sub-strategy for predicting an address distance, the first model is model-trained based on second sample data corresponding to a preset model structure adjustment strategy and a preset model structure adjustment strategy to obtain a trained second model, the second model is used for a model for matching semantics of address information, and finally, matching processing can be performed on the semantics of two obtained address information based on the second model to determine whether the two pieces of address information are the same, so as to obtain a matching result of the two pieces of address information, so that, according to geographic information and characteristics of semantic strings in the address information, a processing mode for the target model is designed specifically, how well the two pieces of address information match the address information in a semantic string learning process, and how to obtain a result of matching the two pieces of address information in which are more accurately matched address information in a learning process of address string semantic information.
Example four
Based on the same idea, the foregoing apparatus for matching address information provided in the embodiments of the present specification further provides a device for matching address information, as shown in fig. 6.
The matching device of the address information may provide terminal devices or servers and the like for the above embodiments.
The matching devices of address information may have large differences due to different configurations or performances, and may include one or more processors 601 and memories 602, and one or more stored applications or data may be stored in the memories 602. Wherein the memory 602 may be transient or persistent storage. The application program stored in memory 602 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in a matching device for address information. Still further, the processor 601 may be arranged to communicate with the memory 602, executing a series of computer executable instructions in the memory 602 on a matching device for address information. The matching apparatus of address information may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input-output interfaces 605, one or more keyboards 606.
Specifically, in this embodiment, the apparatus for matching address information includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions in the apparatus for matching address information, and the one or more programs configured to be executed by one or more processors include computer-executable instructions for:
acquiring a target model, wherein the target model is used for matching the semantics of the text information;
model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, wherein the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographical region prediction in an address and a sub-strategy of address distance prediction;
performing model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model, wherein the second model is used for matching the semantics of the address information;
and matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.
In an embodiment of this specification, the obtaining a target model includes:
the method comprises the steps of obtaining a target model trained on the basis of preset text corpora, wherein the preset text corpora comprise corpora formed by texts of network encyclopedia presented on the basis of preset language characters.
In an embodiment of this specification, the preset training strategy includes a sub-strategy for identifying a false address, and the performing model training on the target model based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model includes:
acquiring a plurality of different first pre-selection address information, and selecting a preset number of first pre-selection address information from the plurality of different first pre-selection address information;
removing first preset geographical area information in a preset number of first pre-selection address information, and splicing the rest part with second preset geographical area information to obtain a preset number of second pre-selection address information;
and taking a preset number of second preselected address information and first preselected address information except the preset number of first preselected address information in the plurality of different first preselected address information as first sample data, and performing model training on the target model by using the first sample data to predict whether the address information corresponding to the first sample data is real or not through the target model to obtain a trained first model.
In an embodiment of this specification, the first preset geographic area information is information of an administrative area.
In an embodiment of this specification, the preset training strategy includes a sub-strategy for predicting a preset geographic area in an address, and the model training of the target model based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model includes:
acquiring a plurality of different third preselected address information;
removing preset geographic area information in a plurality of different third preselected address information, using the rest part as first sample data, and performing model training on the target model by using the first sample data, so as to predict the removed preset geographic area information in the third preselected address information through the target model, and obtain a trained first model.
In an embodiment of this specification, the preset training strategy includes an address distance prediction sub-strategy, and the performing model training on the target model based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model includes:
acquiring a plurality of different pre-selection address information pairs, and acquiring the distance between two pieces of pre-selection address information in each pre-selection address information pair;
and respectively inputting the different preselected address information pairs into the target model, predicting a distance interval where the distance between two preselected address information in each preselected address information pair is located through the target model, and performing model training on the target model by taking the distance between two preselected address information in each preselected address information pair as a training label to obtain a trained first model.
In an embodiment of this specification, the performing model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model includes:
performing fusion processing on the features of the characters contained in the second sample data and the sentence features obtained after interactive coding of the sentences contained in the second sample data through a preset gating mechanism to obtain fused features;
and inputting the fused features into a network layer for classification in the first model so as to adjust the model structure of the first model, and performing model training on the first model to obtain a trained second model.
In the embodiment of this specification, the method further includes:
recognizing semantic entities contained in the address information pairs corresponding to the second sample data based on a pre-trained address entity recognition model to obtain the semantic entities contained in the address information pairs corresponding to each second sample data;
and performing maximum pooling on different types of semantic entities contained in each address information in the address information pair, performing fusion processing and classification processing on the data subjected to maximum pooling through the same type of semantic entities contained in the address information pair, inputting the processed data into a full-connection layer in the first model, and obtaining statement characteristics obtained after interactive encoding of statements contained in the second sample data.
In the embodiment of the present specification, the target model is a BERT model.
The embodiment of the specification provides an address information matching device, a target model is obtained and is used for a model for matching the semantics of text information, then model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, the preset training strategy comprises one or more of a sub-strategy of false address recognition, a sub-strategy of preset geographic region prediction in an address and a sub-strategy of address distance prediction, model training is carried out on the first model based on second sample data corresponding to a preset model structure adjustment strategy and a preset model structure adjustment strategy to obtain a trained second model, the second model is used for a model for matching the semantics of address information, finally, matching processing can be carried out on the semantics of two obtained address information based on the second model to determine whether the two pieces of address information are the same or not, a matching result of the two pieces of address information is obtained, and whether the two pieces of address information are matched in a mode of processing the obtained two pieces of address information is targeted semantic information based on the semantic string of the geographic information and the characteristics of the semantic strings in the address information, so that the two pieces of address information are matched with a certain degree of semantic string of semantic information, and further, and how the address information is obtained in a certain address information interaction learning process, so that the address information is more accurate and the address information is obtained in the address information learning process of the address string of the address information.
EXAMPLE five
Further, based on the methods shown in fig. 1 to fig. 4, one or more embodiments of the present specification further provide a storage medium for storing computer-executable instruction information, in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, or the like, and when executed by a processor, the storage medium stores the computer-executable instruction information, which can implement the following processes:
acquiring a target model, wherein the target model is used for matching the semantics of the text information;
model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, wherein the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic area prediction in an address and a sub-strategy of address distance prediction;
performing model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model, wherein the second model is used for matching the semantics of the address information;
and matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.
In an embodiment of this specification, the obtaining a target model includes:
the method comprises the steps of obtaining a target model trained on the basis of preset text corpora, wherein the preset text corpora comprise corpora formed by texts of network encyclopedia presented on the basis of preset language characters.
In an embodiment of the present specification, the preset training strategy includes a sub-strategy of false address identification, and the model training is performed on the target model based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, where the method includes:
acquiring a plurality of different first pre-selection address information, and selecting a preset number of first pre-selection address information from the plurality of different first pre-selection address information;
removing first preset geographical area information in a preset number of first pre-selection address information, and splicing the rest part with second preset geographical area information to obtain a preset number of second pre-selection address information;
and taking a preset number of second preselected address information and first preselected address information except the preset number of first preselected address information in the plurality of different first preselected address information as first sample data, and performing model training on the target model by using the first sample data to predict whether the address information corresponding to the first sample data is real or not through the target model to obtain a trained first model.
In an embodiment of this specification, the first preset geographic area information is information of an administrative area.
In an embodiment of this specification, the preset training strategy includes a sub-strategy for predicting a preset geographic area in an address, and the model training of the target model based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model includes:
acquiring a plurality of different third preselected address information;
removing preset geographic area information in a plurality of different third preselected address information, using the rest part as first sample data, and performing model training on the target model by using the first sample data, so as to predict the removed preset geographic area information in the third preselected address information through the target model, and obtain a trained first model.
In an embodiment of this specification, the preset training strategy includes an address distance prediction sub-strategy, and the performing model training on the target model based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model includes:
acquiring a plurality of different pre-selection address information pairs, and acquiring the distance between two pieces of pre-selection address information in each pre-selection address information pair;
and respectively inputting the different preselected address information pairs into the target model, predicting a distance interval where the distance between two preselected address information in each preselected address information pair is located through the target model, and performing model training on the target model by taking the distance between two preselected address information in each preselected address information pair as a training label to obtain a trained first model.
In an embodiment of this specification, the performing model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model includes:
performing fusion processing on the features of the characters contained in the second sample data and the sentence features obtained after interactive coding of the sentences contained in the second sample data through a preset gating mechanism to obtain fused features;
and inputting the fused features into a network layer for classification in the first model so as to adjust the model structure of the first model, and performing model training on the first model to obtain a trained second model.
In the embodiment of this specification, the method further includes:
recognizing semantic entities contained in the address information pairs corresponding to the second sample data based on a pre-trained address entity recognition model to obtain the semantic entities contained in the address information pairs corresponding to each second sample data;
and performing maximum pooling on different types of semantic entities contained in each address information in the address information pair, performing fusion processing and classification processing on the data subjected to maximum pooling through the same type of semantic entities contained in the address information pair, inputting the processed data into a full-connection layer in the first model, and obtaining statement characteristics obtained after interactive encoding of statements contained in the second sample data.
In the embodiment of the present specification, the target model is a BERT model.
The embodiment of the specification provides a storage medium, a target model is obtained and used for a model for matching semantics of text information, then the target model is subjected to model training based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, the preset training strategy comprises one or more of a sub-strategy for false address recognition, a sub-strategy for predicting a preset geographic region in an address and a sub-strategy for predicting an address distance, a second sample data corresponding to a preset model structure adjustment strategy and a preset model structure adjustment strategy is subjected to model training on the first model to obtain a trained second model, the second model is used for a model for matching semantics of address information, finally, matching processing can be performed on the semantics of two obtained address information based on the second model to determine whether the two pieces of address information are the same or not to obtain a matching result of the two pieces of address information, thus, a processing mode of the target model is designed in a targeted manner according to the geographic information and semantic characteristics of character strings in the address information, matching of a large amount of unsupervised address information is performed on the semantics of the training information, so that how the two pieces of address information match with the address information is determined, and how the address information is more accurate matching of the address information in the address information learning process, and how the address information matching of the address information is judged according to how the semantic string of the two pieces of the address information in the address information, and how well the address information matching process of the address information is achieved.
The foregoing description of specific embodiments has been presented for purposes of illustration and description. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), lava, lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable fraud case serial-parallel apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable fraud case serial-parallel apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable fraud case to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable fraud case serial-parallel apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
One or more embodiments of the specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present application. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (12)

1. A method of matching address information, the method comprising:
acquiring a target model, wherein the target model is used for matching the semantics of the text information;
model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, wherein the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic area prediction in an address and a sub-strategy of address distance prediction;
performing model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model, wherein the second model is used for matching the semantics of the address information;
and matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.
2. The method of claim 1, the obtaining a target model, comprising:
the method comprises the steps of obtaining a target model trained on the basis of preset text corpora, wherein the preset text corpora comprise corpora formed by texts of network encyclopedia presented on the basis of preset language characters.
3. The method according to claim 1 or 2, wherein the preset training strategy comprises a sub-strategy of false address recognition, and the model training of the target model based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model comprises:
acquiring a plurality of different first pre-selection address information, and selecting a preset number of first pre-selection address information from the plurality of different first pre-selection address information;
removing first preset geographical area information in a preset number of first pre-selection address information, and splicing the rest part with second preset geographical area information to obtain a preset number of second pre-selection address information;
and taking a preset number of second preselected address information and first preselected address information except the preset number of first preselected address information in the plurality of different first preselected address information as first sample data, and performing model training on the target model by using the first sample data to predict whether the address information corresponding to the first sample data is real or not through the target model to obtain a trained first model.
4. The method according to claim 3, wherein the first preset geographical area information is information of an administrative area.
5. The method according to claim 1 or 2, wherein the preset training strategy includes a sub-strategy for predicting a preset geographic area in an address, and the model training of the target model is performed based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, including:
acquiring a plurality of different third pre-selected address information;
removing preset geographical area information in a plurality of different third pre-selected address information, using the rest part as first sample data, and performing model training on the target model by using the first sample data, so as to predict the removed preset geographical area information in the third pre-selected address information through the target model, and obtain a trained first model.
6. The method according to claim 1 or 2, wherein the preset training strategy comprises an address distance prediction sub-strategy, and the model training of the target model based on the preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model comprises:
acquiring a plurality of different pre-selection address information pairs, and acquiring the distance between two pieces of pre-selection address information in each pre-selection address information pair;
and respectively inputting the different preselected address information pairs into the target model, predicting a distance interval where the distance between two preselected address information in each preselected address information pair is located through the target model, and performing model training on the target model by taking the distance between two preselected address information in each preselected address information pair as a training label to obtain a trained first model.
7. The method according to claim 1, wherein the performing model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model comprises:
performing fusion processing on the features of the characters contained in the second sample data and the sentence features obtained after interactive coding of the sentences contained in the second sample data through a preset gating mechanism to obtain fused features;
and inputting the fused features into a network layer for classification in the first model so as to adjust the model structure of the first model, and performing model training on the first model to obtain a trained second model.
8. The method of claim 7, further comprising:
recognizing semantic entities contained in the address information pairs corresponding to the second sample data based on a pre-trained address entity recognition model to obtain the semantic entities contained in the address information pairs corresponding to each second sample data;
and performing maximum pooling on different types of semantic entities contained in each address information in the address information pair, performing fusion processing and classification processing on the data subjected to maximum pooling through the same type of semantic entities contained in the address information pair, inputting the processed data into a full-connection layer in the first model, and obtaining statement characteristics obtained after interactive encoding of statements contained in the second sample data.
9. The method of claim 1, the target model being a BERT model.
10. An apparatus for matching address information, the apparatus comprising:
the initial model acquisition module is used for acquiring a target model, and the target model is used for matching the semantics of the text information;
the first training module is used for carrying out model training on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, wherein the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic region prediction in an address and a sub-strategy of address distance prediction;
the second training module is used for carrying out model training on the first model based on a preset model structure adjusting strategy and second sample data corresponding to the preset model structure adjusting strategy to obtain a trained second model, and the second model is used for matching the semantics of the address information;
and the address information matching module is used for matching the semantics of the two pieces of acquired address information based on the second model so as to determine whether the two pieces of address information are the same or not and obtain a matching result of the two pieces of address information.
11. An address information matching apparatus, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a target model, wherein the target model is used for matching the semantics of the text information;
model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, wherein the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic area prediction in an address and a sub-strategy of address distance prediction;
performing model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model, wherein the second model is used for matching the semantics of the address information;
and matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.
12. A storage medium for storing computer executable instructions which, when executed by a processor, implement the following flow:
acquiring a target model, wherein the target model is used for matching the semantics of the text information;
model training is carried out on the target model based on a preset training strategy and first sample data corresponding to the preset training strategy to obtain a trained first model, wherein the preset training strategy comprises one or more of a sub-strategy of false address identification, a sub-strategy of preset geographic area prediction in an address and a sub-strategy of address distance prediction;
performing model training on the first model based on a preset model structure adjustment strategy and second sample data corresponding to the preset model structure adjustment strategy to obtain a trained second model, wherein the second model is used for matching the semantics of the address information;
and matching the semantics of the two acquired address information based on the second model to determine whether the two address information are the same or not, so as to obtain a matching result of the two address information.
CN202210993894.3A 2022-08-18 2022-08-18 Address information matching method, device and equipment Pending CN115345174A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210993894.3A CN115345174A (en) 2022-08-18 2022-08-18 Address information matching method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210993894.3A CN115345174A (en) 2022-08-18 2022-08-18 Address information matching method, device and equipment

Publications (1)

Publication Number Publication Date
CN115345174A true CN115345174A (en) 2022-11-15

Family

ID=83954568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210993894.3A Pending CN115345174A (en) 2022-08-18 2022-08-18 Address information matching method, device and equipment

Country Status (1)

Country Link
CN (1) CN115345174A (en)

Similar Documents

Publication Publication Date Title
CN111967242A (en) Text information extraction method, device and equipment
CN111885000A (en) Network attack detection method, system and device based on graph neural network
Sridhar et al. Fake news detection and analysis using multitask learning with BiLSTM CapsNet model
CN113887235A (en) Information recommendation method and device
CN115238250B (en) Model processing method, device and equipment
CN113010780A (en) Model training and click rate estimation method and device
CN116308738B (en) Model training method, business wind control method and device
CN111538925A (en) Method and device for extracting Uniform Resource Locator (URL) fingerprint features
CN113992429B (en) Event processing method, device and equipment
CN113704466B (en) Text multi-label classification method and device based on iterative network and electronic equipment
CN116227467A (en) Model training method, text processing method and device
CN115345174A (en) Address information matching method, device and equipment
CN115129885A (en) Entity chain pointing method, device, equipment and storage medium
CN115358777A (en) Advertisement putting processing method and device of virtual world
CN111552706B (en) Public opinion information grouping method, device and equipment
CN112765377A (en) Time slot positioning in media streams
CN113254635B (en) Data processing method, device and storage medium
CN115423485B (en) Data processing method, device and equipment
CN115017915B (en) Model training and task execution method and device
CN116127984A (en) Text processing method, device, electronic equipment and storage medium
CN115859110A (en) Data processing method, device and equipment
CN115827935A (en) Data processing method, device and equipment
CN115129870A (en) Entity classification method, apparatus, electronic device, program product, and medium
CN114579813A (en) Data processing method, device and equipment
Zhilin et al. News-driven financial warning based on label information attention

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination