Methods, devices, equipment, and storage media for model training, handling of spurious negatives.

By constructing an object node transition graph and a spurious negative example discriminator, the problem of spurious negative examples affecting model performance is solved, achieving more accurate model training and application.

CN116561580BActive Publication Date: 2026-03-10NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-15
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, spurious negative examples are incorrectly used as negative examples, affecting the model's performance.

Method used

By constructing an object node transition graph, the feature information of historical behavior sequences is determined, and a pseudo-negative example discriminator is used to judge and eliminate pseudo-negative example behavior sequences. The object node transition graph includes multiple object nodes and their relationships. The feature information of historical behavior sequences is determined by using a preset node template graph and the object node transition graph, and the pseudo-negative example discriminator is trained.

Benefits of technology

Effectively identify and eliminate spurious negative example behavior sequences to improve the accuracy and application effect of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116561580B_ABST
    Figure CN116561580B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and storage medium for model training and pseudo-negative example processing, relating to the field of data processing technology. The method includes: constructing an object node transition graph based on multiple historical behavior sequences; wherein each historical behavior sequence includes: historical behavior data of a user targeting multiple objects; the object node transition graph includes: multiple object nodes and the relationships between the object nodes, with each object node corresponding to one object; determining feature information of each historical behavior sequence based on the object node transition graph and a preset node template graph; and training a model based on the feature information and the multiple historical behavior sequences to obtain a pseudo-negative example discriminator. Compared to existing technologies, this avoids the problem of using pseudo-negative examples as negative examples, which could negatively impact the model's performance.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a model training and pseudo-negative example processing method and device, equipment and a storage medium. BACKGROUND

[0002] Sequence recommendation is a recommendation technology based on user historical behavior sequences, aiming to provide personalized recommendation lists for users. Specifically, for a certain user sequence, we expect to be able to predict the user's interest based on the user sequence, and the interest may be a certain product, a certain topic, or a certain operation. Through analysis and modeling of user historical behavior sequences, sequence recommendation technology can more accurately predict the user's interest evolution trend, thereby improving recommendation accuracy and user experience. This technology is widely used in e-commerce, video, music and other fields, and has become a research hotspot in the field of recommendation systems.

[0003] In the process of sequence recommendation, a contrast learning model is often used. The contrast learning model generally determines whether each sequence is a positive sample sequence or a negative sample sequence through sequence-to-sequence contrast learning. In the process of contrast learning, for a certain positive sample in the entire batch, a small number of positive sample pairs are matched, or a small number of positive sample pairs are constructed using data augmentation, and all other data in the entire batch are selected as negative samples.

[0004] However, such data construction strategy, the selected negative samples often have some pseudo-negative examples, that is, they are actually positive examples. If they are used as negative examples, it will affect the effect of the model. SUMMARY

[0005] The present application aims to solve the problem that the pseudo-negative examples are used as negative examples in the prior art, which affects the effect of the model.

[0006] To achieve the above object, the technical solutions adopted by the embodiments of the present application are as follows:

[0007] In a first aspect, an embodiment of the present application provides a model processing method, which comprises:

[0008] According to a plurality of historical behavior sequences, an object node transition graph is constructed; wherein each historical behavior sequence includes historical behavior data of a user for a plurality of objects; the object node transition graph includes a plurality of object nodes and the association relationship between the object nodes, and each object node corresponds to an object;

[0009] According to the object node transition graph and a preset node template graph, the feature information of each historical behavior sequence is determined;

[0010] According to the feature information of the plurality of historical behavior sequences and the plurality of historical behavior sequences, model training is performed to obtain a pseudo-negative example discriminator.

[0011] In a second aspect, an embodiment of the present application provides a pseudo-negative example processing method, which comprises:

[0012] Obtaining a to-be-compared behavior sequence for a preset target object, the to-be-compared behavior sequence comprising a positive example behavior sequence and at least one to-be-determined negative example behavior sequence;

[0013] According to the positive example behavior sequence, a preset pseudo-negative example discriminator is used to determine whether the to-be-determined negative example behavior sequence is a pseudo-negative example behavior sequence; wherein the pseudo-negative example discriminator is obtained after the model training method of the first aspect is trained;

[0014] If yes, the pseudo-negative example behavior sequence is removed from the to-be-compared behavior sequence.

