Method and related device for constructing customer portraits based on social relationships

Through social relationship maps and customer portraits of related customers, combined with graph convolution networks and shopping data, a more comprehensive customer portrait is built, solving the accuracy and comprehensiveness problems caused by insufficient data in traditional methods, and achieving more accurate market strategies and services.

CN119477433BActive Publication Date: 2025-07-22SHENZHEN BAILIU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510029952.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-07-22
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The traditional customer portrait construction method relies on the direct shopping data of customers, resulting in the portrait of new customers or customers with low purchase frequency inaccurate and comprehensive enough, affecting the formulation of market strategies and service quality.

Method used

By obtaining the social relationship map of the target customer and the customer portrait of the associated customer, using the graph convolution network to extract trusted relationship paths and confidence, building customer portraits with shopping data, integrating the path weights of multiple paths and the preferences of related customers, and forming a more comprehensive customer portrait.

Benefits of technology

Even with limited direct shopping data, more accurate and comprehensive customer portraits can be built, improving the accuracy and comprehensiveness of customer portraits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477433B_ABST
    Figure CN119477433B_ABST
Patent Text Reader

Abstract

The present invention provides a method for constructing a customer portrait based on social relationships. The method includes: obtaining shopping data corresponding to a target customer; if the amount of shopping data is less than a preset data amount threshold, obtaining a social relationship graph of the target customer, where the social relationship graph includes a main node corresponding to the target customer and slave nodes corresponding to associated customers, and the main node and the slave nodes are connected by at least one first connection edge, and each first connection edge has a corresponding first relationship value. The associated customers are customer personnel having social relationships with the target customer, and the slave nodes have customer portraits of the corresponding associated customers, and the customer portraits are constructed based on the historical shopping data of the corresponding associated customers; constructing a customer portrait of the target customer based on the social relationship graph, the customer portraits of the associated customers, and the shopping data. The present invention can construct a more accurate and comprehensive customer portrait, improving the accuracy and comprehensiveness of the customer portrait.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular, to a method for constructing a customer portrait based on social relationships and related devices. Background Art

[0002] In order to provide more accurate and personalized services, merchants need to deeply understand and analyze customers. Customer portraits are crucial tools in this process, which can help merchants comprehensively understand customers' consumption habits, preferences, and needs, so as to formulate more refined marketing strategies.

[0003] Traditional methods for constructing customer portraits mainly rely on customers' direct shopping data. However, in practical applications, for many customers, especially new customers or customers with low purchase frequencies, their shopping data may not be sufficient, which results in inaccurate and incomplete customer portraits constructed based on these data. In this case, it is difficult for merchants to effectively grasp customers' real needs and preferences, thus affecting the formulation of marketing strategies and the improvement of service quality. Summary of the Invention

[0004] Embodiments of the present invention provide a method for constructing a customer portrait based on social relationships, which can construct a customer portrait for a customer based on social relationships, improving the accuracy and comprehensiveness of the customer portrait. By combining a social relationship graph and the customer portraits of associated customers, the consumption habits, preferences, and needs of a target customer can be understood from a broader perspective. Even when the direct shopping data is limited, a more accurate and comprehensive customer portrait can be constructed, improving the accuracy and comprehensiveness of the customer portrait.

[0005] In a first aspect, embodiments of the present invention provide a method for constructing a customer portrait based on social relationships, the method comprising the following steps:

[0006] Obtain shopping data corresponding to a target customer;

[0007] If the amount of the shopping data is less than a preset data amount threshold, obtain a social relationship graph of the target customer, where the social relationship graph includes a main node corresponding to the target customer and slave nodes corresponding to associated customers, the main node and the slave nodes are connected by at least one first connection edge, each first connection edge has a corresponding first relationship value, the associated customers are customer personnel having social relationships with the target customer, the slave nodes have customer portraits corresponding to the associated customers, and the customer portraits are constructed according to historical shopping data corresponding to the associated customers;

[0008] Construct a customer portrait of the target customer based on the social relationship graph, the customer portraits of the associated customers, and the shopping data.

[0009] Optionally, constructing the customer portrait of the target customer based on the social relationship graph, the customer portraits of the associated customers, and the shopping data includes:

[0010] Extracting multiple credible relationship paths and the confidence level corresponding to each credible relationship path from the social relationship graph through a pre-trained graph convolutional network, where the confidence level corresponding to each credible relationship path is greater than a preset confidence threshold. Each credible relationship path includes the main node and credible subordinate nodes, and the main node and the credible subordinate nodes are connected by a second connection edge, and each second connection edge has a corresponding second relationship value;

[0011] Constructing the customer portrait of the target customer based on the multiple credible relationship paths, the customer portraits of the associated customers, and the shopping data.

[0012] Optionally, constructing the customer portrait of the target customer based on the multiple credible relationship paths, the customer portraits of the associated customers, and the shopping data includes:

[0013] For each credible relationship path, calculating the path weight of the credible relationship path based on the confidence level and the second relationship value, and each credible relationship path corresponds to a path weight;

[0014] Based on the path weight, performing a fusion process on the customer portraits of the associated customers on the credible relationship path to obtain a path portrait corresponding to the credible relationship path, and each credible relationship path corresponds to a path portrait;

