Method, system, medium and device for evaluating offline strategy under social network
By introducing the network confluence inverse probability weighted method in social networks and using graph convolutional networks to optimize the offline strategy evaluation model, the problem of insufficient evaluation accuracy caused by the network confluence effect in social networks is solved, and the evaluation accuracy of the new recommendation strategy is improved.
Patent Information
- Application Number
- CN202411158770.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-08-22
AI Technical Summary
Existing offline policy evaluation methods fail to effectively consider network confounding effects in social networks, resulting in insufficient accuracy in evaluating new recommendation strategies.
The network inverse probability weighting (IntIPW) method is introduced to map the behavioral processing variables and evaluation processing variables of social network data into a semantic space through a graph convolutional network. The adjacency matrix is used for weight calculation to integrate the impact of the processing variables of social network data on neighbors and optimize the offline policy evaluation model.
The evaluation accuracy of new recommendation strategies in the presence of network confounding effects is improved, the evaluation error is reduced, and the reliability of strategy decisions is enhanced.
Smart Images

Figure CN119089053B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data mining, and in particular relates to an offline strategy evaluation method, system, medium and device applicable to social networks. Background Art
[0002] The contextual multi-armed bandit process is crucial in numerous real-world applications, including precision medicine, recommender systems, and advertising. In these interactive systems, legacy recommendation strategies generate extensive logs by recommending content (behavioral processing variables) based on user characteristics (covariates) and collecting responses (outcome variables). These logs, generated by online interactions, provide crucial data for offline strategy evaluation. Offline strategy evaluation aims to assess the performance of new recommendation strategies without relying on A / B testing, thereby mitigating the high costs and potential ethical issues.
[0003] With growing interest in offline policy evaluation, numerous estimators have been developed to evaluate new policies using offline log data. Direct methods predict outcome functions based on log data. Inverse probability weighting assigns sample weights based on the probabilities of the old and new policies. Doubly robust methods combine direct methods with inverse probability weighting. These estimators have demonstrated effectiveness in various domains. Their effectiveness relies on the stability-under-individual-treatment assumption (SUTVA), which states that the outcome of any given sample is affected only by its covariates and its treatment variable. However, in many real-world scenarios involving social networks, this assumption often fails because samples are not independent.
[0004] In social networks, confounding occurs when the outcome of a sample is affected not only by its own covariates and treatment variables, but also by the treatment variables of its social neighbors. This is also known as network confounding. For example, in epidemiology, deciding whether to vaccinate someone may affect the health of those around them; in recommendation systems, recommending a product to someone may also indirectly affect the purchase intentions of others in their social circle through opinion propagation; in advertising, ad exposure may directly influence users' purchasing behavior and indirectly influence others in their social network through their acquisition behavior. However, current research on offline policy evaluation ignores network confounding, which may cause these estimators to fail completely. Therefore, how to evaluate new recommendation strategies based solely on marketing datasets in the presence of confounding effects in social networks remains an open problem. Summary of the Invention
[0005] The present application aims to solve the problem of evaluating new recommendation strategies from marketing data in the presence of network confounding effects in the prior art, specifically, how to more accurately estimate the effectiveness of new recommendation strategies using marketing data sets when the processing variables of social network data affect the outcome variables of their neighbors. And the present application provides an offline strategy evaluation method, system, medium and equipment suitable for social networks. In the method of the present application, the network confounding inverse probability weighting (IntIPW) is introduced, which ingeniously integrates the importance weight and comprehensively considers the influence of the processing variables of social network data on the neighbors, thereby proposing a novel method within the inverse probability weighting framework, effectively making up for the existing gap.
[0006] In order to achieve the above-mentioned application purposes, the present application specifically adopts the following technical solutions:
[0007] In the first aspect, the present application provides an offline strategy evaluation method suitable for social networks, and the specific steps are as follows:
[0008] S1. According to the keywords, the social network data is respectively divided into covariates, behavior processing variables, adjacency matrices and outcome variables according to the user's feature information, the content recommended to the user by the old content recommendation strategy, the friend relationship information between users and the user preference, and the content recommended to the user by the new content recommendation strategy is used as the evaluation processing variable by using the divided social network data to construct a social network data set;
[0009] S2. Train an offline strategy evaluation model on the social network data set and the evaluation processing variable, wherein the offline strategy evaluation model comprises an embedding function and a binary classifier, and the binary classifier comprises a graph convolution network;
[0010] In the offline strategy evaluation model, first, a learnable embedding function is used to map the behavior processing variable and the evaluation processing variable to a semantic space respectively, the behavior processing variable corresponds to a behavior processing embedding with a dimension consistent with the covariate, the evaluation processing variable corresponds to an evaluation processing embedding with a dimension consistent with the covariate, and each marketing data covariate and behavior processing embedding are connected to form a behavior joint representation, each marketing data covariate and evaluation processing embedding are connected to form an evaluation joint representation, and the behavior joint representation and the evaluation joint representation are set with corresponding labels, the adjacency matrix is added to the unit matrix to form an adjacency matrix containing self-connection, the adjacency matrix containing self-connection, the evaluation joint representation and the behavior joint representation are input into the binary classifier, the graph convolution network processes the adjacency matrix containing self-connection and the behavior joint representation to obtain a first output vector corresponding to the behavior joint representation, and the graph convolution network processes the adjacency matrix containing self-connection and the evaluation joint representation to obtain a second output vector corresponding to the evaluation joint representation;
[0011] S3. When the offline strategy evaluation model training is completed, the weight of the social network data result variable is calculated from the updated first output vector, the weight of the social network data result variable is weighted and summed with the corresponding social network data result variable, the evaluation strategy value is obtained, the weight of the social network data result variable is added, the normalized weight is obtained, and the self-normalized evaluation strategy value is obtained by dividing the evaluation strategy value by the normalized weight, which is used to judge whether to adopt the new content recommendation strategy.
[0012] On the basis of the above scheme, each step can be implemented in the following preferred specific manner.
[0013] As a preferred embodiment of the above first aspect, in step S2, the label of the behavior joint representation is set to 0, and the label of the evaluation joint representation is set to 1.
[0014] As a preferred embodiment of the above first aspect, in step S2, the offline strategy evaluation model uses binary cross-entropy loss during training.
[0015] As a preferred embodiment of the above first aspect, in step S3, the weight w i of the result variable r i of the i-th social network data calculated from the updated first output vector f 0i is:
[0016]
[0017] where f 0i represents the i-th value in the first output vector f0.
[0018] As a preferred embodiment of the above first aspect, in step S3, the self-normalized evaluation strategy value is calculated as follows:
[0019]
[0020] where r i represents the result variable of the i-th social network data; and N represents the number of social network data.
[0021] As a preferred embodiment of the above first aspect, in step S3, the specific process of determining whether to adopt the new content recommendation strategy from the self-normalized evaluation strategy value is as follows: the value of the old content recommendation strategy is obtained by averaging all result variables in the social network data set, the value of the old content recommendation strategy is compared with the self-normalized evaluation strategy value, if the value of the old content recommendation strategy is less than the self-normalized evaluation strategy value, the old content recommendation strategy is retained; if the value of the old content recommendation strategy is greater than or equal to the self-normalized evaluation strategy value, the new content recommendation strategy is replaced with the old content recommendation strategy.
[0022] In a second aspect, the present invention provides an offline strategy evaluation system applicable to social networks, comprising:
[0023] The data processing module divides the social network data into covariates, behavioral processing variables, adjacency matrices, and outcome variables based on the keywords, user feature information, content recommended to users by the old content recommendation strategy, user friendship information, and user preferences. The divided social network data is used to construct a social network dataset, and the content recommended to users by the new content recommendation strategy is used as the evaluation processing variable.
[0024] A model optimization module, configured to train an offline policy evaluation model on a social network dataset and evaluation processing variables, wherein the offline policy evaluation model comprises an embedding function and a binary classifier, wherein the binary classifier comprises a graph convolutional network;
[0025] In the offline strategy evaluation model, a learnable embedding function is first used to map the behavior processing variable and the evaluation processing variable to the semantic space respectively. The behavior processing variable obtains a behavior processing embedding with a dimension consistent with the covariate, and the evaluation processing variable obtains an evaluation processing embedding with a dimension consistent with the covariate. The covariate and behavior processing embedding of each marketing data are connected to form a behavior joint representation. The covariate and evaluation processing embedding of each marketing data are connected to form an evaluation joint representation. Corresponding labels are set for the behavior joint representation and the evaluation joint representation. An adjacency matrix containing self-connections is formed by adding the adjacency matrix and the identity matrix. The adjacency matrix containing self-connections, the evaluation joint representation, and the behavior joint representation are input into the binary classifier. The graph convolutional network processes the adjacency matrix containing self-connections and the behavior joint representation to obtain a first output vector corresponding to the behavior joint representation. The graph convolutional network processes the adjacency matrix containing self-connections and the evaluation joint representation to obtain a second output vector corresponding to the evaluation joint representation.
[0026] The result acquisition module is used to calculate the weight of the social network data result variable based on the updated first output vector after the offline strategy evaluation model training is completed, and to obtain the evaluation strategy value by adding the weight of the social network data result variable with the corresponding social network data result variable. The weight of the social network data result variable is added to obtain the normalized weight, and the evaluation strategy value is divided by the normalized weight to obtain the self-normalized evaluation strategy value, which is used to determine whether to adopt the new content recommendation strategy.
[0027] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements an offline strategy evaluation method applicable to a social network as described in any of the solutions in the first aspect above.
[0028] In a fourth aspect, the present invention provides a computer electronic device, characterized in that it includes a memory and a processor;
[0029] The memory is used to store computer programs;
[0030] The processor is configured to implement, when executing the computer program, an offline policy evaluation method applicable to a social network as described in any one of the solutions of the first aspect above.
[0031] In a fifth aspect, the present invention provides a computer program product, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, it can implement an offline strategy evaluation method applicable to a social network as described in any of the solutions in the first aspect above.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] Compared with the traditional offline strategy evaluation method, the present invention considers the influence of neighbors on each social network data through network confounding inverse probability weighting, thereby improving the accuracy of new recommendation strategy evaluation in the presence of network confounding effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 Schematic diagram of the steps of the method of the present invention;
[0035] Figure 2 Schematic diagram of the process of training the offline strategy evaluation model of the present invention;
[0036] Figure 3 This is a schematic diagram of an embodiment of the present invention when a network confounding effect exists on a social network;
[0037] Figure 4 This is a system block diagram of the present invention. DETAILED DESCRIPTION
[0038] In order to make the above-mentioned objects, features and advantages of the present invention more clearly understood, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. The technical features in the various embodiments of the present invention can be combined accordingly without conflicting with each other.
[0039] In the description of the present invention, it should be understood that the terms "first" and "second" are used solely for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly specifying the number of technical features being described. Therefore, features defined as "first" or "second" may explicitly or implicitly include at least one of such features.
[0040] The purpose of this invention is to solve the problem of evaluating new recommendation strategies from social network data in the presence of network confounding effects. Specifically, when the processing variable of a social network data affects the outcome variable of its neighbors, how to use the social network data set to more accurately estimate the effectiveness of the new recommendation strategy. This embodiment gives an example of a small social network with network confounding effects, such as Figure 3 shown. Figure 3 In , x, a, and y represent the covariate, treatment variable, and outcome variable of social network data, respectively. Figure 3 Left side of the dotted line (such as Figure 3 The left half) is a causal diagram under the common individual treatment stability assumption. Figure 3 Right side of the dotted line (such as Figure 3 The right half is the network connection topology and causal diagram under the setting. For the sake of simplicity, the result variable y1 of user 1 and the result variable y3 of user 3 are not shown. Figure 3 As shown in the left part, previous studies mainly followed the stability of individual treatment assumption (SUTVA), that is, the potential outcome variable of each social network data will not be affected by the treatment variables of other social network data. However, in real-world situations, such as Figure 3 As shown in the right half of , there is usually a social network in which people with social connections influence each other, thus violating the assumption of individual treatment stability. Specifically, the outcome variable of each social network data is affected not only by their own treatment variables and covariates, but also by the treatment variables of other social network data in their social connections.
[0041] like Figure 1 As shown, in a preferred implementation of the present invention, to address the problem of evaluating new strategies from marketing data in the presence of network clutter, the present invention provides a novel offline strategy evaluation method applicable to social networks. This offline strategy evaluation method applicable to social networks includes the following steps S1 to S3. The specific implementation process is described in detail below.
[0042] S1. Based on keywords, social network data is divided into covariates, behavioral processing variables, adjacency matrices, and outcome variables according to user characteristics, content recommended to users by the old content recommendation strategy, friendship information between users, and user preferences. The divided social network data is used to construct a social network dataset, and the content recommended to users by the new content recommendation strategy is used as the evaluation processing variable.
[0043] It should be noted that, in this embodiment, a certain social scenario is that a social network recommends content to a user. The above covariates are the user's characteristic information, such as gender, age, etc., recorded as an N×p-dimensional matrix x, where N is the number of users (i.e., the number of social network data) and p is the dimension of the user's characteristic information. The behavior processing variable is the content recommended to the user by the old strategy, recorded as an N-dimensional vector a0. The adjacency matrix is the friend relationship information between users, recorded as an N×N-dimensional matrix A. If user i and user j are friends, then A ij =A ji =1, otherwise A ij =A ji =0, where A ij 、A ji The result variable is the user's preference, denoted by the N-dimensional vector r. The evaluation variable is the content recommended to the user by the new strategy, denoted by the N-dimensional vector a1.
[0044] S2. Training an offline policy evaluation model on a social network dataset and an evaluation processing variable, wherein the offline policy evaluation model comprises an embedding function and a binary classifier, wherein the binary classifier comprises a graph convolutional network;
[0045] In the offline strategy evaluation model, a learnable embedding function is first used to map the behavior processing variable and the evaluation processing variable to the semantic space respectively. The behavior processing variable obtains a behavior processing embedding with a dimension consistent with the covariate, and the evaluation processing variable obtains an evaluation processing embedding with a dimension consistent with the covariate. The covariate and behavior processing embedding of each marketing data are connected to form a behavior joint representation. The covariate and evaluation processing embedding of each marketing data are connected to form an evaluation joint representation. Corresponding labels are set for the behavior joint representation and the evaluation joint representation. The adjacency matrix containing self-connection is added to the unit matrix to form an adjacency matrix containing self-connection, the evaluation joint representation and the behavior joint representation are input into the binary classifier, the graph convolution network processes the adjacency matrix containing self-connection and the behavior joint representation to obtain a first output vector corresponding to the behavior joint representation, and the graph convolution network processes the adjacency matrix containing self-connection and the evaluation joint representation to obtain a second output vector corresponding to the evaluation joint representation.
[0046] It should be noted that in the training of the offline policy evaluation model, as shown in Figure 2 , first, a dimension-consistent embedding representation of the behavior processing variable and the evaluation processing variable is learned for each value of the behavior processing variable and the evaluation processing variable, respectively. Specifically, an embedding function e φ is used to project the two processing variables into a semantic space. φ The discrete processing variables are converted into p-dimensional vectors, which have the same dimension as the covariates, and are referred to as processing embeddings. Therefore, the behavior processing variable corresponds to a dimension-consistent behavior processing embedding e φ (a0), and the evaluation processing variable corresponds to a dimension-consistent evaluation processing embedding e φ (a1). Wherein, φ is a learnable parameter of the embedding function e φ .
[0047] Then, the covariates of each social network data and the two processing embeddings obtained in S21 are connected respectively, which are referred to as joint representations. Specifically, the covariates of each social network data and the behavior processing embedding are connected to form a behavior joint representation h0=[x,e φ (a0)], and the covariates of each social network data and the evaluation processing embedding are connected to form an evaluation joint representation h1=[x,e φ (a1)].
[0048] Next, a probability is learned by a graph convolution network of a binary classifier to distinguish between the two joint representations, that is, to determine whether the joint representation of each social network data belongs to the behavior joint representation or the evaluation joint representation. Specifically, the classifier uses a graph convolution network (GCN) to aggregate the information of adjacent social network data. In addition, considering that the graph convolution network pays attention to both the behavior of the neighbors of the social network data and the behavior of the sample itself, the present application forms an adjacency matrix containing self-connection by adding an identity matrix I n to the adjacency matrix A, that is: After obtaining the adjacency matrix containing self-connection, the graph convolution network processes the adjacency matrix containing self-connection and the behavior joint representation to obtain a first output vector corresponding to the behavior joint representation , which represents the output vector corresponding to the behavior joint representation, that is, the true label is the behavior joint representation and the result learned by the graph convolution network is also a label close to the behavior joint representation; and the graph convolution network processes the adjacency matrix containing self-connection and the evaluation joint representation to obtain a second output vector corresponding to the evaluation joint representation This vector represents the output vector corresponding to the evaluation joint representation, that is, the true label is the evaluation joint representation and the result of the graph convolutional network learning is also a label close to the evaluation joint representation. Therefore, the output vector f∈[0,1] can represent the probability that the graph convolutional network believes that the social network data belongs to the evaluation joint representation. Conversely, the probability that the joint representation belongs to the behavior joint representation is 1-f. Where θ is the graph convolutional network g θ A learnable parameter of .
[0049] It should be noted that, in this embodiment, in order to optimize the offline policy evaluation model, before the end of each iteration of the training process, the embedding function e in the offline policy evaluation model is jointly optimized by minimizing the binary cross-entropy loss between the first output vector f0, the second output vector f1 and the true label of the social network data. φ and graph convolutional network g θ In addition, in order to facilitate the subsequent classification task, the present invention sets the label of the behavior joint representation h0 to 0 and the label of the evaluation joint representation h1 to 1. When the label of the behavior joint representation is set to 0 and the label of the evaluation joint representation is set to 1, the binary cross entropy loss The mathematical expression can be simplified to:
[0050]
[0051] Among them, f 0i represents the i-th value in the first output vector f0; f 1i Represents the i-th value in the second output vector f1.
[0052] S3. After the offline strategy evaluation model is trained, the weight of the social network data outcome variable is calculated using the updated first output vector. The weight of the social network data outcome variable is weighted and summed with the corresponding social network data outcome variable to obtain the evaluation strategy value. The weights of the social network data outcome variables are added together to obtain the normalized weight. The evaluation strategy value is divided by the normalized weight to obtain the self-normalized evaluation strategy value, which is used to determine whether to adopt the new content recommendation strategy.
[0053] It should be noted that in this invention, each outcome variable in the social network dataset is weighted based on the results of the binary classifier. The final self-normalized evaluation strategy value (the evaluation result of the new content recommendation strategy) is the average value of the weighted outcome variables. This evaluation result can be used to decide whether to adopt the new content recommendation strategy.
[0054] Specifically, training stops when the offline policy evaluation model converges. Based on the probability given by the binary classifier, a weight is assigned to the outcome variable r in the social network dataset. The outcome variable r of the i-th social network data i The weight w i for:
[0055]
[0056] While maintaining consistency, the present invention reduces variance by self-normalizing weights. Finally, the new content recommendation strategy can be evaluated in the presence of network confounding effects, and the self-normalized evaluation strategy value can be obtained. And decide whether to adopt a new content recommendation strategy based on the evaluation results:
[0057]
[0058] Among them, r i represents the outcome variable of the i-th social network data.
[0059] It should be noted that in step S3 of the present invention, the specific process of judging whether to adopt the new content recommendation strategy based on the self-normalized evaluation strategy value is: averaging all the result variables in the social network data set to obtain the value of the old content recommendation strategy, comparing the value of the old content recommendation strategy with the self-normalized evaluation strategy value; if the value of the old content recommendation strategy is less than the self-normalized evaluation strategy value, retaining the old content recommendation strategy; if the value of the old content recommendation strategy is greater than or equal to the self-normalized evaluation strategy value, replacing the old content recommendation strategy with the new content recommendation strategy.
[0060] The present invention will now use a specific example to demonstrate the application effect of the offline strategy evaluation method applicable to social networks described in S1 to S3 of the above embodiments on a specific data set, so as to facilitate understanding of the essence of the present invention.
[0061] Example
[0062] The specific implementation process of the offline strategy evaluation method applicable to social networks adopted in this embodiment is as described above and will not be repeated here.
[0063] This embodiment obtains two social network datasets on a public social platform, namely a blog social (BlogCatalog) dataset and a picture social (Flickr) dataset. The following introduces the above two social network datasets respectively.
[0064] The BlogCatalog dataset is a dataset used for network analysis and social media research. It contains data about bloggers and their connections, organized to represent the social networks between them. The BlogCatalog dataset used in this example contains 5,196 social network data points and 171,743 edges connecting them. The covariate for each social network data point is a 2,246-dimensional vector.
[0065] The Flickr dataset is from a web-based platform for storing, organizing, and sharing digital photos. This dataset is a collection of data extracted from social networks, focusing on connections and interactions between users. The Flickr dataset used in this example includes social network data representing some users and edges representing the friendships between them. It contains 7,575 social network data points and 239,738 edges connecting them. The covariate for each social network data point is a 1,205-dimensional vector.
[0066] Because the feature dimensions of the samples in these two data sets are too high, this embodiment uses the principal component analysis method to reduce the feature dimensions to 10 dimensions before conducting the experiment.
[0067] To objectively evaluate the performance of this algorithm, this example randomly generates 20 different result functions for the BlogCatalog and Flickr datasets, and trains the offline policy evaluation model under five selection bias intensities. Selection bias controls an exploration-exploitation trade-off in the old recommendation strategy. A larger selection bias value means that the social network data has a greater probability of selecting the covariate that is best for its own results. Finally, the mean and standard deviation (mean±std) of the mean square error (MSE) of the 20 evaluation results of the offline policy evaluation model on the BlogCatalog and Flickr experiments are calculated. The formula for calculating the mean square error is as follows:
[0068]
[0069] Among them, V(π) is the true result of the new recommendation strategy, Evaluation results for new recommended strategies; Indicates expectation,
[0070] The experimental results are shown in Table 1 and Table 2. The results show that the method of the present invention significantly improves the accuracy of estimating the new recommendation strategy. "IntIPW" in Table 1 and Table 2 represents the method of the present invention.
[0071] Table 1. MSE error (mean ± std) of evaluation results on the BlogCatalog dataset
[0072]
[0073] Table 2. MSE error (mean ± std) of the evaluation results on Flickr dataset
[0074]
[0075]
[0076] Among them, DM is a direct estimation method, which is derived from the prior art literature: Alina Beygelzimer and John Langford.2009.The offset tree for learning with partiallabels.In Proceedings of the 15th ACM SIGKDD,129–138; IPW is an inverse probability weighting method, which is derived from the prior art literature: Alexander L. Strehl, John Langford, Lihong Li, and Sham M. Kakade.2010.Learning from Logged Implicit Exploration Data.In Neural Information Processing Systems; BIPW is a balanced inverse probability weighting method, which is derived from the prior art literature: Arjun Sondhi, David Arbour, and Drew Dimmery.2020.Balanced Off-Policy Evaluation in General Action Spaces.In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistic; SGIPW is a sub-Gaussian inverse probability weighting method, derived from the prior art literature: Alberto Maria Metelli. 2021. Subgaussian and Differentiable Importance Sampling for Off-Policy Evaluation and Learning. In Neural Information Processing Systems; DR is a doubly robust method, derived from the prior art literature: Yi Su, Lequn Wang, Michele Santacatterina, and Thorsten Joachims. 2019.CAB: Continuous Adaptive Blending for Policy Evaluation and Learning. In Proceedings of the 36th International Conference on Machine Learning. PMLR, 6005-6014. SGDR is a Sub-Gaussian Doubly Robust method, derived from the state-of-the-art literature: Alberto Maria Metelli. 2021. Subgaussian and Differentiable Importance Sampling for Off-Policy Evaluation and Learning. In Neural Information Processing Systems.
[0077] It should be further noted that the offline policy evaluation method for social networks in the above embodiments can be essentially executed by computer programs or modules. Therefore, based on the same inventive concept, another preferred embodiment of the present application also provides an offline policy evaluation system for social networks corresponding to the offline policy evaluation method for social networks provided by the above embodiments, as shown in Figure 4 which comprises:
[0078] The data processing module divides the social network data into covariates, behavior processing variables, adjacency matrices and result variables according to the keywords, respectively according to the user's feature information, the content recommended to the user by the old content recommendation policy, the friend relationship information between users and the user preference, and uses the divided social network data to construct a social network data set, and uses the content recommended to the user by the new content recommendation policy as the evaluation processing variable;
[0079] The model optimization module is used to train the offline policy evaluation model on the social network data set and the evaluation processing variable, and the offline policy evaluation model contains an embedding function and a binary classifier, and the binary classifier contains a graph convolution network.
[0080] In the offline strategy evaluation model, first, the behavior processing variables and the evaluation processing variables are respectively mapped to a semantic space using a learnable embedding function, the behavior processing variables correspond to obtain a behavior processing embedding with a dimension consistent with the covariate, the evaluation processing variables correspond to obtain an evaluation processing embedding with a dimension consistent with the covariate, the covariate of each marketing data and the behavior processing embedding are connected to form a behavior joint representation, the covariate of each marketing data and the evaluation processing embedding are connected to form an evaluation joint representation, and the behavior joint representation and the evaluation joint representation are set with corresponding labels, a self-connection containing adjacency matrix is formed by adding the adjacency matrix and the unit matrix, the self-connection containing adjacency matrix, the evaluation joint representation and the behavior joint representation are input into the binary classifier, the self-connection containing adjacency matrix and the behavior joint representation are processed by the graph convolution network to obtain a first output vector corresponding to the behavior joint representation, the self-connection containing adjacency matrix and the evaluation joint representation are processed by the graph convolution network to obtain a second output vector corresponding to the evaluation joint representation;
[0081] The result obtaining module is configured to, when the offline strategy evaluation model is trained, calculate a weight of a social network data result variable according to the first output vector, weight-sum the weight of the social network data result variable and the corresponding social network data result variable to obtain an evaluation strategy value, add the weights of the social network data result variables to obtain a normalized weight, and divide the evaluation strategy value by the normalized weight to obtain a self-normalized evaluation strategy value, which is used to determine whether to adopt a new content recommendation strategy.
[0082] It can be understood that the offline strategy evaluation method for social networks described in S1-S3 can be realized by a computer program. Therefore, based on the same inventive concept, another preferred embodiment of the present application also provides a computer program product corresponding to the offline strategy evaluation method for social networks described in the above embodiment, which includes computer programs / instructions that can be executed by a processor to realize the offline strategy evaluation method for social networks described in the above embodiment.
[0083] Similarly, based on the same inventive concept, another preferred embodiment of the present application also provides a computer electronic device corresponding to the offline strategy evaluation method for social networks described in the above embodiment, which includes a memory and a processor;
[0084] The memory is configured to store a computer program;
[0085] The processor is configured to, when executing the computer program, realize the offline strategy evaluation method for social networks described in the above embodiment.
[0086] Furthermore, the logic instructions in the aforementioned memory can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention.
[0087] Therefore, based on the same inventive concept, another preferred embodiment of the present invention further provides a computer-readable storage medium corresponding to the offline policy evaluation method applicable to social networks provided in the above embodiment. The storage medium stores a computer program. When the computer program is executed by a processor, it can implement the offline policy evaluation method applicable to social networks in the above embodiment.
[0088] It is understood that the storage medium may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Furthermore, the storage medium may be any medium capable of storing program code, such as a USB flash drive, a mobile hard drive, a magnetic disk, or an optical disk.
[0089] It is understandable that the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0090] In addition, it should be noted that, for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the foregoing method embodiments, and will not be described here. In the embodiments provided in the present application, the division of steps or modules in the system and method described is only a logical functional division, and there can be another division manner in actual implementation, for example, multiple modules or steps can be combined or integrated together, or a module or step can be split.
[0091] The above-described embodiments are only a preferred scheme of the present application, and are not intended to limit the present application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, any technical scheme obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present application.
Claims
1. A method for evaluating offline strategies in social networks, characterized in that: The following steps are involved: S1. Based on keywords, the social network data is divided into covariates, behavioral processing variables, adjacency matrices, and outcome variables according to user characteristics, content recommended to users by the old content recommendation strategy, user friendship information, and user preferences. The divided social network data is used to construct a social network dataset, and the content recommended to users by the new content recommendation strategy is used as the evaluation processing variable. S2. Training an offline policy evaluation model on a social network dataset and an evaluation processing variable, wherein the offline policy evaluation model comprises an embedding function and a binary classifier, wherein the binary classifier comprises a graph convolutional network; In the offline strategy evaluation model, a learnable embedding function is first used to map the behavior processing variable and the evaluation processing variable to the semantic space respectively. The behavior processing variable obtains a behavior processing embedding with a dimension consistent with the covariate, and the evaluation processing variable obtains an evaluation processing embedding with a dimension consistent with the covariate. The covariate and behavior processing embedding of each marketing data are connected to form a behavior joint representation. The covariate and evaluation processing embedding of each marketing data are connected to form an evaluation joint representation. Corresponding labels are set for the behavior joint representation and the evaluation joint representation. An adjacency matrix containing self-connections is formed by adding the adjacency matrix and the identity matrix. The adjacency matrix containing self-connections, the evaluation joint representation, and the behavior joint representation are input into the binary classifier. The graph convolutional network processes the adjacency matrix containing self-connections and the behavior joint representation to obtain a first output vector corresponding to the behavior joint representation. The graph convolutional network processes the adjacency matrix containing self-connections and the evaluation joint representation to obtain a second output vector corresponding to the evaluation joint representation. S3. After the offline strategy evaluation model is trained, the weight of the social network data outcome variable is calculated using the updated first output vector. The weight of the social network data outcome variable is weighted and summed with the corresponding social network data outcome variable to obtain the evaluation strategy value. The weights of the social network data outcome variables are added together to obtain the normalized weight. The evaluation strategy value is divided by the normalized weight to obtain the self-normalized evaluation strategy value, which is used to determine whether to adopt the new content recommendation strategy.
2. The offline strategy evaluation method applicable to social networks according to claim 1, characterized in that: In step S2, the label of the behavior joint representation is set to 0, and the label of the evaluation joint representation is set to 1.
3. The offline strategy evaluation method applicable to social networks according to claim 1, characterized in that: In step S2, the offline policy evaluation model adopts binary cross entropy loss during training.
4. The offline strategy evaluation method applicable to social networks according to claim 1, characterized in that: In step S3, the result variable r of the i-th social network data is calculated based on the updated first output vector. i The weight w i for: Among them, f 0i represents the i-th value in the first output vector f0.
5. The offline strategy evaluation method applicable to social networks according to claim 4, characterized in that: In step S3, the self-normalized evaluation strategy value is calculated as follows: Among them, r i represents the outcome variable of the i-th social network data; N represents the number of social network data.
6. The offline strategy evaluation method applicable to social networks according to claim 1, characterized in that: In step S3, the specific process of judging whether to adopt the new content recommendation strategy based on the self-normalized evaluation strategy value is as follows: averaging all the result variables in the social network data set to obtain the value of the old content recommendation strategy, comparing the value of the old content recommendation strategy with the self-normalized evaluation strategy value; if the value of the old content recommendation strategy is less than the self-normalized evaluation strategy value, retaining the old content recommendation strategy; if the value of the old content recommendation strategy is greater than or equal to the self-normalized evaluation strategy value, replacing the old content recommendation strategy with the new content recommendation strategy.
7. An offline strategy evaluation system for social networks, characterized in that: include: The data processing module divides the social network data into covariates, behavioral processing variables, adjacency matrices, and outcome variables based on the keywords, user feature information, content recommended to users by the old content recommendation strategy, user friendship information, and user preferences. The divided social network data is used to construct a social network dataset, and the content recommended to users by the new content recommendation strategy is used as the evaluation processing variable. A model optimization module, configured to train an offline policy evaluation model on a social network dataset and evaluation processing variables, wherein the offline policy evaluation model comprises an embedding function and a binary classifier, wherein the binary classifier comprises a graph convolutional network; In the offline strategy evaluation model, a learnable embedding function is first used to map the behavior processing variable and the evaluation processing variable to the semantic space respectively. The behavior processing variable obtains a behavior processing embedding with a dimension consistent with the covariate, and the evaluation processing variable obtains an evaluation processing embedding with a dimension consistent with the covariate. The covariate and behavior processing embedding of each marketing data are connected to form a behavior joint representation. The covariate and evaluation processing embedding of each marketing data are connected to form an evaluation joint representation. Corresponding labels are set for the behavior joint representation and the evaluation joint representation. An adjacency matrix containing self-connections is formed by adding the adjacency matrix and the identity matrix. The adjacency matrix containing self-connections, the evaluation joint representation, and the behavior joint representation are input into the binary classifier. The graph convolutional network processes the adjacency matrix containing self-connections and the behavior joint representation to obtain a first output vector corresponding to the behavior joint representation. The graph convolutional network processes the adjacency matrix containing self-connections and the evaluation joint representation to obtain a second output vector corresponding to the evaluation joint representation. The result acquisition module is used to calculate the weight of the social network data result variable based on the updated first output vector after the offline strategy evaluation model training is completed, and to obtain the evaluation strategy value by adding the weight of the social network data result variable with the corresponding social network data result variable. The weight of the social network data result variable is added to obtain the normalized weight, and the evaluation strategy value is divided by the normalized weight to obtain the self-normalized evaluation strategy value, which is used to determine whether to adopt the new content recommendation strategy.
8. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the offline strategy evaluation method applicable to a social network according to any one of claims 1 to 6 is implemented.
9. A computer electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is configured to implement the offline strategy evaluation method applicable to a social network as claimed in any one of claims 1 to 6 when executing the computer program.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, it can implement the offline strategy evaluation method applicable to social networks as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Cantonese rumor detection method based on graph convolutional network and external knowledge embedding
CN116776889A
User-topic interestingness evaluation method based on hypergraph convolution in social network
CN118210984A