[0015] In a third aspect, another embodiment of the present application provides a model training device, which comprises a construction module, a determination module and a training module, wherein:

[0016] The construction module is configured to construct an object node transition graph according to a plurality of historical behavior sequences; wherein each historical behavior sequence comprises historical behavior data of a user for a plurality of objects; the object node transition graph comprises a plurality of object nodes and an association relationship between the object nodes, and each object node corresponds to an object;

[0017] The determination module is configured to determine feature information of each historical behavior sequence according to the object node transition graph and a preset node template graph;

[0018] The training module is configured to perform model training according to the feature information of the plurality of historical behavior sequences and the plurality of historical behavior sequences to obtain a pseudo-negative example discriminator.

[0019] In a fourth aspect, another embodiment of the present application provides a pseudo-negative example processing device, which comprises an acquisition module, a determination module and a removal module, wherein:

[0020] The acquisition module is configured to acquire a to-be-compared behavior sequence for a preset target object, the to-be-compared behavior sequence comprising a positive example behavior sequence and at least one to-be-determined negative example behavior sequence;

[0021] The judgment module is configured to determine, according to the positive example behavior sequence, whether the to-be-judged negative example behavior sequence is a pseudo-negative example behavior sequence by using a preset pseudo-negative example discriminator.

[0022] The elimination module is configured to eliminate the pseudo-negative example behavior sequence from the to-be-compared behavior sequence if the to-be-judged negative example behavior sequence is a pseudo-negative example behavior sequence.

[0023] In a fifth aspect, another embodiment of the present application provides an electronic device, including a processor, a storage medium and a bus, the storage medium stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine readable instructions to perform the steps of the method in any one of the above first aspect or the second aspect.

[0024] In a sixth aspect, another embodiment of the present application provides a storage medium, the storage medium stores a computer program, and the computer program performs the steps of the method in any one of the above first aspect or the second aspect when the computer program is run by a processor.

[0025] The model training method provided by the present application has the following beneficial effects: the object node transition graph is constructed according to a plurality of historical behavior sequences, the object node transition graph includes a plurality of object nodes and an association relationship between the object nodes, the feature information of the historical behavior sequence is determined by using the preset node template graph and the object node transition graph, the pseudo-negative example discriminator is obtained by training the historical behavior sequence and the feature information of the historical behavior sequence, the association relationship between the object nodes in the object node transition graph is included, the feature information obtained by using the object node transition graph and the preset node template can better reflect the relationship between the sequences, and the pseudo-negative example discriminator trained by using a plurality of sequences with the feature information can determine whether the to-be-judged negative example behavior sequence is a pseudo-negative example behavior sequence relative to the positive example behavior sequence after receiving a positive example behavior sequence and a to-be-judged negative example behavior sequence, thereby solving the problem of the existence of the pseudo-negative example behavior sequence and affecting the subsequent application of the model. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0027] Figure 1A schematic flowchart illustrating a model training method provided in an embodiment of this application;

[0028] Figure 2 A schematic flowchart illustrating a model training method provided in another embodiment of this application;

[0029] Figure 3 A schematic flowchart illustrating a model training method provided in another embodiment of this application;

[0030] Figure 4 A flowchart illustrating a method for processing spurious negative examples provided in another embodiment of this application;

[0031] Figure 5 This is a schematic diagram of the structure of a model training device provided in an embodiment of this application;

[0032] Figure 6 This is a schematic diagram of the structure of a model training device provided in another embodiment of this application;

[0033] Figure 7 A schematic diagram of the structure of a pseudo-negative example processing device provided in an embodiment of this application;

[0034] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.

[0036] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0037] Furthermore, the flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed in order or performed simultaneously. Moreover, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0038] The following explanation, using several specific application examples, illustrates a model training method provided in this application. The method provided in this application is particularly suitable for recommendation scenarios with complex user behavior but a limited number of targets, such as product recommendations based on game logs or topic recommendations based on browsing logs. Specific scenario settings can be flexibly adjusted according to user needs and are not limited to those given in the above embodiments. Figure 1 This is a flowchart illustrating a model training method provided in one embodiment of this application, as shown below. Figure 1 As shown, the method includes:

[0039] S101: Construct an object node transition graph based on multiple historical behavior sequences.

