Address type determination method and device, storage medium and electronic equipment
By obtaining the target address text and crawler text to construct input information and using a pre-trained discrimination model, the address type discrimination process is simplified, the accuracy is improved, and the problem of low accuracy caused by complex calculations in the existing technology is solved.
Patent Information
- Application Number
- CN202410235063.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-09-12
AI Technical Summary
In the existing technology, the calculation process of the address type discrimination model is complicated, resulting in a low accuracy rate in discriminating the address type associated with financial risk objects.
By obtaining the target address text related to the target application, performing a search operation to obtain the target crawler text, and constructing the target input information, inputting the pre-trained target discrimination model, and using the entity label to determine the entity type in the target crawler text.
This simplifies the process of determining the address type, saves computing resources, and improves the accuracy of entity recognition, solving the problem of low recognition accuracy.
Smart Images

Figure CN120632103A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method and device for determining an address type, a storage medium, and an electronic device. Background Art
[0002] At present, in related technologies, multiple models running independently of each other are often used to determine the type of related addresses. In the process of distinguishing the type of addresses, different models are used for processing to predict the address type. For example, in the process of distinguishing the address type in the fields of financial risk control and anti-money laundering, the data after each processing needs to be transmitted between different models. Since the data transmission process is complex and prone to errors, the model construction is complex and computationally intensive, resulting in a technical problem in related technologies of low accuracy in distinguishing the address type associated with financial risk objects.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] The embodiments of the present application provide a method and device for determining an address type, a storage medium, and an electronic device to at least solve the technical problem that the model calculation process for determining the address type is complex and prone to errors, thereby resulting in too low an accuracy rate for distinguishing the address type associated with objects with financial risks.
[0005] According to one aspect of an embodiment of the present application, a method for determining an address type is provided, comprising: obtaining a target address text related to a target application, wherein the target address text represents an address text associated with multiple accounts using the target application; performing a search operation based on the target address text to obtain a target crawler text, wherein the target crawler text represents text that is allowed to be retrieved using the target address text as a keyword; constructing target input information based on the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and a target placeholder, wherein the target placeholder is used to indicate whether the type of an entity in the target crawler text needs to be determined to be a preset entity type; inputting the target input information into a pre-trained target discrimination model to obtain a target discrimination result, wherein the target discrimination result includes an entity label for indicating whether the type of an entity identified in the target crawler text is the preset entity type, the entity label is associated with the target placeholder, and the target discrimination model is used to identify an entity related to the target address text from the target crawler text, and indicate whether the identified entity is the preset entity type through the entity label.
[0006] According to another aspect of an embodiment of the present application, a device for determining an address type is also provided, including: an acquisition module for acquiring a target address text related to a target application, wherein the target address text represents an address text associated with multiple accounts using the target application; a search module for performing a search operation based on the target address text to obtain a target crawler text, wherein the target crawler text represents a text that is allowed to be retrieved using the target address text as a keyword; a construction module for constructing target input information based on the target address text and the target crawler text, wherein the target input information includes the target address text, the target A crawler text and a target placeholder, wherein the target placeholder is used to indicate whether the type of an entity in the target crawler text needs to be determined to be a preset entity type; a discrimination module is used to input the target input information into a pre-trained target discrimination model to obtain a target discrimination result, wherein the target discrimination result includes an entity label for indicating whether the type of the entity identified in the target crawler text is the preset entity type, the entity label is associated with the target placeholder, and the target discrimination model is used to identify entities related to the target address text from the target crawler text, and indicate whether the identified entity is the preset entity type through the entity label.
[0007] Optionally, the device is used to construct target input information based on the target address text and the target crawler text in the following manner: constructing the target input information based on the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text and the target placeholder separated by several separators, and the target placeholder is set as an initialization label vector in the target discrimination model, and the initialization label vector is used to generate the entity label; the device is used to input the target input information into a pre-trained target discrimination model in the following manner to obtain a target discrimination result: extracting target entity text related to the target address text from the target crawler text of the target input information, and judging whether the target entity text is the preset entity type, updating the initialization label vector, and obtaining the target discrimination result.
[0008] Optionally, the device is used to extract target entity text related to the target address text from the target crawler text of the target input information in the following manner, and judge whether the target entity text is the preset entity type, update the initialization label vector, and obtain the target judgment result: input the target input information into a pre-trained first encoding model to obtain a first text sequence, wherein the first encoding model is used to perform self-attention encoding on multiple words in the target input information to obtain the first text sequence including multiple word vectors, and the multiple word vectors correspond one-to-one to the multiple words; input the first text sequence into a pre-trained second encoding model to obtain the target entity text, wherein the second encoding model is used to identify entities existing in the first text sequence; determine the entity type of the target entity text, and compare it with the preset entity type, update the initialization label vector, and generate the target judgment result.
[0009] Optionally, the device is used to input the target input information into a pre-trained first encoding model to obtain a first text sequence in the following manner: marking the target input information to obtain the multiple words with part-of-speech tagged; and performing self-attention encoding on the multiple words to obtain the first text sequence.
[0010] Optionally, the device is used to input the first text sequence into a pre-trained second encoding model to obtain the target entity text in the following manner: encoding the first text sequence from a first direction and a second direction of the first text sequence respectively to obtain a first encoding result and a second encoding result, wherein the first direction and the second direction are opposite; splicing the first encoding result and the second encoding result to determine the target entity text.
[0011] Optionally, the device is used to determine the target entity text by splicing the first encoding result and the second encoding result in the following manner: splicing the first encoding result and the second encoding result to obtain a target encoding result; determining the probability of whether each word in the multiple words belongs to an entity based on the target encoding result; determining the target entity text from the multiple words based on the probability of whether each word in the multiple words belongs to an entity, wherein the target entity text represents a text composed of words whose probability values meet a preset probability condition.
[0012] Optionally, the device is used to determine the entity type of the target entity text in the following manner, compare it with the preset entity type, update the initialization label vector, and generate the target discrimination result: determine a first probability of whether each character in the multiple words is a starting position and a second probability of whether each character in the multiple words is an ending position based on the target encoding result, wherein the starting position indicates that the corresponding character is the first character of the target entity text, and the ending position indicates that the corresponding character is the last character of the target entity text; use the first probability and the second probability to determine the entity type of the target entity text, compare it with the preset entity type, update the initialization label vector, and generate the target discrimination result.
[0013] Optionally, the device is used to obtain target address text related to the target application in the following manner: obtaining a group of initial address texts generated in the target application; and determining the target address text based on the number of accounts associated with each initial address text in the group of initial address texts.
[0014] Optionally, the device is used to determine the target address text according to the number of accounts associated with each initial address text in the group of initial address texts in the following manner: obtain the number of first accounts associated with the first initial address text and a first account number threshold, wherein the group of initial address texts includes the first initial address text; when the number of the first accounts is greater than or equal to the first account number threshold, determine the first initial address text as the target address text; obtain the number of second accounts associated with the second initial address text and a second account number threshold, wherein the group of initial address texts includes the second initial address text, and the second account number threshold is less than or equal to the first account number threshold; when the accounts associated with the second initial address text all provide address texts through the target application, and the number of the second accounts is greater than or equal to the second account number threshold, determine the second initial address text as the target address text.
[0015] Optionally, the device is also used to: obtain the target address text associated with both the first account and the second account, wherein the first account and the second account both actively provide the target address text through the target application; input the target address text into a preset search engine to determine the target crawler text; construct a prompt template based on the target address text and the target crawler text, and input the prompt template into the target discrimination model to obtain the target entity identified in the target address text, and a target label of whether the target entity is a valid aggregation address, wherein the preset entity type includes the valid aggregation address, and the entity label includes the target label.
[0016] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned method for determining the address type when running.
[0017] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described method for determining an address type.
[0018] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned method for determining the address type through the computer program.
[0019] In an embodiment of the present application, a target address text related to a target application is obtained, wherein the target address text represents an address text associated with multiple accounts using the target application; a search operation is performed based on the target address text to obtain a target crawler text, wherein the target crawler text represents a text that is allowed to be retrieved using the target address text as a keyword; target input information is constructed based on the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and a target placeholder, and the target placeholder is used to indicate whether the type of an entity in the target crawler text needs to be determined to be a preset entity type; the target input information is input into a pre-trained target discrimination model to obtain a target discrimination result, wherein the target discrimination result includes an entity label for indicating whether the type of an entity identified in the target crawler text is a preset entity type, and the entity label and the target placeholder are used to indicate whether the entity type is a preset entity type. The target discrimination model is used to identify entities related to the target address text from the target crawler text, and to indicate whether the identified entity is of a preset entity type through an entity label. That is, when a target address text associated with multiple accounts using the target application is obtained, a search will be performed based on the target address text to determine the target crawler text, and target input information will be constructed based on the target address text and the target crawler text. Finally, the target input information will be input into the pre-trained target discrimination model to generate a target discrimination result, thereby achieving the purpose of simplifying the address type determination process, thereby achieving the technical effect of saving computing resources while ensuring the entity recognition accuracy, and thus solving the technical problem that the model calculation process for determining the address type is complex and prone to errors, thereby leading to too low a discrimination accuracy rate for the address type associated with objects with financial risks.
[0020] On the other hand, the type of entity identified in the target crawler text is determined by a pre-trained target discrimination model. The target discrimination model can accurately identify entities related to the target address text from the target crawler text, and further determine whether the entity label is a label of a preset entity type, thereby improving the recognition efficiency of entities in the target crawler text and achieving the purpose of determining the target discrimination result based on the entity label, and then determining the address type corresponding to the entity. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0022] Figure 1 is a schematic diagram of an application environment of an optional method for determining an address type according to an embodiment of the present application;
[0023] Figure 2 is a flowchart of an optional method for determining an address type according to an embodiment of the present application;
[0024] Figure 3 is a schematic diagram of an optional method for determining an address type according to an embodiment of the present application;
[0025] Figure 4 is a schematic diagram of another optional method for determining an address type according to an embodiment of the present application;
[0026] Figure 5 is a schematic diagram of another optional method for determining an address type according to an embodiment of the present application;
[0027] Figure 6 is a schematic diagram of another optional method for determining an address type according to an embodiment of the present application;
[0028] Figure 7 is a schematic diagram of another optional method for determining an address type according to an embodiment of the present application;
[0029] Figure 8 is a schematic diagram of another optional method for determining an address type according to an embodiment of the present application;
[0030] Figure 9 is a schematic diagram of another optional method for determining an address type according to an embodiment of the present application;
[0031] Figure 10 is a schematic diagram of another optional method for determining an address type according to an embodiment of the present application;
[0032] Figure 11 is a structural diagram of an optional device for determining an address type according to an embodiment of the present application;
[0033] Figure 12 is a schematic structural diagram of an optional address type determination product according to an embodiment of the present application;
[0034] Figure 13 It is a schematic structural diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] The present application will be described below with reference to the following embodiments:
[0038] According to one aspect of an embodiment of the present application, a method for determining an address type is provided. Optionally, in this embodiment, the above-mentioned method for determining an address type can be applied to: Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1As shown, the server 101 is connected to the terminal device 103 via a network and can be used to provide services for the terminal device or the application installed on the terminal device. The application 107 can be a video application, instant messaging application, browser application, educational application, game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The terminal device 103 may be a terminal configured with an application 107, and may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal and other computer devices. The above-mentioned server may be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0039] Combine Figure 1 As shown, the above-mentioned method for determining the address type can be executed by an electronic device, which can be a terminal device or a server. The above-mentioned method for determining the address type can be implemented by the terminal device or the server separately, or by the terminal device and the server together.
[0040] The above is only an example and is not specifically limited in this embodiment.
[0041] Alternatively, as an optional implementation, Figure 2 As shown, the method for determining the address type includes:
[0042] S202, obtaining a target address text related to the target application, wherein the target address text represents an address text associated with multiple accounts using the target application;
[0043] Optionally, in an embodiment of the present application, the above-mentioned target application may include but is not limited to e-commerce shopping applications, game applications, health monitoring applications, sleep monitoring applications, diet management applications, mental health assistance applications, etc. The above-mentioned target address text can be understood as an address text related to multiple accounts that log in to the target application. For example, the target application is an e-commerce shopping application, account A and account B can both log in to the e-commerce shopping application, and the delivery address filled in by account A and account B in the e-commerce shopping application is the same, both of which are A City, District B, C Street, D School. At this time, A City, District B, C Street, D School is the target address text, which may include but is not limited to regarding the target address text as a collective household address.
[0044] For example, the above-mentioned target address text is the address text filled in by the account when registering the account when logging into the target application for the first time, and the address text after the account address is modified after logging into the target application for a non-first registration. For example, the target application is an e-commerce shopping application, and the target address text can be the delivery address text, shipping address text, etc. filled in by account A when registering for the first time. It can also be that account A modifies the delivery address text and shipping address text after logging into the e-commerce shopping application for the second time, and determines the modified delivery address text and shipping address text as the target address text.
[0045] For example, Figure 3 is a schematic diagram of an optional method for determining an address type according to an embodiment of the present application, such as Figure 3 As shown, the target application 302 includes multiple accounts, including account 304 and account 306 . The address texts filled in by account 304 and account 306 in the target application 302 are both target address texts 308 .
[0046] S204, performing a search operation based on the target address text to obtain a target crawler text, wherein the target crawler text represents text that can be retrieved using the target address text as a keyword;
[0047] Optionally, the above-mentioned target crawler text can be obtained by, but is not limited to, extracting crawler text from web page source code, extracting crawler text from a database, reading text content from a file, obtaining crawler text by crawling website links, obtaining crawler text by crawling search engine result pages, obtaining crawler text by crawling application or software interfaces, etc.
[0048] For example, assuming that the target address text is "A City, District B, Street C, Community D", the search engine retrieves the address text related to it through the target address text as the above-mentioned target crawler text. For example, when "A City, District B, Street C, Community D" is entered as a keyword in the search engine for searching, the search engine will return the relevant content of the web page as the search result, and the search result includes the target crawler text. For example, the search result may include an introductory article about Community D, which includes information such as the location of the community, surrounding facilities, and traffic conditions. The target crawler text can be the web page content including "A City, District B, Street C, Community D". You can use Python language to program a web crawler program to quickly crawl the target crawler text in the search results. Figure 4 is a schematic diagram of another optional method for determining the address type according to an embodiment of the present application, such as Figure 4 As shown, including but not limited to:
[0049] S402, setting the target address text as the search keyword;
[0050] S404, constructing a URL (Uniform Resource Locator) of a search engine;
[0051] S406, initiating an HTTP request (Hypertext Transfer Protocol request) to obtain the content of the search result page;
[0052] S408, parsing the content of the search result page;
[0053] S410, searching for an HTML tag (Hypertext Markup Language tag) where the target crawler text is located. The HTML tag can be used to define element content on the search result page;
[0054] S412, output the target crawler text.
[0055] S206: constructing target input information according to the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and a target placeholder, where the target placeholder is used to indicate whether the type of an entity in the target crawler text needs to be determined to be a preset entity type;
[0056] Optionally, in an embodiment of the present application, the above-mentioned target input information can be understood as a text representation obtained by constructing the target address text and the target crawler text. For example, taking the target address text as "No. 12, Town A" and the target crawler text as "A kindergarten is located at No. 12, Town A" as an example, the target input information is [CLS] extract entities related to No. 12, Town A [SEP] a kindergarten is located at No. 12, Town A [SEP] L [SEP], where "L" represents the above-mentioned target placeholder. In the above example, [CLS] and [SEP] are the above-mentioned separators.
[0057] S208, input the target input information into the pre-trained target discrimination model to obtain a target discrimination result, wherein the target discrimination result includes an entity label for indicating whether the type of the entity identified in the target crawler text is a preset entity type, and the entity label is associated with the target placeholder. The target discrimination model is used to identify entities related to the target address text from the target crawler text, and indicates whether the identified entity is a preset entity type through the entity label.
[0058] Specifically, the above-mentioned target discrimination model can be understood as identifying the entities existing in the target crawler text, and then obtaining the entity labels corresponding to the entities existing in the target crawler text, and comparing the types of the identified entity labels with the labels of the preset entity types to achieve the purpose of discriminating the types of entity labels, thereby generating target discrimination results based on the types of entity labels.
[0059] Exemplarily, the above-mentioned target discrimination results include entities identified from the target crawler text, and may also include but are not limited to entity tags corresponding to the entities, which may reflect the type of the entity, wherein there is a target placeholder in the target input information, and the target placeholder indicates that after the pre-trained target discrimination model processes the target input information, the output of the model includes not only the entities existing in the target crawler text, but also the entity tags corresponding to each entity.
[0060] It should be noted that the above-mentioned preset entity types may include but are not limited to collective household address types and non-collective household address types. Similarly, the types of entities identified from the above-mentioned target address text may include but are not limited to collective household address types and non-collective household address types. Furthermore, the target discrimination results may include but are not limited to the type of the entity identified in the target address text being a collective household address type and the type of the entity identified in the target address text being a non-collective household address type.
[0061] Exemplarily, the above-mentioned target discriminant model may include but is not limited to a discriminant model obtained based on an improved MRC (machine reading comprehension) algorithm, wherein the MRC algorithm is designed to enable computers to understand and answer questions in natural language, usually by reading and understanding text data, and answering relevant questions. First, the MRC algorithm encodes the input questions and text materials, converts them into representations that the model can understand, understands the relationship between the questions and text materials based on the representation, and finds the most relevant part to answer the questions, and finally outputs the answers based on the model's understanding of the questions and text.
[0062] For example, a model is created by fusing the BERT (Bidirectional Encoder Transformer) model with the BILSTM (Bidirectional Long Short-Term Memory) model. The BERT model uses a bidirectional self-attention mechanism, which simultaneously considers contextual information in the input sequence, thereby better understanding semantic and syntactic relationships. The BERT model is pre-trained on a large-scale corpus and then trained on a specific task through fine-tuning. The BILSTM model encodes the input sequence using two LSTM networks (Long Short-Term Memory) in different directions, then merges the results from both directions to obtain more comprehensive contextual information. The BILSTM model has strong modeling capabilities when processing sequential data and can effectively capture long-term dependencies in the sequence.
[0063] Further, Figure 5 is a schematic diagram of another optional method for determining the address type according to an embodiment of the present application, such as Figure 5 As shown, target address text 504 and target crawler text 506 are input into target discrimination model 502. For example, the input is "[CLS] Extract entities related to target address text [SEP] Target crawler text [SEP] Preset entity type label", where [CLS] and [SEP] are special token identifiers of the model, used to identify the beginning and end of the input text. [CLS] is used to identify the beginning of the input text, and [SEP] is used to separate the input text. After being processed by the target discrimination model, the model output can be the identified entity 508 related to the target address text and the target discrimination result 510 related to the type label of the entity 508.
[0064] In an exemplary embodiment, Figure 6 This is a schematic diagram of another optional method for determining the address type according to an embodiment of the present application. The method for determining the address type proposed in this application can be applied to the application scenario of distinguishing collective household addresses. The model framework structure of the target discrimination model 602 is as follows: Figure 6 As shown in the figure, Prompt represents the target address text, Context represents the target crawler text, Label represents the label of the preset entity type, Start / End Pos represents the starting position and ending position related to the entity in the crawler text, and P / N represents the label of the entity identified from the target address text. For example, if the entity label is "0", it means that the entity is a non-collective household address, and if the entity label is "1", it means that the entity is a collective household address.
[0065] Specifically, Figure 7 is a schematic diagram of another optional method for determining the address type according to an embodiment of the present application, such as Figure 7As shown, the steps for implementing the discrimination of collective household addresses using the target discrimination model may include but are not limited to:
[0066] S702, obtaining a target address text related to the target application. Assuming that the target application is a road navigation application, the target address text is "No. 18, Street C, District B, City A";
[0067] S704 , performing a search operation based on the target address text “No. 18, C Street, District B, City A” to obtain a target crawler text, which is the text “A comprehensive hospital is located at No. 18, C Street, District B, City A” in an article related to “No. 18, C Street, District B, City A”;
[0068] S706, identifying entities related to the target address text from the target crawler text using the target discrimination model, can be achieved by:
[0069] S706-1, inputting the target crawler text and the target address text as input text into the target discrimination model;
[0070] S706-2: The target discriminant model labels the word components contained in the input text, completes the text component annotation, and constructs the target crawler text and the target address text into the form of "[CLS] Extract entities related to No. 18, C Street, District B, City A [SEP] A comprehensive hospital is located at No. 18, C Street, District B, City A [SEP] L [SEP]";
[0071] S706-3, the target discrimination model performs self-attention encoding on each word in the input text through the bidirectional encoder converter within the model to obtain the word vector representation of each word;
[0072] S706-4: The target discriminant model encodes the word vector through the bidirectional long short-term memory network within the model to identify the entity corresponding to the word vector. For example, the word vector corresponding to "hospital" is [0.125, 0.256, -0.367, 0.478, 0.289, -0.145, 0.632, -0.245, 0.198, 0.764].
[0073] S708, determining whether the type of the entity identified in the target crawler text is a preset entity type through the target discrimination model;
[0074] S708-1, encoding the word vectors using the bidirectional long short-term memory network within the target discriminant model to obtain the probability of each word belonging to the entity to determine the word corresponding to the entity;
[0075] S708-2: Words whose probability values meet the preset probability conditions are combined into a target coded text. The bidirectional long short-term memory network within the model automatically determines the entity type of the target entity text based on the probability of the first word and the probability of the last word in the target coded text.
[0076] S708-3, determining whether the entity type of the target entity text is the same as the preset entity type;
[0077] S710, generate a target discrimination result based on the discrimination result of the entity type of the target entity text and the preset entity type, wherein the target entity text is a hospital. Since the hospital is a collective household address, the generated target discrimination result indicates that "No. 18, C Street, District B, City A is a comprehensive hospital, and the address type is the same as the preset entity type. No. 18, C Street, District B, City A is a collective household address type."
[0078] In another exemplary embodiment, the method for determining the address type proposed in this application can be applied to an application scenario of determining valid training samples during the training of a neural network model. The steps for implementing the discrimination of collective household addresses using the target discrimination model may include but are not limited to:
[0079] S1, obtaining target sample data related to the target neural network model, assuming that the target sample data is "traffic roads in City A";
[0080] S2, performing a search operation based on the target sample data "traffic" to obtain a target crawler text, which is the text "The traffic roads in City A include Road B" in an article related to "traffic";
[0081] S3, using the target discriminant model to identify entities related to the target sample data from the target crawler text, can be achieved in the following ways:
[0082] S3-1, take the target crawler text and target sample data as input text and input them into the target discrimination model;
[0083] S3-2, the target discriminant model labels the word components contained in the input text, completes the text component annotation, and constructs the target crawler text and target sample data into the form of "[CLS] Extract entities related to traffic roads in City A [SEP] Traffic roads in City A include Road B [SEP] L [SEP]";
[0084] S3-3, the target discriminant model uses the bidirectional encoder converter inside the model to perform self-attention encoding on each word in the input text to obtain the word vector representation of each word;
[0085] S3-4, the target discrimination model encodes the word vector through the bidirectional long short-term memory network within the model to identify the entity corresponding to the word vector. For example, the word vector corresponding to "Road B" is [0.25, 0.35, 0.15, 0.18, 0.28, 0.21, 0.31, 0.26];
[0086] S4, determining whether the type of the entity identified in the target crawler text is a preset entity type through a target discrimination model;
[0087] S4-1, based on the target discriminant model, the word vector is encoded using the bidirectional long short-term memory network within the model to determine the probability of each word belonging to the entity;
[0088] S4-2: The words whose probability values meet the preset probability conditions are combined into the target encoding text. The bidirectional long short-term memory network within the model automatically determines the entity type of the target entity text based on the probability of the first word and the probability of the last word in the target encoding text.
[0089] S4-3, determining whether the entity type of the target entity text is the same as the preset entity type;
[0090] S5. Generate a target discrimination result based on the discrimination result between the entity type of the target entity text and the preset entity type, wherein the target entity text is Road B. Since Road B is a traffic road in City A, the generated target discrimination result indicates that "the entity type of Road B is a valid sample type, and the relevant data of Road B can be used as target sample data for training the target neural network model."
[0091] Through the embodiment of the present application, a target address text related to a target application is obtained, wherein the target address text represents an address text associated with multiple accounts using the target application; a search operation is performed based on the target address text to obtain a target crawler text, wherein the target crawler text represents text that is allowed to be retrieved using the target address text as a keyword; target input information is constructed based on the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and a target placeholder, and the target placeholder is used to indicate whether the type of the entity in the target crawler text needs to be determined to be a preset entity type; the target input information is input into a pre-trained target discrimination model to obtain a target discrimination result, wherein the target discrimination result includes an entity label for indicating whether the type of the entity identified in the target crawler text is a preset entity type, and the entity label and the target placeholder are used to indicate whether the entity type is a preset entity type. The target discrimination model is used to identify entities related to the target address text from the target crawler text, and to indicate whether the identified entity is of a preset entity type through an entity label. That is, when a target address text associated with multiple accounts using the target application is obtained, a search will be performed based on the target address text to determine the target crawler text, and target input information will be constructed based on the target address text and the target crawler text. Finally, the target input information will be input into the pre-trained target discrimination model to generate a target discrimination result, thereby achieving the purpose of simplifying the address type determination process, thereby achieving the technical effect of saving computing resources while ensuring the entity recognition accuracy, and thus solving the technical problem that the model calculation process for determining the address type is complex and prone to errors, thereby leading to too low a discrimination accuracy rate for the address type associated with objects with financial risks.
[0092] On the other hand, the type of entity identified in the target crawler text is determined by a pre-trained target discrimination model. The target discrimination model can accurately identify entities related to the target address text from the target crawler text, and further determine whether the entity label is a label of a preset entity type, thereby improving the recognition efficiency of entities in the target crawler text and achieving the purpose of determining the target discrimination result based on the entity label to determine the address type.
[0093] As an optional solution, the above-mentioned constructing the target input information based on the above-mentioned target address text and the above-mentioned target crawler text includes: constructing the above-mentioned target input information based on the above-mentioned target address text and the above-mentioned target crawler text, wherein the above-mentioned target input information includes the above-mentioned target address text, the above-mentioned target crawler text and the above-mentioned target placeholder separated by several delimiters, and the above-mentioned target placeholder is set as the initialization label vector in the above-mentioned target discrimination model, and the above-mentioned initialization label vector is used to generate the above-mentioned entity label; the above-mentioned inputting the above-mentioned target input information into the pre-trained target discrimination model to obtain the target discrimination result includes: extracting the target entity text related to the above-mentioned target address text from the above-mentioned target crawler text of the above-mentioned target input information, and judging whether the above-mentioned target entity text is the above-mentioned preset entity type, updating the above-mentioned initialization label vector, and obtaining the above-mentioned target discrimination result.
[0094] Optionally, in this embodiment, an initialization label vector can be pre-set in the target discrimination model, and the initialization label vector can be updated based on the calculation process of the target discrimination model. The updated initialization label vector can be represented by 0 or 1. For example, the initialization label vector 0 can represent a collective household address type, and the initialization label vector 1 can represent a non-collective household address type, or the initialization label vector 1 can represent a collective household address type, and the initialization label vector 0 can represent a non-collective household address type.
[0095] It should be noted that it can include but is not limited to constructing target input information based on the target address text and target crawler text before inputting the target address text and target crawler text into the pre-trained target discrimination model, so as to better control the quality and accuracy of the input data of the target discrimination model, improve the robustness and generalization ability of the target discrimination model, and save the computing resources of the target discrimination model. Alternatively, after inputting the target address text and target crawler text into the pre-trained target discrimination model, the target input information is constructed in the target discrimination model, which can improve the interpretability and reliability of the target discrimination model, and thus achieve the technical effect of improving the accuracy of the output results of the final target discrimination model. This application is not limited to this.
[0096] Furthermore, after successfully constructing the target input information, the target discrimination model can be used to perform information extraction operations from the target crawler text contained in the target input information to obtain the target entity text related to the target address text, determine whether the entity type of the target entity text is the above-mentioned preset entity type, and output the target discrimination result.
[0097] Through the embodiments of the present application, a target input information including the target address text, the target crawler text and the initialization label vector separated by several delimiters is constructed according to the target address text and the target crawler text. Then, the target entity text related to the target address text is extracted from the target crawler text of the target input information, and whether the target entity text is the preset entity type is judged to obtain the target judgment result. That is, by constructing the target input information, the technical effect of improving the accuracy of the target judgment result output by the target judgment model is achieved.
[0098] As an optional solution, the target entity text related to the target address text is extracted from the target crawler text of the target input information, and whether the target entity text is the preset entity type is judged, the initialization label vector is updated, and the target judgment result is obtained, including: inputting the target input information into a pre-trained first encoding model to obtain a first text sequence, wherein the first encoding model is used to perform self-attention encoding on multiple words in the target input information to obtain the first text sequence including multiple word vectors, and the multiple word vectors correspond one-to-one to the multiple words; inputting the first text sequence into a pre-trained second encoding model to obtain the target entity text, wherein the second encoding model is used to identify entities existing in the first text sequence; determining the entity type of the target entity text, and comparing it with the preset entity type, updating the initialization label vector, and generating the target judgment result.
[0099] Optionally, in an embodiment of the present application, the target discrimination model may be a model formed by combining the first encoding model and the second encoding model, wherein the first encoding model may include but is not limited to a BERT model, the second encoding model may include but is not limited to a BILSTM model, and the first text sequence may include but is not limited to a plurality of word vectors, wherein each word vector corresponds one-to-one to a word contained in the target input information.
[0100] For example, Figure 8 This is a schematic diagram of another optional method for determining the address type according to an embodiment of the present application, taking the first encoding model as the BERT model as an example, such as Figure 8As shown, the first encoding model performs self-attention encoding on multiple words in the target input information based on the deep learning model 802, including token embedding 804 and encoder 806, which can comprehensively consider the context during the word encoding process. Moreover, context labels between the input texts of the model are added to the loss function of the first encoding model to achieve context understanding between texts. At the same time, some words in the text are randomly masked to make the model parameter update process more robust and prevent the first encoding model from overfitting. Specifically, when the target input information is input into the first encoding model, self-attention encoding can be performed on multiple words in the target input information to generate word vectors corresponding to each word. Furthermore, the multiple word vectors are used as the first text sequence. For example:
[0101] The target input information is "[CLS] Extract entities related to No. 12 of Town A [SEP] A kindergarten is located at No. 12 of Town A [SEP] 0, 1". The first encoding model can convert each word into a vector representation and output a sequence containing each word vector as the above first text sequence, including but not limited to: the word vector corresponding to "one" is [0.88, 0.77, 0.43,...]; the word vector corresponding to "a" is [0.12, 0.43, 0.98,...]; the word vector corresponding to "kindergarten" is [0.25, 0.12, 0.98,...]; the word vector corresponding to "is located" is [0.75, 0.36, 0.21,...]; the word vector corresponding to "at" is [0.63, 0.42, 0.87,...]; the word vector corresponding to "Town A" is [0.81, 0.19, 0.56,...]; the word vector corresponding to "No. 12" is [0.81, 0.19, 0.56,...]. Here, each word vector is a vector containing multiple values, representing the semantic representation of the word in the first encoding model. At this time, the first text sequence is [[0.88, 0.77, 0.43,...], [0.12, 0.43, 0.98,...], [0.25, 0.12, 0.98,...], [0.75, 0.36, 0.21,...], [0.63, 0.42, 0.87,...], [0.81, 0.19, 0.56,...], [0.81, 0.19, 0.56,...]].
[0102] Furthermore, after generating the first text sequence, the first text sequence can be input into a pre-trained second encoding model. Taking the BILSTM model as an example of the second encoding model, the BILSTM model is based on the LSTM model. Figure 9 It is a schematic diagram of another optional method for determining the address type according to an embodiment of the present application. As Figure 9 shown, the LSTM model consists of the input word X at time t t , <---- Figure 9902, cell state C t 904, hidden layer H t 906, Forgotten Gate F t 908, Memory Gate I t 910, output gate O t 912, the target discrimination result output by the second encoding model may include but is not limited to representing a sequence containing multiple probability values, where each input word vector corresponds to a probability value, indicating the probability that the word corresponding to the word vector belongs to the entity, and the probability value can be used to determine whether the type of the entity corresponding to each word vector is a preset entity type.
[0103] Specifically, the LSTM model forgets the information in the cell state and remembers new information so that the information useful for subsequent calculations can be transmitted, while useless information is discarded, and the hidden state H is output at each time step. t , where forgetting, memory and output are determined by the hidden state H at time t t-1 and X at time t t The calculated forget gate F t , Memory Gate I t , output gate O t To control, the time step here can be understood as each discrete time point in the second coding model, which is used to represent the state and behavior of the second coding model at different time points.
[0104] It should be noted that Figure 10 This is a schematic diagram of another optional method for determining the address type according to an embodiment of the present application. By combining two LSTM models to implement a BILSTM model, the encoding results of the input text sequence are spliced from two different directions of the input text sequence to achieve word context understanding. For example: the input text sequence is "I love eating ice cream". First, the input text sequence is divided into a group of word vectors, represented by the word vector corresponding to "I", the word vector corresponding to "love", the word vector corresponding to "eat", and the word vector corresponding to "ice cream". This group of word vectors is input into the BILSTM model, as shown in FIG. Figure 10 As shown, the BILSTM model includes a left-facing LSTM model 1002 and a right-facing LSTM model 1004. First, each word vector is encoded to obtain LSTM encoding results from left to right and LSTM encoding results from right to left. The left-facing LSTM model reads the word vector corresponding to "I", the word vector corresponding to "like", the word vector corresponding to "eat", and the word vector corresponding to "ice cream" from left to right, while the right-facing LSTM model reads the word vector corresponding to "ice cream", the word vector corresponding to "eat", the word vector corresponding to "like", and the word vector corresponding to "I" from right to left.
[0105] Furthermore, the left-following LSTM model and the right-following LSTM model respectively calculate the encoding results of each word vector. Since the left-following LSTM model and the right-following LSTM model respectively consider different context information, the encoding results of the same word vector in the left-following LSTM model and the right-following LSTM model may be different. Then, the left-to-right LSTM encoding result output by the left-following LSTM model and the right-to-left LSTM encoding result output by the right-following LSTM model are spliced to obtain the encoding result of the BILSTM model, for example:
[0106] The LSTM encoding result from left to right is: [A, B, C, D]; the LSTM encoding result from right to left is: [E, F, G, H]. Concatenating these two encoding results, the encoding result of the BILSTM model is [A, B, C, D, E, F, G, H].
[0107] Through the embodiment of the present application, the above-mentioned target input information is input into a pre-trained first encoding model to obtain a first text sequence, wherein the above-mentioned first encoding model is used to perform self-attention encoding on multiple words in the above-mentioned target input information to obtain the above-mentioned first text sequence including multiple word vectors, and the above-mentioned multiple word vectors correspond one-to-one to the above-mentioned multiple words; the above-mentioned first text sequence is input into a pre-trained second encoding model to obtain the above-mentioned target entity text, wherein the above-mentioned second encoding model is used to identify entities existing in the above-mentioned first text sequence; the entity type of the above-mentioned target entity text is determined, and compared with the above-mentioned preset entity type to generate the above-mentioned target discrimination result, thereby achieving the purpose of saving computing resources for discriminating the target address type, and ensuring the accuracy of the output result of the target discrimination model, and effectively processing the discrimination task of the entity type in the target entity text.
[0108] As an optional solution, the above-mentioned target input information is input into a pre-trained first encoding model to obtain a first text sequence, including: marking the above-mentioned target input information to obtain the above-mentioned multiple words with part-of-speech tagged; and performing self-attention encoding on the above-mentioned multiple words to obtain the above-mentioned first text sequence.
[0109] Optionally, in an embodiment of the present application, the target input information may be marked in the following manners, including but not limited to classifying the target input information using labels, marking using symbols or icons, and marking the target information using specialized marking tools or software. For example, the target input information is "[CLS] Extract entities related to No. 18, C Street, District B, City A [SEP] A comprehensive hospital is located at No. 18, C Street, District B, City A [SEP] Collective household address type, non-collective household address type":
[0110] The target input information after labeling can be expressed as "[CLS] Extract_Entities_Related_to_No._18_C_Street_B_District_A_City_[SEP]_A_Comprehensive_Hospital_Located_at_No._18_C_Street_B_District_A_[SEP]_Collective_Hospital_Address_Type_,_Non-Collective_Hospital_Address_Type". For ease of understanding, the underscore "_" is used in the embodiment of the present application to represent multiple words contained in the target input information obtained after labeling the target input information. The above multiple words all have corresponding parts of speech. For example, the part of speech marked for "extraction" is a verb, the part of speech marked for "C Street" is a place name, the part of speech marked for "hospital" is a noun, and so on.
[0111] Furthermore, the first encoding model can be used to perform self-attention encoding on the multiple words with part-of-speech labels to generate the first word sequence. Self-attention encoding is a neural network structure used to process sequence data, including but not limited to natural language text or time series data. It encodes the correlations between different parts of the input, thereby enabling better understanding and processing of sequence data. Self-attention encoding operates similarly to the human attention mechanism, noting the correlations between different parts of the input sequence and determining how to encode the input based on these correlations. Self-attention encoding fully utilizes the information in the input sequence, thereby improving the model's ability to understand sequence data. In self-attention encoding, each input part is assigned a weight to represent its correlation with other input parts. These weights are dynamically updated based on the correlations between input parts, thereby better capturing the information in the input sequence. Ultimately, through self-attention encoding, the first encoding model can better understand the multiple input words and more accurately predict or generate outputs. In other words, self-attention encoding is an effective method for processing sequence data that fully utilizes the information in the input sequence and enables better understanding and processing of sequence data.
[0112] As an optional solution, the above-mentioned first text sequence is input into the pre-trained second encoding model to obtain the above-mentioned target entity text, including: encoding the above-mentioned first text sequence from the first direction and the second direction of the above-mentioned first text sequence respectively to obtain a first encoding result and a second encoding result, wherein the above-mentioned first direction is opposite to the above-mentioned second direction; splicing the above-mentioned first encoding result and the above-mentioned second encoding result to determine the above-mentioned target entity text.
[0113] Optionally, in an embodiment of the present application, the above-mentioned first direction and the above-mentioned second direction are both relative to the first text sequence. For example, the first text sequence is [vec(I), vec(love), vec(nature), vec(language), vec(processing)], where "vec" represents the vector representation of the word. At this time, when the first direction is from left to right, it means that vec(I), vec(love), vec(nature), vec(language), and vec(processing) are encoded in sequence. At this time, the second direction is to encode the word vectors from right to left, that is, vec(processing), vec(language), vec(nature), vec(love), and vec(I) are encoded in sequence.
[0114] Furthermore, the above-mentioned first encoding result and the above-mentioned second encoding result can respectively include but are not limited to being expressed in the form of a set of probability values, that is, a word vector can correspond to a probability value, and the probability value can be used to indicate the probability of whether the word vector belongs to an entity. For example, the first encoding result is expressed as the encoding probability value corresponding to vec(I), the encoding probability value corresponding to vec(love), the encoding probability value corresponding to vec(nature), the encoding probability value corresponding to vec(language), and the encoding probability value corresponding to vec(processing). Similarly, the second encoding result is expressed as the encoding probability value corresponding to vec(processing), the encoding probability value corresponding to vec(language), the encoding probability value corresponding to vec(nature), the encoding probability value corresponding to vec(love), and the encoding probability value corresponding to vec(I). After generating the first encoding result and the second encoding result, it can include but is not limited to splicing the first encoding result and the second encoding result to determine the corresponding target entity text.
[0115] Through the embodiments of the present application, the first text sequence is encoded from the first direction and the second direction of the first text sequence respectively to obtain a first encoding result and a second encoding result, wherein the first direction and the second direction are opposite; the first encoding result and the second encoding result are spliced together to determine the target entity text. This method can better capture the long-distance dependency relationship in the first text sequence, help improve the second encoding model's ability to understand contextual information, and thereby achieve the purpose of improving the encoding accuracy of the second encoding model.
[0116] As an optional scheme, the above-mentioned splicing of the above-mentioned first encoding result and the above-mentioned second encoding result to determine the above-mentioned target entity text includes: splicing the above-mentioned first encoding result and the above-mentioned second encoding result to obtain the target encoding result; determining the probability of whether each word in the above-mentioned multiple words belongs to the entity based on the above-mentioned target encoding result; determining the above-mentioned target entity text from the above-mentioned multiple words based on the probability of whether each word in the above-mentioned multiple words belongs to the entity, wherein the above-mentioned target entity text represents a text composed of words whose probability values meet the preset probability conditions.
[0117] Taking the first encoding result as [0.3, 0.4, ...] and the second encoding result as [..., 0.5, 0.2] as an example, the first encoding result and the second encoding result are spliced, and the generated target encoding result can also include but is not limited to being expressed in the form of a set of probability values. The above-mentioned target discrimination result includes the target encoding result. For example, the target encoding result is [0.3, 0.4, ... 0.5, 0.2], wherein the target encoding result can determine the probability of each word in the above-mentioned multiple words belonging to the entity in the following manner:
[0118] For example, the probability value at the beginning of the first encoding result is the encoding result of the word "I", and the word vector at the end of the second encoding result is also the encoding result of the word "I". At this time, the probability of whether the word "I" belongs to the entity can be calculated by the softmax function, where the softmax function is a commonly used activation function that can convert the real number output by the neural network into a probability distribution, so that the probability value of each output category is between 0 and 1, and the sum of the probabilities of all categories is 1. Finally, the probability that the word "I" belongs to the entity is approximately 0.213.
[0119] Furthermore, the probability that each word vector belongs to an entity can be obtained from the target encoding result. When the probability value corresponding to the word vector meets the preset probability condition, the word corresponding to the word vector is determined to be a component of the target entity text. Conversely, when the probability value corresponding to the word vector does not meet the preset probability condition, the word corresponding to the word vector will not be determined as a component of the target entity text. The preset probability condition can be set flexibly and is not specifically limited in this application. For example, the preset probability condition can be a probability value greater than or equal to 0.5, that is, only when the probability value corresponding to the word vector is greater than or equal to 0.5, it is determined to be a component of the target entity text.
[0120] Through the embodiments of the present application, by splicing the above first coding result and the above second coding result to obtain a target coding result, thereby determining the probability that each word in the above multiple words belongs to an entity according to the above target coding result; according to the probability that each word in the above multiple words belongs to an entity, determining the above target entity text from the above multiple words, the method realizes extracting the target input information from the forward and backward directions, thereby more comprehensively understanding the features and context of the word vectors in the first input sequence, which helps to improve the representation ability and model performance of the target discrimination model.
[0121] As an optional solution, determining the entity type of the above target entity text and comparing it with the above preset entity type to update the above initialized label vector and generate the above target discrimination result includes: determining the first probability that each character in the above multiple words is at the start position and the second probability that each character in the above multiple words is at the end position according to the above target coding result, where the above start position indicates that the corresponding character is the first character of the above target entity text, and the above end position indicates that the corresponding character is the last character of the above target entity text; using the above first probability and the above second probability to determine the entity type of the above target entity text, comparing it with the above preset entity type, updating the above initialized label vector, and generating the above target discrimination result.
[0122] Optionally, in the embodiments of the present application, the above target coding result may include, but is not limited to, the probability value of the position where each character in the above multiple words is located. In other words, each word may include, but is not limited to, multiple characters, and these multiple characters form a word in a certain order, and each character corresponds to its respective position. For example, the target entity text is "kindergarten", and "kindergarten" includes three characters, namely "you", "er", and "yuan". Among them, the character "you" is at the start position of the word "kindergarten", and the character "yuan" is at the end position. Furthermore, each character at the above start position corresponds to a probability value, which is the first probability. Similarly, each character at the above end position corresponds to a probability value, which is the first probability. The character at the start position is set as the first character of the target entity text, and the character at the end position is set as the last character of the target entity text. In other words, it is possible to further determine whether the character is the first character of the target entity text by the probability value of the character in each word at the above start position. Similarly, it is possible to determine whether the character is the last character of the target entity text by the probability value of the character in each word at the above end position.
[0123] In an exemplary embodiment, by determining that the first probability distribution of the start position corresponding to each word is [0.1, 0.8, 0.05, 0.05,...], at this time, the highest probability of the start position of the target entity text is the 2nd position. Similarly, by determining that the second probability distribution of the end position corresponding to each word is [0.05, 0.05, 0.8, 0.1,...], the highest probability of the end position of the target entity text is the 3rd position. At this time, it can be determined that the start position of the target entity text is the 2nd position and the end position is the 3rd position.
[0124] Exemplarily, assume that the target entity text is "kindergarten", and the target coding result includes "kindergarten" and "comprehensive". At this time, the first probability that the character "you" corresponding to the word "kindergarten" in the target coding result is the start position of the target entity text is 1, and the first probability that the character "yuan" is the end position of the target entity text is 1. That is, "kindergarten" in the target coding result is determined as the target entity text, and the entity type of this target entity text is the collective household address type. However, the first probability that the character "zong" corresponding to the word "comprehensive" in the target coding result is the start position of the target entity text is 0, and the first probability that the character "he" is the end position of the target entity text is 0. "Comprehensive" in the target coding result is not the target entity text.
[0125] In the embodiment of the present application, the first probability of whether each character in the above-mentioned multiple words is the start position and the second probability of whether each character in the above-mentioned multiple words is the end position are determined according to the above-mentioned target coding result, and the entity type of the above-mentioned target entity text is determined by using the above-mentioned first probability and the above-mentioned second probability, and compared with the above-mentioned preset entity type to generate the above-mentioned target discrimination result. Thus, the purpose of quickly and conveniently determining the target entity text from the target coding result is achieved, and the rate of the target discrimination model outputting the target discrimination result is improved.
[0126] As an optional solution, the obtaining of the target address text related to the target application includes: obtaining a set of initial address texts generated in the above-mentioned target application; determining the above-mentioned target address text according to the number of accounts associated with each initial address text in the above-mentioned set of initial address texts.
[0127] Optionally, in the embodiment of the present application, the above-mentioned initial address text may include, but is not limited to, the address text filled in by the account for logging in to the target application, the address text generated by the account that has not logged in to the target application when browsing the content in the target application, and may also be the address text involved in the media information published in the target application.
[0128] Furthermore, after obtaining the initial address text, the target address text can be determined in combination with the account in the target application. For example, the determination condition of the target address text is: when there are more than 5 accounts associated with the initial address text, the initial address text will be determined as the target address text. At this time, only 1 account A fills in the initial address text A in the target application, that is, only 1 account is associated with the initial address text A. At this time, the initial address text A will not be determined as the target address text, and 10 accounts fill in the initial address text B in the target application. At this time, these 10 accounts are all associated with the initial address text B, and the initial address text B will be determined as the target address text.
[0129] As an optional solution, the above-mentioned determination of the target address text based on the number of accounts associated with each initial address text in the above-mentioned group of initial address texts includes: obtaining the number of first accounts associated with the first initial address text and a first account number threshold, wherein the above-mentioned group of initial address texts includes the above-mentioned first initial address text; when the number of the above-mentioned first accounts is greater than or equal to the above-mentioned first account number threshold, determining the above-mentioned first initial address text as the above-mentioned target address text; obtaining the number of second accounts associated with the second initial address text and a second account number threshold, wherein the above-mentioned group of initial address texts includes the above-mentioned second initial address text, and the above-mentioned second account number threshold is less than or equal to the above-mentioned first account number threshold; when the accounts associated with the above-mentioned second initial address text all provide address texts through the above-mentioned target application, and the number of the above-mentioned second accounts is greater than or equal to the above-mentioned second account number threshold, determining the above-mentioned second initial address text as the above-mentioned target address text.
[0130] Optionally, in an embodiment of the present application, the above-mentioned first initial address text and the above-mentioned second initial address text can both be any initial address text in the above-mentioned group of initial address texts, the above-mentioned first initial address text and the above-mentioned second initial address text can be the same or different, the first account number can be understood as the number of accounts associated with the first initial address text, and the second account number can be understood as the number of accounts associated with the second initial address text, and the accounts associated with the second initial address text are all provided with address texts through the above-mentioned target application, and the account associated with the second initial address text can not only provide the second initial address text, but also provide other initial address texts, while the account associated with the first initial text is not limited to providing address texts through the target application, but can also provide address texts through other applications, web pages, websites, etc. different from the target application, and one account can be associated with different address texts, the first account number threshold and the second account number threshold can be flexibly set, and this application does not limit this, and the second account number threshold is less than or equal to the first account number threshold.
[0131] For example, the first initial address text will only be determined as the target address text when the number of first accounts is greater than or equal to the first account number threshold. For another example, assuming that the accounts associated with the second initial address text all provide address text through the target application, and the number of second accounts is greater than or equal to the second account number threshold, the second initial address text will be determined as the target address text. If there is an account associated with the second initial address text that has not provided address text through the target application, the second initial address text will not be determined as the target address text.
[0132] Through the embodiments of the present application, an initial address text is obtained in advance, and whether each initial address text can be determined as the target address text is determined based on the number of accounts associated with each initial address text. Specifically, the number of first accounts associated with the first initial address text and a first account number threshold can be obtained. If the first account number is greater than or equal to the first account number threshold, the first initial address text is determined as the target address text. The number of second accounts associated with the second initial address text and a second account number threshold can also be obtained, and the second account number threshold is less than or equal to the first account number threshold. If the accounts associated with the second initial address text all provide address text through the target application, and the number of second accounts is greater than or equal to the second account number threshold, the second initial address text is determined as the target address text, so as to increase the flexibility of the target address text determination method. That is, the target address text is determined not only by relying on a single judgment criterion, but by combining the possibility of determining the target address text with the number of accounts, thereby improving the certainty of the target address text.
[0133] As an optional solution, the above method also includes: obtaining the above target address text associated with both the first account and the second account, wherein the above first account and the above second account both actively provide the above target address text through the above target application; inputting the above target address text into a preset search engine to determine the above target crawler text; constructing a prompt template based on the above target address text and the above target crawler text, and inputting the above prompt template into the above target discrimination model to obtain the target entity identified in the above target address text, and a target label of whether the above target entity is a valid aggregate address, wherein the above preset entity type includes the above valid aggregate address, and the above entity label includes the above target label.
[0134] In an exemplary embodiment, the above-mentioned target address text is associated with both the first account and the second account, and the first account and the second account are both target address texts provided by the target application. The above-mentioned preset search engine may include but is not limited to an independent search engine application, a search engine web site, etc.
[0135] Specifically, after determining the target address text, the target address text is input into a preset search engine for search, and the target crawler text is obtained from the searched page. Finally, a prompt template is constructed based on the target address text and the target crawler text. The prompt template may include but is not limited to "[CLS] Extract entities related to the target address text [SEP] Target crawler text [SEP] Preset entity type". After inputting the prompt template into the above-mentioned target discrimination model, the target entity identified in the target address text is obtained. In addition, the target discrimination model can also be used to obtain whether the target entity is a target label of a valid aggregate address. The above-mentioned valid aggregate address can be understood as a collective household address. For example, the target label of the target entity is a valid aggregate address label, and the target label of the target entity is an invalid aggregate address label.
[0136] In an exemplary embodiment, the address type determination method proposed in this application can be applied to an address management application scenario, wherein it is possible to determine whether multiple addresses are collective household addresses. After collecting target crawler text related to the target address text through a search engine, a prompt template is constructed based on the target address text and the target crawler text. The prompt template and the classification characters (the above-mentioned preset entity type) are used as inputs of the target discrimination model. By improving the MRC algorithm, entities related to the target address text are extracted, and further determination is made as to whether the address corresponding to the entity identified from the target crawler text is a collective household address, which may include but is not limited to:
[0137] S1, collects target crawler text related to the target address text through search engines;
[0138] S2, construct the prompt template description and classification characters to form the input of the target discrimination model, for example: [CLS] extract entities related to XX [SEP] crawler text [SEP] L (classification characters) [SEP];
[0139] S3, trains the model to extract address-related entities from the crawled text [SEP] and obtains entity type predictions from L (classified characters) labels.
[0140] Exemplarily, the present application can construct a description of the prompt template in the input text so that the target discrimination model only extracts entities related to the prompt template in the input text; by constructing L at the end of the input text, the target discrimination model can synchronously identify the entity type, that is, by designing the input and output of the MRC algorithm framework, the target discrimination model can solve the task of collective account address identification associated with multiple accounts in a joint modeling manner, which may include but is not limited to the MRC basic model and model fusion framework.
[0141] Furthermore, the target discrimination model may include but is not limited to TOKEN processing, BERT precoding, and BILSTM precoding, which respectively undertake sentence component labeling, precoding, context encoding, and sentence component learning during the model training process. Among them, the TOKEN processing module implements the labeling of word components in the input text, completes the component labeling of the input text, and uses the BERT module as a pre-training tool to encode the input text. Its parameters are not gradient updated during the training process. At the same time, the BILSTM model is used to encode the words, and two LSTM models are combined to splice the encoding results of the words from two directions of the sentence to achieve contextual understanding of the words. For example, the model input of the target discrimination model is [CLS] extracting entities related to address XX [SEP] crawler text [SEP] type label, and the model output of the target discrimination model is entity type discrimination related to crawler text related entities and type labels.
[0142] It should be noted that, in the embodiment of the present application, the target discrimination model is implemented by the MRC algorithm, and it may also include but is not limited to using information extraction schemes to replace the MRC algorithm. Moreover, a variety of different text generation algorithms may also be used to generate prompt templates based on the target address text and the target crawler text, including but not limited to text generation algorithms based on LSTM, Transform, Bert, etc.
[0143] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0144] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0145] According to another aspect of the embodiment of the present application, there is also provided an address type determination device for implementing the above-mentioned address type determination method. Figure 11 As shown, the device includes:
[0146] An acquisition module 1102 is configured to acquire a target address text associated with a target application, wherein the target address text represents an address text associated with multiple accounts using the target application;
[0147] A search module 1104 is configured to perform a search operation based on the target address text to obtain a target crawler text, wherein the target crawler text represents text that can be retrieved using the target address text as a keyword;
[0148] A construction module 1106 is configured to construct target input information based on the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and a target placeholder, wherein the target placeholder is used to indicate whether the type of an entity in the target crawler text needs to be determined to be a preset entity type;
[0149] The discrimination module 1108 is used to input the target input information into the pre-trained target discrimination model to obtain a target discrimination result, wherein the target discrimination result includes an entity label for indicating whether the type of the entity identified in the target crawler text is a preset entity type, and the entity label is associated with the target placeholder. The target discrimination model is used to identify entities related to the target address text from the target crawler text, and indicates whether the identified entity is a preset entity type through the entity label.
[0150] As an optional solution, the above-mentioned device is used to construct the target input information based on the above-mentioned target address text and the above-mentioned target crawler text in the following manner: construct the above-mentioned target input information based on the above-mentioned target address text and the above-mentioned target crawler text, wherein the above-mentioned target input information includes the above-mentioned target address text, the above-mentioned target crawler text and the above-mentioned target placeholder separated by several separators, and the above-mentioned target placeholder is set as the initialization label vector in the above-mentioned target discrimination model, and the above-mentioned initialization label vector is used to generate the above-mentioned entity label; the above-mentioned device is used to input the above-mentioned target input information into the pre-trained target discrimination model in the following manner to obtain the target discrimination result: extract the target entity text related to the above-mentioned target address text from the above-mentioned target crawler text of the above-mentioned target input information, and judge whether the above-mentioned target entity text is the above-mentioned preset entity type, update the above-mentioned initialization label vector, and obtain the above-mentioned target discrimination result.
[0151] As an optional solution, the above-mentioned device is used to extract the target entity text related to the above-mentioned target address text from the above-mentioned target crawler text of the above-mentioned target input information in the following manner, and judge whether the above-mentioned target entity text is the above-mentioned preset entity type, update the above-mentioned initialization label vector, and obtain the above-mentioned target judgment result: input the above-mentioned target input information into the pre-trained first encoding model to obtain a first text sequence, wherein the above-mentioned first encoding model is used to perform self-attention encoding on multiple words in the above-mentioned target input information to obtain the above-mentioned first text sequence including multiple word vectors, and the above-mentioned multiple word vectors correspond one-to-one to the above-mentioned multiple words; input the above-mentioned first text sequence into the pre-trained second encoding model to obtain the above-mentioned target entity text, wherein the above-mentioned second encoding model is used to identify entities existing in the above-mentioned first text sequence; determine the entity type of the above-mentioned target entity text, and compare it with the above-mentioned preset entity type, update the above-mentioned initialization label vector, and generate the above-mentioned target judgment result.
[0152] As an optional solution, the above-mentioned device is used to input the above-mentioned target input information into a pre-trained first encoding model in the following manner to obtain a first text sequence: marking the above-mentioned target input information to obtain the above-mentioned multiple words with part-of-speech tagged; and self-attention encoding the above-mentioned multiple words to obtain the above-mentioned first text sequence.
[0153] As an optional solution, the above-mentioned device is used to input the above-mentioned first text sequence into a pre-trained second encoding model in the following manner to obtain the above-mentioned target entity text: encode the above-mentioned first text sequence from the first direction and the second direction of the above-mentioned first text sequence respectively to obtain a first encoding result and a second encoding result, wherein the above-mentioned first direction and the above-mentioned second direction are opposite; splice the above-mentioned first encoding result and the above-mentioned second encoding result to determine the above-mentioned target entity text.
[0154] As an optional solution, the above-mentioned device is used to determine the above-mentioned target entity text by splicing the above-mentioned first encoding result and the above-mentioned second encoding result in the following manner: splicing the above-mentioned first encoding result and the above-mentioned second encoding result to obtain a target encoding result; determining the probability of whether each of the above-mentioned multiple words belongs to an entity based on the above-mentioned target encoding result; determining the above-mentioned target entity text from the above-mentioned multiple words based on the probability of whether each of the above-mentioned multiple words belongs to an entity, wherein the above-mentioned target entity text represents a text composed of words whose probability values meet preset probability conditions.
[0155] As an optional solution, the above-mentioned device is used to determine the entity type of the above-mentioned target entity text in the following manner, compare it with the above-mentioned preset entity type, update the above-mentioned initialization label vector, and generate the above-mentioned target discrimination result: determine the first probability of whether each character in the above-mentioned multiple words is the starting position and the second probability of whether each character in the above-mentioned multiple words is the ending position based on the above-mentioned target encoding result, wherein the above-mentioned starting position indicates that the corresponding character is the first character of the above-mentioned target entity text, and the above-mentioned ending position indicates that the corresponding character is the last character of the above-mentioned target entity text; use the above-mentioned first probability and the above-mentioned second probability to determine the entity type of the above-mentioned target entity text, compare it with the above-mentioned preset entity type, update the above-mentioned initialization label vector, and generate the above-mentioned target discrimination result.
[0156] As an optional solution, the above-mentioned device is used to obtain the target address text related to the target application in the following manner: obtain a set of initial address texts generated in the above-mentioned target application; determine the above-mentioned target address text based on the number of accounts associated with each initial address text in the above-mentioned set of initial address texts.
[0157] As an optional solution, the above-mentioned device is used to determine the above-mentioned target address text according to the number of accounts associated with each initial address text in the above-mentioned group of initial address texts in the following manner: obtain the number of first accounts associated with the first initial address text and the first account number threshold, wherein the above-mentioned group of initial address texts includes the above-mentioned first initial address text; when the number of the above-mentioned first accounts is greater than or equal to the above-mentioned first account number threshold, determine the above-mentioned first initial address text as the above-mentioned target address text; obtain the number of second accounts associated with the second initial address text and the second account number threshold, wherein the above-mentioned group of initial address texts includes the above-mentioned second initial address text, and the above-mentioned second account number threshold is less than or equal to the above-mentioned first account number threshold; when the accounts associated with the above-mentioned second initial address text all provide address texts through the above-mentioned target application, and the number of the above-mentioned second accounts is greater than or equal to the above-mentioned second account number threshold, determine the above-mentioned second initial address text as the above-mentioned target address text.
[0158] As an optional solution, the above-mentioned device is also used to: obtain the above-mentioned target address text associated with both the first account and the second account, wherein the above-mentioned first account and the above-mentioned second account both actively provide the above-mentioned target address text through the above-mentioned target application; input the above-mentioned target address text into a preset search engine to determine the above-mentioned target crawler text; construct a prompt template based on the above-mentioned target address text and the above-mentioned target crawler text, and input the above-mentioned prompt template into the above-mentioned target discrimination model to obtain the target entity identified in the above-mentioned target address text, and the target label of whether the above-mentioned target entity is a valid aggregation address, wherein the above-mentioned preset entity type includes the above-mentioned valid aggregation address, and the above-mentioned entity label includes the above-mentioned target label.
[0159] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0160] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0161] According to one aspect of the present application, a computer program product is provided, which includes a computer program.
[0162] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0163] Figure 12 The block diagram schematically shows a computer system structure of an electronic device used to implement an embodiment of the present application.
[0164] It should be noted that Figure 12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0165] like Figure 12As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 into the random access memory (RAM) 1203. Various programs and data required for system operation are also stored in the random access memory 1203. The CPU 1201, the read-only memory 1202, and the random access memory 1203 are connected to each other via a bus 1204. An input / output interface 1205 (i.e., an I / O interface) is also connected to the bus 1204.
[0166] The following components are connected to the input / output interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output section 1207 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1208 including a hard disk; and a communication section 1209 including a network interface card such as a local area network card or a modem. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the input / output interface 1205 as needed. Removable media 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1210 as needed, so that computer programs read therefrom can be installed into the storage section 1208 as needed.
[0167] In particular, according to an embodiment of the present application, the processes described in the various method flow charts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods shown in the flow charts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209 and / or installed from a removable medium 1211. When the computer program is executed by the central processing unit 1201, the various functions defined in the system of the present application are performed.
[0168] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processing unit 1201, various functions provided by the embodiments of the present application are performed.
[0169] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned method for determining the address type is also provided. The electronic device may be Figure 1 The terminal device or server shown in FIG. This embodiment is described by taking the electronic device as a terminal device as an example. Figure 13 As shown, the electronic device includes a memory 1302 and a processor 1304. The memory 1302 stores a computer program, and the processor 1304 is configured to execute the steps in any of the above method embodiments through the computer program.
[0170] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0171] Optionally, in this embodiment, the above-mentioned processor can be configured to execute the methods in each embodiment of the present application through a computer program.
[0172] Alternatively, those skilled in the art will appreciate that Figure 13 The structure shown is for illustration only. Figure 13 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 13 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 13 Different configurations shown.
[0173] Among them, the memory 1302 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for determining the address type in the embodiment of the present application. The processor 1304 executes various functional applications and data processing by running the software programs and modules stored in the memory 1302, that is, realizes the above-mentioned method for determining the address type. The memory 1302 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1302 may further include a memory remotely located relative to the processor 1304, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1302 can be used specifically, but not limited to, to store information such as target address text and target crawler text. As an example, if Figure 13 As shown, the memory 1302 may include, but is not limited to, the acquisition module 1102, search module 1104, and identification module 1106 in the device for determining the address type. Furthermore, it may also include, but is not limited to, other module units in the device for determining the address type, which will not be described in detail in this example.
[0174] Optionally, the transmission device 1306 is configured to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one embodiment, the transmission device 1306 includes a network interface controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In one embodiment, the transmission device 1306 is a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.
[0175] In addition, the electronic device further includes: a display 1308 for displaying the target identification result; and a connection bus 1310 for connecting various module components in the electronic device.
[0176] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting multiple nodes via network communication. The nodes may form a peer-to-peer network, and any computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0177] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the address type determination method provided in various optional implementations of the above-mentioned address type determination aspects.
[0178] Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be configured to store data for executing the methods in various embodiments of the present application.
[0179] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0180] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0181] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing one or more electronic devices to execute all or part of the steps of the method described in each embodiment of the present application.
[0182] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0183] In the several embodiments provided in this application, it should be understood that the disclosed applications can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0184] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0185] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0186] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining an address type, characterized in that: include: Acquire a target address text related to a target application, wherein the target address text represents an address text associated with multiple accounts using the target application; Performing a search operation based on the target address text to obtain a target crawler text, wherein the target crawler text represents text that can be retrieved using the target address text as a keyword; Constructing target input information according to the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and a target placeholder, wherein the target placeholder is used to indicate whether a type of an entity in the target crawler text needs to be determined to be a preset entity type; The target input information is input into a pre-trained target discrimination model to obtain a target discrimination result, wherein the target discrimination result includes an entity label for indicating whether the type of the entity identified in the target crawler text is the preset entity type, and the entity label is associated with the target placeholder. The target discrimination model is used to identify entities related to the target address text from the target crawler text, and indicates whether the identified entity is the preset entity type through the entity label.
2. The method according to claim 1, characterized in that The constructing target input information according to the target address text and the target crawler text includes: constructing the target input information according to the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and the target placeholder separated by a plurality of delimiters, the target placeholder is set as an initialization label vector in the target discrimination model, and the initialization label vector is used to generate the entity label; The target input information is input into a pre-trained target discrimination model to obtain a target discrimination result, including: extracting target entity text related to the target address text from the target crawler text of the target input information, and judging whether the target entity text is the preset entity type, updating the initialization label vector, and obtaining the target discrimination result.
3. The method according to claim 2, characterized in that The step of extracting target entity text related to the target address text from the target crawler text of the target input information, determining whether the target entity text is the preset entity type, updating the initialization label vector, and obtaining the target determination result includes: Inputting the target input information into a pre-trained first encoding model to obtain a first text sequence, wherein the first encoding model is used to perform self-attention encoding on multiple words in the target input information to obtain the first text sequence including multiple word vectors, and the multiple word vectors correspond one-to-one to the multiple words; Inputting the first text sequence into a pre-trained second encoding model to obtain the target entity text, wherein the second encoding model is used to identify entities present in the first text sequence; The entity type of the target entity text is determined, and compared with the preset entity type, the initialization label vector is updated, and the target discrimination result is generated.
4. The method according to claim 3, characterized in that The step of inputting the target input information into a pre-trained first encoding model to obtain a first text sequence includes: performing tagging processing on the target input information to obtain the plurality of words with part-of-speech tags; Perform self-attention encoding on the multiple words to obtain the first text sequence.
5. The method according to claim 3, characterized in that Inputting the first text sequence into a pre-trained second encoding model to obtain the target entity text includes: Encoding the first text sequence from a first direction and a second direction of the first text sequence respectively to obtain a first encoding result and a second encoding result, wherein the first direction and the second direction are opposite to each other; The first encoding result and the second encoding result are concatenated to determine the target entity text.
6. The method according to claim 5, characterized in that The step of concatenating the first encoding result and the second encoding result to determine the target entity text includes: splicing the first encoding result and the second encoding result to obtain a target encoding result; Determining a probability of whether each word in the plurality of words belongs to an entity according to the target encoding result; The target entity text is determined from the multiple words according to the probability of whether each word in the multiple words belongs to an entity, wherein the target entity text represents a text composed of words whose probability values meet a preset probability condition.
7. The method according to claim 3, characterized in that The determining the entity type of the target entity text, comparing it with the preset entity type, updating the initialization label vector, and generating the target discrimination result includes: Determining, based on the target encoding results, a first probability of whether each character in the multiple words is a start position and a second probability of whether each character in the multiple words is an end position, wherein the start position indicates that the corresponding character is the first character of the target entity text, and the end position indicates that the corresponding character is the last character of the target entity text; The entity type of the target entity text is determined using the first probability and the second probability, and is compared with the preset entity type, the initialization label vector is updated, and the target discrimination result is generated.
8. The method according to claim 1, characterized in that The step of obtaining the target address text related to the target application includes: Obtain a set of initial address texts generated in the target application; The target address text is determined according to the number of accounts associated with each initial address text in the group of initial address texts.
9. The method according to claim 8, characterized in that The determining the target address text according to the number of accounts associated with each initial address text in the set of initial address texts includes: Obtaining a first number of accounts associated with a first initial address text and a first account number threshold, wherein the group of initial address texts includes the first initial address text; and determining the first initial address text as the target address text if the first number of accounts is greater than or equal to the first account number threshold; Obtain the number of second accounts associated with the second initial address text and the second account number threshold, wherein the group of initial address texts includes the second initial address text, and the second account number threshold is less than or equal to the first account number threshold; if all accounts associated with the second initial address text provide address text through the target application, and the number of second accounts is greater than or equal to the second account number threshold, determine the second initial address text as the target address text.
10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: Obtaining the target address text associated with both the first account and the second account, wherein both the first account and the second account actively provide the target address text through the target application; Input the target address text into a preset search engine to determine the target crawler text; A prompt template is constructed based on the target address text and the target crawler text, and the prompt template is input into the target discrimination model to obtain the target entity identified in the target address text and a target label of whether the target entity is a valid aggregation address, wherein the preset entity type includes the valid aggregation address, and the entity label includes the target label.
11. A device for determining an address type, characterized in that: include: An acquisition module, configured to acquire a target address text associated with a target application, wherein the target address text represents an address text associated with multiple accounts using the target application; A search module, configured to perform a search operation based on the target address text to obtain a target crawler text, wherein the target crawler text represents text that can be retrieved using the target address text as a keyword; a construction module, configured to construct target input information according to the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and a target placeholder, wherein the target placeholder is used to indicate whether a type of an entity in the target crawler text needs to be determined to be a preset entity type; A discrimination module is used to input the target input information into a pre-trained target discrimination model to obtain a target discrimination result, wherein the target discrimination result includes an entity label for indicating whether the type of the entity identified in the target crawler text is the preset entity type, and the entity label is associated with the target placeholder. The target discrimination model is used to identify entities related to the target address text from the target crawler text, and indicates whether the identified entity is the preset entity type through the entity label.
12. The device according to claim 11, characterized in that The device is configured to construct target input information based on the target address text and the target crawler text in the following manner: constructing the target input information based on the target address text and the target crawler text, wherein the target input information includes the target address text, the target crawler text, and the target placeholder separated by a plurality of delimiters, the target placeholder being set as an initialization label vector in the target discriminant model, and the initialization label vector being used to generate the entity label; The device is used to input the target input information into a pre-trained target discrimination model in the following manner to obtain a target discrimination result: extracting target entity text related to the target address text from the target crawler text of the target input information, and judging whether the target entity text is the preset entity type, updating the initialization label vector, and obtaining the target discrimination result.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method according to any one of claims 1 to 10.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.