User searching method and device

文档序号:1798837 发布日期:2021-11-05 浏览:14次 中文

阅读说明:本技术 一种用户搜索方法及装置 (User searching method and device ) 是由 周洁芸 王中晴 彭涛 马金韬 于 2021-08-19 设计创作,主要内容包括:本发明实施例提供了一种用户搜索方法及装置,涉及互联网应用技术领域,上述方法包括:获得基于目标用户的静态特征和动态特征生成的目标表示特征,其中,静态特征为:随用户参与网络行为不变的特征,动态特征为:随用户参与网络行为变化的特征;计算目标表示特征与用户特征库中存储的已有用户的表示特征间的相似度,其中,已有用户的表示特征是基于已有用户的静态特征、静态关系、动态特征和动态关系得到的特征;按照计算得到的相似度由高到低的顺序,在已有用户中搜索所述目标用户的关联用户。应用本发明实施例提供的方案搜索用户,能够提高搜索到的关联用户的准确度。(The embodiment of the invention provides a user searching method and a user searching device, which relate to the technical field of Internet application, and the method comprises the following steps: obtaining target representation characteristics generated based on static characteristics and dynamic characteristics of a target user, wherein the static characteristics are as follows: the dynamic characteristics are the characteristics that the network behavior is invariable along with the participation of the user: characteristics that change as a user participates in network behavior; calculating the similarity between the target representation characteristics and the representation characteristics of the existing users stored in a user characteristic library, wherein the representation characteristics of the existing users are characteristics obtained based on the static characteristics, the static relation, the dynamic characteristics and the dynamic relation of the existing users; and searching the related users of the target user from the existing users according to the sequence of the calculated similarity from high to low. By applying the scheme provided by the embodiment of the invention to search the user, the accuracy of the searched associated user can be improved.)

1. A method for searching a user, the method comprising:

obtaining target representation characteristics generated based on static characteristics and dynamic characteristics of a target user, wherein the static characteristics are as follows: the dynamic characteristics are the characteristics that the network behavior is invariable along with the participation of the user, and are as follows: characteristics that change as a user participates in network behavior;

calculating the similarity between the target representation feature and the representation features of the existing users stored in a user feature library, wherein the representation features of the existing users are features obtained based on the static features, static relations, dynamic features and dynamic relations of the existing users, and the static relations are as follows: the relationship between the users is determined based on the static characteristics of the users, and the dynamic relationship is as follows: relationships between users determined based on dynamic characteristics of the users;

and searching the related users of the target user from the existing users according to the sequence of the calculated similarity from high to low.

2. The method of claim 1, wherein the representation characteristics of the existing user are generated as follows:

generating static representation characteristics of the existing user according to the static characteristics and the static relation of the existing user;

generating the dynamic representation characteristics of the existing user according to the dynamic characteristics and the dynamic relation of the existing user;

and performing weighted fusion on the static representation characteristics and the dynamic representation characteristics based on preset characteristic weight to obtain the representation characteristics of the existing user.

3. The method according to claim 2, wherein the weighting and fusing the static representation features and the dynamic representation features based on preset feature weights to obtain the representation features of the existing users comprises:

determining a first dimension and a second dimension according to a preset feature weight, wherein the first dimension is as follows: and performing dimensionality reduction on the static representation feature to obtain a feature dimension, wherein the second dimension is as follows: dimensionality of the feature obtained after dimensionality reduction processing is carried out on the dynamic representation feature;

reducing the dimension of the statically represented feature to the first dimension;

reducing the dimension of the dynamically represented feature to the second dimension;

and splicing the static representation characteristics after the dimension reduction processing and the dynamic representation characteristics after the dimension reduction processing to obtain the representation characteristics of the existing user.

4. The method according to claim 2, wherein the generating the static representation feature of the existing user according to the static feature and the static relationship of the existing user comprises:

determining nodes corresponding to existing users in static graph data, wherein each node in the static graph data corresponds to one existing user, the attribute of each node comprises the static characteristics of the user corresponding to the node, and the edge between two nodes represents the static relation between the two nodes;

obtaining the static characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes;

and generating the static representation characteristics of the existing users according to the obtained static characteristics and the weights.

5. The method according to any one of claims 2-4, wherein the generating of the dynamic representation feature of the existing user according to the dynamic feature and the dynamic relationship of the existing user comprises:

determining nodes corresponding to existing users in dynamic graph data, wherein each node in the dynamic graph data corresponds to one existing user, the attribute of each node comprises the dynamic characteristics of the user corresponding to the node, and the edge between two nodes represents the dynamic relationship between the two nodes;

obtaining the dynamic characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes;

and generating the dynamic representation characteristics of the existing users according to the obtained dynamic characteristics and the weights.

6. The method of claim 5, wherein the weight of an edge between two nodes in graph data is determined as follows: the static graph data or the dynamic graph data:

respectively inputting the user characteristics included in the attributes of each node of the two nodes into a pre-trained class attribution degree calculation model to obtain the class attribution degrees of the users corresponding to the two nodes, wherein the class attribution degree calculation model is a regression model;

and determining the weight of the edge between the two nodes according to the obtained class attribution degree.

7. The method according to claim 6, wherein the determining the weight of the edge between the two nodes according to the obtained class attribution degree comprises:

determining the weight of the edge between the two nodes according to the following expression:

wherein j and k represent the identity of the node, Wj,kRepresenting the weight of the edge between node j and node k,indicating the category attribution degree of the user corresponding to the node j,the category attribution degree of a user corresponding to the node k is represented, max () represents a maximum value function, and avg () represents a mean value function.

8. The method according to any one of claims 1-4, wherein the obtaining target representation features generated based on static features and dynamic features of a target user comprises:

determining the identification of a target user;

and obtaining the target representation characteristics stored in the user characteristic library and corresponding to the identification of the target user.

9. An apparatus for searching a user, the apparatus comprising:

the representation feature acquisition module is used for acquiring a target representation feature generated based on a static feature and a dynamic feature of a target user, wherein the static feature is as follows: the dynamic characteristics are the characteristics that the network behavior is invariable along with the participation of the user, and are as follows: characteristics that change as a user participates in network behavior;

a similarity calculation module, configured to calculate a similarity between the target representation feature and a representation feature of an existing user stored in a user feature library, where the representation feature of the existing user is a feature obtained based on a static feature, a static relationship, a dynamic feature, and a dynamic relationship of the existing user, and the static relationship is: the relationship between the users is determined based on the static characteristics of the users, and the dynamic relationship is as follows: relationships between users determined based on dynamic characteristics of the users;

and the user searching module is used for searching the related users of the target user in the existing users according to the sequence of the calculated similarity from high to low.

10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;

