Disclosure of Invention
The embodiment of the application provides a method for establishing a user relationship network, which can improve the accuracy of establishing the user relationship network.
In a first aspect, an embodiment of the present application provides a method for establishing a user relationship network, where the method includes:
acquiring center user information of a center user and first user information of a first user;
respectively extracting attribute information corresponding to a preset attribute item in the center user information and the first user information;
Determining that the first user is an associated user of the central user under the condition that attribute information corresponding to a first preset attribute item of the central user is matched with attribute information corresponding to the first preset attribute item of the first user;
and establishing a user relationship network of the central user based on the central user and the first user.
As an alternative embodiment, the attribute information includes quality attribute information and general attribute information;
The establishing a user relation network of the central user based on the central user and the first user comprises the following steps:
under the condition that first attribute information corresponding to the first preset attribute item in the first user information is high-quality attribute information, the first user and the central user are associated in a first association mode;
And under the condition that the first attribute information corresponding to the first preset attribute item in the first user information is common attribute information, the first user and the central user are associated in a second association mode.
As an optional implementation manner, after the determining that the first user is the associated user of the central user, the method further includes:
Acquiring second user information of a second user which is other than the central user and the first user when the first user is a non-abnormal user and the first attribute information is common attribute information;
Extracting attribute information corresponding to the preset attribute item in the second user information;
Determining that the second user is an associated user of the first user under the condition that attribute information corresponding to a second preset attribute item is matched between the first user and the second user;
after the establishing of the user relationship network for the central user based on the central user and the first user, the method further comprises:
When the second attribute information corresponding to the second preset attribute item in the second user information is high-quality attribute information, the second user and the first user are associated in a first association mode;
And under the condition that second attribute information corresponding to the second preset attribute item in the second user information is common attribute information, the second user and the first user are associated in a second association mode.
As an alternative embodiment, the method further comprises: generating a user relation diagram of the central user based on the user relation network of the central user, wherein nodes in the user relation diagram represent users, different user types are represented by different node forms, and the nodes are connected by adopting a corresponding connection mode according to the association mode between the nodes.
As an optional implementation manner, after the generating the user relationship graph of the central user based on the user relationship network of the central user, the method further includes:
Displaying the user relation graph;
Receiving an operation instruction for the user relation diagram, and executing an operation corresponding to the operation instruction, wherein the operation instruction comprises at least one of the following operation instructions: displaying operation instructions of the specified user information of the specified user, displaying operation instructions of shortest paths of the abnormal user and the central user, and calculating operation instructions of risk grades of the central user.
As an alternative embodiment, the method further includes:
And calculating the risk level of the central user based on the number of the abnormal users in the user relation network and the distance between the abnormal users and the central user.
As an alternative embodiment, the method further comprises:
performing word segmentation processing on the attribute information of the central user and the attribute information of the first user to obtain word segmentation vectors;
determining feature vectors of attribute information of the central user and the first user based on the word segmentation vector;
calculating the distance between the first user and the feature vector corresponding to the attribute information of the central user;
And determining that attribute information matching corresponding to a first preset attribute item exists between the central user and the first user when the distance between the first user and the feature vector corresponding to the first preset attribute item of the central user is smaller than a threshold value.
In a second aspect, an embodiment of the present application provides a user relationship network establishment apparatus, including a unit for executing the method of the first aspect, where the user relationship network establishment apparatus includes:
the acquisition unit is used for acquiring the central user information of the central user and the first user information of the first user;
the extraction unit is used for respectively extracting attribute information corresponding to a preset attribute item in the center user information and the first user information;
A first determining unit, configured to determine that the first user is an associated user of the central user when attribute information corresponding to a first preset attribute item of the central user is matched with attribute information corresponding to a first preset attribute item of the first user;
and the establishing unit is used for establishing a user relationship network of the central user based on the central user and the first user.
As an alternative embodiment, the attribute information includes quality attribute information or general attribute information;
The establishing unit is configured to associate, in a first association manner, the first user with the central user when first attribute information corresponding to the first preset attribute item in the first user information is high-quality attribute information;
Or alternatively
The establishing unit is configured to associate the first user with the central user in a second association manner when the first attribute information corresponding to the first preset attribute item in the first user information is common attribute information.
As an optional implementation manner, the obtaining unit is further configured to obtain second user information of a second user, where the second user is a user other than the central user and the first user, in a case where the first user is a non-abnormal user and the first attribute information is common attribute information;
The extracting unit is further used for extracting attribute information corresponding to the preset attribute item in the second user information;
The first determining unit is further configured to determine that the second user is an associated user of the first user when attribute information corresponding to a second preset attribute item matches between the first user and the second user;
The establishing unit is further configured to associate, in a first association manner, the second user with the first user when second attribute information corresponding to the second preset attribute item in the second user information is high-quality attribute information;
Or alternatively
The establishing unit is further configured to associate the second user with the first user in a second association manner when second attribute information corresponding to the second preset attribute item in the second user information is common attribute information.
As an alternative embodiment, the method further comprises:
The generating unit is used for generating a user relation diagram of the central user based on the user relation network of the central user, nodes in the user relation diagram represent users, different user types are represented by different node forms, and the nodes are connected by adopting a corresponding connection mode according to the association mode between the nodes.
As an alternative embodiment, the method further comprises:
The display unit is used for displaying the user relation graph;
the receiving unit is used for receiving an operation instruction to the user relation diagram;
The execution unit is used for executing the operation corresponding to the operation instruction, and the operation instruction comprises at least one of the following operation instructions: displaying operation instructions of the specified user information of the specified user, displaying operation instructions of shortest paths of the abnormal user and the central user, and calculating operation instructions of risk grades of the central user.
As an alternative embodiment, the method further includes:
and the calculating unit is used for calculating the risk level of the central user based on the number of the abnormal users in the user relation network and the distance between the abnormal users and the central user.
As an alternative embodiment, the method further comprises:
the processing unit is used for performing word segmentation processing on the attribute information of the central user and the attribute information of the first user to obtain word segmentation vectors;
A second determining unit configured to determine feature vectors of attribute information of the center user and the first user based on the word segmentation vector;
A calculating unit, configured to calculate a distance between feature vectors corresponding to attribute information of the first user and the central user;
the second determining unit is further configured to determine that attribute information corresponding to a first preset attribute item exists between the central user and the first user when a distance between the first user and feature vectors corresponding to the first preset attribute item of the central user is smaller than a threshold value.
In a third aspect, an embodiment of the present application provides another user relationship network establishment apparatus, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, and the memory is configured to store a computer program supporting the user relationship network establishment apparatus to perform the foregoing method, where the computer program includes program instructions, and the processor is configured to invoke the program instructions to perform the foregoing method of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, are adapted to carry out the method of the first aspect described above.
The embodiment of the application acquires the center user information of the center user and the first user information of the first user; extracting attribute information corresponding to a preset attribute item from the center user information and the first user information; determining that the first user is an associated user of the central user under the condition that attribute information corresponding to a first preset attribute item is matched between the central user and the first user; and establishing a user relationship network of the central user based on the central user and the first user. The user relationship network of the user can be accurately and multidimensional.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Referring to fig. 1, fig. 1 is a schematic flowchart of a method for establishing a user relationship network according to an embodiment of the present application, as shown in the drawings, the method may include:
101: the user relation network building device obtains center user information of a center user and first user information of a first user.
In the embodiment of the present application, the user relationship network establishment device may include various user relationship network establishment devices such as a tablet computer, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a Mobile internet device (Mobile INTERNET DEVICE, MID), and the embodiment of the present application is not limited.
In the embodiment of the present application, the central user refers to a user who needs to establish a user relationship network. The central user information and the first user information may be user-related information stored in a user database. The user database may be in a local memory of the user relationship network creation means. In this case, the user relationship network establishing device may directly read the local memory, so as to obtain the user information of the central user and the first user; the central user information and the first user information may also be stored in a peripheral user database server, in which case the user relationship network establishment device may send a read request to the user database server, and when the database server receives the read request, the user information of the central user and the user information of the first user may be returned to the user relationship network establishment device. Wherein the central user and the first user may be any user in the user database.
In the embodiment of the application, the user stored in the user database can be a legal user actively recorded, in this case, the user relationship network building device is a server of a certain application program, and before the user logs in the server through a client installed by a local terminal, the user can initiate a related service request through the client after the user needs to record related information into the legal user. The user relation network establishing device stores the obtained user information of each legal user into the user database.
Alternatively, the users contained in the user database may be acquired through a transaction channel or by acquiring images. For example, a user purchases a product of a user relationship network establishment device belonging to a user relationship network through a bank card, in which case the user relationship network establishment device sends a user information acquisition request to a financial institution corresponding to the bank card, and then a database of the financial institution returns the user information to the user relationship network establishment device, thereby completing acquisition of the user information.
102: The user relation network building device extracts the attribute information corresponding to the preset attribute items in the center user information and the first user information respectively.
In the embodiment of the application, corresponding preset attribute items can be preset according to the service or the application specific to the user relation network to be established. After the user information of the user is obtained, the attribute information corresponding to the preset attribute item can be extracted from the user information. For example, the preset attribute item may include: basic information of users, residence addresses, company names, family member information, social relationships, and the like. Wherein the basic information of the user includes the name, sex, age, certificate number, etc. of the user.
Specifically, after the user information of the central user and the first user is acquired by the user relationship network building device, attribute information corresponding to each attribute item in the preset attribute items is sequentially extracted from the user information of the central user and the first user, so that the attribute information corresponding to each preset attribute item of the central user and the first user is compared to determine whether the central user and the first user are associated users.
For example, assume that the user relationship network is used to evaluate risk levels when loaning the central user; for the risk level evaluation, the users having influence on the risk evaluation of the central user may include users having at least one relationship among a colleague relationship, a relative relationship, a colleague relationship, a neighbor relationship, a friend relationship, and the like with the central user. In this case, therefore, the preset attribute items may include: household address information, school address information, company address information, work information, household address information, social information, family member information, and the like.
103: And under the condition that the attribute information corresponding to the first preset attribute item of the central user is matched with the attribute information corresponding to the first preset attribute item of the first user, the user relation network building device determines that the first user is an associated user of the central user.
In the embodiment of the application, after the attribute information corresponding to the preset attribute item is extracted from the user information of the central user and the first user, whether the attribute information corresponding to the first preset attribute item of the central user is matched with the attribute information corresponding to the first preset attribute item of the first user or not is sequentially judged, and if the attribute information corresponding to the first preset attribute item is matched between the central user and the first user, the central user and the first user are mutually related, namely the first user is the related user of the central user. Wherein the first preset attribute item is any one attribute item of the preset attribute items.
As an optional implementation manner, after extracting attribute information corresponding to the preset attribute items from the user information of the central user and the first user, performing word segmentation processing on the attribute information corresponding to the individual attribute items of the central user and the first user to obtain word segmentation vectors corresponding to the respective attribute information; and then obtaining the feature vector corresponding to each item of attribute information according to the word segmentation vector of the attribute information of the central user and the first user. Then, calculating the distance between the corresponding feature vectors between the central user and the first user; and when the distance between the corresponding feature vectors is smaller than the threshold value, determining that the two attribute information corresponding to the corresponding feature vectors are matched with each other. Thereby further determining that attribute information corresponding to the first preset attribute item is matched between the center user and the first user. The distance may be a cosine distance between feature vectors or a euclidean distance between feature vectors, which is not limited in the embodiment of the present application.
In one implementation, the above attribute information may be segmented by a method based on string matching, which is also called a mechanical segmentation method, where a word sequence of each sentence of the attribute information is matched with an entry in a dictionary according to a certain policy, and if a string composed of a certain character or a certain number of characters of the attribute information is found in the dictionary, the matching is successful, that is, a word is identified.
For example, the above attribute information is "Shenzhen Fu Tian Ou safe building", and after the sentence is segmented by mechanical word segmentation method, the corresponding segmented words of the sentence are respectively: shenzhen city, futian district, safe mansion. It may be understood that in the above implementation manner, the attribute information is segmented to obtain all the segmented words, which means that each word in the attribute information is included in a certain segmented word. Of course, the method of word segmentation of the attribute information is not limited thereto.
As an alternative implementation manner, determining the word vector of each word segment may specifically include: word vectors of each word are obtained through word2vec training.
Word2vec is an efficient tool for characterizing words as real word vectors. Specifically, word2vec maps the word into a K-dimensional vector through CBoW network or Skip-gram network, where the K-dimensional vector is generally a high-dimensional vector, and for example, K may be 400 or other integer with a relatively large value. The CBoW model or the Skip-gram model both assume that a word is associated with a plurality of surrounding words, and the sequential relationship of the surrounding words is not considered, so that the word vector obtained through word2vec training contains the syntactic and semantic features of the word.
As an optional implementation manner, according to the word segmentation vector of the attribute information, obtaining the feature vector corresponding to the attribute information may specifically include: and inputting the word segmentation vector of the attribute information into a feature vector generation model, and outputting the feature vector corresponding to the attribute information. The feature vector generation model may be a trained recurrent neural network. The recurrent neural network can be trained by using attribute information training samples matched with each other in a supervised learning mode.
104: The user relation network establishing device establishes a user relation network of the central user based on the central user and the first user.
In the embodiment of the present application, the attribute information may include high-quality attribute information or general attribute information, and when types of attribute information corresponding to the attribute information matched with each other between the central user and the first user are different, different association manners may be adopted to associate the first user and the central user. Therefore, after the user relation network of the central user is generated, the corresponding service processing can be carried out on the central user through the user relation network in a multi-dimensional mode. The credit rating of the central user may be calculated, for example, by the number of users associated in the user relationship network by means of the association corresponding to the quality attribute.
Wherein the high-quality attribute information indicates: when the association relationship is determined because of the existence of the matched high-quality attribute information, the two users do not negatively affect each other when performing business processing (such as risk evaluation or credit evaluation). The above general attribute information indicates: when the association relationship is determined because of the existence of the matched common attribute information, the two users may negatively affect each other when performing service processing (such as risk assessment or credit assessment).
Specifically, after determining that the first user is an associated user of the central user, judging whether attribute information of the first user corresponding to the first attribute item is high-quality attribute information, and if the attribute information of the first user corresponding to the first attribute item is high-quality attribute information, associating the first user with the central user in a first association mode to generate a user relationship network of the central user; if the attribute information of the first user corresponding to the first attribute item is common attribute information, the first user is associated with the central user through a second association mode, and a user relationship network of the central user is generated.
When the attribute information matched with the users is determined to be the high-quality attribute information, the first association mode indicates the association between the two users by adding the preset high-quality identification used by the two users and the user identification of the two users. For example, assume that the preset character string with the quality identifier of "youzhi" is set, the user identifier of a user is a, and the user identifier of B user is B; the association of the a-user and the B-user by the first association means can be represented by a value pair of (youzhi, a and B), the key being the type of matching attribute information between the two associated users, the value being the user identity of the two users. The second association manner is similar to the first association manner, and will not be described in detail.
In the embodiment of the application, different association modes are adopted for distinguishing different types of the matching attribute between the central user and the associated user, so that when the specific service is processed by using the types of the attribute information between the users in the user relationship network of the central user, the types of the matching attribute information between the central user and the associated user can be quickly determined directly through the association mode between the central user and the associated user, and the specific service can be processed more effectively.
It will be appreciated that the first user is any user other than the central user in the user database. Therefore, after the first user is associated with the central user, the associated users of other central users in the user database can be associated with the central user by the same method as the first user, so that a more complete user relationship network of the central user is obtained.
It can be seen that the embodiment of the application obtains the central user information of the central user and the first user information of the first user; extracting attribute information corresponding to a preset attribute item from the central user information and the first user information; under the condition that attribute information corresponding to a first preset attribute item is matched between the central user and the first user, determining the first user as an associated user of the central user; and establishing a user relation network of the central user based on the central user and the first user. The user relationship network of the user can be accurately and multidimensional.
Referring to fig. 2, fig. 2 is a schematic flowchart of another method for establishing a user relationship network according to an embodiment of the present application, as shown in the drawings, the method may include:
201: the user relation network building device obtains center user information of a center user and first user information of a first user.
202: The user relation network building device extracts the attribute information corresponding to the preset attribute items in the center user information and the first user information respectively.
203: And under the condition that the attribute information corresponding to the first preset attribute item of the central user is matched with the attribute information corresponding to the first preset attribute item of the first user, the user relation network building device determines that the first user is an associated user of the central user.
204: The user relation network establishing device establishes a user relation network of the central user based on the central user and the first user.
In the embodiment of the present application, the steps 201 to 204 are similar to the steps 101 to 104 in the real-time example 1, so reference may be made to the steps 101 to 104 in the real-time example 1, and the description thereof will not be repeated here.
205: And under the condition that the first user is a non-abnormal user and the first attribute information is common attribute information, the user relation network building device acquires second user information of a second user and extracts attribute information corresponding to the preset attribute item in the second user information.
Wherein the second user is other than the center user and the first user.
In real life, there may be an indirect association relationship between users, that is, an association relationship may be generated between two unrelated users by an intermediate user, where the intermediate user and the two unrelated users are associated users. For example, it is assumed that the colleagues of the center user are not directly associated with each other, but in some cases, an association relationship may be generated between the colleagues of the users and the colleagues by the center user. For example, the colleague of the central user borrows money to the central user, and the central user temporarily does not borrow money to the colleague, so that money borrowed to the colleague is borrowed to the colleague, and an indirect liability relationship is formed between the colleague and the colleague.
Therefore, in the embodiment of the present application, after the associated user of the central user is associated with the central user, the associated user of the central user may also be associated into the user relationship network.
In addition, when business processing is performed (for example, risk assessment, credit assessment and the like), the central user in the user relation network is generally an abnormal user (for example, a user with poor credit or high risk level), therefore, when judging whether the associated user of the associated user is to be associated with the user relation network, whether the associated user of the central user is an abnormal user or not can be judged, if yes, the associated user is determined to have negative influence on the central user, and further association of the associated user of the abnormal user with the user relation network is not necessary; if the user is a non-abnormal user, determining whether the abnormal user associated with the non-abnormal user can influence the central user through the non-abnormal user; if so, it is necessary to associate the associated user of the non-abnormal user to the user relationship network, and if not, it is not necessary to associate the associated user of the non-abnormal user to the user relationship network.
As an alternative implementation manner, when determining whether the user is an abnormal user, whether the user is an abnormal user may be determined by acquiring a blacklist of a user and then by the blacklist.
Since the relevance between users is determined by attribute information between users, namely, the relevance between users is generated by attributes corresponding to the attribute information matched with each other; therefore, when the associated user of the central user is a non-abnormal user, whether the abnormal user associated with the non-abnormal user can influence the central user through the non-abnormal user or not can be determined through the attribute information matched between the non-abnormal user and the central user. When the attribute information matched between the non-abnormal user and the central user is common attribute information, determining that the abnormal user associated with the non-abnormal user can influence the central user through the non-abnormal user; when the attribute information matched between the non-abnormal user and the central user is the high-quality attribute information, determining that the abnormal user associated with the non-abnormal user cannot influence the central user through the non-abnormal user.
In summary, in the embodiment of the present application, after the user relationship network based on the central user and the first user builds the central user, whether the first user in the user relationship network is an abnormal user is determined, if the first user is a non-abnormal user, whether the attribute information matched with each other between the first user and the central user is common attribute information is determined, if yes, second user information of a second user is obtained, attribute information corresponding to the preset attribute item in the second user information is extracted, and if not, the process is ended.
206: And under the condition that attribute information corresponding to a second preset attribute item is matched between the first user and the second user, the user relation network building device determines that the second user is an associated user of the first user.
In the embodiment of the present application, after the attribute information corresponding to the preset attribute item is extracted from the user information of the second user, whether the attribute information corresponding to the preset attribute item between the second user and the first user is matched is sequentially determined, and if the attribute information corresponding to the second preset attribute item exists between the second user and the first user and is matched with each other, it is determined that the second user and the first user are associated with each other, that is, the second user is an associated user of the first user. Wherein the second preset attribute item is any one attribute item of the preset attribute items.
In the embodiment of the present application, the specific implementation of this step may refer to step 103 in embodiment 1, and will not be described herein.
207: The user relationship network establishment means associates the second user with the first user.
In the embodiment of the application, after the second user is determined to be the associated user of the first user, the second user is associated with the first user.
Specifically, when the second attribute information corresponding to the second preset attribute item in the second user information is high-quality attribute information, the second user and the first user are associated by a first association method. And under the condition that the second attribute information corresponding to the second preset attribute item in the second user information is common attribute information, the second user and the first user are associated in a second association mode.
As an optional implementation manner, the types (high-quality attribute information and common attribute information) of the non-abnormal associated users in the user relationship network according to the matched attribute information are classified into high-quality associated users and common associated users. After the second user is associated with the first user, the associated users of the second user and the associated users after the second user are further associated with the user relationship network until all the associated users of the common associated users in the user relationship are associated with the user relationship network to form a complete and detailed user relationship network, wherein the specific association method is the same as that of the second user associated with the user relationship network.
208: The user relationship network establishing device generates a user relationship graph of the central user based on the user relationship network of the central user.
In the embodiment of the application, after the user relationship network of the central user is established, the user relationship graph of the central user is generated based on the user relationship network of the central user, and the user relationship graph is displayed. The nodes in the user relation graph represent users, different user types are represented by different node forms, and the nodes are connected by adopting corresponding connection modes according to the association modes among the nodes; therefore, an administrator can quickly determine the association relationship between the central user and each associated user through the user relationship graph, and quickly identify the type of each associated user.
Specifically, a user relation graph is generated according to the user types (including central users, abnormal associated users, high-quality associated users and common associated users) and the association modes of the user relation network, wherein nodes in the user relation graph represent users, different user types are represented by different symbols, and different association modes are represented by different connecting lines. As shown in fig. 3, the root node is the central user; the broken line represents the connection mode of the high-quality attribute information, namely the first connection mode; the solid line represents the connection mode of the common association attribute information, namely the second connection mode; blank rectangular boxes represent labels of common associated users; the shaded rectangle represents the label of the abnormally associated user; circles represent labels of good quality associated users.
209: The user relation network establishing device receives the operation instruction to the user relation graph and executes the operation corresponding to the operation instruction.
In the embodiment of the application, after the user relationship diagram is generated, an operation instruction for the user relationship diagram can be received, and then an operation corresponding to the operation instruction is triggered in response to the operation instruction. Wherein the operation instruction includes at least one of the following operation instructions: an operation instruction for displaying the information of the designated user, an operation instruction for displaying the shortest path between the abnormal user and the central user, and an operation instruction for calculating the risk level of the central user.
As an optional implementation manner, the operation instruction for displaying the specified user information of the specified user may specifically be a user tag clicked by the receiving administrator in the user relationship diagram. After receiving the operation instruction for displaying the specified user information of the specified user, determining the user identification of the clicked user tag, acquiring the user information of the user from a user information base through the user identification, and displaying the acquired user information beside the user tag in a dialog box mode.
As an optional implementation manner, the operation instruction for displaying the shortest path between the abnormal user and the central user may specifically be that the receiving administrator clicks a preset shortest path display button on a management interface of the system, obtains the abnormal user in the user relationship network after receiving the operation instruction for displaying the shortest path between the abnormal user and the central user, calculates a distance between the abnormal user and the central user in the user relationship graph, and finally highlights the abnormal user and the central user corresponding to the calculated shortest distance on the system display interface in the user relationship graph.
The distance between the abnormal associated user and the central user refers to the distance between the abnormal associated user node and the central user node in the user relation diagram; for example, if the abnormal associated user a is an associated user of the central user, that is, is directly connected to the central user in the user relationship diagram, the distance between the abnormal associated user a and the central user is 1, and if the abnormal associated user a is connected to the central user of the user through the intermediate user B, the distance between the abnormal associated user a and the central user is 2.
As an optional implementation manner, after receiving the operation instruction for calculating the risk level of the central user, the number of abnormal users, risk information and a distance between the abnormal users and the central user in the user relationship diagram are counted. And then calculating the risk level of the central user according to the number of the abnormal associated users, the risk information and the distance between the abnormal associated users and the central user in the user relation diagram.
The specific calculation mode of the risk level of the central user is as follows:
Wherein P represents the risk level of the central user; i represents the ith abnormality associated user; n represents the number of abnormal users; r i represents the risk level of the ith abnormality associated user; k i represents a distance weight between the ith abnormal associated user and the central user in the user relationship diagram, which is smaller as the distance between the abnormal associated user and the central user is larger.
It can be seen that the embodiment of the application obtains the central user information of the central user and the first user information of the first user; extracting attribute information corresponding to a preset attribute item from the central user information and the first user information; under the condition that attribute information corresponding to a first preset attribute item is matched between the central user and the first user, determining the first user as an associated user of the central user; and establishing a user relation network of the central user based on the central user and the first user. After the user relation network is established, a user relation graph is generated according to the user relation network, and then the risk level of the central user is calculated according to the user relation graph. By the embodiment of the application, the user relationship network of the user can be accurately established in a multidimensional manner, and an administrator can also quickly identify abnormal users from the user relationship graph.
The embodiment of the application also provides a user relation network establishment device which is used for executing the unit of any one of the methods. Specifically, referring to fig. 4, fig. 4 is a schematic block diagram of a device for establishing a user relationship network according to an embodiment of the present application. The user relationship network establishment device of the present embodiment includes: the acquisition unit 410, the extraction unit 420, the first determination unit 430, the establishment unit 440.
An acquiring unit 410, configured to acquire center user information of a center user and first user information of a first user;
an extracting unit 420, configured to extract attribute information corresponding to a preset attribute item in the central user information and the first user information, respectively;
a first determining unit 430, configured to determine that the first user is an associated user of the central user when attribute information corresponding to a first preset attribute item of the central user matches attribute information corresponding to a first preset attribute item of the first user;
a setting up unit 440, configured to set up a user relationship network of the central user based on the central user and the first user.
As an alternative embodiment, the attribute information includes quality attribute information or general attribute information;
the establishing unit 440 is configured to associate the first user with the central user through a first association method when the first attribute information corresponding to the first preset attribute item in the first user information is high-quality attribute information;
Or alternatively
The establishing unit 440 is configured to associate the first user with the central user through a second association method when the first attribute information corresponding to the first preset attribute item in the first user information is common attribute information.
As an optional implementation manner, the obtaining unit 410 is further configured to obtain second user information of a second user, where the second user is a user other than the central user and the first user, in a case where the first user is a non-abnormal user and the first attribute information is common attribute information;
the extracting unit 420 is further configured to extract attribute information corresponding to the preset attribute item in the second user information;
The first determining unit 430 is further configured to determine that the second user is an associated user of the first user if there is a match of attribute information corresponding to a second preset attribute item between the first user and the second user;
The establishing unit 440 is further configured to associate the second user with the first user through a first association method when the second attribute information corresponding to the second preset attribute item in the second user information is high-quality attribute information;
Or alternatively
The establishing unit 440 is further configured to associate the second user with the first user through a second association method when the second attribute information corresponding to the second preset attribute item in the second user information is common attribute information.
As an alternative embodiment, the method further comprises:
And the generating unit is used for generating a user relation diagram of the central user based on the user relation network of the central user, wherein nodes in the user relation diagram represent users, different user types use different node forms for representation, and the nodes are connected by adopting a corresponding connection mode according to the association mode between the nodes.
As an alternative embodiment, the method further comprises:
a display unit for displaying the user relationship graph;
a receiving unit for receiving an operation instruction to the user relationship diagram;
The execution unit is used for executing the operation corresponding to the operation instruction, and the operation instruction comprises at least one of the following operation instructions: an operation instruction for displaying the information of the designated user, an operation instruction for displaying the shortest path between the abnormal user and the central user, and an operation instruction for calculating the risk level of the central user.
As an alternative embodiment, the method further includes:
And the calculating unit is used for calculating the risk level of the central user based on the number of the abnormal users in the user relation network and the distance between the abnormal users and the central user.
As an alternative embodiment, the method further comprises:
the processing unit is used for performing word segmentation processing on the attribute information of the central user and the attribute information of the first user to obtain word segmentation vectors;
a second determining unit configured to determine feature vectors of attribute information of the center user and the first user based on the word segmentation vector;
A calculation unit configured to calculate a distance between feature vectors corresponding to the attribute information of the first user and the center user;
The second determining unit is further configured to determine that attribute information matching corresponding to a first preset attribute item exists between the central user and the first user when a distance between feature vectors corresponding to the first preset attribute item of the first user and the first preset attribute item of the central user is smaller than a threshold.
It can be seen that the embodiment of the application obtains the central user information of the central user and the first user information of the first user; extracting attribute information corresponding to a preset attribute item from the central user information and the first user information; under the condition that attribute information corresponding to a first preset attribute item is matched between the central user and the first user, determining the first user as an associated user of the central user; and establishing a user relation network of the central user based on the central user and the first user. After the user relation network is established, a user relation graph is generated according to the user relation network, and then the risk level of the central user is calculated according to the user relation graph. By the embodiment of the application, the user relationship network of the user can be accurately established in a multidimensional manner, and an administrator can also quickly identify abnormal users from the user relationship graph.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a user relationship network establishing apparatus 500 according to an embodiment of the present application, and as shown in fig. 5, a sample generating apparatus 500 includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are different from the one or more application programs, and the one or more programs are stored in the memory and configured to be executed by the processor. The program includes instructions for performing the steps of: acquiring center user information of a center user and first user information of a first user; extracting attribute information corresponding to a preset attribute item from the central user information and the first user information; under the condition that attribute information corresponding to a first preset attribute item is matched between the central user and the first user, determining the first user as an associated user of the central user; and establishing a user relation network of the central user based on the central user and the first user.
It should be appreciated that in embodiments of the present application, the Processor may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the present application, there is provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements: acquiring center user information of a center user and first user information of a first user; extracting attribute information corresponding to a preset attribute item from the central user information and the first user information; under the condition that attribute information corresponding to a first preset attribute item is matched between the central user and the first user, determining the first user as an associated user of the central user; and establishing a user relation network of the central user based on the central user and the first user.
The computer readable storage medium may be an internal storage unit of the terminal according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer-readable storage medium may be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, or a flash memory card (FLASH CARD) provided in the terminal. Further, the computer-readable storage medium may further include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal. The above-described computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
In the several embodiments provided in the present application, it should be understood that the disclosed system, server, and method may be implemented in other manners. For example, the above-described sample generating device embodiments are merely illustrative, e.g., the division of the above-described units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, sample generating devices or units, or may be an electrical, mechanical, or other form of connection.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present application.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.