A method, device, storage medium and electronic device for user matching

By extracting entities and relationships from policy information texts using machine learning technology, and building a rule-matching engine, the problem of inaccurate policy information matching is solved, enabling efficient and accurate user screening and policy delivery.

CN117648396BActive Publication Date: 2026-07-31ZHEJIANG LAB
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG LAB
Filing Date
2023-08-21
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately match policy information to the target group, resulting in insufficient understanding of policy information among grassroots staff and the public, wasting a lot of time and energy, and producing inaccurate matching results.

Method used

Machine learning methods are used to extract entities and entity relationships from policy information texts through entity extraction and relation extraction models, and a rule matching engine is built to directly filter out users who meet the policy information from the users to be matched.

Benefits of technology

It improved the efficiency of policy implementation, saved time and effort, avoided misinterpretation and distortion of policy information, and enhanced the coverage and effectiveness of policies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117648396B_ABST
    Figure CN117648396B_ABST
Patent Text Reader

Abstract

This specification discloses a method, apparatus, storage medium, and electronic device for user matching, comprising: first, acquiring policy information text to be matched; then, inputting the policy information text into a pre-trained entity extraction model to obtain entities extracted from the policy information text; then, inputting the policy information text and entity labels corresponding to each character in the policy information text into a pre-trained relation extraction model to determine the relationships between the entities; then, establishing a rule matching engine for the policy information text based on the determined relationships between the entities; and finally, calling the policy rule matching engine to filter users matching the policy information text from the users to be matched, thereby improving the execution efficiency and coverage of the policy information text, avoiding deviations in execution results that may occur in manual matching, and filling a gap in the field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a method, apparatus, storage medium, and electronic device for user matching. Background Technology

[0002] How to accurately match policy information to the target group of the policy is a very important issue.

[0003] Based on this, this specification provides a method for user matching. Summary of the Invention

[0004] This specification provides a method, apparatus, storage medium, and electronic device for user matching, filling a technical gap in the field of matching individuals with policies.

[0005] The following technical solution is adopted in this specification:

[0006] This manual provides a method for user matching, including:

[0007] Obtain policy information text;

[0008] The policy information text is input into a pre-trained entity extraction model to obtain the entities extracted by the entity extraction model from the policy information text.

[0009] By using a pre-trained relation extraction model, the relationships between the entities are determined based on the policy information text and the entities themselves.

[0010] Based on the relationships between the entities, a rule matching engine is established for the policy information text.

[0011] The rule matching engine is invoked to filter out users from the users to be matched who match the policy information text.

[0012] Optionally, obtaining the entities extracted from the policy information text by the entity extraction model specifically includes:

[0013] The policy information text is input into a pre-trained entity extraction model to obtain entity labels corresponding to each character in the policy information text output by the entity extraction model.

[0014] Optionally, based on the policy information text and the entities, the relationships between the entities are determined, specifically including:

[0015] The policy information text and the entity labels corresponding to each character in the policy information text are input into a pre-trained relation extraction model to obtain the relationship between each entity in the policy information text output by the relation extraction model.

[0016] Optionally, based on the relationships between the entities, a rule matching engine is established corresponding to the policy information text, specifically including:

[0017] For each obtained relation, the entities associated with that relation and the relation itself are redefined as entities, and entity labels are set for the redefined entities as the updated entity labels corresponding to the characters contained in the entities associated with that relation.

[0018] The policy information text and the updated entity labels corresponding to each character in the policy information text are input into a pre-trained relation extraction model to obtain the redefined relationships between entities output by the relation extraction model. When the preset conditions are met, a rule matching engine corresponding to the policy information text is established based on the relationships between the entities.

[0019] Optionally, preset conditions are met, including:

[0020] Determine whether each identified relationship and the entity associated with each relationship contains a specified portion of the policy information text;

[0021] If so, then the preset conditions are met;

[0022] Otherwise, it is determined that the preset conditions are not met.

[0023] Optionally, the method further includes:

[0024] After filtering out users from the pool of users who match the policy information text, the policy information text is then pushed to the matched users.

[0025] Optionally, an entity extraction model is pre-trained, specifically including:

[0026] Obtain the sample text and the entity label for each character in the sample text;

[0027] The sample text is input into the entity extraction model to be trained, and the entity labels corresponding to each character in the sample text are output by the entity extraction model to be trained.