[0015] Based on the path portraits corresponding to the multiple credible relationship paths, performing a weighted fusion process on the shopping data to obtain the customer portrait of the target customer.

[0016] Optionally, for each credible relationship path, calculating the path weight of the credible relationship path based on the confidence level and the second relationship value includes:

[0017] The calculation of the path weight is as follows:

[0018]

[0019] Where represents the path weight of the j th credible relationship path, represents the confidence level of the j th credible relationship path, represents the number of levels of the j th credible relationship path, represents thej The level coefficient of the i level in the th trusted relationship path, j indicating the second relationship value of the i level in the

[0020] Optionally, based on the path weights, fusing the customer portraits of the associated customers on the trusted relationship paths to obtain the path portrait corresponding to the trusted relationship path, including:

[0021] For each trusted relationship path, obtaining the customer portraits of the associated customers corresponding to the trusted slave nodes in each level;

[0022] The fusion process is as follows:

[0023]

[0024] where, represents the path portrait corresponding to the j th trusted relationship path, represents the customer portrait of the associated customer corresponding to the trusted slave node of the j th level in the i th trusted relationship path.

[0025] Optionally, based on the path portraits corresponding to multiple trusted relationship paths, performing weighted fusion processing on the shopping data to obtain the customer portrait of the target customer, including:

[0026] Performing weighted average calculation on the path portraits corresponding to multiple trusted relationship paths and the customer portrait of the target customer to obtain the customer portrait of the target customer, where the weight of the path portrait is the second relationship value between the master node and the trusted slave node in the corresponding trusted relationship path, and the weight of the customer portrait of the target customer is 1.

[0027] Optionally, before extracting multiple trusted relationship paths and the confidence level corresponding to each trusted relationship path from the social relationship graph through the pre-trained graph convolutional network, the method further includes:

[0028] Obtaining the graph convolutional network to be trained and the training data set, where the training data set includes the sample social relationship graph and the trusted relationship paths corresponding to the sample social relationship graph;

[0029] Training the graph convolutional network to be trained based on the training data set, and obtaining the trained graph convolutional network after training is completed.

[0030] Second aspect, an embodiment of the present invention further provides a device for constructing a customer portrait based on social relationships, and the device for constructing a customer portrait based on social relationships includes:

[0031] A first acquisition module, configured to acquire the remaining device capacity and the remaining inference coefficient of each of a plurality of algorithm containers within the target time period, where the remaining device capacity is determined according to the connected device identifier, and the connected device identifier is the device identifier of the data acquisition device connected to the algorithm container;

[0032] A second acquisition module, configured to acquire the total device capacity and the total task inference coefficient of the to-be-scheduled task for each of the algorithm containers when creating a to-be-scheduled task within the target time period, where the to-be-scheduled task includes at least one device identifier and a task inference coefficient corresponding to the device identifier one by one, the total device capacity is determined according to the device identifier, and the total task inference coefficient is determined according to the task inference coefficient;

[0033] A first processing module, configured to perform matching among a plurality of the algorithm containers based on the total device capacity and the total task inference coefficient. If the matching is successful, the to-be-scheduled task is successfully created, and a target algorithm container corresponding to the to-be-scheduled task is determined in the algorithm container, where the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the to-be-scheduled task, and the remaining inference coefficient of the target algorithm container is greater than or equal to the total task inference coefficient of the to-be-scheduled task;

[0034] A second processing module, configured to connect the corresponding data acquisition device to the target algorithm container within the target time based on the device identifier of the to-be-scheduled task.

[0035] Third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the steps in the method for constructing a customer portrait based on social relationships provided by the embodiment of the present invention are implemented.

[0036] Fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the method for constructing a customer portrait based on social relationships provided by the embodiment of the invention are implemented.

[0037] In an embodiment of the present invention, shopping data corresponding to a target customer is obtained; if the amount of the shopping data is less than a preset data amount threshold, a social relationship graph of the target customer is obtained. The social relationship graph includes a main node corresponding to the target customer and slave nodes corresponding to associated customers. The main node and the slave nodes are connected by at least one first connection edge, and each first connection edge has a corresponding first relationship value. The associated customers are customer personnel having a social relationship with the target customer, and the slave nodes have customer portraits corresponding to the associated customers. The customer portraits are constructed based on the historical shopping data of the corresponding associated customers; based on the social relationship graph, the customer portraits of the associated customers, and the shopping data, a customer portrait of the target customer is constructed. By combining the social relationship graph and the customer portraits of the associated customers, the present invention can understand the consumption habits, preferences, and needs of the target customer from a broader perspective. Even when the direct shopping data is limited, a more accurate and comprehensive customer portrait can be constructed, improving the accuracy and comprehensiveness of the customer portrait. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0039] Figure 1 is a flowchart of a method for constructing a customer portrait based on social relationships provided by an embodiment of the present invention;

[0040] Figure 2 is a schematic structural diagram of a device for constructing a customer portrait based on social relationships provided by an embodiment of the present invention;