[0040] Each historical behavior sequence includes: historical behavior data of a user for multiple objects; the object node transition graph includes: multiple object nodes and the relationships between object nodes, with each object node corresponding to an object.

[0041] However, since each user's historical behavior sequence is often complex and not highly repetitive, treating each historical behavior sequence as an independent sequence and encoding it accordingly often fails to capture the relationships between sequences effectively. Therefore, this application proposes to construct an Object Node Transition Graph (WITG) to help capture the complex relationships between sequences.

[0042] S102: Determine the feature information of each historical behavior sequence based on the object node transition graph and the preset node template graph.

[0043] Each preset node template is a small graph structure. For example, a preset node template can be a graph structure consisting of three nodes (triangle, ring, etc.), or a preset node template can be a graph structure consisting of four nodes (rectangle, trapezoid, rhombus, ring, etc.), or a preset node template can be a graph structure consisting of five nodes (star, ring, etc.). It should be understood that the above embodiments are only illustrative examples. The number of nodes included in the graph structure of each preset node template, as well as the shape formed by multiple nodes, can be flexibly adjusted according to user needs. It can be simply composed of two connected nodes, a triangle with three nodes connected to each other, or a tree with two leaf nodes. It is not limited to the above embodiments. The number of nodes can also be 2, 6, or even more. This application does not impose any restrictions here.

[0044] In the embodiments of this application, the method for determining the feature information of historical behavior sequences may be, for example, determining the overlap features between each historical behavior sequence in the object node transition graph and a preset node template; and determining the feature information of each historical behavior sequence based on the overlap features.

[0045] One method for determining overlapping features is as follows: determine the isomorphic vectors of the target object node and the preset node template in each historical behavior sequence in the object node transition graph; then, based on the isomorphic vectors of each target object node and the preset node template in the historical behavior sequence, determine the feature information of each historical behavior sequence, that is, use the isomorphic vectors as features of each object node and expand them into the feature information of each object node.

[0046] In other words, based on the object node transition graph, this application also uses the isomorphic number vector of the node as the topological feature (feature information) of the historical behavior sequence. Specifically, for each node in each historical behavior sequence, the number of preset node template graphs it has experienced in the object node transition graph is calculated, and the topological feature of the corresponding historical behavior sequence is generated according to the isomorphic number vector of each node in each historical behavior sequence.

[0047] In the embodiments of this application, in order to ensure that the differences between topological features are not too large and to avoid the influence of some excessively large topological feature data on the topological features of the entire historical behavior sequence, in the embodiments of this application, before determining the feature information of the historical behavior sequence, it is also necessary to normalize the isomorphic vector of each target object node in the historical behavior sequence; based on the normalized isomorphic vector of each target object node in the historical behavior sequence, the feature information of each historical behavior sequence is determined.

[0048] For example, given M preset node templates and a series of graph templates [P1, P2, ..., PM], for a target object node v in a certain historical behavior sequence S, the number of preset node templates that the target object node v traverses is calculated based on the object node transition graph to obtain the isomorphic vector H(v) = [Hom(v,G,P1), Hom(v,G,P2), ..., Hom(v,G,PM)], where G is a constant representing the number of times the target object node v traverses each preset node template. H(v) is then normalized. Finally, for the historical behavior sequence S, the isomorphic vector of each object node in S is extracted, averaged, and then used as the final local topological feature H(S) of the historical behavior sequence S.

[0049] S103: Based on the feature information of multiple historical behavior sequences and multiple historical behavior sequences, the model is trained to obtain a pseudo-negative example discriminator.

[0050] The model training method provided in this application constructs an object node transition graph based on multiple historical behavior sequences. The constructed object node transition graph includes multiple object nodes and establishes relationships between them. Subsequently, the feature information of the historical behavior sequences is determined through a preset node template graph and the object node transition graph. A pseudo-negative example discriminator is obtained by training with the historical behavior sequences and their feature information. Since the object node transition graph in this application includes relationships between object nodes, the feature information obtained through such an object node transition graph and the preset node template can better reflect the relationships between the sequences. The pseudo-negative example discriminator, trained with multiple sequences possessing the aforementioned feature information, can determine whether the pseudo-negative example sequence is a pseudo-negative example sequence relative to the positive example sequence after receiving a positive example behavior sequence and a negative example behavior sequence to be discriminated against. This solves the problem of the existence of pseudo-negative example behavior sequences, which affects subsequent applications.