[0028] The entity extraction model is trained based on the entity labels output by the entity extraction model to be trained and the labeled entity labels.

[0029] Optionally, a relation extraction model is pre-trained, specifically including:

[0030] Obtain the sample text and the relationships between the annotations of the entities in the sample text;

[0031] Input the entity labels corresponding to each character in the sample text and the policy information text into the relation extraction model to obtain the relationship between each entity in the sample text output by the relation extraction model to be trained.

[0032] The relation extraction model is trained based on the relationships between entities output by the relation extraction model to be trained and the relationships between labeled entities.

[0033] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described user matching method.

[0034] This specification provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned user matching method.

[0035] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0036] The user matching method provided in this specification first determines the policy information text. Then, for each determined policy information text, it extracts each entity from the policy information text, extracts the relationships between the entities based on the policy information text and the entities, establishes a rule matching engine corresponding to the policy information text based on the relationships between the entities, and calls the established rule matching engine to filter out users who match the policy information text from the users to be matched.

[0037] As can be seen from the above method, this approach establishes a rule-matching engine by extracting the entities and relationships between them from the policy information text. By calling this rule-matching engine, users who meet the rules are filtered out from existing big data. This not only saves a significant amount of time and effort but also avoids problems caused by some grassroots staff and the public misinterpreting the policy information text, effectively improving the efficiency and coverage of policy implementation and filling a gap in this field. Attached Figure Description

[0038] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0039] Figure 1 This is a flowchart illustrating a user matching method provided in this specification;

[0040] Figure 2This is a schematic diagram of an entity extraction model structure provided in this specification;

[0041] Figure 3 This is a flowchart illustrating a method for extracting relationships between various relations provided in this specification;

[0042] Figure 4 This is a schematic diagram of a multi-level nested structure of a policy information text provided in this specification;

[0043] Figure 5 This is a flowchart illustrating a training method for an entity extraction model provided in this specification.

[0044] Figure 6 This is a flowchart illustrating a training method for a relation extraction model provided in this specification.

[0045] Figure 7 This is a schematic diagram of a user matching device provided in this specification;

[0046] Figure 8 This specification provides a corresponding Figure 1 A schematic diagram of the structure of an electronic device. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0048] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0049] Figure 1 This is a flowchart illustrating a user matching method provided in this specification, including the following steps:

[0050] S100: Obtain policy information text.

[0051] This specification provides a user matching method, which can be executed by electronic devices such as servers used for running big data analysis. Furthermore, the execution of the user matching method in this specification also involves a model training process. The electronic devices used to perform the model training process and the electronic devices used to perform the user matching method can be the same or different; this specification does not impose any limitations on this.

[0052] in, Figure 1The user matching method shown is used to filter out users who meet the standards specified in the current policy information text.

[0053] In real-world scenarios, there are issues such as scattered policy information, lack of explanation of document clauses, and insufficient understanding and awareness of policies among some grassroots staff and the public. Manual matching requires a lot of effort and time, and the final results may not necessarily match.

[0054] Therefore, in the user matching process of this specification, machine learning combined with big data methods are used to directly extract the entity relationships in the policy information text to be matched, and a rule matching engine for the policy information text is constructed to directly filter out matching users from the users to be matched. Of course, the text used for user matching can also be company performance evaluation text; this specification does not make any specific limitations.

[0055] S102: Input the policy information text into a pre-trained entity extraction model to obtain the entities extracted by the entity extraction model from the policy information text.