[0041] Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0043] As Figure 1 shown, Figure 1The figure is a flowchart of a method for constructing a customer portrait based on social relationships provided by an embodiment of the present invention. The method for constructing a customer portrait based on social relationships includes the steps:

[0044] 101. Obtain the shopping data corresponding to the target customer.

[0045] In the embodiment of the present invention, the above-mentioned target customer may be a new customer or a customer without a customer portrait record. The above-mentioned shopping data may be the shopping records of the target customer at a designated merchant or the shopping records at different merchants. According to the shopping data, the initial preference degree or initial preference score of the target customer for each commodity can be initially formed.

[0046] The shopping data may include the purchased products, purchase time, purchase frequency, etc.

[0047] 102. If the data volume of the shopping data is less than a preset data volume threshold, obtain the social relationship graph of the target customer.

[0048] In the embodiment of the present invention, the social relationship graph includes a main node corresponding to the target customer and slave nodes corresponding to associated customers. The main node and the slave nodes are connected by at least one first connection edge, and each first connection edge has a corresponding first relationship value. The associated customers are customer personnel having a social relationship with the target customer, and the slave nodes have customer portraits corresponding to the associated customers. The customer portraits are constructed according to the historical shopping data corresponding to the associated customers.

[0049] It should be noted that if the data volume of the shopping data is less than the preset data volume threshold, it indicates that the customer portrait constructed through the shopping data is not accurate and comprehensive enough. Therefore, in the embodiment of the present invention, it is necessary to obtain the social relationship graph and mine the commonalities between the target customer and the associated customers through the social relationship graph, so as to improve the accuracy and comprehensiveness of the customer portrait.

[0050] The above-mentioned social relationship graph can be obtained on an open-source social software, and obtaining the above-mentioned social relationship graph requires the consent of the target customer and the associated customers.

[0051] The higher the first relationship value in the above-mentioned social relationship graph, the closer the relationship between the two customers.

[0052] The above-mentioned customer portrait may be the preference degree or preference score of the customer for each commodity.

[0053] 103. Based on the social relationship graph, the customer portraits of the associated customers, and the shopping data, construct the customer portrait of the target customer.

[0054] In an embodiment of the present invention, in a social relationship graph, reliable subordinate nodes can be extracted. A reliable subordinate node is one for which the total sum of the first relationship values with the master node is greater than or equal to a relationship value threshold, that is, the relationship between the associated customer and the target customer is close enough.

[0055] After determining the reliable subordinate nodes, the customer portraits of the associated customers corresponding to the reliable subordinate nodes are averaged to obtain the average preference degree or average preference score of all associated customers for each commodity.

[0056] Based on the shopping data, the initial preference degree or initial preference score of the target customer for each commodity is initially formed. By adding the initial preference degree or initial preference score of the target customer for each commodity to the average preference degree or average preference score of all associated customers for each commodity, the customer portrait of the target customer can be obtained, that is, the preference degree or preference score of the target customer for each commodity.

[0057] In an embodiment of the present invention, shopping data corresponding to a target customer is obtained; if the amount of data of the shopping data is less than a preset data amount threshold, the social relationship graph of the target customer is obtained. The social relationship graph includes a master node corresponding to the target customer and subordinate nodes corresponding to associated customers. The master node and the subordinate nodes are connected by at least one first connection edge, and each first connection edge has a corresponding first relationship value. The associated customer is a customer who has a social relationship with the target customer, and the subordinate node has a customer portrait corresponding to the associated customer. The customer portrait is constructed based on the historical shopping data corresponding to the associated customer; based on the social relationship graph, the customer portrait of the associated customer, and the shopping data, the customer portrait of the target customer is constructed. By combining the social relationship graph and the customer portrait of the associated customer, the present invention can understand the consumption habits, preferences, and needs of the target customer from a broader perspective. Even when the direct shopping data is limited, a more accurate and comprehensive customer portrait can be constructed, improving the accuracy and comprehensiveness of the customer portrait.

[0058] It can be understood that in the specific implementation of the present application, relevant data such as shopping data, customer data, social relationship data, and algorithm model data are involved. When the embodiments in the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data, as well as the training, deployment, and invocation of algorithm models, all need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0059] Optionally, constructing the customer profile of the target customer based on the social relationship graph, the customer profiles of the associated customers, and the shopping data includes: extracting multiple credible relationship paths and the confidence level corresponding to each credible relationship path from the social relationship graph through a pre-trained graph convolutional network, where the confidence level corresponding to the credible relationship path is greater than a preset confidence threshold. Each credible relationship path includes the main node and credible subordinate nodes, and the main node and the credible subordinate nodes are connected by a second connection edge. Each second connection edge has a corresponding second relationship value; constructing the customer profile of the target customer based on the multiple credible relationship paths, the customer profiles of the associated customers, and the shopping data.

[0060] In an embodiment of the present invention, the above-mentioned pre-trained graph convolutional network is used to extract multiple credible relationship paths from the social relationship graph. The output of the pre-trained graph convolutional network is the credible relationship paths and the confidence levels of the credible relationship paths. The above-mentioned confidence level indicates the credibility of the output relationship path being a credible relationship path. The higher the confidence level, the higher the credibility of the output relationship path being a credible relationship path. The above-mentioned confidence threshold can be set according to experience. The above-mentioned confidence level is a value in the range of 0 to 1, and the above-mentioned confidence threshold can be set to be above 0.95.