[0051] Optionally, based on the above embodiments, this application embodiment may also provide a model training method, as illustrated below with reference to the accompanying drawings, illustrating the implementation process of constructing an object node transition graph in the above method. Figure 2 A flowchart illustrating a model training method provided in another embodiment of this application is shown below. Figure 2 As shown, S101 may include:

[0052] S111: Determine the behavioral distance between object nodes based on the historical behavioral data of the target user in multiple historical behavioral sequences.

[0053] In the embodiments of this application, for a certain historical behavior sequence, for every two object nodes in the sequence that are k apart, where k is the behavioral distance between the two object nodes, for example, in a user's historical behavior sequence, if the user performs two behavioral operations before moving from object node 1 to object node 2, then the distance between object node 1 and object node 2 is 2; if the user performs five behavioral operations before moving from object node 1 to object node 2, then the distance between object node 1 and object node 2 is 5. Taking the browsing topic scenario as an example, for instance, if a user browses topic 1 and then immediately browses topic 2, then in the user's historical behavior sequence, the distance between the object node of topic 1 and the object node of topic 2 is 1; if the user browses topic 1 and then browses topics 3 and 4, and then browses topic 2, then in the user's historical behavior sequence, the distance between the object node of topic 1 and the object node of topic 2 is 3. It should be understood that the above embodiments are only illustrative examples, and the specific application scenarios and the distances between each node object can be adjusted according to user needs and actual scenarios, and are not limited to the above embodiments.

[0054] S112: Construct edges between object nodes based on the behavioral distance between them.

[0055] One way to construct edges is to build them on the object node transition graph, with the initial weight w of the edge being 1 / k. If an edge already exists between two adjacent object nodes, the weight of the edge between the two adjacent nodes in the object node transition graph is updated. The rule for updating the weight can be, for example, w = w + 1 / k. That is, if two objects are always accessed / purchased / clicked by different users in a short period of time, they are likely to reflect similar user preferences. Such two objects are generally very close in the historical behavior sequence, such as being directly adjacent or indirectly adjacent, so the edge weight of these two object nodes on the object node transition graph will be larger. If two objects are always far apart in the historical behavior sequence, such as being five or more adjacent objects, then the edge weight of these two nodes on the object node transition graph will be lower. In other words, the weight setting can reflect user preferences; the larger the weight, the higher the user's preference level, and vice versa.

[0056] S113: Construct an object node transition graph based on multiple historical behavior sequences and the corresponding edge construction results.

[0057] The object node transition graph obtained in this way not only includes object node transition graphs with connection relationships between multiple historical behavior sequences, but also the edge relationships between each object node in the object node transition graph have their own corresponding weight information. Thus, the object node transition graph can intuitively show the relationship between object nodes and the user's preference when accessing / clicking / purchasing each object node.

[0058] Optionally, based on the above embodiments, this application embodiment may also provide a model training method, and the implementation process of obtaining the pseudo-negative example discriminator in the above method is illustrated below with reference to the accompanying drawings. Figure 3 A flowchart illustrating a model training method provided in another embodiment of this application is shown below. Figure 3 As shown, S103 may include:

[0059] S121: Determine a preset number of negative example sequences to be judged corresponding to a preset positive example sequence on the object node transition graph.

[0060] In the embodiments of this application, for example, N preset positive behavior sequences can be determined as target behavior sequences on the object node transition graph. Then, Q negative behavior sequences to be discriminated are extracted from each target behavior sequence on the object node transition graph. Each target behavior sequence and its corresponding Q negative behavior sequences to be discriminated are used as a batch of training behavior sequence data. Here, N and Q are both integers greater than 0. The specific settings of N and Q can be flexibly adjusted according to user needs and are not limited to those given in the above embodiments. That is, N batches of training behavior sequence data can be obtained through the above method. Such a method of constructing training behavior sequence data can ensure that there are enough pseudo negative behavior sequences to subsequently train the discriminator.

[0061] S122: Based on the feature information of a preset number of negative example behaviors to be judged, the preset number of negative example behaviors to be judged are concatenated to obtain a sample behavior sequence.

[0062] In some possible embodiments of this application, for each training behavior sequence data, the topological feature information of the preset positive example behavior sequence and the negative example behavior sequence to be discriminated is used to concatenate the positive example behavior sequence and the negative example behavior sequence to be discriminated to obtain the sample behavior sequence.