[0056] Specifically, an entity consists of one or more characters that can constitute actual meaning. In this embodiment, each character in the entity needs to be assigned a corresponding entity label. The entity label for a character is used to indicate the entity type of that character. The entity label consists of two parts: entity category features and entity construction features. Specifically, the entity category features are divided into the following five categories: governing entity - GOV, policy entity - POL (this entity is generally the policy title; there is only one policy entity in a policy document), attribute entity - ATT (e.g., per capita disposable income of households), standard entity - STA (e.g., per capita disposable income of local urban and rural residents), and population entity - GRO; the entity construction features are divided into the following five categories: R indicates that the entity is involved in some relationships, N indicates that it does not participate in relationship construction, B indicates the beginning of the entity, I indicates the middle of the entity, and O indicates a non-entity (used for labeling). (Note irrelevant characters), the two features together constitute 21 entity tags: B-GOV-R, I-GOV-R, B-POL-R, I-POL-R, B-ATT-R, I-ATT-R, B-STA-R, I-STA-R, B-GRO-R, I-GRO-R, B-GOV-N, I-GOV-N, B-POL-N, I-POL-N, B-ATT-N, I-ATT-N, B-STA-N, I-STA-N, B-GRO-N, I-GRO-N, O. Specifically, if "recipients of minimum subsistence allowance" constitutes a population entity, then the characters within that entity would be labeled as follows: "Minimum (B-GRO-R) subsistence (I-GRO-R) living (I-GRO-R) guarantee (I-GRO-R) recipient (I-GRO-R)". Here, the character "minimum" is the beginning of the entity "recipients of minimum subsistence allowance", so it is labeled "I". The entity "recipients of minimum subsistence allowance" involves a relationship between a population entity and a policy entity, so all characters within that entity are labeled "R".

[0057] In the embodiments of this specification, the specific structure of the pre-trained entity extraction model is as follows: Figure 2 As shown, the policy information text is input into the BiLSTM layer of the entity extraction model to obtain the probability of each type of entity label corresponding to each character, as well as the contextual feature information of the policy information text. Since the CRF layer has two feature functions, the contextual features of the policy information text are input into the CRF layer as one feature function, and the other feature function is adaptively converted into the dependency information between the entity labels corresponding to each character in the policy information text. Based on the dependency information between the entity labels, the scores of each entity label corresponding to each character in the policy information text output by the BiLSTM layer are corrected, and the entity label with the highest score among all entity labels is taken as the final entity label.

[0058] S104: Using a pre-trained relation extraction model, determine the relationships between the entities based on the policy information text and the entities.

[0059] In the embodiments of this specification, the pre-trained relation extraction model is divided into two functional modules. The first module processes the policy information text and the entities to obtain the contextual features of the policy information text and the various relation scores between the entities. The policy information text and the contextual features output by the first module are then input into the second module of the relation extraction model to obtain the forward and backward scores of various relations between the entities. The relation with the highest combined relation score, forward score, and backward score among all relation types is taken as the final relation between the entities.

[0060] S106: Based on the relationships between the entities, establish a rule matching engine corresponding to the policy information text.

[0061] Specifically, when building the engine, firstly, a correspondence can be established between each entity and user data in a specific location. For example, the entity "Local Registered Households" corresponds to the "id_number" field in the local user data table "tb_registered_population," and the entity "Local Minimum Living Guarantee Standard" corresponds to the "minimum_living_guarantee_standard" field in the local user data table "tb_common_standard_information." Then, a structured policy rule expression is established for the policy information text based on the relationships between the entities. Finally, a rule matching engine is built for the policy information text based on the correspondence between the entities and the local user data, as well as the policy rule expression for the policy information text, and stored in the database for later retrieval.

[0062] S108: Invoke the rule matching engine to filter out users from the users to be matched who match the policy information text.

[0063] Specifically, after obtaining the data of users to be matched, the user matching engine can be invoked to perform user matching. To facilitate matching, the data of users to be matched can be stored in a table of users to be matched and sorted by unique identifiers. Furthermore, after matching users who meet the policy rules, push notifications can be sent to these matched users. To facilitate push notifications, a table of users to be pushed to is also created for the matched user data and sorted by unique identifiers.

[0064] The system uses a rule-matching engine corresponding to the one or more policy information texts to filter users for matching. For a matched user, the identifier of the user and the matching policy information text are stored in the user-to-be-pushed-to-users table. For a matched user, the system can also record any missing information required by the policy for later supplementation after the policy is pushed out.

[0065] The reason for matching a certain policy information text is that the user data matches all entity relation triples extracted from the policy information text.

[0066] Furthermore, after obtaining the list of users to be pushed to, the multi-channel push interface of the rule matching engine can be called to push the corresponding policy information text to users who match the policy information text. For users who have received pushes, the push record is saved to the database for retention, and the user's data is deleted from the original list of users to be pushed to.

[0067] The multi-channel push interface can be invoked manually or on a scheduled basis; this manual does not specify the specific method. Each multi-channel push interface corresponds to a push method, which can be SMS, a webpage, or a government affairs app; this manual also does not specify the specific method. The push record can include the user's information and the number of the pushed policy information text.