[0061] In the credible relationship path and the social relationship graph, for the same pair of nodes, the second relationship value corresponding to the second connection edge is the same as the corresponding first relationship value, except for whether the connected subordinate node is a credible subordinate node.

[0062] By extracting multiple credible relationship paths from the social relationship graph, some non-credible subordinate nodes in the social relationship graph can be eliminated, thereby retaining the credible subordinate nodes. The above-mentioned credible relationship paths can indicate that different paths have different influences on the target customer. At the same time, there are no identical credible subordinate nodes between any two credible relationship paths, which can avoid complex calculations and repeated calculations caused by path intersections.

[0063] Optionally, constructing the customer profile of the target customer based on the multiple credible relationship paths, the customer profiles of the associated customers, and the shopping data includes: for each credible relationship path, calculating the path weight of the credible relationship path based on the confidence level and the second relationship value. Each credible relationship path corresponds to a path weight; based on the path weight, performing a fusion process on the customer profiles of the associated customers on the credible relationship path to obtain the path profile corresponding to the credible relationship path. Each credible relationship path corresponds to a path profile; based on the path profiles corresponding to the multiple credible relationship paths, performing a weighted fusion process on the shopping data to obtain the customer profile of the target customer.

[0064] In the embodiments of the present invention, for each credible relationship path extracted from the social relationship graph, the weight of this credible relationship path can be calculated based on the confidence of this credible relationship path and the second relationship value of the second connection edge that constitutes this credible relationship path. Specifically, the average value of all the second relationship values in this credible relationship path can be calculated, and the product of the average value of all the second relationship values in this credible relationship path and the confidence is used as the weight of this credible relationship path.

[0065] For each credible relationship path, the customer portraits of the associated customers corresponding to the credible slave nodes can be averaged to obtain the average preference degree or average preference score of all the associated customers on each commodity on this credible relationship path, that is, the path portrait corresponding to this credible relationship path. The path portrait is used to describe the group preference degree or group preference score of all the associated customers on the credible relationship path. At the same time, the target customer also belongs to the group corresponding to this credible relationship path, so there will be some common characteristics.

[0066] Based on the path portraits corresponding to multiple credible relationship paths, the weighted average path portrait of multiple credible relationship paths can be calculated according to the path weights corresponding to each credible relationship path. According to the shopping data, the initial preference degree or initial preference score of the target customer for each commodity is initially formed. On the average path portrait of multiple credible relationship paths, the initial preference degree or initial preference score of the target customer for each commodity is correspondingly added, and the customer portrait of the target customer can be obtained, that is, the preference degree or preference score of the target customer for each commodity.

[0067] The above path weight reflects the importance of this path in constructing the customer portrait of the target customer. The path with a high confidence and a high second relationship value will obtain a higher weight.

[0068] Optionally, for each of the credible relationship paths, calculating the path weight of the credible relationship path based on the confidence and the second relationship value includes:

[0069] The calculation of the path weight is as follows:

[0070]

[0071] Where represents the path weight of the j th credible relationship path, represents the confidence of the j th credible relationship path, represents the number of levels of the j th credible relationship path, represents the jThe level coefficient of the i level in the th reliable relationship path, j which represents the second relationship value of the i th level in the

[0072] th reliable relationship path. The above formula reflects the influence of the second relationship value and the level on the path weight in the reliable relationship path, as well as the influence of different confidence levels on the path weight. It can be seen that a path with a high confidence level and a high second relationship value will obtain a higher weight.

[0073] In an embodiment of the present invention, for each reliable relationship path, it includes a main node and a reliable slave node. The reliable slave node has a level, and the level of the reliable slave node is the same as the data of the second connection edge required to connect to the main node. That is, if the reliable slave node needs one second connection edge to connect to the main node, the level of the reliable slave node is 1; if the reliable slave node needs two second connection edges to connect to the main node, the level of the reliable slave node is 2.

[0074] Optionally, based on the path weight, fusing the customer portraits of the associated customers on the reliable relationship path to obtain the path portrait corresponding to the reliable relationship path includes:

[0075] For each reliable relationship path, obtaining the customer portraits of the associated customers corresponding to the reliable slave nodes in each level;

[0076]

[0077] Wherein, represents the path portrait corresponding to the j th reliable relationship path, represents the customer portrait of the associated customer corresponding to the reliable slave node of the j th level in the i th reliable relationship path. represents the cumulative product. For example, when i = 3, it is .

[0078] In an embodiment of the present invention, the above formula reflects the influence of the path portrait by the second relationship value, the path weight, the level, and the customer portrait, as well as the influence of different confidence levels on the path weight. It can be seen that the path portrait of a reliable relationship path with a high confidence level, a high second relationship value, and a short path will be less affected.

[0079] Optionally, the weighted fusion process of the shopping data based on the path portraits corresponding to the multiple trusted relationship paths to obtain the customer portrait of the target customer includes: performing a weighted average calculation on the path portraits corresponding to the multiple trusted relationship paths and the customer portrait of the target customer to obtain the customer portrait of the target customer. The weight of the path portrait is the second relationship value between the main node and the trusted subordinate node in the corresponding trusted relationship path, and the weight of the customer portrait of the target customer is 1.