[0063] In other possible embodiments, when the pseudo-negative example discriminator is applied to a preset model, the preset model can be any binary classification model. The sample behavior sequence may include, for example, topological feature information of a preset positive example behavior sequence and a negative example behavior sequence to be discriminated, model representation of the preset positive behavior sequence in the preset model, and splicing information of the model representation of the negative example behavior sequence to be discriminated in the preset model. It should be understood that the above embodiments are only illustrative examples, and the information included in the specific sample behavior sequence can be flexibly adjusted according to user needs, and is not limited to the above embodiments.

[0064] S123: Using the positive example behavior sequence as a reference, the model is trained based on the sample behavior sequence to obtain the pseudo-negative example discriminator.

[0065] The sample behavior sequence is then input into the spurious negative example discriminator N(S, K). The consistency of the targets in the positive and negative behavior sequences is used as a monitoring signal to determine whether the sample behavior sequence includes spurious negative examples. In the embodiments of this application, the last object node of each behavior sequence is generally taken as the target. It should be understood that the above embodiments are only illustrative examples. The second to last object node of each behavior sequence or the 10th object node in each sequence can also be taken as the target. The specific target selection can be flexibly adjusted according to user needs and is not limited to the above embodiments.

[0066] If included, the negative example sample behavior sequence in the sample behavior sequence is determined to be a pseudo-negative example behavior sequence; if not included, the negative example sample behavior sequence in the sample behavior sequence is determined to be a positive or negative example behavior sequence.

[0067] In the embodiments of this application, the way to determine the trained pseudo-negative example discriminator N(s,e) can be, for example, by determining the loss function L of the pseudo-negative example discriminator. CL Whether (s) converges is used to determine the outcome, where the loss function L CL The calculation method for (s) can be, for example, as follows:

[0068]

[0069] Where, z′ s Let z′ be the representation of a target sequence s. s′ Let z' be the representation of a positive example sequence s′ of a target sequence. e Let be the representation of a negative example sequence e, and τ be a manually set temperature coefficient. The value of τ is generally between (0, 1], and it can be used to adjust the uniformity and discriminability of the object representation in the model. Generally, the smaller the τ setting, the more uniform the distribution of representation features, but the lower the discriminability between semantically similar samples. Users can flexibly adjust the setting of τ according to their own needs. The pseudo-negative example discriminator N(s, e) is used to filter out pseudo-negative examples among all negative examples.

[0070] The model training method provided in this application establishes relationships between object nodes by constructing an object node transition graph. Then, isomorphic feature information of historical behavior sequences is determined using a preset node template graph and the object node transition graph. A pseudo-negative example discriminator is obtained through training with the historical behavior sequences and their feature information. Since the object node transition graph in this application includes relationships between object nodes and user preferences, the feature information obtained through such an object node transition graph and the preset node template can better reflect the relationships between sequences. The pseudo-negative example discriminator, trained with multiple sequences possessing the aforementioned feature information, can determine whether the negative example sequence to be discriminated against is a pseudo-negative example sequence relative to the positive example sequence after receiving a positive example behavior sequence and a negative example behavior sequence to be discriminated against. This solves the problem of the existence of pseudo-negative example behavior sequences affecting subsequent applications.

[0071] The following explanation, using several specific application examples, illustrates a method for processing pseudo-negative examples provided in the embodiments of this application. Figure 4 A flowchart illustrating a method for processing pseudo-negative examples provided in an embodiment of this application is shown below. Figure 4 As shown, the method includes:

[0072] S201: Obtain the sequence of behaviors to be compared for a preset target object.

[0073] The behavior sequences to be compared include: a positive behavior sequence and at least one negative behavior sequence to be discriminated. Each comparison can only obtain a positive behavior sequence and its corresponding negative behavior sequence as a comparison sequence pair.

[0074] S202: Based on the positive example behavior sequence, use a preset pseudo-negative example discriminator to determine whether the negative example behavior sequence to be judged is a pseudo-negative example behavior sequence.

[0075] Among them, the spurious negative example discriminator is the one that has undergone the above process. Figures 1-3 The model is obtained after training using any of the model training methods.

[0076] If so, then execute S203.

[0077] S203: Remove the spurious negative example behavior sequence from the behavior sequence to be compared.