[0068] based on Figure 1 The user matching method involves the server acquiring policy information text and determining the entities within it and the relationships between them. Then, based on each entity, a correspondence is established between that entity and existing big data. Based on the relationships between entities, a structured policy rule expression for the policy information text is created. Finally, a rule matching engine is built for the policy information text based on the correspondence between entities and existing big data and the policy rule expression. Calling this rule matching engine allows for the selection of users who match the policy information text from the pool of users to be matched.

[0069] It is evident that using machine learning to extract policy rules from policy information texts and combining it with big data technology not only avoids the problems caused by misinterpretation and distortion of policy information texts due to manual matching, but also effectively improves the efficiency of policy implementation, saves a lot of time and energy, and fills a gap in this field.

[0070] In one or more embodiments of this specification, because the entity structure in a text is often multi-level nested, not only are there relationships between entities, but there may also be relationships between the entities themselves. Each entity and its relationships are grouped into a tuple. For example, tuple A (average monthly income per family member, local minimum subsistence allowance, less than) contains the attribute entity ATT "average monthly income per family member" and the standard entity STA "local minimum subsistence allowance" and the relationship "less than". Tuple A can be used to represent the entity "average monthly income per family member is less than the local minimum subsistence allowance". Each tuple can be considered as an entity, meaning that relationships may also exist between tuples.

[0071] Continuing with the previous example, there is a relation "AND" between tuple A (average monthly income per family member, local minimum living standard, less than) and tuple B (local registered households, including). That is, tuple A and tuple B can form a new entity "the average monthly income per family member in local registered households is less than the local minimum living standard".

[0072] Therefore, in Figure 1 In step S104, to obtain the complete policy rule structure of the policy information text, it is necessary not only to extract the relationships between entities but also the relationships between those relationships. The steps are as follows: Figure 3 As shown, please follow these steps:

[0073] S200: Obtain the determined relationship and each entity associated with the relationship, treat it as a new entity, and add the updated entity label to the characters contained in the updated entity;

[0074] Continuing with the previous example, tuple A(average monthly income per family member, local minimum living standard, less than) represents the entity "average monthly income per family member is less than the local minimum living standard". This entity is a special entity, so a new entity type label, Special Entity - SPE, is introduced to redefine the corresponding entity label for each character in the entity represented by this tuple: "Family (B-SPE-R) Family (I-SPE-R) Member (I-SPE-R) Person (I-SP) E-R) average (I-SPE-R) monthly (I-SPE-R) income (I-SPE-R) small (I-SPE-R) in (I-SPE-R) current (I-SPE-R) place (I-SPE-R )The lowest (I-SPE-R) life (I-SPE-R) life (I-SPE-R) guarantee (I-SPE-R) (I-SPE-R) standard (I-SPE-R) standard (I-SPE-R)". Similarly, for each character in the entity represented by tuple B (local registered households, including), a new entity label is determined: "Including (B-SPE-R) Including (B-SPE-R) Local (B-SPE-R) Household (B-SPE-R) Registered (B-SPE-R) Household (B-SPE-R) ...

[0075] S202: Input the policy information text and the updated entity labels corresponding to each character in the policy information text into the pre-trained relation extraction model to determine the relationship between the updated entities;

[0076] Continuing with the previous example, the updated entity labels corresponding to each character and the policy information text are input into a pre-trained relation extraction model. Because the entity labels corresponding to each character in the policy information text have been updated, the model identifies "the average monthly income per family member is less than the local minimum living standard" and "including local registered households" as a complete and indivisible entity. Based on the contextual feature information extracted from the policy information text by the relation extraction model, the model ultimately determines that there is a relation "AND" between entities "the average monthly income per family member is less than the local minimum living standard" and "including local registered households" and entity "including local registered households". Based on this relation and the entities associated with it, a new tuple C (tuple A, tuple B, AND) can be established.

[0077] S204: Determine whether the preset conditions are met. If yes, proceed to S206; otherwise, proceed to S200.

[0078] Specifically, the preset condition may refer to the following: each identified relationship and the entity associated with each relationship contains a specified portion of the policy information text. That is, the combination of all identified relationships and all entities associated with all relationships contains a specified portion of the policy information text.