[0080] In the embodiment of the present invention, the weight of the path portrait can be the second relationship value between the main node (target customer) and the trusted subordinate node (associated customer) in the corresponding trusted relationship path. The larger this second relationship value is, the greater the weight of the path portrait.

[0081] The weight of the shopping data of the target customer (i.e., the initial customer portrait of the target customer, and based on the shopping data, the initial preference degree or initial preference score of the target customer for each commodity can be initially formed) is set to 1, indicating that this is data directly from the target customer itself, so it has a fixed importance.

[0082] The method of weighted average can be used to fuse the path portrait corresponding to each trusted relationship path with the direct shopping data of the target customer (i.e., the initial customer portrait of the target customer, and based on the shopping data, the initial preference degree or initial preference score of the target customer for each commodity can be initially formed).

[0083] In the weighted average calculation, each data point (here are the path portrait and the initial customer portrait of the target customer) will affect the final result according to its weight. The data point with a larger weight will have a greater impact on the final result.

[0084] Through the above weighted average calculation, a customer portrait that combines the shopping data of the target customer and the influence of the associated customers in its social network can be obtained. This customer portrait not only includes the direct preference degree or direct preference score of the target customer for each commodity, but also incorporates the information of the customer portraits associated with the target customer in its social relationships, thus providing a more comprehensive and richer perspective to understand the target customer.

[0085] Optionally, before extracting multiple trusted relationship paths and the confidence level corresponding to each trusted relationship path from the social relationship graph through the pre-trained graph convolutional network, the method further includes: obtaining the graph convolutional network to be trained and the training data set. The training data set includes the sample social relationship graph and the trusted relationship paths corresponding to the sample social relationship graph; training the graph convolutional network to be trained based on the training data set, and after the training is completed, the trained graph convolutional network is obtained.

[0086] In an embodiment of the present invention, the credible relationship path corresponding to the sample social relationship graph is a credible relationship path verified by experts. This credible relationship path can be used as the annotation data of the sample social relationship image to guide the graph convolutional network to be trained to output a relationship path that is the same as or similar to the credible relationship path.

[0087] Specifically, the sample social relationship graph can be input into the graph convolutional network to be trained for processing to obtain an output relationship path. The error between the output relationship path and the credible relationship path is calculated through a loss function to obtain the error value between the output relationship path and the credible relationship path. Taking the minimization of the error value as the optimization goal, the network parameters of the graph convolutional network to be trained are adjusted, and the adjustment process of the network parameters is iterated. When the preset number of iterations is reached or the error value converges to a preset value, the training is completed, and a trained graph convolutional network is obtained.

[0088] The above loss function is as follows:

[0089]

[0090] Among them, the above represents the error value, represents the th credible relationship path corresponding to the sample social relationship graph, represents the th output relationship path corresponding to the sample social relationship graph. C is the number of credible relationship paths corresponding to the sample social relationship graph, is the number of output relationship paths corresponding to the sample social relationship graph. represents the similarity between the th output relationship path corresponding to the sample social relationship graph and the th credible relationship path corresponding to the sample social relationship graph, which can be the cosine similarity.

[0091] As Figure 2 shown, an embodiment of the present invention provides a device for constructing a customer portrait based on social relationships. The device for constructing a customer portrait based on social relationships includes:

[0092] A first acquisition module 201, configured to acquire shopping data corresponding to a target customer;

[0093] The second acquisition module 202 is configured to obtain the social relationship graph of the target customer if the data volume of the shopping data is less than a preset data volume threshold. The social relationship graph includes a main node corresponding to the target customer and slave nodes corresponding to associated customers. The main node and the slave nodes are connected by at least one first connection edge, and each first connection edge has a corresponding first relationship value. The associated customers are customer personnel who have a social relationship with the target customer. The slave nodes have customer portraits corresponding to the associated customers, and the customer portraits are constructed based on the historical shopping data of the corresponding associated customers.

[0094] The construction module 203 is configured to construct the customer portrait of the target customer based on the social relationship graph, the customer portraits of the associated customers, and the shopping data.

[0095] Optionally, the construction module 203 is further configured to extract multiple credible relationship paths and the confidence corresponding to each credible relationship path from the social relationship graph through a pre-trained graph convolutional network. The confidence corresponding to the credible relationship path is greater than a preset confidence threshold. Each credible relationship path includes the main node and credible slave nodes. The main node and the credible slave nodes are connected by a second connection edge, and each second connection edge has a corresponding second relationship value. Based on the multiple credible relationship paths, the customer portraits of the associated customers, and the shopping data, construct the customer portrait of the target customer.

[0096] Optionally, the construction module 203 is further configured to calculate the path weight of each credible relationship path based on the confidence and the second relationship value. Each credible relationship path corresponds to a path weight. Based on the path weight, perform a fusion process on the customer portraits of the associated customers on the credible relationship path to obtain a path portrait corresponding to the credible relationship path. Each credible relationship path corresponds to a path portrait. Based on the path portraits corresponding to the multiple credible relationship paths, perform a weighted fusion process on the shopping data to obtain the customer portrait of the target customer.