[0078] If not, it means that the negative example to be judged is a positive or negative example, and can be retained in the behavior sequence to be compared as a negative example behavior sequence of the positive example behavior sequence.

[0079] Because the aforementioned false negative discriminator is based on the above... Figures 1-3 The model obtained after training using any of the above methods, due to the beneficial effects brought by using the aforementioned pseudo-negative example discriminator, is similar to the above. Figures 1-3 The beneficial effects are the same, and will not be elaborated further in this application.

[0080] The model training apparatus provided in this application will be explained below with reference to the accompanying drawings. This model training apparatus can perform the above-described... Figures 1-4 The specific implementation and beneficial effects of any model training method are described above and will not be repeated below.

[0081] Figure 5 This is a schematic diagram of the structure of a model training device provided in an embodiment of this application, as shown below. Figure 5 As shown, the device includes: a construction module 301, a determination module 302, and a training module 303, wherein:

[0082] Module 301 is used to construct an object node transition graph based on multiple historical behavior sequences; wherein, each historical behavior sequence includes: historical behavior data of a user for multiple objects; the object node transition graph includes: multiple object nodes and the relationships between object nodes, with each object node corresponding to an object;

[0083] The determination module 302 is used to determine the feature information of each historical behavior sequence based on the object node transition graph and the preset node template graph;

[0084] Training module 303 is used to train the model based on the feature information of multiple historical behavior sequences and multiple historical behavior sequences to obtain a pseudo-negative example discriminator.

[0085] Optionally, based on the above embodiments, this application embodiment may also provide a model training device, as described below with reference to the accompanying drawings. Figure 5 The implementation process of the given device is illustrated with examples. Figure 6 This is a schematic diagram of the structure of a model training device provided in another embodiment of this application, as shown below. Figure 6 As shown, the device also includes: a splicing module 304, wherein:

[0086] The determination module 202 is specifically used to determine a preset number of negative example behavior sequences to be judged corresponding to a preset positive example behavior sequence on the object node transition graph;

[0087] The splicing module 304 is used to splice a preset number of negative example behaviors to be judged based on the feature information of a preset number of negative example behaviors to be judged, so as to obtain a sample behavior sequence;

[0088] Training module 303 is specifically used to train the model based on the sample behavior sequence, using the positive example behavior sequence as a reference, to obtain the pseudo-negative example discriminator.

[0089] Optionally, the determining module 202 is specifically used to determine the overlap features between each historical behavior sequence in the object node transition graph and the preset node template; and to determine the feature information of each historical behavior sequence based on the overlap features.

[0090] Optionally, the determining module 202 is specifically used to determine the isomorphic vectors of the target object node and the preset node template in each historical behavior sequence in the object node transition graph; and to determine the feature information of each historical behavior sequence based on the isomorphic vectors of each target object node and the preset node template in the historical behavior sequence.

[0091] Optionally, the determining module 202 is specifically used to normalize the isomorphic vector of each target object node in the historical behavior sequence; and to determine the feature information of each historical behavior sequence based on the normalized isomorphic vector of each target object node in the historical behavior sequence.

[0092] Optionally, the determining module 202 is specifically used to determine the behavioral distance between object nodes based on the historical behavioral data of the target user in multiple historical behavioral sequences;

[0093] The construction module 201 is specifically used to construct edges between object nodes based on the behavioral distance between them; and to construct an object node transition graph based on multiple historical behavior sequences and the edge construction results corresponding to multiple historical behavior sequences.

[0094] like Figure 6 As shown, the device also includes an update module 205, which is used to update the weight of the connection between two adjacent nodes in the object node transition graph if there is already a connection between two adjacent object nodes.

[0095] The model training apparatus provided in this application will be explained below with reference to the accompanying drawings. This model training apparatus can perform the above-described... Figures 1-3 The specific implementation and beneficial effects of any model training method are described above and will not be repeated below.

[0096] Figure 7 This is a schematic diagram of the structure of a pseudo-negative example processing device provided in an embodiment of this application, as shown below. Figure 7 As shown, the device includes: an acquisition module 401, a judgment module 402, and a rejection module 403, wherein:

[0097] The acquisition module 401 is used to acquire a sequence of behaviors to be compared for a preset target object. The sequence of behaviors to be compared includes: a sequence of positive examples and at least one sequence of negative examples to be judged.