[0079] The designated portion can be a portion corresponding to a specified proportion of the policy information text. This specified proportion can be set as needed, for example, 80%. That is, if the combination of all determined relationships and all entities associated with those relationships includes a specified proportion of the policy information text, then the preset condition is met; otherwise, the preset condition is not met. Specifically, it can be determined whether the proportion of characters covered by all relationships and all entities associated with those relationships to all characters in the policy information text is greater than a specified proportion. Alternatively, the designated portion can be a pre-marked portion of the policy information text. That is, the core parts of the policy information text can be pre-marked, while non-core parts such as background information and overviews are not marked. Then, if the combination of all relationships and all entities associated with those relationships includes the marked core parts of the policy information text, then the preset condition is met; otherwise, the preset condition is not met.

[0080] In summary, the determination of whether the tuple representing the relation in the most recent output of the model and the entities associated with that relation can completely and clearly represent the content of the policy information text is crucial. For example, a tuple Z (tuple X, tuple Y, and) consisting of a tuple X (minimum subsistence allowance recipient, tuple A, belongs to) and a tuple Y (tuple B, meets the local minimum subsistence allowance family property status regulations, and), and their relation "and," can completely and clearly form a triple for expressing the policy information text with the policy title body: "Minimum subsistence allowance recipients are local registered households whose per capita monthly income of cohabiting family members is lower than the local minimum subsistence allowance standard and meets the local minimum subsistence allowance family property status regulations."

[0081] S206: Based on the extracted multi-layered entity relationship structure, establish a multi-layered knowledge graph for the policy information text.

[0082] Specifically, based on the entities, the relationships between entities, and the correlations between these relationships, a multi-layered entity relationship structure is constructed for the policy information text. For example, tuple A and tuple B, along with their relationship "and," form tuple P (tuple A, tuple B, and). Tuple P, together with the entity "minimum living allowance" and their relationship "application conditions," forms tuple M (tuple P, minimum living allowance, application conditions). The relevant multi-layered entity relationship structure is as follows: Figure 4 As shown.

[0083] Based on the extracted multi-level entity relationship structure, we obtain the entities, entity types, relationships between entities, and multi-level relationship structure, and establish a knowledge graph to represent the structured rules of policy information text, facilitating the construction of a rule matching engine.

[0084] In this embodiment, a multi-level knowledge graph is used to describe the rules in policy information texts, which can more comprehensively and intuitively reflect the rule features in policy information texts. The policy rule matching engine built on this basis has higher accuracy.

[0085] In addition, Figure 1 The process shown requires the use of a pre-trained entity extraction model. The training process of the entity extraction model is as follows: Figure 5 As shown, please follow these steps:

[0086] S300: Obtain the sample text and label each character in the sample text with the corresponding entity label.

[0087] Specifically, after obtaining the sample text, each entity in the sample text is manually identified, and corresponding entity labels are added to each character in each entity.

[0088] S302: Input the sample text into the first module of the entity extraction model to obtain the contextual feature information of the sample text and the entity label score corresponding to each character in the sample text.

[0089] Specifically, after inputting the sample text into the first module of the entity extraction model, the entity label scores corresponding to each character in the sample text are obtained, and the entity label with the highest score is taken as the entity label corresponding to that character.

[0090] S304: Input the contextual feature information of the sample text and the entity labels corresponding to each character into the second module of the entity extraction model to obtain the dependency information between the entity labels corresponding to each character in the sample text.

[0091] Specifically, after obtaining the contextual feature information of the sample text passed in by the first module, the second module of the entity extraction model generates dependency information between entity labels based on the contextual feature information of the sample text, in order to correct the entity labels corresponding to the characters.

[0092] S306: Based on the entity labels corresponding to each character in the sample text and the dependency information between the entity labels, recalculate the final entity labels corresponding to each character.

[0093] Specifically, the entity labels corresponding to each character obtained solely from the contextual information of the sample text are inaccurate. For example, before correction: "The lowest (B-GRO-R) living (I-GRO-R) security (I-GRO-R) target (I-GRO-R) is (O) co-living (I-STA-R) family (I-ATT-R) members (I-ATT-R) of (O) co-living (I-STA-R)" is not an entity. However, after recalculating based on the dependency information between entity tags, the result is: the lowest level of social security is for members of families living together. It can be seen that some incorrect entity tags have been corrected in the recalculated policy information text.

