Method, apparatus, storage medium, and electronic device for processing information
By dividing the operation information sequence into data sets and using the combination method of capsule network and attention network, the problem of low recognition accuracy under large data volume is solved, and efficient and accurate user feedback recognition is achieved.
Patent Information
- Application Number
- CN202111152863.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2041-09-29
AI Technical Summary
In the prior art, the large amount of historical operation information data leads to excessive calculation amount, low direct identification accuracy, and truncation or classification screening leads to information loss, making it difficult to effectively identify products that users need.
By obtaining the sequence of operation information and dividing it into operation data sets, the aggregation vectors of the operation vector set are determined using the pre-trained capsule network and attention network, and feedback is recognized based on the target product vector to avoid information truncation and classification processing.
Improve the recognition speed and accuracy, make full use of the information in the operation information sequence, reduce the amount of data, and ensure that the information association relationship is not lost.
Smart Images

Figure CN113962292B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electronic information processing, and in particular, to a method, apparatus, storage medium, and electronic device for processing information. Background Art
[0002] In the related art, with the continuous development of e-commerce technology and the continuous improvement of supporting services, people's shopping behaviors and habits in daily life have changed greatly. Buying products through e-commerce gives users more choices, and at the same time, the entire shopping process is more convenient. However, there are a large number of product types and brands, which are often difficult for users to choose. To improve the efficiency of information and avoid waste of processing resources and bandwidth resources, historical operation information can be collected and analyzed to identify products that meet specific needs and display them to users. Usually, the amount of data of historical operation information is very large. If directly identified, the calculation amount will be too large to be realized. If the historical operation information is screened by truncation, classification, etc., it will lead to the loss of some historical operation information and reduce the accuracy of recognition. Summary of the Invention
[0003] The purpose of the present disclosure is to provide a method, apparatus, storage medium, and electronic device for processing information to solve the related problems existing in the prior art.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a method for processing information, the method including:
[0005] Obtain an operation information sequence corresponding to a target object, and divide the operation information sequence into a plurality of operation data sets, each of the operation data sets including a specified number of operation data;
[0006] Obtain a target product vector for characterizing a target product, and obtain an operation vector set corresponding to each of the operation data sets, the operation vector set including operation vectors for characterizing each of the operation data in the corresponding operation data set;
[0007] Use a pre-trained capsule network to determine an aggregation vector corresponding to each of the operation vector sets according to the plurality of operation vector sets;
[0008] Use a pre-trained attention network to determine a recognition result according to the plurality of aggregation vectors and the target product vector, the recognition result being used to indicate the feedback of the target object on the target product.
[0009] Optionally, the obtaining a target product vector for characterizing a target product includes:
[0010] Input the product information of the target product into a pre-trained vector generator to obtain the target product vector output by the vector generator;
[0011] The obtaining of the operation vector set corresponding to each operation dataset includes:
[0012] For each operation dataset, use a pre-established knowledge graph to determine the operation vectors for characterizing each operation data in the operation dataset; the knowledge graph is used to characterize the associations between various operation data.
[0013] Optionally, the using of the pre-trained capsule network to determine the aggregation vector corresponding to each operation vector set according to multiple operation vector sets includes:
[0014] Input multiple operation vector sets into the capsule network, so that the capsule network aggregates each operation vector set to obtain the aggregation vector corresponding to each operation dataset, and the aggregation vector is used to characterize the association relationship between the operation data included in the corresponding operation dataset.
[0015] Optionally, the attention network includes: a plurality of self-attention layers, a bi-directional attention pooling layer, and an output layer; the using of the pre-trained attention network to determine the recognition result according to multiple aggregation vectors and the target product vector includes:
[0016] Input multiple aggregation vectors into the plurality of self-attention layers in a fully-connected manner to obtain the intermediate vectors output by each self-attention layer;
[0017] Input the target product vector and the intermediate vectors output by each self-attention layer into the bi-directional attention pooling layer to obtain the target vector output by the bi-directional attention pooling layer, and the dimension of the intermediate vector is the same as the dimension of the target product vector;
[0018] Input the target vector into the output layer to obtain the recognition result output by the output layer.
[0019] Optionally, the inputting of multiple aggregation vectors into the plurality of self-attention layers in a fully-connected manner to obtain the intermediate vectors output by each self-attention layer includes:
[0020] According to the number of operation datasets, determine a target number of target self-attention layers in the plurality of self-attention layers, and the target number is less than the number of operation datasets;
[0021] Input the multiple aggregated vectors into the target number of the target self-attention layers in a fully-connected manner to obtain the intermediate vectors output by each of the target self-attention layers;
[0022] The step of inputting the target product vector and the intermediate vectors output by each of the self-attention layers into the bi-directional attention pooling layer to obtain the target vector output by the bi-directional attention pooling layer includes:
[0023] Input the target product vector and the intermediate vectors output by each of the target self-attention layers into the bi-directional attention pooling layer, so as to use the bi-directional attention pooling layer to perform weighted summation on the target product vector and the multiple intermediate vectors according to the attention weights to obtain the target vector.
[0024] Optionally, the method further includes:
[0025] If the recognition result indicates that the target object gives a positive feedback on the target product, send multimedia information for displaying the target product to the target object.
[0026] Optionally, the capsule network and the attention network are jointly trained in the following manner:
[0027] Obtain a sample input set and a sample output set. The sample input set includes: a plurality of sample inputs, each sample input including an operation information sequence of a sample object and a sample product. The sample output set includes a sample output corresponding to each sample input, and each sample output includes the feedback of the corresponding sample object on the sample product;
[0028] Use the sample input set as the input of the capsule network, use the output of the capsule network and the sample product vector for characterizing the sample product as the input of the attention network, and use the sample output set as the output of the attention network to jointly train the capsule network and the attention network.
[0029] According to a second aspect of the embodiments of the present disclosure, there is provided an information processing device, the device includes:
[0030] A sequence acquisition module, configured to acquire an operation information sequence corresponding to a target object and divide the operation information sequence into a plurality of operation data sets, each operation data set including a specified number of operation data;
[0031] A vector acquisition module, configured to acquire a target product vector for characterizing a target product and acquire an operation vector set corresponding to each operation data set, the operation vector set including operation vectors for characterizing each operation data in the corresponding operation data set;
[0032] The first processing module is used to use a pre-trained capsule network to determine, according to multiple sets of the operation vectors, an aggregation vector corresponding to each set of the operation vectors;
[0033] The second processing module is used to use a pre-trained attention network to determine an identification result according to multiple aggregation vectors and the target product vector, and the identification result is used to indicate the feedback of the target object on the target product.
[0034] Optionally, the vector acquisition module includes:
[0035] The first acquisition sub-module is used to input the product information of the target product into a pre-trained vector generator to obtain the target product vector output by the vector generator;
[0036] The second acquisition sub-module is used to, for each operation data set, use a pre-established knowledge graph to determine operation vectors for characterizing each operation data in the operation data set; the knowledge graph is used to characterize the associations between various operation data.
[0037] Optionally, the first processing module is used to:
[0038] Input multiple sets of the operation vectors into the capsule network, so that the capsule network aggregates each set of the operation vectors to obtain the aggregation vector corresponding to each operation data set, and the aggregation vector is used to characterize the association relationship between the operation data included in the corresponding operation data set.
[0039] Optionally, the attention network includes: a plurality of self-attention layers, a bi-directional attention pooling layer, and an output layer; the second processing module includes:
[0040] The input sub-module is used to input multiple aggregation vectors into the plurality of self-attention layers in a fully connected manner to obtain intermediate vectors output by each self-attention layer;
[0041] The pooling sub-module is used to input the target product vector and the intermediate vectors output by each self-attention layer into the bi-directional attention pooling layer to obtain a target vector output by the bi-directional attention pooling layer, and the dimension of the intermediate vector is the same as the dimension of the target product vector;
[0042] The output sub-module is used to input the target vector into the output layer to obtain the identification result output by the output layer.
[0043] Optionally, the input sub-module is used to:
[0044] Determine a target number of target self-attention layers among the multiple self-attention layers according to the number of the operation data sets, where the target number is less than the number of the operation data sets;
[0045] Input the multiple aggregation vectors into the target number of target self-attention layers in a fully connected manner to obtain the intermediate vectors output by each of the target self-attention layers;
[0046] The pooling sub-module is configured to:
[0047] Input the target product vector and the intermediate vectors output by each of the target self-attention layers into the bidirectional attention pooling layer, so as to use the bidirectional attention pooling layer to perform weighted summation on the target product vector and the multiple intermediate vectors according to the attention weights to obtain the target vector.
[0048] Optionally, the apparatus further includes:
[0049] A sending module, configured to send multimedia information for displaying the target product to the target object if the recognition result indicates that the target object gives a positive feedback on the target product.
[0050] Optionally, the capsule network and the attention network are jointly trained in the following manner:
[0051] Obtain a sample input set and a sample output set, where the sample input set includes: multiple sample inputs, each sample input includes an operation information sequence of a sample object and a sample product, and the sample output set includes a sample output corresponding to each sample input, and each sample output includes the feedback of the corresponding sample object on the sample product;
[0052] Use the sample input set as the input of the capsule network, use the output of the capsule network and the sample product vector for characterizing the sample product as the input of the attention network, and use the sample output set as the output of the attention network to jointly train the capsule network and the attention network.
[0053] According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in the first aspect are implemented.
[0054] According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0055] A memory, on which a computer program is stored;
[0056] A processor for executing the computer program in the memory to implement the steps of the method according to the first aspect.
[0057] Through the above technical solutions, the present disclosure first obtains an operation information sequence corresponding to a target object, and divides the operation information sequence into a plurality of operation data sets, where each operation data set includes a specified number of operation data. Then, a target product vector for characterizing the target product and an operation vector set corresponding to each operation data set are obtained. Next, a pre-trained capsule network is used to determine an aggregation vector corresponding to each operation vector set according to the plurality of operation vector sets. Finally, a pre-trained attention network is used to determine an identification result for indicating the feedback of the target object on the target product according to the plurality of aggregation vectors and the target product vector. The present disclosure aggregates the operation information sequence through the capsule network, and uses the attention network to identify the aggregated result and the target product to determine the feedback of the target object on the target product, which can make full use of the information carried by the operation information sequence and improve the speed and accuracy of identification.
[0058] Other features and advantages of the present disclosure will be described in detail in the following specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification. Together with the following specific implementation, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:
[0060] Figure 1 is a flowchart of a method for processing information according to an exemplary embodiment;
[0061] Figure 2 is a schematic diagram of the connection relationship between a capsule network and an attention network according to an exemplary embodiment;
[0062] Figure 3 is a flowchart of another method for processing information according to an exemplary embodiment;
[0063] Figure 4 is a flowchart of another method for processing information according to an exemplary embodiment;
[0064] Figure 5 is a flowchart of another method for processing information according to an exemplary embodiment;
[0065] Figure 6 is a flowchart of a method for jointly training a capsule network and an attention network;
[0066] Figure 7 is a block diagram of an information processing device according to an exemplary embodiment;
[0067] Figure 8 It is a block diagram of a processing device for another type of information shown according to an exemplary embodiment;
[0068] Figure 9 It is a block diagram of a processing device for another type of information shown according to an exemplary embodiment;
[0069] Figure 10 It is a block diagram of a processing device for another type of information shown according to an exemplary embodiment;
[0070] Figure 11 It is a block diagram of an electronic device shown according to an exemplary embodiment;
[0071] Figure 12 It is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners
[0072] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0073] Figure 1 It is a flowchart of a method for processing a type of information shown according to an exemplary embodiment, as Figure 1 shown, the method may include the following steps:
[0074] Step 101, obtain an operation information sequence corresponding to a target object, and divide the operation information sequence into a plurality of operation data sets, each operation data set including a specified number of operation data.
[0075] For example, to predict the feedback of a target object on a target product, the operation information sequence corresponding to the target object can be obtained first. The feedback of the target object on the target product can be divided into two types: positive feedback and negative feedback. Positive feedback indicates that the target object will perform a preset operation on the target product. The preset operation can be, for example, click, favorite, share, purchase, etc. Negative feedback indicates that the target object will not perform the preset operation on the target product. When the preset operation is click, this embodiment can be understood as the prediction of CTR (English: Click-Through-Rate, Chinese: click-through rate). Among them, the target object can be understood as a placement platform for placing multimedia information for displaying the target product, and users can perform preset operations on the target product through the placement platform. The placement platform can be, for example, an application program, a group of application programs corresponding to the same server, or a page in an application program, etc. The target object can also be understood as a placement area, and users within the placement area can perform preset operations on the target product. The placement area can be, for example, an area covered by a local area network, an area covered by a base station, or an area served by an operator, etc. The target object can also be understood as a terminal device, and users can perform preset operations on the target product through the terminal device. The target object can also be understood as a user. The present disclosure does not specifically limit the specific meaning of the target object.
[0076] The operation information sequence corresponding to the target object can be understood as a set of operation data executed by the target object within a period of time (for example: 7 days, 1 month, 6 months, or 12 months). The operation information sequence can include a large number of operation data arranged in chronological order, and each operation data is used to describe the operation performed by the target object at a moment. The operation data can include multiple dimensions, for example, it can include: product name, product ID, product category ID, operation type, operation time, operation time interval, purchase quantity, etc. Since the number of operation data included in the operation information sequence is large, the operation information sequence can be divided into multiple operation data sets in chronological order, where each operation data set includes a specified number of operation data. For example, if the operation information sequence includes 10,000 operation data, the operation information sequence can be divided into 500 operation data sets in chronological order, and each operation data set includes 20 operation data. It should be noted that in the scenario where the target object is a user, all the operation data included in the above operation information sequence is obtained under the condition of obtaining user authorization, or actively submitted after the user reads the relevant instructions, or data that the terminal device will inevitably send to the server when the user uses the terminal device.
[0077] Step 102: Obtain a target product vector for characterizing the target product, and obtain an operation vector set corresponding to each operation data set, where the operation vector set includes operation vectors for characterizing each operation data in the corresponding operation data set.
[0078] Exemplarily, a target product vector for characterizing the target product and an operation vector set for characterizing each operation data in each operation data set can be obtained. Specifically, product information that can describe the target product can be input into a pre-trained vector generator or encoder to obtain the target product vector, where the product information may include the product name, product ID, category ID, size, specifications, etc. of the target product. Further, for each operation data set, operation vectors for characterizing each operation data included in the operation data set can be determined in sequence, and then a specified number of operation vectors are combined to form the operation vector set corresponding to the operation data set, and the dimensions of each operation vector are the same. For example, a knowledge graph can be pre-trained and used to determine the operation vectors of each operation data, and each operation data can also be input into a pre-trained vector generator or encoder (such as: one-hot encoder) to obtain the operation vector of the operation data. The present disclosure does not make specific limitations on this.
[0079] Step 103: Use a pre-trained capsule network to determine an aggregation vector corresponding to each operation vector set according to multiple operation vector sets.
[0080] Step 104: Use a pre-trained attention network to determine an identification result according to multiple aggregation vectors and the target product vector, where the identification result is used to indicate the feedback of the target object on the target product.
[0081] For example, multiple sets of operation vectors can be input into a pre-trained Capsule Network, so as to obtain the aggregated vectors corresponding to each set of operation vectors output by the Capsule Network. The Capsule Network can perform aggregation processing on each set of operation vectors to obtain an aggregated vector that can represent the set of operation vectors. The number of aggregated vectors is the same as the number of sets of operation vectors, that is, the number of aggregated vectors is the same as the number of operation data sets. Since the Capsule Network can better learn the deep representation of information and at the same time can learn the correlation relationship between information, the aggregated vector can effectively represent the correlation relationship between a specified number of operation vectors included in the corresponding set of operation vectors. That is to say, through the Capsule Network, a specified number of operation vectors are integrated into one aggregated vector, which can not only make full use of the information contained in the corresponding set of operation vectors, but also reduce the data volume. Then, multiple aggregated vectors and the target product vector can be input into a pre-trained Attention Network, so as to obtain the recognition result output by the Attention Network for indicating the feedback of the target object on the target product. The recognition result can be positive feedback or negative feedback. The Attention Network can learn the correlation relationship between each aggregated vector and the target product vector, so as to determine whether the target object and the target product are positive feedback or negative feedback. In this way, there is no need to truncate the operation information sequence, so information loss will not occur. At the same time, there is no need to classify and process the operation information sequence separately, so the internal correlation between information will not be lost. Therefore, the complete information included in the operation information sequence corresponding to the target object can be fully utilized, and the accuracy of the recognition result can be effectively improved. Further, by integrating a specified number of operation vectors into one aggregated vector, the amount of data to be processed can be effectively reduced, the speed of obtaining the recognition result is increased, and the feasibility of this embodiment is ensured.
[0082] Among them, the connection relationship between the above Capsule Network and Attention Network can be as Figure 2 shown, where multiple sets of operation vectors are used as the input of the Capsule Network, and the output of the Capsule Network and the target product vector ( Figure 2 not shown in the figure) are used as the input of the Attention Network together to obtain the recognition result output by the Attention Network. Further, the Capsule Network and the Attention Network can be jointly trained using a large number of training samples.
[0083] In summary, the present disclosure first obtains an operation information sequence corresponding to a target object, and divides the operation information sequence into multiple operation data sets, where each operation data set includes a specified number of operation data. Then, a target product vector representing the target product and an operation vector set corresponding to each operation data set are obtained. Next, a pre-trained capsule network is used to determine an aggregation vector corresponding to each operation vector set according to multiple operation vector sets. Finally, a pre-trained attention network is used to determine an identification result for indicating the feedback of the target object on the target product according to multiple aggregation vectors and the target product vector. By aggregating the operation information sequence through the capsule network and using the attention network to identify the aggregated result and the target product, the present disclosure can determine the feedback of the target object on the target product, fully utilize the information carried by the operation information sequence, and improve the speed and accuracy of identification.
[0084] Figure 3 is a flowchart of another information processing method shown according to an exemplary embodiment, as Figure 3 shown, step 102 may include:
[0085] Step 1021, input the product information of the target product into a pre-trained vector generator to obtain the target product vector output by the vector generator.
[0086] Step 1022, for each operation data set, use a pre-established knowledge graph to determine operation vectors for characterizing each operation data in the operation data set. The knowledge graph is used to characterize the associations between various operation data.
[0087] Exemplarily, the product information of the target product can be input into a pre-trained vector generator (English: Embedding Generator), and the vector generator can extract from the product information a target product vector that can represent the target product. Among them, the product information may include, for example, the product name, product ID, category ID, size, specifications, etc. of the target product.
[0088] For a specified number of operation data included in each operation dataset, the operation vector corresponding to each operation data can be determined in sequence by using a pre-established knowledge graph. Among them, the knowledge graph can represent the associations between various operation data. In one implementation, a knowledge graph can be established, which includes multiple nodes and at least one edge. Each node represents an operation data, and each edge is used to represent the association between the two nodes at both ends of the edge. Further, the width or value of each edge can also represent the attribute of the association between the two nodes at both ends of the edge. In another implementation, multiple knowledge graphs can be established to represent operation data from multiple dimensions. For example, a knowledge graph of product ID dimension, a knowledge graph of category ID dimension, etc. can be established. Each knowledge graph includes multiple nodes and at least one edge. Each node represents a product ID (or a category ID), and each edge is used to represent the association between the two nodes at both ends of the edge. The method for determining the operation vector according to the knowledge graph, for example, can use methods such as Graph Neural Networks (abbreviation: GNN), Graph Convolutional Network (abbreviation: GCN), or GraphSAGE (Graph SAmple and aggreGatE) to determine the vector corresponding to each node in the knowledge graph, so as to obtain the operation vector for representing the operation data. The present disclosure does not make specific limitations on this.
[0089] In one application scenario, the implementation of step 103 can be:
[0090] Input multiple operation vector sets into the capsule network, so that the capsule network aggregates each operation vector set to obtain an aggregation vector corresponding to each operation dataset. The aggregation vector is used to represent the association relationship between the operation data included in the corresponding operation dataset.
[0091] Exemplarily, multiple operation vector sets can be input into the capsule network, and the capsule network aggregates each operation vector set respectively to obtain an aggregation vector corresponding to each operation dataset. Since the capsule network can better learn the deep representation of information and can also learn the association relationship between information, the aggregation vector can effectively represent the association relationship between the specified number of operation vectors included in the corresponding operation vector set. That is to say, through the capsule network, the specified number of operation vectors are integrated into an aggregation vector, which can not only make full use of the information contained in the corresponding operation vector set, but also reduce the data volume.
[0092] Figure 4 is a flowchart of another information processing method shown according to an exemplary embodiment, as Figure 4As shown, the attention network includes: multiple self-attention layers, a bi-directional attention pooling layer, and an output layer. Step 104 may include the following steps:
[0093] Step 1041: Input multiple aggregated vectors into multiple self-attention layers in a fully connected manner to obtain intermediate vectors output by each self-attention layer.
[0094] Step 1042: Input the target product vector and the intermediate vectors output by each self-attention layer into the bi-directional attention pooling layer to obtain a target vector output by the bi-directional attention pooling layer. The dimension of the intermediate vectors is the same as that of the target product vector.
[0095] Step 1043: Input the target vector into the output layer to obtain the recognition result output by the output layer.
[0096] Exemplarily, the attention network may include a bi-directional attention pooling layer (English: Bi-interactionAttention Pooling), an output layer, and multiple self-attention layers (English: Self Attention). Among them, the number of self-attention layers can be preset or determined according to the number of aggregated vectors. First, as Figure 2 shown, multiple aggregated vectors are input into multiple self-attention layers in a fully connected manner, and each self-attention layer outputs an intermediate vector, that is, the number of intermediate vectors is the same as the number of self-attention layers. The multiple intermediate vectors can be understood as being able to describe the association relationship between the operation data included in the operation information sequence from multiple dimensions. After that, the target product vector and the intermediate vectors output by each self-attention layer can be input into the bi-directional attention pooling layer. The bi-directional attention pooling layer can determine the attention weights of the target product vector and each intermediate vector through the attention mechanism, and then perform weighted summation on the target product vector and the multiple intermediate vectors to obtain the target vector output by the bi-directional attention pooling layer. Finally, the target vector is input into the output layer to obtain the recognition result output by the output layer. For example, the output layer can determine the matching probabilities of the target vector with positive feedback and negative feedback respectively. If the matching probability with positive feedback is large, then the recognition result is determined to be positive feedback. If the matching probability with negative feedback is large, then the recognition result is determined to be negative feedback.
[0097] In an application scenario, the implementation manner of step 1041 may include:
[0098] Step 1): According to the number of operation data sets, determine a target number of target self-attention layers among the multiple self-attention layers, where the target number is less than the number of operation data sets.
[0099] Step 2): Input multiple aggregated vectors into the target number of target self-attention layers in a fully connected manner to obtain intermediate vectors output by each target self-attention layer.
[0100] Correspondingly, the implementation manner of step 1042 may include:
[0101] Step 3): Input the target product vector and the intermediate vectors output by each target self-attention layer into a bi-directional attention pooling layer, so as to use the bi-directional attention pooling layer to perform weighted summation on the target product vector and the multiple intermediate vectors according to the attention weights to obtain a target vector.
[0102] For example, in order to further reduce the amount of data to be processed, the number of self-attention layers in the attention network can be adjusted according to the number of operation data sets. Specifically, the attention network includes multiple self-attention layers, and a target number of target self-attention layers can be selected according to the number of operation data sets, where the target number is less than the number of operation data sets, and a corresponding relationship between the target number and the number of operation data sets can be established in advance. For example, when the number of operation data sets is 100, the target number is 10, and for another example, when the number of operation data sets is 20, the target number is 5. Correspondingly, input the multiple aggregation vectors into the target number of target self-attention layers in a fully connected manner to obtain the intermediate vectors output by each target self-attention layer. That is to say, through the target number of target self-attention layers, the target number of intermediate vectors are obtained. Then, input the target product vector and the target number of intermediate vectors into the bi-directional attention pooling layer, so as to use the bi-directional attention pooling layer to perform weighted summation on the target product vector and the target number of intermediate vectors according to the attention weights to obtain a target vector. Since the target number is less than the number of operation data sets, the number of intermediate vectors that the bi-directional attention pooling layer needs to process is reduced, and the amount of data to be processed can be further reduced.
[0103] For example, if the operation information sequence includes 10,000 operation data, the operation information sequence can be divided into 100 operation data sets (each operation data set includes 100 operation data) in chronological order. Then, 100 aggregation vectors can be obtained through steps 102 to 103. If the attention weights of 100 operation vector sets are directly determined by using the attention mechanism, 100 * 100 calculations are required, and the calculation amount is relatively large. 10 (i.e., the target number) self-attention layers can be selected from the multiple self-attention layers included in the attention network as the target self-attention layers, and then 10 intermediate vectors can be obtained. Then, when using the bi-directional attention pooling layer to obtain a target vector, 10 * (10 * 10) calculations are required. It can be seen that the calculation amount has decreased by one order of magnitude, so the recognition speed can be improved.
[0104] Figure 5 is a flowchart of another information processing method shown according to an exemplary embodiment, as Figure 5 shown, the method may further include:
[0105] Step 105, if the recognition result indicates that the target object has a positive feedback on the target product, send multimedia information for displaying the target product to the target object.
[0106] For example, if the recognition result output by the attention network indicates that the target object has a positive feedback on the target product, which means that the target object will perform a preset operation on the target product (such as click, favorite, share, purchase, etc.), then multimedia information for displaying the target product can be sent to the target object. The multimedia information may include pictures and videos showing the target product, may also include the purchase link of the target product, and may also include coupons of the target product, etc. The present disclosure does not make specific limitations on the form and content of the multimedia information. If the target object is the placement platform, then the multimedia information can be displayed on the placement platform; if the target object is the placement area, then the multimedia information can be displayed within the placement area; if the target object is the terminal device, then the multimedia information can be displayed on the display interface of the terminal device.
[0107] Figure 6 It is a flowchart of a method for jointly training a capsule network and an attention network, as Figure 6 shown. The capsule network and the attention network are jointly trained in the following manner:
[0108] Step A, obtain a sample input set and a sample output set. The sample input set includes: a plurality of sample inputs, each sample input including an operation information sequence of a sample object and a sample product. The sample output set includes a sample output corresponding to each sample input, and each sample output includes the feedback of the corresponding sample object on the sample product.
[0109] Step B, use the sample input set as the input of the capsule network, use the output of the capsule network and the sample product vector for characterizing the sample product as the input of the attention network, and use the sample output set as the output of the attention network to jointly train the capsule network and the attention network.
[0110] Exemplarily, when training the capsule network and the attention network in the above embodiments, it is necessary to first obtain a sample input set and a sample output set. Among them, the sample input set includes a plurality of sample inputs, and each sample input includes an operation information sequence of a sample object and a sample product. Among them, the plurality of sample objects may include a plurality of positive sample objects and a plurality of negative sample objects. The positive sample objects give positive feedback on the sample product, and the negative sample objects give negative feedback on the sample product. Further, the ratio of the number of positive sample objects to the number of negative sample objects can also be controlled (for example, it can be 1:1).
[0111] The sample output set includes the sample output corresponding to each sample input, and each sample output includes the feedback of the corresponding sample object on the sample product. That is, the sample output corresponding to the positive sample object is positive feedback (which can be represented as 1), and the sample output corresponding to the negative sample object is negative feedback (which can be represented as 0).
[0112] After that, the sample input set is used as the input of the capsule network, the output of the capsule network and the sample product vector used to represent the sample product are used as the input of the attention network, and the sample output set is used as the output of the attention network to jointly train the capsule network and the attention network. So that when the sample input set is input, the output of the attention network can match the sample output set.
[0113] Specifically, the operation information sequence of the sample object included in the sample input set can be first divided into multiple operation data sets of the sample object, and then the sample product vector used to represent the sample product and the operation vector set corresponding to each operation data set are obtained. After that, the multiple operation vector sets of the sample object are input into the capsule network to obtain the aggregated vectors of multiple sample objects output by the capsule network. Further, the aggregated vectors of multiple sample objects and the sample product vector are input into the attention network to obtain the output of the attention network. The loss functions of the capsule network and the attention network can be determined according to the output of the attention network and the sample output set, and the parameters of the neurons in the capsule network and the attention network are corrected with the goal of reducing the loss function. The parameters of the neurons can be, for example, the weight (English: Weight) and bias (English: Bias) of the neurons. Repeat the above steps until the loss function meets the preset conditions, such as the loss function is less than the preset loss threshold.
[0114] Specifically, for the capsule network, the loss function of the capsule network can be determined according to the margin loss and the reconstruction loss, and the dynamic routing mechanism is used to correct the parameters of the neurons in the capsule network. The dynamic routing mechanism can measure the similarity between multiple vectors included in the operation vector set, so that the trained capsule network can better learn the deep representation of information and can also learn the correlation relationship between information. For the attention network, the cross-entropy loss function can be used to determine the loss function of the attention network, and the backpropagation algorithm is used to correct the parameters of the neurons in the attention network.
[0115] In summary, the present disclosure first obtains an operation information sequence corresponding to a target object, and divides the operation information sequence into multiple operation data sets, where each operation data set includes a specified number of operation data. Then, a target product vector for characterizing the target product and an operation vector set corresponding to each operation data set are obtained. Next, using a pre-trained capsule network, according to the multiple operation vector sets, an aggregation vector corresponding to each operation vector set is determined. Finally, using a pre-trained attention network, according to the multiple aggregation vectors and the target product vector, an identification result for indicating the feedback of the target object on the target product is determined. By aggregating the operation information sequence through the capsule network and using the attention network to identify the aggregated result and the target product to determine the feedback of the target object on the target product, the present disclosure can make full use of the information carried by the operation information sequence and improve the speed and accuracy of identification.
[0116] Figure 7 is a block diagram of an information processing device shown according to an exemplary embodiment, as Figure 7 shown, the device 200 includes:
[0117] A sequence acquisition module 201, configured to obtain an operation information sequence corresponding to a target object, and divide the operation information sequence into multiple operation data sets, where each operation data set includes a specified number of operation data.
[0118] A vector acquisition module 202, configured to obtain a target product vector for characterizing the target product, and obtain an operation vector set corresponding to each operation data set, where the operation vector set includes operation vectors for characterizing each operation data in the corresponding operation data set.
[0119] A first processing module 203, configured to use a pre-trained capsule network to determine an aggregation vector corresponding to each operation vector set according to the multiple operation vector sets.
[0120] A second processing module 204, configured to use a pre-trained attention network to determine an identification result according to the multiple aggregation vectors and the target product vector, where the identification result is used to indicate the feedback of the target object on the target product.
[0121] Figure 8 is a block diagram of another information processing device shown according to an exemplary embodiment, as Figure 8 shown, the vector acquisition module 202 may include:
[0122] A first acquisition sub-module 2021, configured to input the product information of the target product into a pre-trained vector generator to obtain the target product vector output by the vector generator.
[0123] The second acquisition sub-module 2022 is configured to, for each operation data set, determine an operation vector for characterizing each operation data in the operation data set by using a pre-established knowledge graph. The knowledge graph is used to characterize the associations between various operation data.
[0124] In one application scenario, the first processing module 203 is configured to:
[0125] Input multiple sets of operation vectors into a capsule network, so that the capsule network aggregates each set of operation vectors to obtain an aggregated vector corresponding to each operation data set, and the aggregated vector is used to characterize the association relationship between the operation data included in the corresponding operation data set.
[0126] Figure 9 It is a block diagram of another information processing device shown according to an exemplary embodiment, as Figure 9 shown, the attention network includes: a plurality of self-attention layers, a bi-directional attention pooling layer, and an output layer. The second processing module 204 may include:
[0127] An input sub-module 2041, configured to input multiple aggregated vectors into a plurality of self-attention layers in a fully-connected manner to obtain intermediate vectors output by each self-attention layer.
[0128] A pooling sub-module 2042, configured to input the target product vector and the intermediate vectors output by each self-attention layer into the bi-directional attention pooling layer to obtain a target vector output by the bi-directional attention pooling layer, and the dimensions of the intermediate vectors are the same as the dimension of the target product vector.
[0129] An output sub-module 2043, configured to input the target vector into the output layer to obtain an identification result output by the output layer.
[0130] In one application scenario, the input sub-module 2041 may be configured to perform the following steps:
[0131] Step 1) According to the number of operation data sets, determine a target number of target self-attention layers in the plurality of self-attention layers, where the target number is less than the number of operation data sets.
[0132] Step 2) Input multiple aggregated vectors into the target number of target self-attention layers in a fully-connected manner to obtain intermediate vectors output by each target self-attention layer.
[0133] The pooling sub-module 2042 may be configured to perform the following steps:
[0134] Step 3) Input the target product vector and the intermediate vectors output by each target self-attention layer into the bi-directional attention pooling layer, so that the bi-directional attention pooling layer performs weighted summation on the target product vector and the multiple intermediate vectors according to the attention weights to obtain a target vector.
[0135] Figure 10 is a block diagram of a processing device for another type of information shown according to an exemplary embodiment, as Figure 10 shown, the device 200 may further include:
[0136] A sending module 205, configured to send multimedia information for presenting the target product to the target object if the recognition result indicates that the target object has a positive feedback on the target product.
[0137] In one implementation, the capsule network and the attention network are jointly trained in the following manner:
[0138] Step A, obtain a sample input set and a sample output set. The sample input set includes: a plurality of sample inputs, each sample input including an operation information sequence of a sample object and a sample product. The sample output set includes a sample output corresponding to each sample input, and each sample output includes the feedback of the corresponding sample object on the sample product.
[0139] Step B, use the sample input set as the input of the capsule network, use the output of the capsule network and the sample product vector for characterizing the sample product as the input of the attention network, and use the sample output set as the output of the attention network to jointly train the capsule network and the attention network.
[0140] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0141] In summary, the present disclosure first obtains the operation information sequence corresponding to the target object, and divides the operation information sequence into a plurality of operation data sets, where each operation data set includes a specified number of operation data. Then, obtain the target product vector for characterizing the target product, and the operation vector set corresponding to each operation data set. Then, use the pre-trained capsule network to determine the aggregation vector corresponding to each operation vector set according to the plurality of operation vector sets. Finally, use the pre-trained attention network to determine the recognition result for indicating the feedback of the target object on the target product according to the plurality of aggregation vectors and the target product vector. The present disclosure aggregates the operation information sequence through the capsule network, and uses the attention network to identify the aggregated result and the target product to determine the feedback of the target object on the target product, which can make full use of the information carried by the operation information sequence and improve the speed and accuracy of recognition.
[0142] Figure 11 is a block diagram of an electronic device 300 shown according to an exemplary embodiment. As Figure 11As shown, the electronic device 300 may include: a processor 301 and a memory 302. The electronic device 300 may also include one or more of a multimedia component 303, an input / output (I / O) interface 304, and a communication component 305.
[0143] Among them, the processor 301 is used to control the overall operation of the electronic device 300 to complete all or part of the steps in the above information processing method. The memory 302 is used to store various types of data to support the operation of the electronic device 300. These data may include, for example, instructions for any application or method operating on the electronic device 300, and application-related data, such as contact data, received and sent messages, pictures, audio, video, and so on. The memory 302 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The multimedia component 303 may include a screen and an audio component. The screen may be a touch screen, for example, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 302 or sent via the communication component 305. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 304 provides an interface between the processor 301 and other interface modules, and the other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 305 is used for wired or wireless communication between the electronic device 300 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited herein. Accordingly, the communication component 305 may include: a Wi-Fi module, a Bluetooth module, an NFC module, and so on.
[0144] In an exemplary embodiment, the electronic device 300 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above information processing method.
[0145] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the above information processing method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 302 including program instructions, and the above program instructions can be executed by the processor 301 of the electronic device 300 to complete the above information processing method.
[0146] Figure 12 is a block diagram of an electronic device 400 shown according to an exemplary embodiment. For example, the electronic device 400 can be provided as a server. Referring to Figure 12 , the electronic device 400 includes a processor 422, the number of which can be one or more, and a memory 432 for storing computer programs executable by the processor 422. The computer programs stored in the memory 432 can include one or more modules each corresponding to a set of instructions. In addition, the processor 422 can be configured to execute the computer program to execute the above information processing method.
[0147] In addition, the electronic device 400 can further include a power supply component 426 and a communication component 450. The power supply component 426 can be configured to perform power management of the electronic device 400, and the communication component 450 can be configured to implement communication of the electronic device 400, for example, wired or wireless communication. In addition, the electronic device 400 can further include an input / output (I / O) interface 458. The electronic device 400 can operate based on an operating system stored in the memory 432, such as Windows ServerTM, Mac OSXTM, UnixTM, LinuxTM, and so on.
[0148] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the above-described information processing method are implemented. For example, the computer-readable storage medium may be the above-described memory 432 including program instructions, and the above program instructions may be executed by the processor 422 of the electronic device 400 to complete the above-described information processing method.
[0149] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-described information processing method when executed by the programmable device.
[0150] The preferred embodiments of the present disclosure have been described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, those skilled in the art can easily think of other implementation schemes of the present disclosure after considering the specification and practicing the present disclosure, and all of them belong to the protection scope of the present disclosure.
[0151] In addition, it should be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without conflict. At the same time, any combination can be made between the various different embodiments of the present disclosure as long as it does not violate the idea of the present disclosure, and it should also be regarded as the content disclosed by the present disclosure. The present disclosure is not limited to the exact structure described above, and the scope of the present disclosure is only limited by the appended claims.
Claims
1. A method for processing information, characterized in that The method includes: Obtaining an operation information sequence corresponding to a target object, and dividing the operation information sequence into multiple operation data sets, where each operation data set includes a specified number of operation data; Obtaining a target product vector for characterizing a target product, and obtaining an operation vector set corresponding to each operation data set, where the operation vector set includes operation vectors for characterizing each operation data in the corresponding operation data set; Using a pre-trained capsule network, determining an aggregation vector corresponding to each operation vector set according to the multiple operation vector sets; Using a pre-trained attention network, determining an identification result according to the multiple aggregation vectors and the target product vector, where the identification result is used to indicate the feedback of the target object on the target product.
2. The method according to claim 1, characterized in that, The obtaining a target product vector for characterizing a target product includes: Inputting the product information of the target product into a pre-trained vector generator to obtain the target product vector output by the vector generator; The obtaining an operation vector set corresponding to each operation data set includes: For each operation data set, using a pre-established knowledge graph to determine operation vectors for characterizing each operation data in the operation data set; the knowledge graph is used to characterize the association between various operation data.
3. The method according to claim 1, wherein The using a pre-trained capsule network to determine an aggregation vector corresponding to each operation vector set according to the multiple operation vector sets includes: Inputting the multiple operation vector sets into the capsule network, so that the capsule network aggregates each operation vector set to obtain the aggregation vector corresponding to each operation data set, where the aggregation vector is used to characterize the association relationship between the operation data included in the corresponding operation data set.
4. The method according to claim 1, wherein The attention network includes: multiple self-attention layers, a bi-directional attention pooling layer, and an output layer; the using a pre-trained attention network to determine an identification result according to the multiple aggregation vectors and the target product vector includes: Inputting the multiple aggregation vectors into the multiple self-attention layers in a fully-connected manner to obtain intermediate vectors output by each self-attention layer; Inputting the target product vector and the intermediate vectors output by each self-attention layer into the bi-directional attention pooling layer, and the bi-directional attention pooling layer determines the attention weights of the target product vector and each intermediate vector through an attention mechanism, and then performs weighted summation on the target product vector and the multiple intermediate vectors to obtain a target vector output by the bi-directional attention pooling layer, where the dimension of the intermediate vector is the same as the dimension of the target product vector; Inputting the target vector into the output layer to obtain the identification result output by the output layer.
5. The method according to claim 4, wherein The inputting the multiple aggregation vectors into the multiple self-attention layers in a fully-connected manner to obtain intermediate vectors output by each self-attention layer includes: According to the number of operation data sets, determining a target number of target self-attention layers in the multiple self-attention layers, where the target number is less than the number of operation data sets; Input the multiple aggregated vectors into the target number of the target self-attention layers in a fully-connected manner to obtain the intermediate vectors output by each of the target self-attention layers; The step of inputting the target product vector and the intermediate vectors output by each of the self-attention layers into the bi-directional attention pooling layer to obtain the target vector output by the bi-directional attention pooling layer includes: Input the target product vector and the intermediate vectors output by each of the target self-attention layers into the bi-directional attention pooling layer, so as to use the bi-directional attention pooling layer to perform weighted summation on the target product vector and the multiple intermediate vectors according to the attention weights to obtain the target vector.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: If the recognition result indicates that the target object gives a positive feedback on the target product, send multimedia information for displaying the target product to the target object.
7. The method according to any one of claims 1-5, characterized in that, The capsule network and the attention network are jointly trained in the following manner: Obtain a sample input set and a sample output set. The sample input set includes: multiple sample inputs, each of the sample inputs includes an operation information sequence of a sample object and a sample product, and the sample output set includes a sample output corresponding to each of the sample inputs, and each of the sample outputs includes the feedback of the corresponding sample object on the sample product; Use the sample input set as the input of the capsule network, use the output of the capsule network and the sample product vector for characterizing the sample product as the input of the attention network, and use the sample output set as the output of the attention network to jointly train the capsule network and the attention network.
8. An information processing apparatus, characterized in that, The device includes: A sequence acquisition module, configured to acquire an operation information sequence corresponding to a target object and divide the operation information sequence into a plurality of operation data sets, and each of the operation data sets includes a specified number of operation data; A vector acquisition module, configured to acquire a target product vector for characterizing a target product and acquire an operation vector set corresponding to each of the operation data sets, where the operation vector set includes operation vectors for characterizing each of the operation data in the corresponding operation data set; A first processing module, configured to use a pre-trained capsule network to determine an aggregated vector corresponding to each of the operation vector sets according to the multiple operation vector sets; A second processing module, configured to use a pre-trained attention network to determine a recognition result according to the multiple aggregated vectors and the target product vector, where the recognition result is used to indicate the feedback of the target object on the target product.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, the steps of the method according to any one of claims 1-7 are implemented.
10. An electronic device, characterized in that, It includes: A memory, on which a computer program is stored; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1-7.
Citation Information
Patent Citations
Machine reading comprehension method
CN110619123A
Short video click rate prediction method based on emotion capsule network
CN112199550A