a memory for storing a computer program;

a processor for implementing the method steps of any of claims 1 to 8 when executing a program stored in the memory.

11. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-8.

Technical Field

The invention relates to the technical field of internet application, in particular to a user searching method and device.

Background

In different scenarios, a service provider may provide services to users belonging to the same category according to the same policy. For example, in an information pushing scenario, the same information may be pushed for users belonging to the same category; in the scenario of processing the black product user, the same information shielding strategy can be adopted for the black product user to perform information shielding.

In view of the above, for a single user, the user may be searched for a related user according to the category to which the user belongs and the categories to which other users belong, and then the user may be provided with a service based on the information of the related user.

In the prior art, the classification of a user is generally determined based on a classification model, but is limited by factors such as the richness of sample data, the data volume and the like, and the accuracy is low when the classification model obtained by training is used for classifying the user, so that the accuracy of the searched associated user is low when the user is searched.

Disclosure of Invention

The embodiment of the invention aims to provide a user searching method and device so as to improve the accuracy of searched associated users. The specific technical scheme is as follows:

in a first aspect of the present invention, there is provided a user search method, where the method includes:

obtaining target representation characteristics generated based on static characteristics and dynamic characteristics of a target user, wherein the static characteristics are as follows: the dynamic characteristics are the characteristics that the network behavior is invariable along with the participation of the user, and are as follows: characteristics that change as a user participates in network behavior;

calculating the similarity between the target representation feature and the representation features of the existing users stored in a user feature library, wherein the representation features of the existing users are features obtained based on the static features, static relations, dynamic features and dynamic relations of the existing users, and the static relations are as follows: the relationship between the users is determined based on the static characteristics of the users, and the dynamic relationship is as follows: relationships between users determined based on dynamic characteristics of the users;

and searching the related users of the target user from the existing users according to the sequence of the calculated similarity from high to low.

In one embodiment of the invention, the representation characteristics of the existing user are generated as follows:

generating static representation characteristics of the existing user according to the static characteristics and the static relation of the existing user;

generating the dynamic representation characteristics of the existing user according to the dynamic characteristics and the dynamic relation of the existing user;

and performing weighted fusion on the static representation characteristics and the dynamic representation characteristics based on preset characteristic weight to obtain the representation characteristics of the existing user.

In an embodiment of the present invention, the performing weighted fusion on the static representation feature and the dynamic representation feature based on a preset feature weight to obtain the representation feature of the existing user includes:

determining a first dimension and a second dimension according to a preset feature weight, wherein the first dimension is as follows: and performing dimensionality reduction on the static representation feature to obtain a feature dimension, wherein the second dimension is as follows: dimensionality of the feature obtained after dimensionality reduction processing is carried out on the dynamic representation feature;

reducing the dimension of the statically represented feature to the first dimension;

reducing the dimension of the dynamically represented feature to the second dimension;

and splicing the static representation characteristics after the dimension reduction processing and the dynamic representation characteristics after the dimension reduction processing to obtain the representation characteristics of the existing user.

In an embodiment of the present invention, the generating the static representation feature of the existing user according to the static feature and the static relationship of the existing user includes:

determining nodes corresponding to existing users in static graph data, wherein each node in the static graph data corresponds to one existing user, the attribute of each node comprises the static characteristics of the user corresponding to the node, and the edge between two nodes represents the static relation between the two nodes;

obtaining the static characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes;

and generating the static representation characteristics of the existing users according to the obtained static characteristics and the weights.

In an embodiment of the present invention, the generating the dynamic representation feature of the existing user according to the dynamic feature and the dynamic relationship of the existing user includes:

determining nodes corresponding to existing users in dynamic graph data, wherein each node in the dynamic graph data corresponds to one existing user, the attribute of each node comprises the dynamic characteristics of the user corresponding to the node, and the edge between two nodes represents the dynamic relationship between the two nodes;

obtaining the dynamic characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes;

and generating the dynamic representation characteristics of the existing users according to the obtained dynamic characteristics and the weights.

In an embodiment of the present invention, the weight of an edge between two nodes in graph data is determined in the following manner: the static graph data or the dynamic graph data:

respectively inputting the user characteristics included in the attributes of each node of the two nodes into a pre-trained class attribution degree calculation model to obtain the class attribution degrees of the users corresponding to the two nodes, wherein the class attribution degree calculation model is a regression model;

and determining the weight of the edge between the two nodes according to the obtained class attribution degree.

In an embodiment of the present invention, the determining the weight of the edge between the two nodes according to the obtained category attribution degree includes:

determining the weight of the edge between the two nodes according to the following expression:

wherein j and k represent the identity of the node, Wj,kRepresenting the weight of the edge between node j and node k,indicating the category attribution degree of the user corresponding to the node j,the category attribution degree of a user corresponding to the node k is represented, max () represents a maximum value function, and avg () represents a mean value function.

In an embodiment of the present invention, the obtaining target representation features generated based on static features and dynamic features of a target user includes:

determining the identification of a target user;

and obtaining the target representation characteristics stored in the user characteristic library and corresponding to the identification of the target user.

In a second aspect, an embodiment of the present invention further provides a user search apparatus, where the apparatus includes:

the representation feature acquisition module is used for acquiring a target representation feature generated based on a static feature and a dynamic feature of a target user, wherein the static feature is as follows: the dynamic characteristics are the characteristics that the network behavior is invariable along with the participation of the user, and are as follows: characteristics that change as a user participates in network behavior;

a similarity calculation module, configured to calculate a similarity between the target representation feature and a representation feature of an existing user stored in a user feature library, where the representation feature of the existing user is a feature obtained based on a static feature, a static relationship, a dynamic feature, and a dynamic relationship of the existing user, and the static relationship is: the relationship between the users is determined based on the static characteristics of the users, and the dynamic relationship is as follows: relationships between users determined based on dynamic characteristics of the users;

and the user searching module is used for searching the related users of the target user in the existing users according to the sequence of the calculated similarity from high to low.

In one embodiment of the present invention, the apparatus further comprises: the representation characteristic generation module is used for generating the representation characteristics of the existing users;

the representation feature generation module comprises:

the static representation feature generation submodule is used for generating the static representation features of the existing users according to the static features and the static relations of the existing users;

the dynamic representation characteristic generation submodule is used for generating the dynamic representation characteristics of the existing user according to the dynamic characteristics and the dynamic relation of the existing user;

and the feature fusion submodule is used for performing weighted fusion on the static representation features and the dynamic representation features based on preset feature weights to obtain the representation features of the existing users.

In an embodiment of the present invention, the feature fusion submodule is specifically configured to:

determining a first dimension and a second dimension according to a preset feature weight, wherein the first dimension is as follows: and performing dimensionality reduction on the static representation feature to obtain a feature dimension, wherein the second dimension is as follows: dimensionality of the feature obtained after dimensionality reduction processing is carried out on the dynamic representation feature;

reducing the dimension of the statically represented feature to the first dimension;

reducing the dimension of the dynamically represented feature to the second dimension;

and splicing the static representation characteristics after the dimension reduction processing and the dynamic representation characteristics after the dimension reduction processing to obtain the representation characteristics of the existing user.

In an embodiment of the present invention, the static representation feature generation submodule is specifically configured to:

determining nodes corresponding to existing users in static graph data, wherein each node in the static graph data corresponds to one existing user, the attribute of each node comprises the static characteristics of the user corresponding to the node, and the edge between two nodes represents the static relation between the two nodes;

obtaining the static characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes;

and generating the static representation characteristics of the existing users according to the obtained static characteristics and the weights.

In an embodiment of the present invention, the dynamic representation feature generation submodule is specifically configured to:

determining nodes corresponding to existing users in dynamic graph data, wherein each node in the dynamic graph data corresponds to one existing user, the attribute of each node comprises the dynamic characteristics of the user corresponding to the node, and the edge between two nodes represents the dynamic relationship between the two nodes;

obtaining the dynamic characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes;

and generating the dynamic representation characteristics of the existing users according to the obtained dynamic characteristics and the weights.

In one embodiment of the present invention, the apparatus further comprises: a weight determining module, configured to determine a weight of an edge between two nodes in graph data, where the graph data is: the static graph data or the dynamic graph data;

the weight determination module comprises:

a category attribution degree obtaining submodule, configured to input, to the features of the user included in the attribute of each of the two nodes, a pre-trained category attribution degree calculation model respectively, and obtain category attributions degrees of the users corresponding to the two nodes, where the category attribution degree calculation model is a regression model;

and the weight determining submodule is used for determining the weight of the edge between the two nodes according to the obtained class attribution degree.

In an embodiment of the present invention, the weight determining submodule is specifically configured to:

determining the weight of the edge between the two nodes according to the following expression:

wherein j and k represent the identity of the node, Wj,kRepresenting the weight of the edge between node j and node k,indicating the category attribution degree of the user corresponding to the node j,the category attribution degree of a user corresponding to the node k is represented, max () represents a maximum value function, and avg () represents a mean value function.

In an embodiment of the present invention, the expression characteristic obtaining module is specifically configured to:

determining the identification of a target user;

and obtaining the target representation characteristics stored in the user characteristic library and corresponding to the identification of the target user.

In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;

a memory for storing a computer program;

and the processor is used for realizing the steps of any user searching method when executing the program stored in the memory.

In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any of the above user search method steps.

As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to search for a user, first, the target representation feature generated based on the static feature and the dynamic feature of the target user is obtained, then, the similarity between the target representation feature and the representation features of the existing users stored in the user feature library is calculated, and then, the associated users of the target user are searched for in the existing users according to the sequence of the calculated similarities from high to low.

Because the static characteristics of the users are the characteristics which are invariable along with the participation of the users in the network behavior, and the dynamic characteristics are the characteristics which are changed along with the participation of the users in the network behavior, the static relationship and the dynamic relationship determined based on the static characteristics and the dynamic characteristics are the association relationship between the users which is constructed by taking the set of all the characteristics embodied in the network by the users as the reference, and the association between the users can be accurately embodied.

And because the representation characteristics of the existing users are obtained based on the static characteristics, the static relations, the dynamic characteristics and the dynamic relations of the existing users, the representation characteristics of the existing users can accurately reflect the association between the existing users and other users in the network, and similarly, the target representation characteristics of the target users are generated based on the static characteristics and the dynamic characteristics of the target users, so that the similarity between the target representation characteristics and the representation characteristics of the existing users stored in the user characteristic library is calculated, the associated users associated with the target users in the existing users are searched according to the sequence of high or low similarity, all the associated users associated with the target users and different in association degree in the existing users can be determined, and the accuracy of searching the associated users can be improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.

Fig. 1 is a schematic flowchart of a first user searching method according to an embodiment of the present invention.

Fig. 2 is a schematic flow chart illustrating a first representative feature obtaining method according to an embodiment of the present invention.

Fig. 3 is a schematic flowchart of a second representative feature obtaining method according to an embodiment of the present invention.

Fig. 4 is a schematic diagram of performing weighted fusion on a static representation feature and a dynamic representation feature according to an embodiment of the present invention.

Fig. 5 is a schematic flow chart of a third representative feature obtaining method according to an embodiment of the present invention.

Fig. 6 is a schematic flow chart of a fourth representative feature obtaining method according to an embodiment of the present invention.

Fig. 7 is a schematic flowchart of a fifth representative feature obtaining method according to an embodiment of the present invention.

Fig. 8 is a flowchart illustrating a second user searching method according to an embodiment of the present invention.

Fig. 9 is a schematic structural diagram of a user search apparatus according to an embodiment of the present invention.

Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.

Because the accuracy of the searched associated user is low when the prior art is applied to searching the associated user, in order to solve the technical problem, the embodiment of the invention provides a user searching method and a user searching device.

In an embodiment of the present invention, a user search method is provided, where the method includes:

obtaining target representation characteristics generated based on static characteristics and dynamic characteristics of a target user, wherein the static characteristics are as follows: the dynamic characteristics are the characteristics that the network behavior is invariable along with the participation of the user: characteristics that change as a user participates in network behavior;

calculating the similarity between the target representation characteristics and the representation characteristics of the existing users stored in the user characteristic library, wherein the representation characteristics of the existing users are characteristics obtained based on the static characteristics, the static relationship, the dynamic characteristics and the dynamic relationship of the existing users, and the static relationship is as follows: the relationship between the users determined based on the static characteristics of the users, the dynamic relationship is as follows: relationships between users determined based on dynamic characteristics of the users;

and searching the related users of the target user from the existing users according to the sequence of the calculated similarity from high to low.

As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to search for a user, because the static feature of the user is a feature that is not changed along with the user participating in the network behavior, and the dynamic feature is a feature that is changed along with the user participating in the network behavior, the static relationship and the dynamic relationship determined based on the static feature and the dynamic feature are the association relationship between users that is constructed based on the set of all features that the user embodies in the network, and the association between users can be accurately embodied.

And because the representation characteristics of the existing users are obtained based on the static characteristics, the static relations, the dynamic characteristics and the dynamic relations of the existing users, the representation characteristics of the existing users can accurately reflect the association between the existing users and other users in the network, and similarly, the target representation characteristics of the target users are generated based on the static characteristics and the dynamic characteristics of the target users, so that the similarity between the target representation characteristics and the representation characteristics of the existing users stored in the user characteristic library is calculated, the associated users associated with the target users in the existing users are searched according to the sequence of high or low similarity, all the associated users associated with the target users and different in association degree in the existing users can be determined, and the accuracy of searching the associated users can be improved.