[0094] S308: Adjust the parameters of the entity extraction model with the training objective of maximizing the score of the labeled tags during the training process.

[0095] The goal of maximizing the scores of the labeled entries during training is to enable the entity extraction model to learn the ability to extract entity features from the sample text. This allows for more accurate prediction of the entity labels corresponding to each character in the sample text, improving the accuracy of the entity extraction model in assigning character entity labels.

[0096] The goal of maximizing the scores of the labeled entries during training is to enable the entity extraction model to learn the ability to extract entity features from the sample text. This allows for more accurate prediction of the entity labels corresponding to each character in the sample text, improving the accuracy of the entity extraction model in assigning character entity labels.

[0097] In the above training process, the policy information text is represented by word vectors (x1, x2, x3, ..., x...). n The contextual feature information (h1, h2, h3, ..., h) of the policy information text is input into the entity extraction model in the form of ) to obtain the contextual feature information (h1, h2, h3, ..., h) n The formula for calculating the contextual feature information of word vectors is as follows:

[0098]

[0099] i t=σ(W xi x t +W hi h t-1 +W ci c t-1 +b i )

[0100] c t = (1-i t )⊙c t-1 +i t ⊙tanh(W xc x t +W hc h t-1 +b c )

[0101] o t =σ(W xo x t +W ho h t-1 +W co c t +b o )

[0102] h t =o t ⊙tanh(c t )

[0103] Where all W represent the corresponding weights, which are hyperparameters, and all b represent biases, i t c represents the memory value of the entity extraction model at the current time. t Indicates the current state of the entity extraction model, o t h represents the score of each entity label corresponding to the current word vector. t It represents the contextual feature information of the current word vector.

[0104] Based on the obtained contextual feature information h t The entity label score P corresponding to each character in the word vector is obtained. a,y And the dependency transfer score A between tags i,j .in, A represents the score of the entity label y corresponding to the character 'a'. i,j This represents the score at which label i is transferred to label j.

[0105] For a word vector X in a policy information text, calculate the score for each entity type y corresponding to the entity formed by that word vector:

[0106]

[0107] The score s(X,y) is transformed by the softmax layer in the entity extraction model to obtain the probability of the entity type y corresponding to the entity composed of word vectors X:

[0108]

[0109] in, Y represents any predicted entity label corresponding to the entity formed by word vectors X. X It represents the set of all entity labels corresponding to the entity formed by the word vector X.

[0110] The model aims to maximize the score of the labeled tags during training. Specifically, for each character in the word vector X, this can be achieved by adjusting the sequence y composed of the entity labels corresponding to each character. The probability calculation formula for the entity label sequence y is as follows:

[0111]

[0112] Among them, Y X This represents all possible label sequences for the word vector X.

[0113] When obtaining the entity labels corresponding to each character in the policy information text, the score of the sequence of entity labels corresponding to each character is calculated, and the entity labels in the sequence with the highest score are taken as the final entity labels for each character. The maximum score y of the entity label sequence. * The calculation formula is:

[0114]

[0115] In addition, Figure 1 The process shown requires the use of a pre-trained relation extraction model. The training process of the entity extraction model is as follows: Figure 6 As shown, please follow these steps:

[0116] S400: Obtain the sample text, the entity labels corresponding to each character in the sample text, and the relationships between the annotations of each entity in the sample text.

[0117] Specifically, after obtaining each entity in the sample text, it is necessary to manually determine the relationship between each entity in the sample text, and save the determined relationship and each entity associated with the relationship as a tuple.

[0118] S402: Input the sample text and the entity labels corresponding to each character in the sample text into the first module of the relation extraction model to obtain the contextual feature information of the sample text and the various relation scores between the entities in the sample text.

[0119] Specifically, after inputting the sample text and the entity labels corresponding to each character in the sample text into the first module of the relation extraction model, the scores of various relation types between the entities in the sample text are obtained.

[0120] S404: Input the contextual feature information of the sample text and the relationships between entities into the second module of the relation extraction model to obtain the scores of various forward relations and various backward relations between entities in the sample text.

[0121] Specifically, after obtaining the contextual feature information of the sample text input by the first module, the second module of the entity extraction model determines the relation score in the forward direction and the relation score in the backward direction based on the contextual feature information of the sample text.

[0122] Based on the scores of various types of relationships, the scores of various types of forward relationships, and the scores of various types of backward relationships, the final relationships between the entities associated with this relationship are determined.