[0098] The judgment module 402 is used to determine whether the sequence of negative examples to be judged is a sequence of negative examples based on the sequence of positive examples and a preset pseudo-negative example discriminator; wherein, the pseudo-negative example discriminator is a sequence of negative examples that has undergone the above-mentioned process. Figures 1-3 The model is obtained after training using any of the model training methods;

[0099] The elimination module 403 is used to remove the spurious negative example behavior sequence from the behavior sequence to be compared if the condition is met.

[0100] The aforementioned device is used to perform the aforementioned Figure 4 The methods provided in the embodiments are similar in principle and technical effect, and will not be described again here.

[0101] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0102] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device can be integrated into a terminal device or a chip of a terminal device.

[0103] like Figure 7 As shown, the electronic device includes: a processor 501, a bus 502, and a storage medium 503.

[0104] Processor 501 is used to store programs, and processor 501 calls the programs stored in storage medium 503 to execute the above-mentioned programs. Figures 1-4 The corresponding method implementation is similar in both implementation and technical effect, and will not be described in detail here.

[0105] Optionally, this application also provides a program product, such as a storage medium storing a computer program, including a program that executes the embodiments corresponding to the above-described methods when run by a processor.

[0106] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0107] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0108] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0109] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A model training method, characterized in that, Applied to a recommendation scenario, the method is run by an electronic device integrated in a terminal device or a chip of the terminal device; the method comprises: According to a plurality of historical behavior sequences, an object node transition graph is constructed; wherein each of the historical behavior sequences comprises: historical behavior data of a user for a plurality of objects of a to-be-recommended type in a recommendation scenario; the object node transition graph comprises: a plurality of object nodes and an association relationship between the object nodes, and each of the object nodes corresponds to an object of the to-be-recommended type; According to the object node transition graph and a preset node template, feature information of each of the historical behavior sequences is determined; According to the feature information of the plurality of historical behavior sequences and the plurality of historical behavior sequences, model training is performed to obtain a pseudo-negative example discriminator; the pseudo-negative example discriminator is used to determine, after receiving a positive example behavior sequence and a to-be-discriminated negative example behavior sequence, whether the to-be-discriminated negative example behavior sequence is a pseudo-negative example behavior sequence relative to the positive example behavior sequence; The method comprises: Based on historical behavior data of a target user in the plurality of historical behavior sequences, a behavior distance between object nodes is determined; wherein the historical behavior sequence comprises: a plurality of browsing topics arranged in a browsing order; according to the arrangement order of each browsing topic, a behavior distance between the browsing topics is determined; According to the behavior distance between the object nodes, an edge is constructed between the object nodes; wherein it comprises: according to the behavior distance of two browsing topics in different historical behavior sequences, edge weight information of the two browsing topics in the object node transition graph is determined; Based on the plurality of historical behavior sequences and the edge construction results corresponding to the plurality of historical behavior sequences, the object node transition graph is constructed; According to the object node transition graph and the preset node template, the feature information of each of the historical behavior sequences is determined, which comprises: The isomorphic number vector of each target object node in the historical behavior sequence in the object node transition graph and the preset node template is determined; wherein it comprises: based on the object node transition graph, the number of times that the target object node passes through the preset node template is calculated to determine the isomorphic number vector of the target object node and the preset node template; According to the isomorphic number vector of each of the target object nodes in the historical behavior sequence and the preset node template, the feature information of each of the historical behavior sequences is determined; wherein it comprises: the isomorphic number vector of each of the target object nodes in the historical behavior sequence and the preset node template is extracted, and average pooling is performed to obtain the feature information of the historical behavior sequence.

2. The method of claim 1, wherein, The method comprises: A preset number of to-be-discriminated negative example behavior sequences corresponding to a preset positive example behavior sequence are determined on the object node transition graph; According to the feature information of the preset number of to-be-discriminated negative examples, the preset number of to-be-discriminated negative examples are spliced to obtain a sample behavior sequence; The model is trained according to the sample behavior sequence with reference to the positive example behavior sequence, to obtain the pseudo-negative example discriminator.

3. The method of claim 1, wherein, The feature information of each historical behavior sequence is determined according to the isomorphic number vector of each target object node in the historical behavior sequence and the preset node template. The isomorphic number vector of each target object node in the historical behavior sequence is normalized. The feature information of each historical behavior sequence is determined according to the normalized isomorphic number vector of each target object node in the historical behavior sequence.