First, an application scenario of the embodiment of the present invention will be described below.

In different applications, users can be classified into different types according to different standards, and different service strategies can be adopted for users belonging to different categories according to user types. For example, in the information push application, users can be classified into four types, namely minor, young, middle-aged and old according to age, and different information can be pushed for different types of users; in the black user processing application, users can be divided into black users and white users according to the information and network behaviors of the users in the network, the same information shielding strategy can be adopted for the black users to carry out information shielding, and the information shielding is not carried out for the white users.

Based on the above situation, the scheme provided by the embodiment of the present invention can be applied in the following scenarios.

In a first scenario, a user type of a target user is known currently, users of the same type as the target user are searched for in existing users to serve as associated users associated with the target user, and services are provided for the target user based on information of the associated users.

And in a second scenario, the user type of the target user is not known at present, users related to the target user are searched in the existing users, and the type of the target user is determined based on the information of the related users, so that service is provided for the target user.

The following describes in detail a user search method provided by an embodiment of the present invention with a specific embodiment.

Referring to fig. 1, a flow diagram of a first user search method is provided, which includes the following steps S101-S103.

Step S101: target representation features generated based on static features and dynamic features of a target user are obtained.

Wherein the static characteristics are: a feature that is invariant to network behavior as users participate. For example, the information may be information that the user is not allowed to change after registering on the website, such as a user name; or the information that the user himself is not easy to change under normal conditions, such as the user's phone, mailbox, address, etc.

The dynamic characteristics are as follows: features that change as a user participates in network behavior. For example, the features may be revealed only as the user is continuously engaged in network behavior, such as user hobbies, website browsing preferences, and the like.

In an embodiment of the present invention, the user type of the target user may be known, and the server may store a user feature library, where the user feature library is used to store representation features of existing users, so that the target representation features of the target user may be stored in the user feature library. Therefore, the target representation characteristics of the target user can be obtained directly through the user characteristic library.

Specifically, the identifier of the target user may be determined first, and then the target representation feature corresponding to the identifier of the target user stored in the user feature library is obtained. This can improve the efficiency of obtaining the target representation feature.

In another embodiment of the present invention, the static feature and the dynamic feature of the target user may be obtained first, and then the target representation feature of the target user may be generated based on the static feature and the dynamic feature of the target user. Thus, the representation characteristics of the user can be obtained as long as the static characteristics and the dynamic characteristics of the user are obtained.

For example, the target representation feature of the target user may be generated by splicing the static feature and the dynamic feature.

Step S102: and calculating the similarity between the target representation feature and the representation features of the existing users stored in the user feature library.

Since the target representation feature and the representation feature of the existing user can be represented by vectors, the similarity between the target representation feature and the representation feature of the existing user can be calculated by calculating the distance between the vectors and representing the similarity by the calculated distance. The distance between vectors may be a cosine distance, a euclidean distance, etc.

Step S103: and searching the related users of the target user from the existing users according to the sequence of the calculated similarity from high to low.

The representation characteristics of the existing users are characteristics obtained based on the static characteristics, the static relation, the dynamic characteristics and the dynamic relation of the existing users.

The static relationship is as follows: relationships between users determined based on static characteristics of the users. Specifically, if two users have the same static characteristics, it can be considered that the users have a static relationship; the users can also be classified according to the similarity of the static features among the users, and the users belonging to the same type can be considered to have a static relationship.

The dynamic relation is as follows: relationships between users determined based on dynamic characteristics of the users. Specifically, if the users have the same dynamic characteristics, it can be considered that the users have a dynamic relationship; the users can also be classified according to the similarity of the dynamic features among the users, and the users belonging to the same type can be considered to have a dynamic relationship.

The representation characteristics of the existing users are characteristics obtained based on the static characteristics, the static relations, the dynamic characteristics and the dynamic relations of the existing users. Therefore, the representation characteristics of the existing user can not only represent all the characteristics of the existing user, but also represent all the static relationships and dynamic relationships between the existing user and other users.

And calculating the similarity between the obtained target representation features and the representation features of the existing users stored in the user feature library one by one, wherein the similarity can represent the degree of association between the target user and the existing users. And after the calculated similarity is sorted from high to low, the higher the similarity is, the deeper the correlation degree between the existing user and the target user is.

In an embodiment of the present invention, the above steps S102 and S103 may be implemented together by a faiss (Facebook AI Similarity Search, for clustering and Similarity Search library). Specifically, the target representation features of the target user are subjected to proximity search in the user feature library through an index mode included by the faiss, so that the representation features similar to the target representation features in the user feature library can be directly obtained, and the existing users corresponding to the representation features similar to the target representation features are users related to the target user.

In an embodiment of the present invention, a representation feature of an existing user whose similarity to a target representation feature exceeds a preset threshold may be determined, and referred to as a similar representation feature for convenience of description, and then the existing user corresponding to the similar representation feature may be used as an associated user of the target user. On the basis, the target user can be provided with services subsequently based on the information of the associated users. The value of the preset threshold can be selected according to practical application, and the embodiment of the invention does not make specific requirements on the value.

For example, in the black product user processing application, existing users corresponding to the representation features whose similarity to the target representation features exceeds the preset threshold may all be black users, and the target user may be considered to be also a black user, so that the target user may be subjected to information shielding by adopting the same information shielding strategy as the existing users.

As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to search for a user, because the static feature of the user is a feature that is not changed along with the user participating in the network behavior, and the dynamic feature is a feature that is changed along with the user participating in the network behavior, the static relationship and the dynamic relationship determined based on the static feature and the dynamic feature are the association relationship between users that is constructed based on the set of all features that the user embodies in the network, and the association between users can be accurately embodied.

And because the representation characteristics of the existing users are obtained based on the static characteristics, the static relations, the dynamic characteristics and the dynamic relations of the existing users, the representation characteristics of the existing users can accurately reflect the association between the existing users and other users in the network, and similarly, the target representation characteristics of the target users are generated based on the static characteristics and the dynamic characteristics of the target users, so that the similarity between the target representation characteristics and the representation characteristics of the existing users stored in the user characteristic library is calculated, the associated users associated with the target users in the existing users are searched according to the sequence of high or low similarity, all the associated users associated with the target users and different in association degree in the existing users can be determined, and the accuracy of searching the associated users can be improved.

When the application scene is processed by the black product users, the black product users with harmfulness have certain aggregations, and the user searching method provided by the invention can be used for mining the potential association among the black product users, is convenient for establishing the association network of the black product users, and has a better effect of connecting roots for the black product behaviors with large-scale group properties.

