Method and system for trustworthiness discrimination
By using a dual-subject representation model and a multi-task expert model for credibility determination, the problems of recall defects and high computational resource consumption in existing technologies are solved, achieving high accuracy and low resource consumption in credibility determination, while protecting user privacy.
Patent Information
- Application Number
- CN202210793703.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-07-07
AI Technical Summary
Existing technologies face challenges in trustworthiness assessment due to recall deficiencies and high computational resource consumption, failing to guarantee user privacy.
A dual-subject-based representation model is used for credibility assessment. The representation vector is obtained by training the MoCo model, candidate relation pairs are screened by HNSW, and risk scoring is performed by a multi-task expert model, which reduces the consumption of computing resources and protects user privacy.
It improves the recall rate of future behavioral relationships, enhances the accuracy of credibility judgment, reduces computational resource consumption, and protects user privacy.
Smart Images

Figure CN115293238B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of artificial intelligence technology, and in particular to a method and system for trustworthiness determination. Background Technology
[0002] With the rapid development of internet technology, users face various risks in their online activities. These include various forms of fraud such as online transaction scams, fake job scams, and online dating scams. Other risks include money laundering, cheating, gambling, and theft. Typically, at the front end of a risk identification system, traffic is first assessed for trustworthiness. Traffic deemed to be from trustworthy users is quickly allowed through, while traffic from untrustworthy users is sent to the risk identification system for more refined risk assessment. Generally, trustworthiness assessment allows over 90% of traffic to pass through, with only about 10% being forwarded to the risk identification system for further refinement.
[0003] To alleviate the pressure on online computing, trustworthiness assessments mostly adopt an offline model design approach. This involves pre-summarizing trustworthy elements offline, and then allowing traffic matching these elements to proceed during online trustworthiness assessment. Trustworthy elements primarily include single-subject and dual-subject models. A single subject is a single entity, such as a trustworthiness assessment targeting a single user. A dual-subject model consists of two entities forming a relationship pair, such as between a consumer and a merchant, an account and a reward card, an account and a device, etc. Given the crucial role of the passive party in behavioral relationships in global trustworthiness assessments, dual-subject elements can effectively cover different risk domains. Therefore, there is an urgent need for a method capable of accurate trustworthiness assessment based on dual-subject models. Summary of the Invention
[0004] In view of this, one or more embodiments of this specification disclose a method and system for credibility determination, so as to achieve accurate credibility determination based on two subjects.
[0005] According to the first aspect, this disclosure provides a method for credibility determination, the method comprising:
[0006] The representation vectors of the first subject and the second subject are obtained by using the behavioral features of the first subject and the second subject within a preset time period before time t2, respectively.
[0007] For the first subject, determine the second subject whose distance from the representation vector of the first subject satisfies a preset first condition, and form candidate relationship pairs with the first subject for each determined second subject;
[0008] Each candidate relationship pair is risk-scored, and the candidate relationship pair whose risk score meets the preset second condition is selected as the trustworthy relationship pair. The trustworthy relationship pair is used to determine the trustworthiness of traffic containing network behavior at time t2+m.
[0009] The representation model is obtained by comparative learning using training data in advance. The training data includes the behavioral characteristics of each subject in positive and negative sample pairs within a preset time period before time t1. The positive sample pairs include a first subject and a second subject that have a preset type of behavioral relationship at time t1+m. The negative sample pairs include a first subject and a second subject that have not had a preset type of behavioral relationship at time t1+m. t1 is the historical time before t2, and m is a preset positive integer.
[0010] According to one feasible embodiment of this application, the representation model is pre-trained in the following manner:
[0011] Obtain the training data;
[0012] The momentum contrast MoCo model is trained using the training data. The training objectives include: minimizing the similarity of the representation vectors between the first subject and the second subject in negative sample pairs and maximizing the similarity of the representation vectors between the first subject and the second subject in positive sample pairs.
[0013] The representation model is obtained by using the encoder in the trained MoCo model.
[0014] According to one achievable method in an embodiment of this application, the encoder in the MoCo model includes a first encoder and a second encoder;
[0015] In the training, the first encoder is used to obtain a vector representation of the first subject by utilizing the behavioral features of the first subject within a preset time period before time t1; the second encoder is used to obtain a vector representation of the second subject by utilizing the behavioral features of the second subject within a preset time period before time t1; in each iteration of the training, the parameters of the first encoder are updated in reverse using the value of the training loss, and the parameters of the second encoder are updated with momentum based on the parameters of the first encoder.
[0016] The step of obtaining the representation model using the encoder in the trained MoCo model includes: using the trained first encoder as the representation model.
[0017] According to one achievable method in an embodiment of this application, the pre-obtained representation model is distributed to the terminal devices of the first subject and the second subject;
[0018] The representation vectors of the first and second subjects obtained by the acquisition representation model using the behavioral features of the first subject and the second subject within a preset time period before time t2 include:
[0019] The representation vector of the first subject is obtained from the terminal device of the first subject using the behavioral characteristics of the first subject within a preset time period before time t2; and the representation vector of the second subject is obtained from the terminal device of the second subject using the behavioral characteristics of the second subject within a preset time period before time t2.
[0020] According to one achievable method in an embodiment of this application, for the first subject, determining a second subject whose distance from the representation vector of the first subject satisfies a preset first condition includes:
[0021] Using the hierarchical navigable small-world graph (HNSW) method, search for the N nearest second subjects whose representation vectors are related to the representation vectors of the first subject, where N is a preset positive integer.
[0022] According to one feasible method in the embodiments of this application, risk scoring is performed on each candidate relationship pair, and candidate relationship pairs whose risk scores meet a preset second condition are selected as trustworthy relationship pairs, including:
[0023] Each candidate relation pair is risk-scored to obtain the scores of the candidate relation pair on M risk categories, where M is a positive integer;
[0024] Candidate relation pairs whose scores on the M risk categories satisfy the second condition are selected as reliable relation pairs.
[0025] According to one achievable method in an embodiment of this application, the risk scoring of each candidate relationship pair includes:
[0026] Risk scoring is performed on each candidate relation pair using a risk scoring model, wherein the risk scoring model is pre-trained based on a multi-task expert model.
[0027] According to one achievable method in an embodiment of this application, the risk scoring model includes: a characterization processing module and k expert modules;
[0028] The representation processing module concatenates the feature vectors of the first subject and the second subject in the input candidate relation pair, and then performs an n-order representation cross on the resulting feature vector, where n is a positive integer.
[0029] The expert module uses the representation vector obtained after the nth-order representation cross to map the candidate relation pair to obtain the score of each risk category.
[0030] According to one achievable method in the embodiments of this application, the method further includes:
[0031] If traffic containing network behavior is received at time t2+m, the network behavior is matched with the trusted relationship pair. If the network behavior is determined to be a trusted behavior based on the matching result, the traffic is forwarded normally.
[0032] According to one achievable method in an embodiment of this application, the first subject is a consumer, the second subject is a merchant, and the preset type of behavioral relationship includes at least one of transaction behavior, payment behavior, collection behavior, and evaluation behavior; or...
[0033] Both the first subject and the second subject are users, and the preset type of behavioral relationship includes at least one of payment behavior, deposit and withdrawal behavior, contract binding behavior, and sending and receiving red envelopes behavior.
[0034] Secondly, a credibility determination system is provided, which includes:
[0035] The representation acquisition unit is configured to acquire the representation vectors of the first subject and the second subject obtained by the representation model using the behavioral features of the first subject and the second subject within a preset time period before time t2.
[0036] The candidate recall unit is configured to determine, for the first subject, a second subject whose distance from the representation vector of the first subject satisfies a preset first condition, and to form candidate relationship pairs with each determined second subject and the first subject respectively;
[0037] The risk scoring unit is configured to score the risk of each candidate relationship pair.
[0038] The relationship pair determination unit is configured to select candidate relationship pairs whose risk scores meet a preset second condition as trusted relationship pairs. The trusted relationship pairs are used to determine the trustworthiness of traffic containing network behavior at time t2+m.
[0039] The representation model is obtained by comparative learning using training data in advance. The training data includes the behavioral characteristics of each subject in positive and negative sample pairs within a preset time period before time t1. The positive sample pairs include a first subject and a second subject that have a preset type of behavioral relationship at time t1+m. The negative sample pairs include a first subject and a second subject that have not had a preset type of behavioral relationship at time t1+m. t1 is the historical time before t2, and m is a preset positive integer.
[0040] According to the specific embodiments provided in this application, this application can achieve the following technical effects:
[0041] 1) The representation model provided in this application predicts the representation vectors of the first and second subjects using the historical behavioral characteristics of the first and second subjects before time t1. These representation vectors reflect the probability of the corresponding subjects engaging in behavior at time t1+m. Therefore, using these representation vectors, candidate relationship pairs that may exhibit behavioral relationships at time t1+m can be recalled. Based on these candidate relationship pairs, risk scoring is performed to obtain credible relationship pairs, which are then used to determine the credibility of traffic containing network behavior at time t1+m. This approach can improve the recall rate of relationship pairs that may exhibit behavioral relationships in the future, thereby improving the accuracy of feasibility determination.
[0042] 2) This application first filters candidate relation pairs based on the distance between representation vectors, and then determines credible relation pairs based on risk scoring of the candidate relation pairs. This eliminates the need to traverse the subjects pair by pair for risk scoring, thus reducing the consumption of computing resources.
[0043] 3) After the representation model is trained, it can be sent to each terminal device. Each terminal device's representation model uses the behavioral characteristics of its corresponding subject within a preset time period before time t2 to obtain the subject's representation vector, and then uploads this representation vector to the server's trustworthiness assessment system. In this implementation, terminal devices do not need to submit the behavioral data of each subject; they only need to send the representation vector to the server. The server cannot specifically perceive the behavioral data of each subject, thus achieving the effect of protecting user privacy.
[0044] Of course, any product implementing this application does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 An exemplary system architecture diagram is shown that can be applied to embodiments of this disclosure;
[0047] Figure 2 A flowchart illustrating the reliability determination method provided in this application embodiment;
[0048] Figure 3 A flowchart illustrating the method for training a representation model provided in this application embodiment;
[0049] Figure 4 A schematic diagram illustrating the principle of training the MoCo model provided in the embodiments of this application;
[0050] Figure 5 A schematic diagram illustrating the principle of the multi-task expert model provided in the embodiments of this application;
[0051] Figure 6 This is a structural diagram of the credibility determination system provided in the embodiments of this application. Detailed Implementation
[0052] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0053] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0054] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0055] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0056] Current traditional methods for trustworthiness assessment primarily involve: statistically analyzing all relationship pairs that have exhibited behavioral interactions within the past 30 days, manually predicting potential relationship pairs that may occur within the next n days, and then using these pairs as trustworthy relationships for trustworthiness assessment in the coming days. However, relationship pairs that may exhibit behavioral interactions in the future may not have exhibited any behavior within the past 30 days, leading to recall deficiencies and inaccurate trustworthiness assessments. Furthermore, manually predicting relationships by pairing all entities together would consume excessive computational resources, making it impossible to fully traverse a massive user base. Additionally, these methods require the server to access user data for prediction, compromising user privacy.
[0057] In view of this, this application provides a novel method for determining trustworthiness. To facilitate understanding of the embodiments of this application, the system architecture used in the embodiments of this application will first be described in detail. Figure 1An exemplary system architecture applicable to embodiments of this disclosure is illustrated. The system primarily includes a trustworthiness assessment system and a risk identification system. The trustworthiness assessment system further includes an offline mining device and an online assessment device.
[0058] The offline mining device is used to obtain the behavioral characteristics of each subject within a preset time period before time t2 from the data warehouse; using the behavioral characteristics of each subject within a preset time period before time t2, a trustworthy relationship pair containing two subjects is pre-mined for trustworthiness judgment at time t2+m, where m is a positive integer.
[0059] The online authentication device is used to determine the trustworthiness of traffic online. For example, at time t2+m, it uses the pre-mined trust relationships to determine the trustworthiness of traffic containing network behavior. If the determination result is trustworthy behavior, the traffic is forwarded normally. If the determination result is untrustworthy behavior, the traffic is forwarded to the risk identification system for further refined risk identification. For example, it performs risk identification for categories such as money laundering, cheating, gambling, and theft.
[0060] The trustworthiness assessment system and risk identification system in the aforementioned system can be implemented on the server side. This server side can be a single server, a server cluster consisting of multiple servers, or a cloud server. A cloud server, also known as a cloud computing server or cloud host, is a host product within the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Servers (VPs) services, such as high management difficulty and weak business scalability. Besides implementation on the server side, it can also be implemented on computer terminals with powerful computing capabilities.
[0061] The trustworthiness assessment system can be an application located on the server side, or it can be a functional unit such as a plugin or software development kit (SDK) in an application located on the server side.
[0062] It should be understood that Figure 1 The number of trustworthiness assessment systems, risk identification systems, and data warehouses shown is merely illustrative. Depending on implementation needs, any number of trustworthiness assessment systems, risk identification systems, and data warehouses can be included.
[0063] Figure 2 A flowchart illustrating the reliability determination method provided in this application embodiment. It can be understood that this method can... Figure 1 The credibility determination system in the illustrated system is used for execution. See also Figure 2 The method may include:
[0064] Step 202: Obtain the representation vectors of the first and second subjects obtained by the representation model using the behavioral features of the first and second subjects within a preset time period before time t2. The representation model is obtained through comparative learning using training data, which includes the behavioral features of each subject in positive and negative sample pairs within a preset time period before time t1. Positive sample pairs include the first and second subjects who have a preset type of behavioral relationship at time t1+m, and negative sample pairs include the first and second subjects who do not have a preset type of behavioral relationship at time t1+m. t1 is earlier than t2.
[0065] Step 204: For the first subject, determine the second subject whose distance to the representation vector of the first subject satisfies the preset first condition, and form candidate relationship pairs with the first subject respectively.
[0066] Step 206: Perform risk scoring on each candidate relation pair, and select the candidate relation pair whose risk score meets the preset second condition as the trusted relation pair. The trusted relation pair is used to determine the trustworthiness of traffic containing network behavior at time t2+m, where m is a preset positive integer.
[0067] As can be seen from the above technical solutions, the representation model provided in this application uses the historical behavioral characteristics of the first and second subjects before time t1 to predict the representation vectors of the first and second subjects. This representation vector reflects the probability that the corresponding subject will engage in behavior at time t1+m. Therefore, using this representation vector, candidate relationship pairs that may have behavioral relationships at time t1+m can be recalled. Based on these candidate relationship pairs, risk scoring is performed to obtain credible relationship pairs, which are then used to determine the credibility of traffic containing network behavior at time t1+m. This approach can improve the recall rate of relationship pairs that will have behavioral relationships in the future, thereby improving the accuracy of feasibility determination.
[0068] In addition, the method of first screening candidate relation pairs based on the distance between representation vectors, and then determining credible relation pairs based on risk scoring of candidate relation pairs, does not require pairwise traversal of subjects to perform risk scoring, thus reducing the consumption of computing resources.
[0069] The following sections respectively address... Figure 2 Each step shown will be explained in detail.
[0070] First, the above step 202, namely "obtaining the representation vectors of the first subject and the second subject obtained by the representation model using the behavioral characteristics of the first subject and the second subject within a preset time period before time t2", will be described in detail with reference to the embodiment.
[0071] First, it should be noted that the terms "first" and "second" used in this application do not have any restrictions on size, order, or number; they are merely used to distinguish between the two entities, such as "first subject" and "second subject."
[0072] In this step, the behavioral features of each first subject and second subject within a preset time period before time t2 can be input into the pre-trained representation model, and the representation model outputs the representation vectors of the first subject and the second subject.
[0073] The aforementioned time t2 can be the current time or a historical time that has already occurred. For example, if t2 is today, the behavioral characteristics within a preset time period before today are input into the representation model. The representation model outputs representation vectors for the first subject and the second subject, which are used to generate a trustworthy relationship pair in subsequent steps. This trustworthy relationship pair is used to determine the trustworthiness of online traffic at time t2+m. If m is 1 day, it means determining the trustworthiness of online traffic for tomorrow.
[0074] To facilitate understanding, the training process of this representation model will first be described. As one possible implementation, the training process of this representation model can be as follows: Figure 3 As shown, the steps include:
[0075] Step 302: Obtain training data.
[0076] The representation model used in this embodiment is obtained through comparative learning using training data. The training data includes the behavioral characteristics of each subject in positive and negative sample pairs within a preset time period before time t1. Positive sample pairs include the first and second subjects who have a preset type of behavioral relationship at time t1+m, and negative sample pairs include the first and second subjects who do not have a preset type of behavioral relationship at time t1+m. t1 is earlier than t2 and represents the historical time before t2. m is a positive integer.
[0077] This training data enables the representation model to map the relationship between historical behavioral features and future behavior to a vector space, so that the resulting representation vector can reflect the future behavior of the corresponding subject.
[0078] For example, suppose m is 1 day, the first subject is consumers, and the second subject is merchants. First, retrieve the set of consumers from the data warehouse as the Query Set. Then, select merchants who transacted with consumers on time t1+1 as positive samples in the Gallery Set, forming positive sample pairs with their corresponding consumers. Next, select merchants who did not transact with consumers on time t1+1 as negative samples in the Gallery Set, forming negative sample pairs with their corresponding consumers. In other words, positive sample pairs contain consumer-merchant pairs that transacted on time t1+1, and negative sample pairs contain consumer-merchant pairs that did not transact on time t1+1.
[0079] When selecting positive and negative samples for a given subject, further constraints can be incorporated. For example, when selecting positive samples, the number of positive samples corresponding to a given subject can be controlled within a preset threshold, such as within 10 positive samples. When selecting negative samples, the geographical distance between the first and second subjects can be limited to within 10 kilometers, and so on.
[0080] The characteristics of each entity (including the first entity and the second entity) can be represented by events. For example, for consumers, these could be the 100 most recent transaction events, payment events, attention events, etc., that occurred within a preset time period (e.g., 7 days) before t1. For merchants, these could be the 100 most recent transaction events, payment collection events, etc., that occurred within a preset time period (e.g., 7 days) before t1.
[0081] For example, the feature sequence Q of the first subject in the Query Set can be represented as:
[0082]
[0083] Where 'e' represents a preset type of event, the subscript indicates the most recent event within the preset time period before 't1', and the superscript indicates the subject identifier. For example, This represents the first most recent event of a preset type that occurred within a preset time period prior to t1 for the first subject q. The event's attributes are an l-dimensional vector, where l is a preset positive integer.
[0084] The feature sequence Gp of the positive sample corresponding to the first subject in the Gallery Set can be represented as:
[0085]
[0086] The feature sequence Gn of the negative sample corresponding to the first subject in the Gallery Set can be represented as:
[0087]
[0088] Step 304: Train the MoCo model using the training data. The training objectives include: minimizing the similarity of the representation vectors between the first subject and the second subject in negative sample pairs and maximizing the similarity of the representation vectors between the first subject and the second subject in positive sample pairs.
[0089] As a preferred implementation method, the MoCo (momentum-contrast) model can be used in this application. In addition, other contrastive learning models can also be used. The MoCo model is used as an example here.
[0090] like Figure 4 As shown, the MoCo model includes a first encoder and a second encoder. The first encoder is used to obtain a vector representation of the first subject by utilizing its behavioral features over a predetermined time period before time t1. The behavioral features of the first subject input to the first encoder are derived from Q.
[0091] The second encoder is used to obtain a vector representation of the second subject by utilizing its behavioral features over a preset time period before time t1. The behavioral features of the second subject input to the second encoder come from Gp and Gn.
[0092] In this embodiment, a loss function can be constructed using the aforementioned training objective, and the model parameters can be updated in reverse using the values of the loss function. The constructed loss function can be the InfoNCE loss function L. q As shown in the formula below:
[0093]
[0094] Here, x represents the characteristic of the first subject, derived from Q. + These are the features of the positive samples corresponding to the first subject, derived from Gn. i These are the features of the second subject in the Gallery Set, including the features of the positive and negative samples corresponding to the first subject, derived from Gn and Gp. K is the total number of positive and negative samples sampled for the first subject. f() is the function used by the first encoder, and f′() is the function used by the second encoder. score() is a function that measures the similarity between two vectors, and can use methods such as Euclidean distance or cosine similarity.
[0095] One advantage of the MoCo model is that negative samples are not selected from each batch, but rather randomly sampled from all negative sample features. To a certain extent, the negative samples sampled for a given query can be considered representative of all samples. However, to avoid excessive memory requirements caused by re-encoding all samples in each iteration, the MoCo model uses a momentum encoder for the second encoder. The momentum encoder uses a dynamically entering and exiting queue to maintain the output results of the second encoder in the most recent batches. In addition, in each iteration of training, the parameters of the first encoder are updated backward using the value of the training loss, and the parameters of the second encoder are updated with momentum based on the parameters of the first encoder, that is, by gradually approximating the first encoder, thus ensuring the stability of the output results of the second encoder.
[0096] For example, the parameter θ of the second encoder k This can be expressed using the following formula:
[0097] θ k ←αθ k +(1-α)θ q (2)
[0098] That is to say, using the parameters θ of the first encoder q and the parameter θ of the second encoder k The value obtained after weighted summation is used to update the parameters θ of the second encoder. k Where α is a weighting coefficient, which can be an empirical value or an experimental value.
[0099] After training with the MoCo model, the effect of the generated representation vectors of the first subject and the second subject is as follows: if the first subject and the second subject have a behavioral relationship at time t1+m, then the representation vectors of the first subject and the second subject are close in the vector space; conversely, if the first subject and the second subject do not have a behavioral relationship at time t1+m, then the representation vectors of the first subject and the second subject are far apart in the vector space.
[0100] Step 306: Obtain the representation model using the encoder in the trained MoCo model.
[0101] One possible approach is to use the first encoder in the trained MoCo model as the representation model.
[0102] By using a representation model, it is possible to obtain the representation vector of any subject after inputting its behavioral characteristics.
[0103] Furthermore, since the model training phase does not require knowledge of specific user data, the representation model can be sent to each terminal device after training is complete. Each terminal device's representation model uses the behavioral characteristics of its corresponding subject within a preset time period before time t2 to obtain a representation vector for that subject, and then uploads this representation vector to the server's trustworthiness assessment system. In this implementation, terminal devices do not need to submit user behavioral data; they only need to send the representation vector to the server. The server cannot specifically perceive the user's behavioral data, thus achieving the effect of protecting user privacy.
[0104] Furthermore, during the model training phase, the first encoder branch in the MoCo structure needs to backpropagate gradients for parameter updates, while the second encoder branch does not require gradient backpropagation but instead performs momentum updates based on the parameters of the first encoder. For the training of the first encoder, the portion involving training data can be segmented, with that portion placed in the compliance department. This prevents training personnel from being aware of or accessing the training data, thereby further protecting user privacy.
[0105] The following describes in detail step 204, namely, "determining a second subject whose distance from the representation vector of the first subject satisfies a preset first condition, and forming candidate relationship pairs with the first subject respectively," with reference to the embodiments.
[0106] This step essentially uses representation vectors to perform a preliminary screening of relationship pairs that may exhibit behavioral interactions at a future time t2+m, resulting in candidate relationship pairs. This preliminary screening is determined by calculating the distance between the representation vectors of the first and second subjects. The aforementioned preset first condition can be, for example, less than or equal to a preset distance threshold, or a preset number of pairs ranked from smallest to largest distance. The distance can be measured using Euclidean distance, cosine similarity, or other similarity metrics.
[0107] For example, for consumer A, the distance between consumer A's representation vector and the representation vectors of each merchant can be calculated and judged to find merchants whose representation vectors satisfy a preset first condition. These merchants and consumer A are then used to form candidate relationship pairs. This process can be performed on each consumer to obtain candidate relationship pairs.
[0108] To improve the recall efficiency of candidate relation pairs, as a preferred implementation method, the HNSW (Hierarchical Navigable Small World) method can be used to search for the N nearest second subjects between the representation vector and the representation vector of the first subject, where N is a preset positive integer.
[0109] HNSW, used for approximate nearest neighbor search, is an improvement upon the NSW (Navigable SmallWorld) algorithm and is a graph-based vector retrieval algorithm. Its idea is to construct a connected graph from all vectors in the vector space and then search for the N nearest neighbors of a given vertex based on this graph. Using HNSW, for the example above, we can quickly retrieve the N merchants closest to consumer A's representation vector. Since HNSW is an existing algorithm, it will not be described in detail here.
[0110] The following describes in detail step 206, namely, "to perform risk scoring on each candidate relationship pair, select the candidate relationship pair whose risk score meets the preset second condition as a trustworthy relationship pair, and use the trustworthy relationship pair to determine the trustworthiness of traffic containing network behavior at time t2+m".
[0111] In this step, M risk categories can be determined based on actual needs. Risk scores are then assigned to each candidate relation pair across the M risk categories, where M is a positive integer. Finally, candidate relation pairs whose scores across the M risk categories satisfy the second condition are selected as reliable relation pairs.
[0112] Since the subsequent credibility assessment is for the purpose of allowing traffic to pass, it needs to be guaranteed to be completely risk-free. Therefore, as one feasible method, candidate relation pairs with scores in M risk categories that are all lower than or equal to a preset score threshold can be selected as credible relation pairs.
[0113] For example, for each candidate relationship pair consisting of consumers and merchants, each candidate relationship pair is scored in three categories: theft risk, fraud risk, and gambling risk. Candidate relationship pairs whose scores in all three categories are lower than or equal to preset scoring thresholds are selected. A higher score indicates a higher risk, and vice versa.
[0114] As a feasible approach, candidate relationship pairs can be scored based on some preset rules. For example, preset rules can be formed by clearly defining behavioral characteristics as risk-free, medium-risk, and high-risk. The behavioral characteristics corresponding to each candidate relationship pair are then matched with these preset rules, and the score of the candidate relationship pair is determined based on the matching results. These preset rules can be set manually or through other methods.
[0115] As another feasible approach, a risk scoring model can be used to score the risk of each candidate relationship pair. This risk scoring model can be pre-trained based on a multi-task expert model.
[0116] The aforementioned multi-task expert model may include a representation processing module and k expert modules. The representation processing module concatenates the feature vectors of the first and second subjects in the input candidate relation pair, and then performs an n-order representation cross on the resulting feature vector, where n is a positive integer. The expert modules use the representation vector obtained after the n-order representation cross to map a score for the candidate relation pair on the risk category corresponding to that expert module.
[0117] As a preferred implementation, the aforementioned multi-task expert model can adopt the MoEHO (Multi-task Learning with Mixture of Experts and High-order Feature Interaction) model. For example... Figure 5 As shown, the model may include a characterization cross layer, a splicing layer, and an MMoE (Multi-gate Mixture-of-Experts) module.
[0118] The representation cross layer is used to perform n-order representation crosses on the representation vectors of the first and second subjects in the candidate relation pair. Taking a 3-order representation cross as an example, MLP (Multilayer Perceptron) layers, FM (Factorization Machines) layers, and LNN (Legendre Neural Network) layers can be used to perform 1-order, 2-order, and 3-order representation crosses, respectively. Then, the concatenation layer concatenates the representation vectors output by the representation cross layer. This process can be expressed as the following formula:
[0119]
[0120] in, This is the output of the concatenation layer. σ() represents the activation function, such as ReLU, Sigmoid, etc. The representation crossings performed by the MLP layer are called first-order representation crossings, w (1) For the parameters of the MLP layer, This means concatenating the representation vectors of the first and second subjects together.
[0121] This represents the representational crossover of the FM layer, specifically the second-order representational crossover. e This represents the number of risk domains. The parameters represent the FM layer. This represents the feature vector of the representation vectors of the first and second subjects in the i-th risk domain. Each feature can correspond to one risk domain, or multiple features can correspond to one risk domain, depending on the specific situation.
[0122] Representational crossovers of LNN layers, i.e., high-order representational crossovers of the third order or above. o represents the order of the intersection; if it's order 3, then it's 3. u0, w e and w e0 These are the parameters of the LNN layer.
[0123] The MMoE module uses k expert modules to simulate the scoring of k experts. A threshold mechanism controls the weight of each expert module's score for each risk category, which can be expressed as the following formula:
[0124] y M =h M (f M (x))(4)
[0125]
[0126] Where x is the output of the splicing layer. g M (x) i f represents the weight of the threshold for the Mth risk category in the i-th expert module. It is the output of the gate and can be implemented using a multilayer perceptron, for example, by using a linear transformation plus a Softmax layer. i (x) represents the score of the i-th expert module. y M h is the score for the candidate relation pair in the Mth risk category. M () can be a linear transformation plus a Softmax layer.
[0127] The risk scoring model described above can be pre-trained. The training data used during training includes: the representation vectors of the first and second subjects in the relation pair consisting of the first subject and the second subject, and the scores of the relation pair labeled on M risk categories.
[0128] The representation vectors of the first and second subjects are input into the multi-task expert model described above. The multi-task expert model outputs the scores of the relationship pair on M risk categories, which is equivalent to having M tasks. The training objective is to minimize the difference between the output of the multi-task expert model and the labeled content in the training data. A loss function can be constructed based on the above training objective. In each iteration, the parameters of the multi-task expert model are updated using methods such as gradient descent based on the value of the loss function, until a preset training termination condition is met. The training termination condition may include, for example, the value of the loss function being less than or equal to a preset loss function threshold, or the number of iterations reaching a preset threshold.
[0129] The above process is implemented by an offline mining device in the trustworthiness assessment system. After obtaining trustworthy relationship pairs, these pairs are provided to an online assessment device. The online assessment device then uses these pairs to assess the trustworthiness of traffic containing network behavior at time t2+m. Specifically, this may include: if traffic containing network behavior is received at time t2+m, the network behavior is matched with the trustworthy relationship pair; if the matching result determines the network behavior to be trustworthy, the traffic is forwarded normally; otherwise, the traffic is forwarded to the risk identification system for further refined risk identification.
[0130] For example, if the received traffic contains payment behavior between consumer A and merchant B, it can be determined whether the payment behavior between consumer A and merchant B can be matched with the corresponding trusted relationship pair. If it is matched, it means that the risk score of the payment behavior between consumer A and merchant B is low in each risk category, and the traffic can be allowed.
[0131] It should be noted that for each primary entity, the offline processing is updated every unit of time. For example, if the unit of time used in t2 above is a day, then the terminal device reports the representation vector of each entity every day, then recalls candidate relation pairs, and further performs risk scoring on each candidate relation pair to obtain credible relation pairs. Then, it is fed back online for the credibility determination of traffic at time t2+m.
[0132] The following uses a consumer-merchant relationship as an example to illustrate the above-mentioned method provided in the embodiments of this application.
[0133] The server pre-acquires the behavioral characteristics of users (including consumers and merchants) within the 7 days prior to t1, where t1 can be any day in history where user behavior data is available. Consumers and merchants who engaged in transactions, payments, receipts, or reviews on day t1+1 constitute positive sample pairs, while those who did not engage in such activities constitute negative sample pairs. The behavioral characteristics of each consumer and merchant in these positive and negative sample pairs within the 7 days prior to t1 are input into the MoCo model for comparative learning. The first encoder in the trained MoCo model serves as the representation model.
[0134] The server distributes the representation model to each terminal device. Each terminal device updates its behavioral characteristics from the previous 7 days daily, inputs these characteristics into the representation model, obtains the representation vector for that user (consumer or merchant), and uploads it to the server.
[0135] After obtaining the representation vectors of each consumer and each merchant, the server uses HNSW to search for the N merchants whose representation vectors are closest to that consumer. These merchants and the consumer are then paired as candidate relation pairs.
[0136] Each candidate relation pair is scored using a pre-trained risk scoring model. The candidate relation pairs are scored in three categories: theft risk, fraud risk, and gambling risk. Candidate relation pairs whose scores in all three categories are lower than or equal to the preset scoring thresholds are selected as credible relation pairs.
[0137] All obtained trust relationships are provided to an online trustworthiness assessment device. The device uses these relationships to assess the trustworthiness of network traffic involving consumer and merchant interactions at time t1+1. If the assessment is deemed trustworthy, the traffic is quickly allowed to pass; otherwise, it is forwarded to a risk identification system for further refined risk assessment.
[0138] The foregoing is a detailed description of the method provided in this disclosure, and specific embodiments of this specification have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0139] The apparatus provided in this disclosure will now be described in detail. Figure 6A structural diagram of a credibility determination system according to an embodiment of the present disclosure is shown, as follows: Figure 6 As shown, the system 600 may include: a representation acquisition unit 601, a candidate recall unit 602, a risk scoring unit 603, and a relationship pair determination unit 604. It may further include a first training unit 605, a second training unit 606, and a trustworthiness discrimination unit 607. The main functions of each component are as follows:
[0140] The representation acquisition unit 601 is configured to acquire the representation vectors of the first subject and the second subject obtained by the representation model using the behavioral features of the first subject and the second subject within a preset time period before time t2.
[0141] The candidate recall unit 602 is configured to determine, for the first subject, a second subject whose distance from the representation vector of the first subject satisfies a preset first condition, and to form candidate relationship pairs with the first subject for each determined second subject.
[0142] Risk scoring unit 603 is configured to score the risk of each candidate relationship pair.
[0143] The relationship pair determination unit 604 is configured to select candidate relationship pairs whose risk scores meet a preset second condition as trusted relationship pairs. The trusted relationship pairs are used to determine the trustworthiness of traffic containing network behavior at time t2+m.
[0144] The representation model is obtained by comparative learning using training data in advance. The training data includes the behavioral characteristics of each subject in the positive and negative sample pairs within a preset time period before time t1. The positive sample pairs include the first and second subjects who have a preset type of behavioral relationship at time t1+m, and the negative sample pairs include the first and second subjects who have not had a preset type of behavioral relationship at time t1+m. t1 is earlier than t2 and is the historical time before t2, and m is a preset positive integer.
[0145] As one possible approach, the aforementioned representation model can be pre-trained by the first training unit 605 in the following manner:
[0146] Obtain the above training data;
[0147] The momentum contrast MoCo model is trained using training data. The training objectives include: minimizing the similarity of the representation vectors between the first and second subjects in negative sample pairs and maximizing the similarity of the representation vectors between the first and second subjects in positive sample pairs.
[0148] The representation model is obtained by using the encoder in the trained MoCo model.
[0149] In a preferred embodiment, the encoder in the MoCo model includes a first encoder and a second encoder. During training, the first encoder is used to obtain a vector representation of the first subject by utilizing the behavioral features of the first subject within a preset time period before time t1; the second encoder is used to obtain a vector representation of the second subject by utilizing the behavioral features of the second subject within a preset time period before time t1. In each iteration of training, the parameters of the first encoder are updated in reverse using the value of the training loss, and the parameters of the second encoder are updated with momentum based on the parameters of the first encoder. The first training unit 605 uses the trained first encoder as the representation model.
[0150] As one possible implementation, the first training unit 605 can distribute the trained representation model to the terminal devices of the first subject and the second subject. The representation acquisition unit 601 acquires the representation vector of the first subject obtained from the terminal device of the first subject using the behavioral characteristics of the first subject within a preset time period before time t2; and acquires the representation vector of the second subject obtained from the terminal device of the second subject using the behavioral characteristics of the second subject within a preset time period before time t2.
[0151] As one possible approach, the candidate recall unit 602 can utilize the hierarchical navigable small-world graph (HNSW) method to search for the N closest second subjects whose representation vectors are related to the representation vectors of the first subject, where N is a preset positive integer.
[0152] As one possible implementation, the risk scoring unit 603 can score each candidate relation pair to obtain scores for the candidate relation pairs on M risk categories, where M is a positive integer. Accordingly, the relation pair determination unit 604 selects candidate relation pairs whose scores on the M risk categories satisfy the second condition mentioned above as reliable relation pairs.
[0153] As one possible approach, the second condition mentioned above could be that the scores in all M risk categories are lower than a preset score threshold.
[0154] As one possible approach, the risk scoring unit 603 can use a risk scoring model to score each candidate relationship pair, wherein the risk scoring model is pre-trained based on a multi-task expert model.
[0155] The risk scoring model may include: a representation processing module and k expert modules;
[0156] The representation processing module concatenates the feature vectors of the first and second subjects in the input candidate relation pair, and then performs an n-order representation cross on the resulting feature vectors, where n is a positive integer.
[0157] The expert module uses the representation vector obtained after the nth-order representation cross to map the score of the candidate relation pair on each risk category.
[0158] As one possible implementation, the second training unit 606 is configured to pre-train a risk scoring model. The training data used during its training includes: representation vectors of the first and second subjects in a relation pair consisting of a first subject and a second subject, and scores for the relation pair labeled on m risk categories. The representation vectors of the first and second subjects are input into the aforementioned multi-task expert model, which outputs the scores for the relation pair on the m risk categories, equivalent to having m tasks. The training objective is to minimize the difference between the output of the multi-task expert model and the labeled content in the training data. A loss function can be constructed based on the above training objective. In each iteration, the parameters of the multi-task expert model are updated using methods such as gradient descent based on the value of the loss function, until a preset training termination condition is met. The training termination condition may include, for example, the value of the loss function being less than or equal to a preset loss function threshold, or the number of iterations reaching a preset threshold.
[0159] As one possible implementation method, the trust determination unit 607 is configured to match the network behavior with the trust relationship pair if it receives traffic containing network behavior at time t2+m. If the network behavior is determined to be trustworthy based on the matching result, the traffic is forwarded normally; otherwise, the traffic is forwarded to the risk identification system for further refined risk identification.
[0160] The aforementioned representation acquisition unit 601, candidate recall unit 602, risk scoring unit 603, relation pair determination unit 604, first training unit 605, and second training unit 606 can be configured in... Figure 1 The offline excavation device in the system shown. The trust determination unit 607 can be set in... Figure 1 The system shown includes an online discrimination device.
[0161] As one typical application scenario, the first subject is the consumer, the second subject is the merchant, and the preset types of behavioral relationships include at least one of transaction behavior, payment behavior, collection behavior, and evaluation behavior.
[0162] As another typical application scenario, both the first and second subjects are users, and the preset types of behavioral relationships include at least one of the following: payment behavior, deposit and withdrawal behavior, contract binding behavior, and sending and receiving red envelopes behavior.
[0163] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0164] The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0165] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0166] The aforementioned computer storage media may be any combination of one or more computer-readable media, including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0167] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for determining credibility, characterized in that, The method includes: The representation vectors of the first subject and the second subject are obtained by using the behavioral features of the first subject and the second subject within a preset time period before time t2, respectively. For the first subject, determine the second subject whose distance from the representation vector of the first subject satisfies a preset first condition, and form candidate relationship pairs with the first subject for each determined second subject; Each candidate relationship pair is risk-scored, and the candidate relationship pair whose risk score meets the preset second condition is selected as the trustworthy relationship pair. The trustworthy relationship pair is used to determine the trustworthiness of traffic containing network behavior at time t2+m. The representation model is obtained by comparative learning using training data in advance. The training data includes the behavioral characteristics of each subject in positive and negative sample pairs within a preset time period before time t1. The positive sample pairs include a first subject and a second subject that have a preset type of behavioral relationship at time t1+m. The negative sample pairs include a first subject and a second subject that have not had a preset type of behavioral relationship at time t1+m. t1 is the historical time before t2, and m is a preset positive integer.
2. The method according to claim 1, characterized in that, The representation model is pre-trained in the following manner: Obtain the training data; The momentum contrast MoCo model is trained using the training data. The training objectives include: minimizing the similarity of the representation vectors between the first subject and the second subject in negative sample pairs and maximizing the similarity of the representation vectors between the first subject and the second subject in positive sample pairs. The representation model is obtained by using the encoder in the trained MoCo model.
3. The method according to claim 2, characterized in that, The encoder in the MoCo model includes a first encoder and a second encoder; In the training, the first encoder is used to obtain a vector representation of the first subject by utilizing the behavioral features of the first subject within a preset time period before time t1; The second encoder is used to obtain a vector representation of the second subject by utilizing the behavioral characteristics of the second subject within a preset time period before time t1; In each iteration of the training, the parameters of the first encoder are updated in reverse using the value of the training loss, and the parameters of the second encoder are updated with momentum based on the parameters of the first encoder. The step of obtaining the representation model using the encoder in the trained MoCo model includes: using the trained first encoder as the representation model.
4. The method according to any one of claims 1 to 3, characterized in that, The pre-obtained representation model is distributed to the terminal devices of the first subject and the second subject; The representation vectors of the first and second subjects obtained by the acquisition representation model using the behavioral features of the first subject and the second subject within a preset time period before time t2 include: The representation model of the first subject is obtained from its terminal device, which uses the behavioral characteristics of the first subject within a preset time period before time t2 to obtain the representation vector of the first subject. And the representation vector of the second subject obtained from the terminal device of the second subject using the behavioral characteristics of the second subject within a preset time period before time t2.
5. The method according to claim 1, characterized in that, For the first subject, determining a second subject whose distance to the representation vector of the first subject satisfies a preset first condition includes: Using the hierarchical navigable small-world graph (HNSW) method, search for the N nearest second subjects whose representation vectors are related to the representation vectors of the first subject, where N is a preset positive integer.
6. The method according to claim 1, characterized in that, Each candidate relation pair is risk-scored, and candidate relation pairs whose risk scores meet the preset second condition are selected as trustworthy relation pairs, including: Each candidate relation pair is risk-scored to obtain the scores of the candidate relation pair on M risk categories, where M is a positive integer; Candidate relation pairs whose scores on the M risk categories satisfy the second condition are selected as reliable relation pairs.
7. The method according to claim 6, characterized in that, The risk scoring for each candidate relationship pair includes: Risk scoring is performed on each candidate relation pair using a risk scoring model, wherein the risk scoring model is pre-trained based on a multi-task expert model.
8. The method according to claim 7, characterized in that, The risk scoring model includes: a characterization processing module and k expert modules; The representation processing module concatenates the feature vectors of the first subject and the second subject in the input candidate relation pair, and then performs an n-order representation cross on the resulting feature vector, where n is a positive integer. The expert module uses the representation vector obtained after the nth-order representation cross to map the candidate relation pair to obtain the score of each risk category.
9. The method according to claim 1, characterized in that, The method also includes: If traffic containing network behavior is received at time t2+m, the network behavior is matched with the trusted relationship pair. If the network behavior is determined to be a trusted behavior based on the matching result, the traffic is forwarded normally.
10. The method according to any one of claims 1 to 3, 5 to 9, characterized in that, The first entity is the consumer, the second entity is the merchant, and the preset type of behavioral relationship includes at least one of transaction behavior, payment behavior, collection behavior, and evaluation behavior; or, Both the first subject and the second subject are users, and the preset type of behavioral relationship includes at least one of payment behavior, deposit and withdrawal behavior, contract binding behavior, and sending and receiving red envelopes behavior.
11. A system for reliability assessment, characterized in that, The system includes: The representation acquisition unit is configured to acquire the representation vectors of the first subject and the second subject obtained by the representation model using the behavioral features of the first subject and the second subject within a preset time period before time t2. The candidate recall unit is configured to determine, for the first subject, a second subject whose distance from the representation vector of the first subject satisfies a preset first condition, and to form candidate relationship pairs with each determined second subject and the first subject respectively; The risk scoring unit is configured to score the risk of each candidate relationship pair. The relationship pair determination unit is configured to select candidate relationship pairs whose risk scores meet a preset second condition as trusted relationship pairs. The trusted relationship pairs are used to determine the trustworthiness of traffic containing network behavior at time t2+m. The representation model is obtained by comparative learning using training data in advance. The training data includes the behavioral characteristics of each subject in positive and negative sample pairs within a preset time period before time t1. The positive sample pairs include a first subject and a second subject that have a preset type of behavioral relationship at time t1+m. The negative sample pairs include a first subject and a second subject that have not had a preset type of behavioral relationship at time t1+m. t1 is the historical time before t2, and m is a preset positive integer.
12. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1 to 10.
13. A computing device, comprising a memory and a processor, characterized in that, The memory stores executable code, and when the processor executes the executable code, it implements the method of any one of claims 1 to 10.
Citation Information
Patent Citations
Risk identification model training method, transaction risk determination method and device
CN114092097A
System and method to identify abnormalities to continuously measure transaction risk
US11005839B1