Method, device and equipment for determining social attribute data based on social relationships
By acquiring and adjusting social relationship data sets and optimizing the representation of social relationship networks, it solves the problem of low object representation accuracy in large-scale social relationship networks, improves analysis efficiency, and is suitable for a variety of social scenarios.
Patent Information
- Application Number
- CN201911243166.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-06
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2039-12-06
AI Technical Summary
In large-scale social relationship networks, it is difficult for existing technologies to accurately represent the social attributes of each object, resulting in low analysis efficiency.
By obtaining the social relationship data set, the social relationship network is determined, and adjusted according to the weights of multiple relationship types, optimizing the representation of objects, deleting data of abnormal objects, and meeting the preset adjustment stop conditions to improve relationship closeness.
It improves the accuracy and analysis efficiency of each object representation and is suitable for object representation in different social scenarios.
Smart Images

Figure CN113033850B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device and apparatus for determining social attribute data based on social relationships. Background Art
[0002] In related technologies, social networks are often represented in the form of knowledge graphs. Social networks refer to network systems formed through social relationships between individual members of a society. Knowledge graphs are semantic networks that describe various entity concepts and their relationships in the real world. For social networks represented by knowledge graphs, nodes represent entities such as objects, and edges represent social relationships, etc.
[0003] When analyzing social relationships, we can currently only find out the closeness of the relationships between different objects in a small-scale social network and represent each object fuzzily. However, when identifying each object in a large-scale social network, the accuracy of the representation of each object is low, making it inefficient to analyze the social attributes of each object in the social network based on its representation. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, device and apparatus for determining social attribute data based on social relationships, which are used to optimize a method for representing objects in a social relationship network.
[0005] In a first aspect, the present disclosure provides a method for determining social attribute data based on social relationships, comprising:
[0006] Acquire a social relationship data set, wherein the social relationship data set includes social relationship data of at least one object, and the social relationship data is used to represent the closeness of the relationship between different objects having a social relationship;
[0007] Determine a social relationship network according to the social relationship data set, wherein the social relationship network includes social attribute data of the at least one object, the social attribute data is determined according to the social relationship data, and the social attribute data is used to represent a position of the at least one object in the social relationship network;
[0008] Adjusting the social relationship network so that the relationship closeness between different objects having social relationships in the adjusted social relationship network is higher than the relationship closeness before the adjustment;
[0009] The social attribute data of the at least one object in the adjusted social relationship network is determined.
[0010] In a possible implementation, the social relationship data includes multiple relationship types, and the step of determining a social relationship network according to the social relationship data set includes:
[0011] Determining a weight for each relationship type among the plurality of relationship types;
[0012] The social relationship network is determined according to the social relationship data set and the weights of the various relationship types.
[0013] In a possible implementation, the social relationship data set includes social relationship data in a target social scenario;
[0014] The step of determining the weight of each relationship type among the multiple relationship types comprises:
[0015] Determining association values between the various relationship types and the target social scenario, and determining weights of the various relationship types according to the association values; or
[0016] Determine a preset mapping relationship between the relationship type and the weight corresponding to the target social scenario, and determine the weights of the various relationship types according to the preset mapping relationship between the relationship type and the weight.
[0017] In a possible implementation, after the step of acquiring the social relationship data set and before determining the social relationship network according to the social relationship data set, the step further includes:
[0018] If an abnormal object is determined in the at least one object, the social relationship data of the abnormal object is deleted from the social relationship data set, wherein the abnormal object is an object that affects the accuracy of social attribute data of other objects in the social relationship network, and the abnormal object is determined according to the data volume of the social relationship data of the object.
[0019] In a possible implementation, the step of adjusting the social relationship network includes:
[0020] The social relationship network is distributedly adjusted until a preset adjustment stop condition is met.
[0021] In a possible implementation, the preset adjustment stop condition includes:
[0022] The number of first objects reaches a preset number, and the first objects are objects whose social attribute data are updated a preset number of times when the social relationship network is adjusted; or
[0023] The function value of the objective function of the social relationship network reaches a preset function value, and the function value of the objective function represents the degree of closeness of the relationship between different objects in the social relationship network.
[0024] In a second aspect of the present disclosure, a social attribute data determination device based on social relations is provided, comprising a social relation acquisition unit, a social relation network determination unit, a relation network adjustment unit and an attribute data determination unit, wherein:
[0025] The social relationship acquisition unit is configured to acquire a social relationship data set, wherein the social relationship data set includes social relationship data of at least one object, and the social relationship data is used to represent the relationship closeness between different objects having social relationships;
[0026] The social relationship network determination unit is configured to determine a social relationship network according to the social relationship data set, wherein the social relationship network includes social attribute data of the at least one object, the social attribute data is determined according to the social relationship data, and the social attribute data is used to represent a position of the at least one object in the social relationship network;
[0027] The relationship network adjustment unit is configured to perform adjustment on the social relationship network so that the relationship closeness between different objects having social relationships in the adjusted social relationship network is higher than the relationship closeness before the adjustment;
[0028] The attribute data determining unit is configured to determine the social attribute data of the at least one object in the adjusted social relationship network.
[0029] In a possible implementation, the social relationship data includes multiple relationship types, and the social relationship network determination unit is specifically configured to execute:
[0030] Determining a weight for each relationship type among the plurality of relationship types;
[0031] The social relationship network is determined according to the social relationship data set and the weights of the various relationship types.
[0032] In a possible implementation, the social relationship data set includes social relationship data in a target social scenario;
[0033] The social network determination unit is specifically configured to execute:
[0034] Determining association values between the various relationship types and the target social scenario, and determining weights of the various relationship types according to the association values; or
[0035] Determine a preset mapping relationship between the relationship type and the weight corresponding to the target social scenario, and determine the weights of the various relationship types according to the preset mapping relationship between the relationship type and the weight.
[0036] In a possible implementation, the social relationship acquisition unit is further configured to execute:
[0037] After the step of obtaining the social relationship data set and before determining the social relationship network based on the social relationship data set, if an abnormal object is determined in the at least one object, the social relationship data of the abnormal object is deleted from the social relationship data set, wherein the abnormal object is an object that affects the accuracy of social attribute data of other objects in the social relationship network, and the abnormal object is determined based on the data volume of the social relationship data of the object.
[0038] In a possible implementation, the relationship network adjustment unit is configured to execute:
[0039] The social relationship network is distributedly adjusted until a preset adjustment stop condition is met.
[0040] In a possible implementation manner, the preset adjustment stop condition includes:
[0041] The number of first objects reaches a preset number, and the first objects are objects whose social attribute data are updated a preset number of times when the social relationship network is adjusted; or
[0042] The function value of the objective function of the social relationship network reaches a preset function value, and the function value of the objective function represents the degree of closeness of the relationship between different objects in the social relationship network.
[0043] According to a third aspect of the present disclosure, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect and any one of the possible implementation modes is implemented.
[0044] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed on a computer, the computer executes the method described in the first aspect and any one of the possible implementation modes.
[0045] The solution disclosed herein brings at least the following beneficial effects:
[0046] 1) In the present disclosure, social attribute data of each object in a social relationship network is determined based on social relationship data, and the social relationship network is adjusted. The social attribute data of each object in the adjusted social relationship network is used as the representation of each object, thereby improving the accuracy of the representation of each object, and further improving the efficiency of analyzing the social attributes of each object based on the social attribute data.
[0047] 2) In the present disclosure, social relationship data includes multiple relationship types. A social relationship network is constructed according to the weights of each relationship type, and the social attribute data of each object in the adjusted social relationship network is obtained. This can achieve specific representation of each object under multiple relationship types, further improving the accuracy of the representation of each object.
[0048] 3) In the present disclosure, weights of different relationship types are determined for different social scenarios and a social relationship network is constructed, and the social attribute data of each object in the adjusted social relationship network is obtained, so that each object can be represented in different social scenarios, and the accuracy of the representation of each object is further improved, thereby improving the efficiency of analyzing the social attributes of each object according to the social attribute data in different social scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0050] Figure 1 A flowchart of a method for determining social attributes based on social relationships provided by an exemplary embodiment of the present disclosure;
[0051] Figure 2 A schematic diagram of representing different types of relationships in a social network provided by an exemplary embodiment of the present disclosure;
[0052] Figure 3 A schematic diagram of an abstract representation of different relationship types provided for an exemplary embodiment of the present disclosure;
[0053] Figure 4 A schematic diagram of an adjusted social relationship network provided for an exemplary embodiment of the present disclosure;
[0054] Figure 5 A schematic diagram of a structure of a device for determining social attribute data based on social relationships provided by an exemplary embodiment of the present disclosure;
[0055] Figure 6 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0056] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0057] In order to help those skilled in the art better understand the technical solutions of the present disclosure, the technical terms involved in the present disclosure are explained below.
[0058] Social relationship analysis is generally implemented based on social relationship networks. Social relationship networks refer to the network system formed by social relationships between individual members of society. Social relationship networks generally exist in the form of knowledge graphs. The purpose is to understand the formation of various human social relationships, behavioral characteristics, information dissemination laws, etc. based on social relationship networks.
[0059] Knowledge Graph: It is a way to realize ontology in the information field. It refers to a huge semantic network diagram that describes various entity concepts and their relationships in the real world. It describes the objects, things and connections of real events through entities and relationships. Among them, an entity refers to a certain thing that is distinguishable and exists independently. In graphical analysis, it often appears in the form of a "node"; a relationship is used to express a certain connection between entities. In graphical analysis, it is often displayed as a line between entity nodes, that is, an edge connecting two points. For social relationship networks represented in the form of knowledge graphs, nodes represent entities such as people and concepts, and edges represent social relationships between nodes.
[0060] Embedding data: uses low-dimensional vectors to encode entities and retain their meanings, that is, uses a low-dimensional vector to represent an entity. This entity can be a word, an object, a video, a person, etc.; the nature of embedding data is that it can make entities corresponding to vectors with similar distances in space have similar meanings or close relationships. For example, the vector distance between two users who are relatives or friends will be very close, but the vector distance between two completely strangers will be relatively far.
[0061] Relationship closeness: It can be understood as the degree of association between different objects in a social network. In a social network constructed in the form of a knowledge graph, it can be understood as the spatial distance between different objects in the social network. Technicians can design the calculation standard for the spatial distance between different objects based on actual needs.
[0062] The design concept of the present disclosure is described below.
[0063] With the development of Internet technology, every user will establish social relationships with other users on social platforms, such as friend relationships, follow relationships, like relationships, etc. In related technologies, the social relationship network can only clearly represent the social attributes of users based on the above-mentioned linear social relationships. For example, it can simply represent that user A is a friend of user B, and user C follows user D, but it cannot represent the overall social attributes or spatial positions of user A, user B, user C, and user D in the entire social relationship network. The ability to represent users in the social relationship network is very limited.
[0064] In view of this, the present disclosure designs a method, device and apparatus for determining social attribute data based on social relations, so as to provide a method for specifically representing each object in a social relation network. The method of the present disclosure comprises: obtaining a social relation data set, wherein the social relation data set comprises social relation data of at least one object; determining a social relation network according to the obtained social relation data set, adjusting the social relation network so that the relationship closeness between different objects having social relations in the adjusted social relation network is higher than the relationship closeness before the adjustment; determining the social attribute data of the at least one object in the adjusted social relation network; wherein:
[0065] The social relationship data is used to represent the closeness of the relationship between different objects having social relationships. Both the social relationship network before adjustment and the social relationship network after adjustment include the social attribute data of the at least one object.
[0066] It should be noted that the object in the embodiments of the present disclosure can be understood as a user in a social platform, and the object and the user in the present disclosure have the same meaning.
[0067] The social attribute data in the embodiments of the present disclosure is determined based on the above social relationship data, and is used to represent the position of the object in the above social relationship network, that is, to represent the spatial position of the object in the space of the social relationship network.
[0068] The solution of the present disclosure is described in detail below with reference to the accompanying drawings.
[0069] See also Figure 1 , a method for determining social attributes based on social relationships is provided, the method specifically comprising:
[0070] Step S101: obtaining a social relationship data set, where the social relationship data set includes social relationship data of at least one object.
[0071] As an embodiment, the social relationship data may be obtained through one or more social platforms, such as by collecting the social relationship data of objects in each social platform through the log system and data mining system of each social platform.
[0072] The above social relationship data may include various relationship types, such as follow-up relationships, friend relationships, interactive relationships, and third-party relationships.
[0073] As an embodiment, in order to avoid the influence of some abnormal social relationship data on the social relationship network, after obtaining the social relationship data set, the social relationship data in the social relationship data set can also be cleaned. Specifically, it can be determined whether there is an abnormal object in the at least one of the above objects. If there is an abnormal object, the social relationship data of the abnormal object is deleted from the social relationship data set. The abnormal object can be determined according to the data volume of the social relationship data of the object. The abnormal object is an object that affects the accuracy of the social attribute data of other objects in the above social relationship network.
[0074] As an embodiment, the above-mentioned abnormal objects may include but are not limited to objects with too many followers and objects with low activity. If the number of users following an object exceeds a set value, or the amount of social relationship data with the object exceeds a set amount, the above-mentioned object is determined to be an object with too many followers. Alternatively, if it is determined that an object has not logged into a social account on a social platform for a set period of time, the object is determined to be a low-activity object. For example, if the number of users following A exceeds 10,000 or 100,000, A is determined to be an abnormal object. If B has not logged into his social account within the last month, B is determined to be a low-activity object. A and B are each an object.
[0075] The above-mentioned excessive attention to objects will affect the adjustment of the social network, so that when adjusting the social network, the social attribute data of the objects with social relationships will be close to the social attribute data of the attention objects, thereby affecting the adjustment of the social attribute data of other objects in the social network except the multiple attention objects; since the above-mentioned low-activity objects are inactive for a long time, it is uncertain whether the social relationship data of the low-activity objects is currently valid, which affects the social relationships of other objects in the social network, and further affects the social attribute data of other objects in the social network.
[0076] Step S102: determining a social relationship network according to the acquired social relationship data.
[0077] As an embodiment, a social relationship network can be constructed in the form of a knowledge graph. The social relationship network can be a biggraph model. The social relationship network includes a number of nodes and edges connecting the nodes. Each object is represented by a node, and the social relationship between different objects is represented by an edge. The above edges can be determined based on the acquired social relationship data.
[0078] The social relationship network includes social attribute data of the at least one object. The social attribute data is used to represent the position of the object in the social relationship network and can be determined according to the social relationship data. In this embodiment, the social attribute data may be embedding data of the object.
[0079] As an embodiment, when the social relationship data includes multiple relationship types, the weights of each relationship type in the multiple relationship types can be determined, the multiple relationship types can be merged, and the above social relationship network can be determined according to the social relationship set and the weights of the determined various relationship types. Figure 2 , where the weights of attention relationship, interactive relationship and third-party relationship are 5.0, 4.5 and 1.3 respectively. When constructing a social relationship network in the form of a knowledge graph, different forms of edges can be used to represent different relationship types and their weights.
[0080] As an embodiment, the above-mentioned social relationship data set can be collected for different social scenarios, and the social relationship data set includes social relationship data collected in the target social scenario; the weight of each relationship type can be determined according to various information in the target social scenario, wherein the above-mentioned social scenario can include but is not limited to different social platforms, or specific scenarios under a certain social platform such as short video communities, acquaintance communities, games, e-commerce shopping, etc.
[0081] Step S103, adjusting the obtained social relationship network so that the relationship closeness between different objects having social relationships in the adjusted social relationship network is higher than the relationship closeness before the adjustment.
[0082] The number of relationship types, specific relationship types, and weights of each relationship type obtained in step 101 and step 102 may be used as hyperparameters of the social relationship network to adjust the social relationship network.
[0083] Since the social network is an ultra-large-scale multi-dimensional object representation, it may contain billions of nodes and tens of billions of social relationships. The amount of data is too large. Putting the entire social network on a single training node such as a server for adjustment will put a lot of pressure on the training node. Secondly, the memory resources occupied by such a large-scale social network may exceed the memory of a single training node and cannot be loaded into the memory of a single training node. Therefore, the social network can be distributed and adjusted until the preset stop condition is met.
[0084] Step S104: determining the social attribute data of the at least one object in the adjusted social relationship network.
[0085] After the adjustment of the social network is completed, the social attribute data of each object can be obtained from the social network, and the corresponding object can be represented by the obtained social attribute data. For example, in this embodiment, the object can be represented by the obtained embedding data, which converts each node in the social network into low-dimensional representation information.
[0086] After obtaining the embedding data of each object, we can find seed users with high relationship density to verify the representation ability of the adjusted social network. For example, we can calculate the spatial vector distance between seed users with high relationship density based on the embedding data. If the calculated spatial vector distance represents a distance that is too far, we can readjust the social network.
[0087] The following is a detailed description of the relationship types in the embodiments of the present disclosure:
[0088] Following relationships can include unidirectional following relationships and bidirectional following relationships; a unidirectional following relationship can be understood as A following B, but B does not follow A; a bidirectional following relationship can be understood as A and B following each other; following can be understood as after A follows B, A can view the content posted by B on the social platform, which can be audio, video, text, pictures, anchor content, etc., where A and B each represent an object.
[0089] The above-mentioned friend relationships include one-way friend relationships and two-way friend relationships; a one-way friend relationship can be understood as A is B's social friend on the social platform, but B is not A's social friend; a two-way friend relationship can be understood as A and B are each other's social friends; for social friends, it can be understood that if A is B's social friend, A can send a message to B through a chat interface, etc., and the message can be audio, video, text, picture, etc., where A and B each represent an object.
[0090] It should be understood that the above-mentioned follow relationship and friend relationship may be equivalent on some social platforms, but may not be equivalent on other social platforms.
[0091] The above-mentioned interactive relationship may include but is not limited to like / comment relationship and team relationship.
[0092] The like / comment relationship includes a one-way like / comment relationship and a two-way like relationship. The one-way like / comment relationship can be understood as a relationship in which A likes / comments on the content posted by B on the social platform, but B does not like / comment on the content posted by A on the social platform; the two-way like relationship can be understood as a relationship in which A and B like / comment on each other's content posted on the social platform, where A and B each represent an object.
[0093] The team relationship can be understood as the relationship between A and B participating in an activity on a social platform in the same team, where A and B each represent an object.
[0094] The above-mentioned one-way attention relationship, two-way attention relationship, one-way like / comment relationship, and third-party relationship can be represented in the social network. Figure 3, but it should be understood that Figure 3 It is only an abstract representation of the relationship, and technicians in this field can change it according to actual needs.
[0095] The above-mentioned third-party relationship can be understood as A and B having one or more social relationships on other social platforms other than the current social platform, where A and B each represent an object.
[0096] In the above step S102, the weight of each relationship type may be determined according to various information in the target social scene in the following two ways, but is not limited to the following two ways.
[0097] The weight determination method for the first relationship type:
[0098] Determine the association values between various relationship types and the target social scenario, and then determine the weights of each relationship type based on the association values.
[0099] As an embodiment, the association value between the relationship type and the target social scenario may be set in advance according to actual needs, and may be established in a manner as shown in Table 1.
[0100] Table 1:
[0101] Social Scene 1 Social Scene 2 … Social scene Relationship Type 1 A1 A2 … An Relationship Type 2 B1 B2 … Bn … … … … … Relationship Type m C1 C2 … Cn
[0102] In Table 1, m is a label set only to distinguish different relationship types, and its value is a positive integer; n is a label set to distinguish different social scenarios, and its value is a positive integer; A1 to An, B1 to Bn, C1 to Cn represent different association values respectively; as can be seen from Table 1, the association values of relationship type 1 with social scenario 1, social scenario 2 and social scenario n are A1, A2, An respectively; the association values of relationship type 2 with social scenario 1, social scenario 2 and social scenario n are B1, B2, Bn respectively; the association values of relationship type m with social scenario 1, social scenario 2 and social scenario n are C1, C2, Cn respectively.
[0103] The association values of the above-mentioned relationship types can be set by technical personnel in this field based on actual experience, and no excessive restrictions are made here; after determining the association values of each relationship type and the target social scenario, the weights of each relationship type can be obtained by calculating each association value according to a preset weight calculation formula. No excessive restrictions are made on the above-mentioned preset weight calculation formula. Technical personnel in this field can design it according to specific social scenarios, or design it according to the interactive behavior between objects in social scenarios, etc.
[0104] The weight determination method for the second relationship type:
[0105] Determine the preset mapping relationship between the relationship type and the weight corresponding to the target social scenario, and determine the weights of various relationship types according to the preset mapping relationship between the relationship type and the weight.
[0106] In this way, it is necessary to pre-establish a preset mapping relationship between the relationship type and weight corresponding to each social scenario. Specifically, the preset mapping relationship between the relationship type and weight corresponding to each social scenario can be established by technical personnel in this field based on actual experience.
[0107] As an embodiment, if the relationship types in a certain social scenario include one-way attention relationships, two-way attention relationships, interactive relationships and third-party relationships, the weights of the two-way attention relationships, third-party relationships, one-way attention relationships and interactive relationships can be decreased in sequence. See Table 2, which gives a preset mapping relationship between the relationship types and weights of the social scenario.
[0108] Table 2: Preset mapping relationship between relationship types and weights in a social scenario
[0109] One-way follow relationship Two-way attention relationship Interactive Relationship Third Party Relationships Weight 2.0 5.0 1.3 4.5
[0110] Table 2 shows that in this social scenario, the weights of one-way attention relationship, two-way attention relationship, interactive relationship and third-party relationship are 2.0, 5.0, 1.3 and 4.5 respectively.
[0111] It should be noted that the values of the weights of the above-mentioned one-way attention relationships, two-way attention relationships, interactive relationships and third-party relationships are only examples. In actual application, the weights of each relationship type may be exactly the same, partially the same, or completely different from those in Table 2.
[0112] After obtaining the weights of each relationship type, the obtained weights can be normalized. The above normalization can be understood as unifying non-integer values into integers. For example, if the obtained weights are 0.4, 1, 0.2, and 0.4 respectively, each weight can be multiplied by the same coefficient to obtain an integer. For example, multiplying each of the above weights by the coefficient 5 will obtain the normalized weights 2, 5, 1, and 2.
[0113] The weights of the various relationship types in the above-mentioned social scenarios can be set by technicians in this field according to actual experience, and no excessive restrictions are made here.
[0114] As an embodiment, in the above step S102, after the social relationship data includes multiple relationship types and the weight of each relationship type is determined, the social relationship network can be determined according to the social relationship data and the weight of each relationship type in the following method:
[0115] Firstly, according to the acquired social relationship data, an initial social relationship network is constructed based on the form of biggraph model. The initial social relationship network includes several nodes and edges connecting the nodes. Each object is represented by a node, and different forms of edges are used to represent different relationship types.
[0116] Then, the edges in the initial social relationship network are adjusted according to the normalized weights. For example, when the normalized weights of the unidirectional attention relationship, the bidirectional attention relationship, the interactive relationship and the third-party relationship are 2, 5, 1 and 2, each edge representing the unidirectional attention relationship is transformed into two edges representing the interactive relationship, each edge representing the bidirectional attention relationship is transformed into five edges representing the interactive relationship, and each edge representing the third-party relationship is transformed into two edges representing the interactive relationship. Then, the social relationship network determined according to the social relationship data and the weights of each relationship type can be obtained.
[0117] It should be noted that technicians in this field can also determine the social relationship network according to social relationship data and the weights of each relationship type in other ways, such as determining the initial social relationship network according to the social relationship data, adjusting the lengths of each edge in the initial social relationship network according to the weights of each relationship type, etc. The methods listed in this embodiment are only illustrative examples.
[0118] The following describes the adjustment of the social relationship network in step S103.
[0119] Adjusting the social network mainly includes dividing object relationship samples, setting the hyperparameters of the social network, and performing distributed adjustment on the social network. The social network in this example is a biggraph model built based on social relationship data, as follows:
[0120] 1) Divide object relationship samples
[0121] The nodes in the social network can be marked with object identification information such as account ID, and the acquired object relationship samples can be divided according to the account ID in the social network into several sample sets, so that the object relationship samples in each sample set can contain some object relationships, where the object relationship samples can be understood as the social relationships between objects in the social network, that is, the edges connecting nodes in the social network.
[0122] 2) Setting and adjusting the hyperparameters of the social network
[0123] Hyperparameters include custom parameters and common parameters.
[0124] Customized parameters may include but are not limited to: the number of relationship types, specific relationship types, and the weights of each relationship type, wherein the specific relationship types may include but are not limited to one or more of the above-mentioned relationship types. For example, specific relationships may include one-way attention relationships, two-way attention relationships, interactive relationships (such as like relationships), and third-party relationships, and their corresponding weights may be 2, 5, 1, 2, etc.
[0125] The parameters may include but are not limited to: the number of divided sample sets, the number of training nodes, the distance function, the representation dimension, and the objective function.
[0126] The number of the divided sample sets may be twice the number of training nodes.
[0127] The above distance function is used to calculate the spatial distance between objects based on the social attribute data of different objects. For example, based on the embedding data of two objects, the spatial vector distance between the two objects is calculated to obtain the spatial vector distance of the two objects, and the closeness of the relationship between the two objects is determined based on the spatial vector distance.
[0128] The above representation dimension represents the amount of information that the social attribute data of the object can express. For example, when the social attribute data is embedding data, the representation dimension is the dimension of the embedding data. The larger the value of the dimension, the richer the information expressed by the embedding data.
[0129] The above objective function represents the optimization goal, and its function value represents the degree of relationship closeness between different objects in the social relationship network. Its goal is to make objects with social relationships more and more compact, and objects without social relationships more and more distant. The larger the value of the objective function, the better the goal optimization. When the function value of the objective function reaches the preset function value, it means that the adjusted social relationship network meets the needs. Among them, the specific numerical value of the preset function value is not too limited, and technical personnel in this field can set it according to actual needs.
[0130] An example of an objective function is given in the embodiment of the present disclosure, see Formula 1:
[0131] Formula 1:
[0132]
[0133] In Formula 1, G is a positive sample set, which includes positive samples in the social network, and positive samples are edges in the social network;
[0134] S' is a negative sample set, which includes negative samples sampled in the social network. Negative samples are samples between two objects without edges selected by sampling. For example, if there is an edge between A and B, and there is no edge between A and C, then<A,B> is a positive sample,<A,C> is a negative sample, where<A,B> and<A,C> is the representation of the edge, A, B and C are all one object;
[0135] e is a positive sample, f(e) is the vector inner product of the two nodes corresponding to e;
[0136] e' is a negative sample, and f(e') is the vector inner product of the two nodes corresponding to e';
[0137] L represents the target of social network adjustment. The larger the value of L is, the more compact the nodes corresponding to positive samples in the social network are, and the more distant the nodes corresponding to negative samples are.
[0138] It should be noted that we should understand from the overall perspective of samples in the social network that the nodes corresponding to positive samples are more compact, while the nodes corresponding to negative samples are more distant.
[0139] 3) Adjust your social network
[0140] The social network is adjusted in a distributed manner according to the number of divided sample sets, the number of training nodes, the representation dimension, etc. The social network can be adjusted each time by referring to the following process:
[0141] During the initial adjustment, the embedding data of each object in the social network can be adjusted according to the customized parameters. After the adjustment, it is determined whether the preset adjustment stop condition is met according to the objective function. If not, the embedding data of each object is adjusted through the distance function according to the customized parameters and the function value of the objective function, so that the relationship density between different objects with social relationships in the adjusted social network is higher than the relationship density before the adjustment until the preset stop condition is met.
[0142] In the adjusted social network, objects with heavy-weighted relationship types tend to be more compact. For example, if the weights of one-way attention relationship, two-way attention relationship, like relationship, and third-party relationship are 2, 5, 1, and 2 respectively, objects with two-way attention relationship in the adjusted social network are more compact.
[0143] It should be noted that the relationship density between different objects with social relationships in the above-mentioned adjusted social network is higher than the relationship density before the adjustment. This can be understood as the nodes corresponding to the positive samples in the objective function are more compact, and the nodes corresponding to the negative samples are more distant.
[0144] The above-mentioned preset stop conditions may include but are not limited to:
[0145] The first preset stop condition:
[0146] The number of first objects reaches a preset number, and the first objects are objects whose social attribute data is updated a preset number of times when the social relationship network is adjusted.
[0147] Each time the social network is adjusted, it is possible that the social attribute data of all objects need to be adjusted, but it is also possible that the social attribute data of some objects do not need to be adjusted. In this case, a preset number of times is set as the number of times the social network is adjusted. When the number of times the social attribute data of a preset number of objects is updated reaches the preset number of times, it is considered that the number of times the social network is adjusted is reached, and the adjustment of the social network is ended.
[0148] There are no excessive limitations on the above preset quantity and preset times, and technicians in this field can set them according to actual needs.
[0149] The second preset stop condition:
[0150] The function value of the objective function reaches the preset function value.
[0151] When the function value of the objective function reaches the preset function value, it is considered that the adjusted social relationship network meets the demand, and the adjustment of the social relationship network can be ended at this time.
[0152] See also Figure 4 , a schematic diagram of an adjusted social relationship network is given, which shows that B and D have a direct social relationship, A, B, C, D and F have a direct or indirect social relationship, E and G have a direct social relationship, but E and G have no social relationship with A, B, C, D and F; in the trained social relationship network, B and D are relatively compact, A, B, C, D and F are relatively compact, E and G are relatively compact, but E and G are relatively distant from other objects, and A, B, C, D, E and F are each an object.
[0153] In the present disclosure, by integrating social relationship data and adjusting the social relationship network, complex object representation information in the social relationship network can be converted into low-dimensional simple social attribute data, providing a convenient object representation method in a large-scale social relationship network; and in the present disclosure, the social relationship network can also be adjusted according to the weights of multiple relationship types, so that each object can be specifically represented under multiple relationship types; in the present disclosure, the weights of each relationship type can be adjusted according to the target social scenario, thereby achieving the representation of each object in different social scenarios.
[0154] See also Figure 5Based on the same inventive concept, the embodiment of the present disclosure further provides a social attribute data determination device 500 based on social relations, comprising a social relation acquisition unit 501, a social relation network determination unit 502, a relation network adjustment unit 503 and an attribute data determination unit 504, wherein:
[0155] The social relationship acquisition unit 501 is configured to acquire a social relationship data set, wherein the social relationship data set includes social relationship data of at least one object, and the social relationship data is used to represent the relationship closeness between different objects having social relationships;
[0156] The social relationship network determination unit 502 is configured to determine a social relationship network according to the social relationship data set, wherein the social relationship network includes social attribute data of the at least one object, the social attribute data is determined according to the social relationship data, and the social attribute data is used to indicate the position of the at least one object in the social relationship network;
[0157] The above-mentioned relationship network adjustment unit 503 is configured to perform adjustment on the above-mentioned social relationship network so that the relationship closeness between different objects having social relationships in the adjusted social relationship network is higher than the relationship closeness before the adjustment;
[0158] The attribute data determining unit 504 is configured to determine the social attribute data of the at least one object in the adjusted social relationship network.
[0159] As an optional embodiment, the social relationship data includes multiple relationship types, and the social relationship network determination unit is specifically configured to execute:
[0160] Determine the weight of each relationship type among the above multiple relationship types;
[0161] The social relationship network is determined according to the social relationship data set and the weights of the various relationship types.
[0162] As an optional embodiment, the above social relationship data set includes social relationship data in a target social scenario;
[0163] The social network determination unit is specifically configured to execute:
[0164] Determine the association values between the above-mentioned various relationship types and the target social scenario, and determine the weights of the above-mentioned various relationship types according to the above-mentioned association values; or
[0165] Determine the preset mapping relationship between the relationship type and the weight corresponding to the target social scenario, and determine the weights of the various relationship types according to the preset mapping relationship between the relationship type and the weight.
[0166] As an optional embodiment, the social relationship acquisition unit is further configured to execute:
[0167] After the step of obtaining the social relationship data set and before determining the social relationship network based on the social relationship data set, if an abnormal object is determined in the at least one object, the social relationship data of the abnormal object is deleted from the social relationship data set, wherein the abnormal object is an object that affects the accuracy of the social attribute data of other objects in the social relationship network, and the abnormal object is determined based on the data volume of the social relationship data of the object.
[0168] As an optional embodiment, the relationship network adjustment unit is configured to execute:
[0169] The social network is adjusted in a distributed manner until a preset adjustment stop condition is met.
[0170] As an optional embodiment, the preset adjustment stop condition includes:
[0171] The number of first objects reaches a preset number, and the first objects are objects whose social attribute data are updated a preset number of times when the social relationship network is adjusted; or
[0172] The function value of the objective function of the social relationship network reaches a preset function value, and the function value of the objective function represents the degree of closeness of the relationship between different objects in the social relationship network.
[0173] See also Figure 6 , based on the same inventive concept, the embodiment of the present disclosure further provides an electronic device 600, including a processor 601, and a memory 602 for storing instructions executable by the processor;
[0174] The processor is configured to perform the following process:
[0175] Acquire a social relationship data set, wherein the social relationship data set includes social relationship data of at least one object, and the social relationship data is used to represent the closeness of the relationship between different objects having a social relationship;
[0176] Determine a social relationship network according to the social relationship data set, wherein the social relationship network includes social attribute data of the at least one object, the social attribute data is determined according to the social relationship data, and the social attribute data is used to represent the position of the at least one object in the social relationship network;
[0177] Adjusting the social relationship network so that the relationship closeness between different objects with social relationships in the adjusted social relationship network is higher than the relationship closeness before the adjustment;
[0178] The social attribute data of the at least one object in the adjusted social relationship network is determined.
[0179] As an optional embodiment, the social relationship data includes multiple relationship types, and the step of determining the social relationship network according to the social relationship data set includes:
[0180] Determine the weight of each relationship type among the above multiple relationship types;
[0181] The social relationship network is determined according to the social relationship data set and the weights of the various relationship types.
[0182] As an optional embodiment, the above social relationship data set includes social relationship data in a target social scenario;
[0183] The step of determining the weight of each relationship type among the multiple relationship types includes:
[0184] Determine the association values between the above-mentioned various relationship types and the target social scenario, and determine the weights of the above-mentioned various relationship types according to the above-mentioned association values; or
[0185] Determine the preset mapping relationship between the relationship type and the weight corresponding to the target social scenario, and determine the weights of the various relationship types according to the preset mapping relationship between the relationship type and the weight.
[0186] As an optional embodiment, after the step of obtaining the social relationship data set and before determining the social relationship network according to the social relationship data set, the method further includes:
[0187] If an abnormal object is determined in at least one of the above objects, the social relationship data of the abnormal object is deleted from the above social relationship data set, wherein the abnormal object is an object that affects the accuracy of the social attribute data of other objects in the above social relationship network, and the abnormal object is determined based on the data volume of the social relationship data of the object.
[0188] As an optional embodiment, the step of adjusting the social relationship network includes:
[0189] The social network is adjusted in a distributed manner until a preset adjustment stop condition is met.
[0190] As an optional embodiment, the preset adjustment stop condition includes:
[0191] The number of first objects reaches a preset number, and the first objects are objects whose social attribute data are updated a preset number of times when the social relationship network is adjusted; or
[0192] The function value of the objective function of the social relationship network reaches a preset function value, and the function value of the objective function represents the degree of closeness of the relationship between different objects in the social relationship network.
[0193] It should be noted that the user / account information involved in this disclosure is collected and subsequently processed and analyzed with the authorization of the user / account.
[0194] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by a processor of the electronic device to complete the method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0195] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0196] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for determining social attribute data based on social relationships, characterized in that: include: Acquire a social relationship data set, wherein the social relationship data set includes social relationship data of at least one object, the social relationship data is used to represent the closeness of relationships between different objects having social relationships, and the social relationship data includes multiple relationship types; Determine the weight of each relationship type among the multiple relationship types; determine a social relationship network according to the social relationship data set and the weights of the various relationship types, wherein the social relationship network includes social attribute data of the at least one object, the social attribute data is determined according to the social relationship data, and the social attribute data is used to represent the position of the at least one object in the social relationship network; The social relationships between objects in the acquired social relationship network are divided into several sample sets according to the account ID in the social relationship network; the number of relationship types, the relationship types and the weights of each relationship type are set as customized parameters of the social relationship network; according to the customized parameters and the function value of the objective function, the embedded vector data of each object is adjusted by the distance function, so that the relationship closeness between different objects with social relationships in the adjusted social relationship network is higher than the relationship closeness before the adjustment, and the function value of the objective function represents the size of the relationship closeness between different objects in the social relationship network; The social attribute data of the at least one object in the adjusted social relationship network is determined.
2. The method according to claim 1, characterized in that The social relationship data set includes social relationship data in a target social scenario; The step of determining the weight of each relationship type among the multiple relationship types comprises: Determining association values between the various relationship types and the target social scenario, and determining weights of the various relationship types according to the association values; or Determine a preset mapping relationship between the relationship type and the weight corresponding to the target social scenario, and determine the weights of the various relationship types according to the preset mapping relationship between the relationship type and the weight.
3. The method according to claim 1, characterized in that After the step of acquiring the social relationship data set and before determining the social relationship network according to the social relationship data set, the step further includes: If an abnormal object is determined in the at least one object, the social relationship data of the abnormal object is deleted from the social relationship data set, wherein the abnormal object is an object that affects the accuracy of social attribute data of other objects in the social relationship network, and the abnormal object is determined according to the data volume of the social relationship data of the object.
4. The method according to claim 1, characterized in that The step of adjusting the social relationship network includes: The social relationship network is distributedly adjusted until a preset adjustment stop condition is met.
5. The method according to claim 4, characterized in that The preset adjustment stop condition includes: The number of first objects reaches a preset number, and the first objects are objects whose social attribute data is updated a preset number of times when the social relationship network is adjusted; or The function value of the objective function of the social relationship network reaches a preset function value.
6. A device for determining social attribute data based on social relationships, characterized in that: It includes a social relationship acquisition unit, a social relationship network determination unit, a relationship network adjustment unit and an attribute data determination unit, wherein: The social relationship acquisition unit is configured to execute acquisition of a social relationship data set, wherein the social relationship data set includes social relationship data of at least one object, the social relationship data is used to represent the relationship closeness between different objects having social relationships, and the social relationship data includes multiple relationship types; The social relationship network determination unit is configured to determine the weight of each relationship type among the multiple relationship types; determine the social relationship network according to the social relationship data set and the weights of each relationship type, wherein the social relationship network includes social attribute data of the at least one object, the social attribute data is determined according to the social relationship data, and the social attribute data is used to represent the position of the at least one object in the social relationship network; The relationship network adjustment unit is configured to divide the social relationships between objects in the acquired social relationship network into a plurality of sample sets according to the account ID in the social relationship network; set the number of relationship types, the relationship types and the weights of each relationship type as customized parameters of the social relationship network; adjust the embedded vector data of each object through a distance function according to the customized parameters and the function value of the objective function, so that the relationship closeness between different objects with social relationships in the adjusted social relationship network is higher than the relationship closeness before the adjustment, and the function value of the objective function represents the size of the relationship closeness between different objects in the social relationship network; The attribute data determining unit is configured to determine the social attribute data of the at least one object in the adjusted social relationship network.
7. The device according to claim 6, characterized in that The social relationship data set includes social relationship data in a target social scenario; The social network determination unit is specifically configured to execute: Determining association values between the various relationship types and the target social scenario, and determining weights of the various relationship types according to the association values; or Determine a preset mapping relationship between the relationship type and the weight corresponding to the target social scenario, and determine the weights of the various relationship types according to the preset mapping relationship between the relationship type and the weight.
8. The device according to claim 6, characterized in that The social relationship acquisition unit is further configured to execute After the step of obtaining the social relationship data set and before determining the social relationship network based on the social relationship data set, if an abnormal object is determined in the at least one object, the social relationship data of the abnormal object is deleted from the social relationship data set, wherein the abnormal object is an object that affects the accuracy of social attribute data of other objects in the social relationship network, and the abnormal object is determined based on the data volume of the social relationship data of the object.
9. The device according to claim 6, characterized in that The relationship network adjustment unit is configured to execute: The social relationship network is distributedly adjusted until a preset adjustment stop condition is met.
10. The device according to claim 9, characterized in that The preset adjustment stop condition includes: The number of first objects reaches a preset number, and the first objects are objects whose social attribute data are updated a preset number of times when the social relationship network is adjusted; or The function value of the objective function of the social relationship network reaches a preset function value, and the function value of the objective function represents the degree of closeness of the relationship between different objects in the social relationship network.
11. An electronic device, characterized in that: comprising a processor, and a memory for storing instructions executable by the processor; The processor is configured to execute the method according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 5.