In an embodiment of the present invention, referring to fig. 2, a flowchart of a first method for obtaining a representation characteristic is provided, and compared with the embodiment shown in fig. 1, in this embodiment, the representation characteristic of the existing user in the step S102 can be obtained through the following steps S102A-S102C.

Step S102A: and generating the static representation characteristics of the existing user according to the static characteristics and the static relation of the existing user.

The static representation feature may be represented by a vector, so that the static representation feature of the existing user may be generated by processing the static feature and the static relationship of the existing user, and the generated vector may simultaneously represent the static feature of the existing user and the static relationship between the existing user and other users. The specific generation manner of the static representation features can be seen in detail in the embodiment of fig. 4 below.

Step S102B: and generating the dynamic representation characteristics of the existing users according to the dynamic characteristics and the dynamic relation of the existing users.

The dynamic representation feature can be represented by a vector, so that the dynamic representation feature of the existing user can be generated by processing the dynamic feature and the dynamic relationship of the existing user, and the generated vector can simultaneously represent the dynamic feature of the existing user and the dynamic relationship between the existing user and other users. The specific generation manner of the dynamic representation features can be seen in detail in the embodiment of fig. 5 below.

Step S102C: and performing weighted fusion on the static representation characteristics and the dynamic representation characteristics based on the preset characteristic weight to obtain the representation characteristics of the existing user.

In an embodiment of the present invention, the preset feature weight may be a weight occupied by the static representation feature and the dynamic representation feature in the representation feature of the existing user to be fused, so that the static representation feature and the dynamic representation feature are weighted and fused based on the preset feature weight, and the required representation feature of the existing user can be obtained.

For example, the required representation features of the existing users require that the weights of the static representation features and the dynamic representation features in the representation features are the same, the feature weights preset for the static representation features and the dynamic representation features may both be 50%, and the static representation features and the dynamic representation features are weighted and fused by the preset feature weight with a value of 50%, so that the static representation features and the dynamic representation features both occupy 50% of the weights in the fused representation features of the existing users.

In different applications, the representation characteristics of the existing users are generated, and different weights are required to be provided for the static representation characteristics and the dynamic representation characteristics, so that the preset characteristic weights can be selected according to actual applications, and the representation characteristics of the existing users meeting actual requirements are obtained.

For example, in an information push application, the requirements for the dynamic features of the user and the dynamic relationships between the dynamic features and other users are more than the requirements for the static features of the user and the static relationships between the static features and other users, so when generating the representation features of the existing users, the weights of the static representation features and the weights of the dynamic representation features can be preset to be 30% and 70%, respectively; in the black product user processing application, the requirements for the dynamic characteristics of the user and the dynamic relationship between the user and other users are consistent with the requirements for the static characteristics of the user and the static relationship between the user and other users, so when the representation characteristics of the existing user are generated, the weight of the static representation characteristics and the weight of the dynamic representation characteristics can be preset to be 50%.

As can be seen from the above, when a user is searched by applying the scheme provided by the embodiment of the present invention, the static representation feature of the existing user is generated according to the static feature and the static relationship, so that the static representation feature of the existing user can simultaneously represent the static feature of the existing user and the static relationship between the existing user and other users. And different values are selected for the preset feature weight according to the actual requirement, so that the weights of the static representation feature and the dynamic representation feature in the representation feature of the existing user can be adjusted, and the incidence relation between the existing user and other users can be represented more accurately and more in line with the actual requirement.

In an embodiment of the present invention, referring to fig. 3, a flowchart of a second method for obtaining a representation feature is provided, and compared with the embodiment shown in fig. 2, in this embodiment, the step S102C performs weighted fusion on the static representation feature and the dynamic representation feature based on the preset feature weight to obtain the representation feature of the existing user, which may be implemented by the following steps S102C1-S102C 4.

Step S102C 1: and determining a first dimension and a second dimension according to the preset feature weight.

Wherein the first dimension is: and performing dimensionality reduction on the static representation features to obtain the dimensionality of the features, wherein the second dimensionality is as follows: and performing dimension reduction processing on the dynamic representation features to obtain the dimensions of the features.

The dimension reduction process may be to reduce the dimension of the representation feature having the initial data dimension to obtain the representation feature having a data dimension lower than the former one. The first dimension may be a dimension of the statically represented feature after the dimension reduction processing is performed on the statically represented feature. The second dimension may be a dimension of the dynamic representation feature after the dimension reduction processing is performed on the dynamic representation feature. The values of the first dimension and the second dimension can satisfy the proportional relationship between the preset feature weight of the static representation feature and the preset feature weight of the dynamic representation feature, and the specific values of the first dimension and the second dimension can be selected according to actual requirements on the premise of satisfying the proportional relationship.

For example, if the preset feature weights of the static representation feature and the dynamic representation feature are both 50%, values of the first dimension and the second dimension may be selected according to actual requirements on the premise that the ratio of 1:1 is satisfied, for example, both the values may be 32 dimensions, or both the values may be 64 dimensions; if the preset feature weight of the static representation feature is 40%, and the preset feature weight of the dynamic representation feature is 60%, and the ratio of the two is 2:3, the values of the first dimension and the second dimension can be selected according to actual requirements on the premise that the ratio of the first dimension to the second dimension is 2:3, for example, the first dimension may be 32 dimensions, and the second dimension may be 48 dimensions.

Step S102C 2: the dimension of the statically represented feature is reduced to a first dimension.

Step S102C 3: and reducing the dimension of the dynamic representation feature to a second dimension.

In an embodiment of the present invention, the above-mentioned performing dimension reduction processing on the static representation feature and the dynamic representation feature respectively can be implemented based on an AutoEncoder (AutoEncoder) model, and the static representation feature and the dynamic representation feature having an initial data dimension are encoded, so that the static representation feature having a first dimension and the dynamic representation feature having a second dimension can be obtained.

The above-mentioned performing the dimension reduction processing on the static representation characteristic and the dynamic representation characteristic respectively can also be realized by other models or algorithms, and the embodiment of the present invention does not make specific requirements on this.

Step S102C 4: and splicing the static representation characteristics after the dimension reduction processing and the dynamic representation characteristics after the dimension reduction processing to obtain the representation characteristics of the existing user.

In an embodiment of the present invention, the static representation feature after the dimension reduction processing and the dynamic representation feature after the dimension reduction processing are spliced, and the splicing may be performed with the static representation feature as the head and the dynamic representation feature as the tail; or splicing can be performed by taking the dynamic representation characteristics as the head and the static representation characteristics as the tail; the static representation features and the dynamic representation features can be cross-spliced according to dimensions.