[0097] Optionally, the construction module 203 is further configured to calculate the path weight as follows:

[0098]

[0099] Where represents the path weight of the j th credible relationship path, represents the confidence of the j th credible relationship path, represents thej The number of levels of a trusted relationship path Indicates the j th level coefficient in the i th trusted relationship path Indicates the j th second relationship value of the i th level in the trusted relationship path

[0100] Optionally, the building block 203 is further configured to, for each trusted relationship path, obtain the customer portraits of the associated customers corresponding to the trusted slave nodes in each level;

[0101] The fusion processing is as follows:

[0102]

[0103] Wherein, Indicates the path portrait corresponding to the j th trusted relationship path, Indicates the j th customer portrait of the associated customer corresponding to the trusted slave node of the i th level in the trusted relationship path

[0104] Optionally, the building block 203 is further configured to perform a weighted average calculation on the path portraits corresponding to multiple trusted relationship paths and the customer portrait of the target customer, to obtain the customer portrait of the target customer, where the weight of the path portrait is the second relationship value between the master node and the trusted slave node in the corresponding trusted relationship path, and the weight of the customer portrait of the target customer is 1.

[0105] Optionally, the apparatus further includes:

[0106] A third acquisition module, configured to acquire a graph convolutional network to be trained and a training data set, where the training data set includes a sample social relationship graph and the trusted relationship paths corresponding to the sample social relationship graph;

[0107] A training module, configured to train the graph convolutional network to be trained based on the training data set, and obtain a trained graph convolutional network after the training is completed.

[0108] As Figure 3 shown, an embodiment of the present invention further provides an electronic device, including a processor, and the processor can execute any one of the above-mentioned methods for constructing a customer portrait based on social relationships.

[0109] Specifically, it includes a processor 301 and a memory 302, as well as a computer program stored on the memory 302 and capable of running on the processor 301 to execute a method for constructing a customer portrait based on social relationships, where:

[0110] The processor 301 runs the calculator program for the method of constructing a customer portrait based on social relationships stored in the memory 302 and executes the following steps:

[0111] Obtain the shopping data corresponding to the target customer;

[0112] If the amount of the shopping data is less than a preset data amount threshold, obtain the social relationship graph of the target customer. The social relationship graph includes a main node corresponding to the target customer and slave nodes corresponding to associated customers. The main node and the slave nodes are connected by at least one first connection edge, and each first connection edge has a corresponding first relationship value. The associated customers are customer personnel having social relationships with the target customer, and the slave nodes have customer portraits corresponding to the associated customers. The customer portraits are constructed based on the historical shopping data corresponding to the associated customers;

[0113] Construct the customer portrait of the target customer based on the social relationship graph, the customer portraits of the associated customers, and the shopping data.

[0114] Optionally, the constructing the customer portrait of the target customer by the processor 301 based on the social relationship graph, the customer portraits of the associated customers, and the shopping data includes:

[0115] Extract multiple credible relationship paths and the confidence corresponding to each credible relationship path from the social relationship graph through a pre-trained graph convolutional network. The confidence corresponding to each credible relationship path is greater than a preset confidence threshold. Each credible relationship path includes the main node and credible slave nodes. The main node and the credible slave nodes are connected by a second connection edge, and each second connection edge has a corresponding second relationship value;

[0116] Construct the customer portrait of the target customer based on the multiple credible relationship paths, the customer portraits of the associated customers, and the shopping data.

[0117] Optionally, the constructing the customer portrait of the target customer by the processor 301 based on the multiple credible relationship paths, the customer portraits of the associated customers, and the shopping data includes:

[0118] For each of the described trusted relationship paths, calculate the path weight of the trusted relationship path based on the confidence level and the second relationship value, and each of the trusted relationship paths corresponds to one such path weight;

[0119] Based on the path weight, perform a fusion process on the customer portraits of the associated customers on the trusted relationship path to obtain the path portrait corresponding to the trusted relationship path, and each of the trusted relationship paths corresponds to one such path portrait;

[0120] Based on the path portraits corresponding to multiple trusted relationship paths, perform a weighted fusion process on the shopping data to obtain the customer portrait of the target customer.

[0121] Optionally, the "For each of the described trusted relationship paths, calculate the path weight of the trusted relationship path based on the confidence level and the second relationship value" executed by the processor 301 includes:

[0122] The calculation of the path weight is as follows:

[0123]

[0124] Wherein, represents the path weight of the j th trusted relationship path, represents the confidence level of the j th trusted relationship path, represents the number of levels of the j th trusted relationship path, represents the level coefficient of the j th level in the i th trusted relationship path, represents the second relationship value of the j th level in the i th trusted relationship path.

[0125] Optionally, the "Based on the path weight, perform a fusion process on the customer portraits of the associated customers on the trusted relationship path to obtain the path portrait corresponding to the trusted relationship path" executed by the processor 301 includes:

[0126] For each of the trusted relationship paths, obtain the customer portraits of the associated customers corresponding to the trusted slave nodes in each level;