4. The method of claim 1, wherein, The method further comprises: If there is an edge between the adjacent two object nodes, the edge weight between the adjacent two nodes in the object node transition graph is updated.

5. A method of handling false negatives, characterized by, The method comprises: Obtaining a to-be-compared behavior sequence of a preset target object, the to-be-compared behavior sequence comprising a positive example behavior sequence and at least one to-be-discriminated negative example behavior sequence; Using a preset pseudo-negative example discriminator to determine whether the to-be-discriminated negative example behavior sequence is a pseudo-negative example behavior sequence according to the positive example behavior sequence, wherein the pseudo-negative example discriminator is obtained after the model training method in any one of the preceding claims 1-4 is trained; If yes, the pseudo-negative example behavior sequence is removed from the to-be-compared behavior sequence.

6. A model training apparatus characterized by comprising: The device is applied to a recommendation scenario, and is run by an electronic device integrated in a terminal device or a chip of the terminal device; the device comprises a construction module, a determination module, and a training module, wherein: The construction module is configured to construct an object node transition graph according to a plurality of historical behavior sequences, wherein each historical behavior sequence comprises historical behavior data of a user with respect to a plurality of objects of a to-be-recommended type in a recommendation scenario; the object node transition graph comprises a plurality of object nodes and an association relationship between the object nodes, and each object node corresponds to an object of the to-be-recommended type; The determination module is configured to determine feature information of each historical behavior sequence according to the object node transition graph and a preset node template; The training module is configured to train a model according to the feature information of the plurality of historical behavior sequences and the plurality of historical behavior sequences, to obtain a pseudo-negative example discriminator; the pseudo-negative example discriminator is configured to determine whether a to-be-discriminated negative example behavior sequence is a pseudo-negative example behavior sequence relative to a positive example behavior sequence after receiving the positive example behavior sequence and the to-be-discriminated negative example behavior sequence; The construction module is specifically configured to determine a behavior distance between object nodes based on historical behavior data of a target user in the plurality of historical behavior sequences, wherein the historical behavior sequence comprises a plurality of browsing topics arranged in a browsing order; and determine a behavior distance between each browsing topic according to the arrangement order of the browsing topics; An edge is constructed between the object nodes according to the behavior distance between the object nodes, comprising determining edge weight information of two browsing topics in the object node transition graph according to the behavior distance between the two browsing topics in different historical behavior sequences. constructing the object node transition graph based on the plurality of historical behavior sequences and edges corresponding to the plurality of historical behavior sequences; The determination module is specifically configured to determine the isomorphic number vector of the target object node in each historical behavior sequence in the object node transition graph and the preset node template, including: determining the isomorphic number vector of the target object node and the preset node template based on the number of times the target object node passes through the preset node template calculated based on the object node transition graph. According to the isomorphic number vector of each target object node in the historical behavior sequence and the preset node template, the feature information of each historical behavior sequence is determined, including: extracting the isomorphic number vector of each target object node in the historical behavior sequence and the preset node template, and performing average pooling to obtain the feature information of the historical behavior sequence.

7. A false negative handling apparatus comprising: The device includes an acquisition module, a judgment module and a rejection module, wherein: The acquisition module is configured to acquire a to-be-compared behavior sequence for a preset target object, the to-be-compared behavior sequence including a positive example behavior sequence and at least one to-be-judged negative example behavior sequence. The judgment module is configured to judge whether the to-be-judged negative example behavior sequence is a pseudo-negative example behavior sequence according to the positive example behavior sequence and using a preset pseudo-negative example discriminator, wherein the pseudo-negative example discriminator is obtained after the model training method of any one of claims 1-4 is trained. The rejection module is configured to, if so, reject the pseudo-negative example behavior sequence from the to-be-compared behavior sequence.

8. An electronic device, comprising: The device includes a processor, a storage medium and a bus, the storage medium stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, the processor executes the machine readable instructions to execute the method of any one of claims 1-5.

9. A storage medium, characterized by The storage medium stores a computer program, and the computer program is executed by the processor to execute the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Location recommendation method based on sequence semantics and attribute graph feature learning

    CN113901319A

  • Driving behavior detection method and device and electronic equipment

    CN114005105A