For example, referring to FIG. 4, a schematic diagram of a weighted fusion of static representation features and dynamic representation features is provided.

In the figure, the upper representation feature is a static representation feature, the lower representation feature is a dynamic representation feature, the initial data dimensions of the two are both 128, dimension reduction processing is carried out according to preset feature weights, in the dimension reduction process, the dimension of the static representation feature is firstly reduced to 128 × 3/2-a/3, and is finally reduced to (1-a) × 128, and (1-a) × 128 is a first dimension; and the dimension of the dynamic representation feature is firstly reduced to 128 × 1+ a/2, and finally reduced to a × 128, where a × 128 is the second dimension, and the static representation feature with the dimension of 128 × 1+ a/2 and the dynamic representation feature with the dimension of a × 128 are spliced to obtain the representation feature of the existing user.

The value of the coefficient a may be less than 1 and greater than or equal to 0, and the specific value may depend on the preset feature weight. If the static representation features and the dynamic representation features need to be subjected to dimension lifting again in the actual requirement, the static representation features which are already reduced to the first dimension and the dynamic representation features which are reduced to the second dimension can be subjected to dimension lifting processing to reach the initial dimension.

Therefore, when the scheme provided by the embodiment of the invention is applied to search users, the static representation characteristics and the dynamic representation characteristics are spliced after dimension reduction processing, and the static representation characteristics and the dynamic representation characteristics are low-dimensional data during splicing, so that the complexity of splicing the representation characteristics is greatly reduced, errors possibly caused by redundant information are reduced, and the accuracy and the search efficiency of subsequent search related users are improved. Meanwhile, the values of the first dimension and the second dimension after dimension reduction of the static representation feature and the dynamic representation feature need to meet the preset feature weights of the static representation feature and the dynamic representation feature, so that the weights of the static representation feature and the dynamic representation feature in the representation features of the spliced existing users can be determined according to the actual application requirements.

The above-mentioned database for storing the static and dynamic characteristics and the static and dynamic relationships may be a database capable of directly storing these data, or may be a database.

In an embodiment of the present invention, referring to fig. 5, a flowchart of a third method for obtaining representation characteristics is provided, and compared with the embodiment shown in fig. 2, in this embodiment, the step S102A described above generates the static representation characteristics of the existing user according to the static characteristics and the static relationships of the existing user, and may be implemented by the following steps S102a1-S102 A3.

Step S102a 1: and determining nodes corresponding to the existing users in the static graph data.

Each node in the static graph data corresponds to one existing user, so that each existing user can be represented as one node in the static graph data. The attribute of the node includes a static feature of the user corresponding to the node, that is, may include a feature of the node corresponding to an existing user that is invariant with network behavior. The edge between the two nodes represents the static relationship between the existing users corresponding to the two nodes.

Step S102a 2: and obtaining the static characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes.

The weight of the edge connected by the node may indicate the degree of association between the node and other nodes connected thereto. In the static graph data, each edge to which a node is connected has a weight, which can be used to indicate a static association degree between two nodes to which the edge is connected, that is, a static association degree between two users corresponding to the two nodes.

Step S102a 3: and generating the static representation characteristics of the existing users according to the obtained static characteristics and the weights.

In an embodiment of the present invention, the static representation features may be represented in a vector manner, so that the static representation features of the existing user are generated according to the obtained static features and weights, which may be implemented by a node2vec (network embedding) algorithm, where the nodes learn by walking around edges connected to the nodes, and the vector of the user corresponding to the node is generated based on the attribute of the node itself and the weight of the edge connected to the node, that is, the static representation features of the existing user corresponding to the node are generated based on the static features of the existing user corresponding to the node and the association between the static features of the existing user and the user corresponding to another node.

As can be seen from the above, when a user is searched by applying the scheme provided by the embodiment of the present invention, static graph data is introduced, and an existing user is customized to a node in the static graph data, where a node attribute includes a static feature of the existing user corresponding to the node, edges connected between nodes may represent a static relationship between the node and the user, and weights of the edges connected between the nodes may represent associations between other users corresponding to the node, so that a static representation feature generated based on the static feature included in the node attribute and the associations between the edges connected to the node and the other users, can comprehensively represent the static feature of the existing user corresponding to the node and the static relationship between the user and the other users.

In an embodiment of the present invention, referring to fig. 6, a flowchart of a fourth method for generating a representation feature is provided, and compared with the embodiment shown in fig. 2, in this embodiment, the step S102B described above generates a dynamic representation feature of an existing user according to a dynamic feature and a dynamic relationship of the existing user, and may be implemented by the following steps S102B1-S102B 3.

Step S102B 1: and determining nodes corresponding to the existing users in the dynamic graph data.

Each node in the dynamic graph data corresponds to one existing user, so that each existing user can be represented as one node in the dynamic graph data. The attribute of the node includes the dynamic characteristics of the user corresponding to the node, that is, the attribute may include the characteristics of the existing user corresponding to the node, which change with the network behavior. The edge between the two nodes represents the dynamic relationship between the existing users corresponding to the two nodes.

Step S102B 2: and obtaining the dynamic characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes.

The weight of the edge connected by the node may indicate the degree of association between the node and other nodes connected thereto. In the dynamic graph data, each edge connected to a node has a weight, which can be used to represent a dynamic association degree between two nodes connected to the edge, that is, a dynamic association degree between two users corresponding to the two nodes.

Step S102B 3: and generating the dynamic representation characteristics of the existing users according to the obtained dynamic characteristics and the weights.

In an embodiment of the present invention, the dynamic representation feature may be represented in a vector manner, so that the dynamic representation feature of the existing user is generated according to the obtained dynamic feature and the weight, and may be implemented by a node2vec (network embedding) algorithm, where the nodes learn by walking around edges connected to the nodes, and generate a vector of a user corresponding to the node based on the attribute of the node itself and the weight of the edge connected to the node, that is, generate the dynamic representation feature of the existing user corresponding to the node based on the dynamic feature of the existing user corresponding to the node and the association between the existing user and the user corresponding to another node.

As can be seen from the above, when a user is searched by applying the scheme provided by the embodiment of the present invention, dynamic graph data is introduced, and an existing user is customized to a node in the dynamic graph data, where a node attribute includes a dynamic feature of the existing user corresponding to the node, edges connected between nodes may represent a dynamic relationship between the node and the user, and a weight of an edge connected between nodes may represent an association between other users corresponding to the node, so that a dynamic representation feature generated based on the dynamic feature included in the node attribute and the association between the edge connected to the node and the other users represented by the weight of the edge can comprehensively represent the own dynamic feature of the existing user corresponding to the node and the dynamic relationship between the user and the other users.