[0123] S406: Take one or more relations with the highest combined score from the three categories, along with each entity associated with that relation. Keep the entities associated with that relation unchanged, replace only the relation to form a negative sample, and add the negative sample to the training.

[0124] For a given entity and a combination of entities, the relation extraction model outputs scores for the various relations corresponding to that entity combination. These relations are then sorted from highest to lowest score to obtain the relation ranking for that combination.

[0125] The purpose of constructing negative samples for training is to improve the relationship extraction model's ability to identify relationships between entities, thereby further improving the model's training performance.

[0126] S408: Adjust the parameters of the entity extraction model with the training objective of maximizing the score difference between the labeled relationships between entities and the relationships in the negative samples.

[0127] The goal of maximizing the score difference between the labeled relationships between entities and the relationships in the negative samples is to improve the relationship extraction model's ability to capture the features of each entity, thereby enabling it to extract the relationships between entities more accurately.

[0128] In the relation extraction model, an entity e is generated for a word k consisting of one or more characters in the policy information text, represented as: Among them l e w represents the length of entity e. k This represents the word vector corresponding to word k. Similarly, entity e can also be represented as (x i ,x j ,…,x i+len), which is the combination of word vectors.

[0129] After inputting the policy information text into the relation extraction model, the contextual feature information of the policy information text is obtained. Based on this contextual feature information, the forward entity and backward entity corresponding to word k can also be established, represented as follows: and in, and These represent the forward and backward feature information of word k, respectively.

[0130] Let r represent the relationship between entities. For a tuple (e1, e2, r), calculate the score of the relationship between entities e1 and e2, including the forward score and the backward score. The specific calculation method is as follows:

[0131]

[0132]

[0133]

[0134] The model's training objective is to maximize the score difference between the labeled relationships between entities and the relationships in the resulting negative samples. Specifically, for a tuple (e1, e2, r), the hinge loss function can be calculated sequentially within that tuple. Ranking loss of relational sequences and the final loss function Maximize the final loss function using stochastic gradient descent. Training the model. The formulas for calculating each loss function are as follows:

[0135]

[0136]

[0137]

[0138]

[0139]

[0140] in, Let y be the probability calculation formula for the entity label sequence y in S308, where t and t′ represent the positive and negative samples during model training, respectively, and γ and λ are both model hyperparameters.

[0141] Finally, multiple triplet extraction is performed. From the label sequence obtained in S308, entities with the R label are selected as candidate entities, resulting in a candidate entity set. Where m is the number of candidate entities, for each pair of candidate entities... Generate the initial set of triples Calculate the score For each candidate entity pair, the triple with the highest score is selected as the final triple:

[0142]

[0143] The above describes one or more implementations of the methods described in this specification. Based on the same approach, this specification also provides corresponding task scheduling devices, such as... Figure 7 As shown.

[0144] Figure 7 A schematic diagram of a user matching device provided in this specification includes:

[0145] The text acquisition module 700 is used to acquire policy information text.

[0146] The entity extraction module 702 is used to input the policy information text into a pre-trained entity extraction model to obtain the entities extracted by the entity extraction model from the policy information text.

[0147] The relationship extraction module 704 is used to determine the relationship between the entities based on the policy information text and the entities by using a pre-trained relationship extraction model.

[0148] Engine building module 706 is used to build a rule matching engine corresponding to the policy information text based on the relationships between the entities.

[0149] User matching module 708 is used to call the rule matching engine to filter out users from the users to be matched who match the policy information text.

[0150] Optionally, the entity extraction module 702 is specifically used to input the policy information text into a pre-trained entity extraction model to obtain entity labels corresponding to each character in the policy information text output by the entity extraction model.

[0151] Optionally, the relationship extraction module 704 is specifically used to input the policy information text and the entity labels corresponding to each character in the policy information text into a pre-trained relationship extraction model to obtain the relationship between each entity in the policy information text output by the relationship extraction model.

[0152] Optionally, the relationship extraction module 704 is specifically used to: for each obtained relationship, re-determine each entity associated with the relationship and the relationship itself as entities, and set entity labels for the re-determined entities as updated entity labels corresponding to the characters contained in each entity associated with the relationship; input the policy information text and the updated entity labels corresponding to each character in the policy information text into a pre-trained relationship extraction model to obtain the relationship between the re-determined entities output by the relationship extraction model, until a preset condition is met, and instruct the engine construction module 706 to establish a rule matching engine corresponding to the policy information text based on the relationship between each entity.