[0127] The fusion process is as follows:

[0128]

[0129] Wherein, represents the jThe path portrait corresponding to a credible relationship path indicating the j th level of the i credible subordinate node in the th credible relationship path, and the customer portrait of the associated customer corresponding thereto

[0130] Optionally, the weighted fusion processing of the shopping data based on the path portraits corresponding to multiple credible relationship paths, to obtain the customer portrait of the target customer, includes:

[0131] Performing weighted average calculation on the path portraits corresponding to multiple credible relationship paths and the customer portrait of the target customer, to obtain the customer portrait of the target customer, where the weight of the path portrait is the second relationship value between the master node and the credible subordinate node in the corresponding credible relationship path, and the weight of the customer portrait of the target customer is 1

[0132] Optionally, before extracting multiple credible relationship paths and the confidence level corresponding to each credible relationship path from the social relationship graph through the pre-trained graph convolutional network, the method performed by the processor 301 further includes:

[0133] Obtaining a graph convolutional network to be trained and a training data set, where the training data set includes a sample social relationship graph and the credible relationship paths corresponding to the sample social relationship graph

[0134] Training the graph convolutional network to be trained based on the training data set, and after the training is completed, obtaining a trained graph convolutional network

[0135] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements each process of the method for constructing a customer portrait based on social relationships provided by the embodiments of the present invention, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here

[0136] Those of ordinary skill in the art can understand that all or part of the processes of implementing the method in the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc

[0137] The above-disclosed are only the preferred embodiments of the present invention. Of course, the scope of the rights of the present invention cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope covered by the present invention.

Claims

1. A method for constructing a customer portrait based on social relationships, characterized in that, The method includes the following steps: Obtain the shopping data corresponding to the target customer; If the data volume of the shopping data is less than a preset data volume threshold, obtain the social relationship graph of the target customer. The social relationship graph includes a main node corresponding to the target customer and slave nodes corresponding to associated customers. The main node and the slave nodes are connected by at least one first connection edge, and each first connection edge has a corresponding first relationship value. The associated customers are customer personnel who have social relationships with the target customer. The slave nodes have customer portraits corresponding to the associated customers, and the customer portraits are constructed based on the historical shopping data of the corresponding associated customers; Based on the social relationship graph, the customer portraits of the associated customers, and the shopping data, construct the customer portrait of the target customer; Obtain the graph convolutional network to be trained and the training data set. The training data set includes a sample social relationship graph and the credible relationship paths corresponding to the sample social relationship graph; Based on the training data set, train the graph convolutional network to be trained. After the training is completed, a trained graph convolutional network is obtained; The credible relationship paths corresponding to the sample social relationship graph are credible relationship paths verified by experts. The credible relationship paths are used as the annotation data of the sample social relationship image to guide the graph convolutional network to be trained to output relationship paths that are the same as or similar to the credible relationship paths; Input the sample social relationship graph into the graph convolutional network to be trained for processing to obtain an output relationship path. Calculate the error between the output relationship path and the credible relationship path through a loss function to obtain the error value between the output relationship path and the credible relationship path. With minimizing the error value as the optimization goal, adjust the network parameters of the graph convolutional network to be trained, and iterate the adjustment process of the network parameters. When the preset number of iterations is reached or the error value converges to a preset value, the training is completed to obtain a pre-trained graph convolutional network; The loss function is as follows: Among them, represents the error value, represents the th reliable relationship path corresponding to the sample social relationship graph, represents the th output relationship path corresponding to the sample social relationship graph, C is the number of reliable relationship paths corresponding to the sample social relationship graph, is the number of output relationship paths corresponding to the sample social relationship graph, represents the th output relationship path corresponding to the sample social relationship graph and the th reliable relationship path corresponding to the sample social relationship graph; the cosine similarity between them; Through the pre-trained graph convolutional network, extract multiple credible relationship paths and the confidence corresponding to each credible relationship path from the social relationship graph. The confidence corresponding to the credible relationship path is greater than a preset confidence threshold. Each credible relationship path includes the main node and credible slave nodes. The main node and the credible slave nodes are connected by a second connection edge, and each second connection edge has a corresponding second relationship value; Based on multiple credible relationship paths, the customer portraits of the associated customers, and the shopping data, construct the customer portrait of the target customer; For each credible relationship path, calculate the path weight of the credible relationship path based on the confidence and the second relationship value. Each credible relationship path corresponds to a path weight; The calculation of the path weight is as follows: Among them, represents the path weight of the j th credible relationship path, represents the confidence of the j th credible relationship path, represents the number of levels of the j th credible relationship path, represents the level coefficient of the j th level in the i th credible relationship path, represents the second relationship value of the j th level in the i th credible relationship path; Based on the path weights, perform fusion processing on the customer portraits of the associated customers on the trusted relationship path to obtain a path portrait corresponding to the trusted relationship path, and each trusted relationship path corresponds to one path portrait; for each trusted relationship path, obtain the customer portraits of the associated customers corresponding to the trusted subordinate nodes at each level; The fusion processing is as follows: Among them, represents the path portrait corresponding to the j th trustworthy relationship path, represents the customer portrait of the associated customer corresponding to the j th level of the i trustworthy slave node in the th trustworthy relationship path; Based on the path portraits corresponding to multiple trusted relationship paths, perform weighted fusion processing on the shopping data to obtain the customer portrait of the target customer.