In one embodiment of the present invention, referring to fig. 7, a fifth flowchart illustrating a feature obtaining method is provided, and compared with the embodiment shown in fig. 5, in this embodiment, the weights of the edges connected by the nodes in the step S102B2 can be implemented by the following steps S102B2a-S102B 2B.

The graph data is: static graph data or dynamic graph data.

Step S102B2 a: and respectively inputting the characteristics of the user included in the attribute of each node of the two nodes into a pre-trained category attribution degree calculation model to obtain the category attribution degree of the user corresponding to the two nodes.

Wherein, the category attribution degree calculation model is a regression model.

In an embodiment of the present invention, the pre-trained class attribution degree calculation model may be a regression model, the model may use a large number of pre-obtained users with different classes as training samples, and [0,1] as a risk score as a regression target, the closer the score obtained by processing the samples through the regression model is to 1, which means that the closer the user is to one of the classes of the known classes, the closer the obtained score is to 0, which means that the user is to the other classes of the known classes.

The features of the users included in the attributes of each of the two nodes are respectively input into a pre-trained class attribution degree calculation model, the obtained value of the class attribution degree of the users corresponding to the two nodes can be between [0,1], the closer to 1, the closer to one class, the closer to 0, the closer to the other class, the user corresponding to the node is.

For example, in the black user processing application, the pre-trained class attribution degree calculation model may use users classified into black users and white users as training samples, and use [0,1] as a risk score as a regression target, the closer to 1 the obtained score is, the more likely the user is to be a black user, the closer to 0 the obtained score is, the more likely the user is to be a white user, and the obtained score is the class attribution degree of the user corresponding to the node.

Step S102B 2B: and determining the weight of the edge between the two nodes according to the obtained class attribution degree.

In an embodiment of the present invention, according to the obtained category attribution degrees of the two users corresponding to the two nodes, the weight of the edge between the two nodes may be determined based on the following expression, and whether the users corresponding to the two nodes belong to the same category may be determined, so that the association relationship between the users corresponding to the two nodes may be determined.

Wherein j and k represent the identity of the node, Wj,kRepresenting the weight of the edge between node j and node k,indicating the category attribution degree of the user corresponding to the node j,the category attribution degree of a user corresponding to the node k is represented, max () represents a maximum value function, and avg () represents a mean value function.

If the category attribution degrees of the users corresponding to the two nodes are both greater than or equal to 0.5, the weight of the edge between the two nodes can be the maximum value of the values of the category attribution degrees of the users corresponding to the two nodes; if the category attribution degrees of the users corresponding to the two nodes are both less than 0.5, the weight value between the two nodes is 0, namely, the users corresponding to the two nodes have no incidence relation, so that the edges connected between the two nodes are cut off. If the values of the category attribution degrees of the users corresponding to the two nodes do not belong to the two situations, the weight of the edge between the two nodes can be the average value of the values of the category attribution degrees of the users corresponding to the two nodes.

As can be seen from the above, when a user is searched by applying the scheme provided by the embodiment of the present invention, the class attribution degree of the user corresponding to the node is calculated according to the pre-trained class attribution degree calculation model, so as to obtain the weight of the edge between the nodes. In addition, when the weight of the edge between the nodes is calculated, if the category attribution degrees of the users corresponding to the two nodes are both less than 0.5, the two nodes are not associated with each other, so that the edge between the two nodes is broken, and the data volume needing to be processed is reduced.

In an embodiment of the present invention, referring to fig. 8, a flowchart of a second user searching method is provided, and compared with the embodiment shown in fig. 1, in this embodiment, the step S101 of obtaining a target representation feature generated based on a static feature and a dynamic feature of a target user may include the following steps:

step S101A: an identification of the target user is determined.

Step S101B: and obtaining the target representation characteristics corresponding to the identification of the target user and stored in the user characteristic library.

As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to search for a user, the target representation feature corresponding to the identifier of the target user stored in the user feature library can be determined according to the determined identifier of the target user, so that the step of generating the target representation feature again can be omitted, and an existing user associated with the target user can be searched more efficiently.

Corresponding to the user searching method, the embodiment of the invention also provides a user searching device.

Referring to fig. 9, an embodiment of the present invention provides a schematic structural diagram of a user search apparatus, where the apparatus includes:

a representation feature obtaining module 901, configured to obtain a target representation feature generated based on a static feature and a dynamic feature of a target user, where the static feature is: the dynamic characteristics are the characteristics that the network behavior is invariable along with the participation of the user, and are as follows: characteristics that change as a user participates in network behavior;

a similarity calculation module 902, configured to calculate a similarity between the target representation feature and a representation feature of an existing user stored in a user feature library, where the representation feature of the existing user is a feature obtained based on a static feature, a static relationship, a dynamic feature, and a dynamic relationship of the existing user, and the static relationship is: the relationship between the users is determined based on the static characteristics of the users, and the dynamic relationship is as follows: relationships between users determined based on dynamic characteristics of the users;

and the user searching module 903 is configured to search the related users of the target user from the existing users according to the calculated similarity from high to low.

As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to search for a user, because the static feature of the user is a feature that is not changed along with the user participating in the network behavior, and the dynamic feature is a feature that is changed along with the user participating in the network behavior, the static relationship and the dynamic relationship determined based on the static feature and the dynamic feature are the association relationship between users that is constructed based on the set of all features that the user embodies in the network, and the association between users can be accurately embodied.

And because the representation characteristics of the existing users are obtained based on the static characteristics, the static relations, the dynamic characteristics and the dynamic relations of the existing users, the representation characteristics of the existing users can accurately reflect the association between the existing users and other users in the network, and similarly, the target representation characteristics of the target users are generated based on the static characteristics and the dynamic characteristics of the target users, so that the similarity between the target representation characteristics and the representation characteristics of the existing users stored in the user characteristic library is calculated, the associated users associated with the target users in the existing users are searched according to the sequence of high or low similarity, all the associated users associated with the target users and different in association degree in the existing users can be determined, and the accuracy of searching the associated users can be improved.

In one embodiment of the present invention, the apparatus further comprises: the representation characteristic generation module is used for generating the representation characteristics of the existing users;

the representation feature generation module comprises:

the static representation feature generation submodule is used for generating the static representation features of the existing users according to the static features and the static relations of the existing users;

the dynamic representation characteristic generation submodule is used for generating the dynamic representation characteristics of the existing user according to the dynamic characteristics and the dynamic relation of the existing user;

and the feature fusion submodule is used for performing weighted fusion on the static representation features and the dynamic representation features based on preset feature weights to obtain the representation features of the existing users.