[0153] The relationship extraction module 704 is specifically used to determine whether each identified relationship and the entity associated with each relationship contains a specified portion of the policy information text; if so, it is determined that the preset conditions are met; otherwise, it is determined that the preset conditions are not met.

[0154] Optionally, the device further includes:

[0155] The policy push module 710 is used to push the policy information text to the matched users after the user matching module 708 filters out users that match the policy information text from the users to be matched.

[0156] Optionally, the device further includes:

[0157] The first model training module 712 is used to pre-acquire sample text and entity labels for each character in the sample text; input the sample text into the entity extraction model to be trained to obtain the entity labels corresponding to each character in the sample text output by the entity extraction model to be trained; and train the entity extraction model to be trained based on the entity labels output by the entity extraction model to be trained and the labeled entity labels.

[0158] Optionally, the device further includes:

[0159] The second model training module 714 is used to pre-acquire sample text and the labeled relationships between entities in the sample text; input the entity labels corresponding to each character in the sample text and the policy information text into the relationship extraction model to obtain the relationships between entities in the sample text output by the relationship extraction model to be trained; and train the relationship extraction model to be trained based on the relationships between entities output by the relationship extraction model to be trained and the labeled relationships between entities.

[0160] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1The user matching method is shown.

[0161] This instruction manual also provides Figure 8 The diagram shows a schematic structural representation of the electronic device. Figure 8 As shown, in the hardware sub-plane, this electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for various services. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The user matching method is shown. Of course, in addition to the software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0162] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0163] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0164] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0165] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0166] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0167] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0168] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0169] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0170] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0171] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0172] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0173] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0174] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0175] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0176] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The above descriptions are merely embodiments of this specification and are not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A method of user matching, characterized by, include: Obtain policy information text; The policy information text is input into a pre-trained entity extraction model to obtain the entities extracted by the entity extraction model from the policy information text. By using a pre-trained relation extraction model, the relationships between the entities are determined based on the policy information text and the entities themselves. For each obtained relation, the entities associated with that relation and the relation itself are redefined as entities, and entity labels are set for the redefined entities as the updated entity labels corresponding to the characters contained in the entities associated with that relation. The policy information text and the updated entity labels corresponding to each character in the policy information text are input into a pre-trained relation extraction model to obtain the redefined relationships between entities output by the relation extraction model. When a preset condition is met, a rule matching engine corresponding to the policy information text is established based on the relationships between the entities. The preset condition specifically includes: each determined relationship and the entity associated with each relationship contains a specified part of the policy information text. The rule matching engine is invoked to filter out users from the users to be matched who match the policy information text.

2. The method of claim 1, wherein, Obtaining the entities extracted from the policy information text by the entity extraction model specifically includes: The policy information text is input into a pre-trained entity extraction model to obtain entity labels corresponding to each character in the policy information text output by the entity extraction model.

3. The method of claim 2, wherein, Based on the policy information text and the entities, the relationships between the entities are determined, specifically including: The policy information text and the entity labels corresponding to each character in the policy information text are input into a pre-trained relation extraction model to obtain the relationship between each entity in the policy information text output by the relation extraction model.

4. The method of claim 1, wherein, The method further includes: After filtering out users from the pool of users who match the policy information text, the policy information text is then pushed to the matched users.

5. The method of claim 1, wherein, Pre-training the entity extraction model includes: Obtain the sample text and the entity label for each character in the sample text; The sample text is input into the entity extraction model to be trained, and the entity labels corresponding to each character in the sample text are output by the entity extraction model to be trained. The entity extraction model is trained based on the entity labels output by the entity extraction model to be trained and the labeled entity labels.

6. The method of claim 1, wherein, Pre-training the relation extraction model includes: Obtain the sample text and the relationships between the entities in the sample text; Input the sample text and the entity labels corresponding to each character in the policy information text into the relation extraction model to be trained, and obtain the relationship between each entity in the sample text output by the relation extraction model to be trained. The relation extraction model is trained based on the relationships between entities output by the relation extraction model to be trained and the relationships between labeled entities.

7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 6.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 6.