2. The method for constructing a customer portrait based on social relationships according to claim 1, wherein The performing weighted fusion processing on the shopping data based on the path portraits corresponding to multiple trusted relationship paths to obtain the customer portrait of the target customer includes: Perform weighted average calculation on the path portraits corresponding to multiple trusted relationship paths and the customer portrait of the target customer to obtain the customer portrait of the target customer. The weight of the path portrait is the second relationship value between the main node and the trusted subordinate node in the corresponding trusted relationship path, and the weight of the customer portrait of the target customer is 1.

3. A customer portrait construction device based on social relationships, characterized in that, The customer portrait construction device based on social relationships includes: A first acquisition module, configured to acquire shopping data corresponding to a target customer; A second acquisition module, configured to, if the data volume of the shopping data is less than a preset data volume threshold, acquire the social relationship graph of the target customer. The social relationship graph includes a main node corresponding to the target customer and subordinate nodes corresponding to associated customers. The main node and the subordinate nodes are connected by at least one first connection edge, and each first connection edge has a corresponding first relationship value. The associated customers are customer personnel having a social relationship with the target customer, and the subordinate nodes have customer portraits corresponding to the associated customers. The customer portraits are constructed based on the historical shopping data corresponding to the associated customers; A construction module, configured to construct the customer portrait of the target customer based on the social relationship graph, the customer portraits of the associated customers, and the shopping data; acquire a graph convolutional network to be trained and a training data set. The training data set includes a sample social relationship graph and the trusted relationship paths corresponding to the sample social relationship graph; Based on the training data set, train the graph convolutional network to be trained, and after the training is completed, obtain a trained graph convolutional network; The trusted relationship paths corresponding to the sample social relationship graph are trusted relationship paths verified by experts. The trusted relationship paths are used as annotation data for the sample social relationship images to guide the graph convolutional network to be trained to output relationship paths that are the same as or similar to the trusted relationship paths; Input the sample social relationship graph into the graph convolutional network to be trained for processing to obtain the output relationship path. Calculate the error between the output relationship path and the trusted relationship path through the loss function to obtain the error value between the output relationship path and the trusted relationship path. Taking the minimization of the error value as the optimization objective, adjust the network parameters of the graph convolutional network to be trained, and iterate the adjustment process of the network parameters. When the preset number of iterations is reached or the error value converges to the preset value, the training is completed, and a pre-trained graph convolutional network is obtained; The loss function is as follows: Among them, represents the error value, represents the th credible relationship path corresponding to the sample social relationship graph, represents the th output relationship path corresponding to the sample social relationship graph. C is the number of credible relationship paths corresponding to the sample social relationship graph, is the number of output relationship paths corresponding to the sample social relationship graph, represents the th output relationship path and the th credible relationship path corresponding to the sample social relationship graph, and the cosine similarity therebetween; Through the pre-trained graph convolutional network, multiple trusted relationship paths and the confidence corresponding to each trusted relationship path are extracted from the social relationship graph. The confidence corresponding to the trusted relationship path is greater than the preset confidence threshold. Each trusted relationship path includes the main node and the trusted subordinate node. The main node and the trusted subordinate node are connected by a second connection edge, and each second connection edge has a corresponding second relationship value; Based on the multiple trusted relationship paths, the customer portrait of the associated customer, and the shopping data, construct the customer portrait of the target customer; for each trusted relationship path, calculate the path weight of the trusted relationship path based on the confidence and the second relationship value. Each trusted relationship path corresponds to a path weight; the calculation of the path weight is as follows: Among them, represents the path weight of the j th trustworthy relationship path, represents the confidence of the j th trustworthy relationship path, represents the number of levels of the j th trustworthy relationship path, represents the level coefficient of the j th level in the i th trustworthy relationship path, represents the second relationship value of the j th level in the i th trustworthy relationship path; Based on the path weight, perform a fusion process on the customer portraits of the associated customers on the trusted relationship path to obtain the path portrait corresponding to the trusted relationship path. Each trusted relationship path corresponds to a path portrait; for each trusted relationship path, obtain the customer portraits of the associated customers corresponding to the trusted subordinate nodes at each level; The fusion process is as follows: Among them, represents the path portrait corresponding to the j th credible relationship path, represents the customer portrait of the associated customer corresponding to the j th level of the i credible subordinate node in the th credible relationship path; Based on the path portraits corresponding to the multiple trusted relationship paths, perform a weighted fusion process on the shopping data to obtain the customer portrait of the target customer.

4. An electronic device, characterized in that, It includes: A memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps in the method for constructing a customer portrait based on social relationships according to claim 1 or 2 are implemented.

5. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, the steps in the method for constructing a customer portrait based on social relationships according to any one of claims 1 or 2 are implemented.

Citation Information

Patent Citations

  • User portrait establishing method and system

    CN114155067A

  • Redemption commodity recommendation method and device, equipment and storage medium

    CN118822622A