As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to search a user, because the static representation features are generated according to the static features and the static relationships, the static representation features of the existing user can simultaneously represent the static relationships established between the static features of the existing user and other users based on the static features, and similarly, the dynamic representation features of the existing user can simultaneously represent the dynamic relationships established between the dynamic features of the existing user and other users based on the dynamic features, and the static representation features and the dynamic representation features of the existing user are weighted and fused according to the preset feature weights, the obtained representation features of the existing user can comprehensively represent the static features and the dynamic features of the user and the static relationships and the dynamic relationships with other users, and different values can be selected for the preset feature weights according to actual requirements, therefore, the proportion of the static representation characteristics and the dynamic representation characteristics in the representation characteristics of the existing users can be adjusted, and the association relation between the existing users and other users can be represented more accurately and more desirably.

In an embodiment of the present invention, the feature fusion submodule is specifically configured to:

determining a first dimension and a second dimension according to a preset feature weight, wherein the first dimension is as follows: and performing dimensionality reduction on the static representation feature to obtain a feature dimension, wherein the second dimension is as follows: dimensionality of the feature obtained after dimensionality reduction processing is carried out on the dynamic representation feature;

reducing the dimension of the statically represented feature to the first dimension;

reducing the dimension of the dynamically represented feature to the second dimension;

and splicing the static representation characteristics after the dimension reduction processing and the dynamic representation characteristics after the dimension reduction processing to obtain the representation characteristics of the existing user.

Therefore, when the scheme provided by the embodiment of the invention is applied to search users, the static representation characteristics and the dynamic representation characteristics are spliced after dimension reduction processing, and the static representation characteristics and the dynamic representation characteristics are low-dimensional data during splicing, so that the complexity of splicing the representation characteristics is greatly reduced, errors possibly caused by redundant information are reduced, and the accuracy and the search efficiency of subsequent search related users are improved. Meanwhile, the values of the first dimension and the second dimension after dimension reduction of the static representation feature and the dynamic representation feature need to meet the preset feature weights of the static representation feature and the dynamic representation feature, so that the weights of the static representation feature and the dynamic representation feature in the representation features of the spliced existing users can be determined according to the actual application requirements.

In an embodiment of the present invention, the static representation feature generation submodule is specifically configured to:

determining nodes corresponding to existing users in static graph data, wherein each node in the static graph data corresponds to one existing user, the attribute of each node comprises the static characteristics of the user corresponding to the node, and the edge between two nodes represents the static relation between the two nodes;

obtaining the static characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes;

and generating the static representation characteristics of the existing users according to the obtained static characteristics and the weights.

As can be seen from the above, when a user is searched by applying the scheme provided by the embodiment of the present invention, static graph data is introduced, and an existing user is customized to a node in the static graph data, where a node attribute includes a static feature of the existing user corresponding to the node, edges connected between nodes may represent a static relationship between the node and the user, and weights of the edges connected between the nodes may represent associations between other users corresponding to the node, so that a static representation feature generated based on the static feature included in the node attribute and the associations between the edges connected to the node and the other users, can comprehensively represent the static feature of the existing user corresponding to the node and the static relationship between the user and the other users.

In an embodiment of the present invention, the dynamic representation feature generation submodule is specifically configured to:

determining nodes corresponding to existing users in dynamic graph data, wherein each node in the dynamic graph data corresponds to one existing user, the attribute of each node comprises the dynamic characteristics of the user corresponding to the node, and the edge between two nodes represents the dynamic relationship between the two nodes;

obtaining the dynamic characteristics of the existing user from the attributes of the determined nodes, and obtaining the weight of the edges connected by the determined nodes;

and generating the dynamic representation characteristics of the existing users according to the obtained dynamic characteristics and the weights.

As can be seen from the above, when a user is searched by applying the scheme provided by the embodiment of the present invention, dynamic graph data is introduced, and an existing user is customized to a node in the dynamic graph data, where a node attribute includes a dynamic feature of the existing user corresponding to the node, edges connected between nodes may represent a dynamic relationship between the node and the user, and a weight of an edge connected between nodes may represent an association between other users corresponding to the node, so that a dynamic representation feature generated based on the dynamic feature included in the node attribute and the association between the edge connected to the node and the other users represented by the weight of the edge can comprehensively represent the own dynamic feature of the existing user corresponding to the node and the dynamic relationship between the user and the other users.

In one embodiment of the present invention, the apparatus further comprises: a weight determining module, configured to determine a weight of an edge between two nodes in graph data, where the graph data is: the static graph data or the dynamic graph data;

the weight determination module comprises:

a category attribution degree obtaining submodule, configured to input, to the features of the user included in the attribute of each of the two nodes, a pre-trained category attribution degree calculation model respectively, and obtain category attributions degrees of the users corresponding to the two nodes, where the category attribution degree calculation model is a regression model;

and the weight determining submodule is used for determining the weight of the edge between the two nodes according to the obtained class attribution degree.

In an embodiment of the present invention, the weight determining submodule is specifically configured to:

determining the weight of the edge between the two nodes according to the following expression:

wherein j and k represent the identity of the node, Wj,kRepresenting the weight of the edge between node j and node k,indicating the category attribution degree of the user corresponding to the node j,the category attribution degree of a user corresponding to the node k is represented, max () represents a maximum value function, and avg () represents a mean value function.

As can be seen from the above, when a user is searched by applying the scheme provided by the embodiment of the present invention, the class attribution degree of the user corresponding to the node is calculated according to the pre-trained class attribution degree calculation model, so as to obtain the weight of the edge between the nodes. In addition, when the weight of the edge between the nodes is calculated, if the category attribution degrees of the users corresponding to the two nodes are both less than 0.5, the two nodes are not associated with each other, so that the edge between the two nodes is broken, and the data volume needing to be processed is reduced.

In an embodiment of the present invention, the representation characteristic obtaining module 901 is specifically configured to:

determining the identification of a target user;

and obtaining the target representation characteristics stored in the user characteristic library and corresponding to the identification of the target user.

As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to search for a user, the target representation feature corresponding to the identifier of the target user stored in the user feature library can be determined according to the determined identifier of the target user, so that the step of generating the target representation feature again can be omitted, and an existing user associated with the target user can be searched more efficiently.

The embodiment of the present invention further provides an electronic device, as shown in fig. 10, which includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,

a memory 1003 for storing a computer program;

the processor 1001 is configured to implement any user search method described in the foregoing method embodiments when executing the program stored in the memory 1003.

The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.

The communication interface is used for communication between the terminal and other equipment.

The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.

The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.

In still another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the user search method in any of the above embodiments.

In yet another embodiment, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the user search method of any of the above embodiments.

In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.

It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, electronic device, storage medium, and program product embodiments, as they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.

The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于电网大数据POI点信息检索方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!