User data acquisition method, system, electronic device, chip and medium
By obtaining log information, extracting and filtering feature information, and using spherical clustering processing, the problem of low efficiency and high consumption of computing resources in detecting abnormal network users in the existing technology is solved, and more efficient and stable abnormal user detection is achieved.
Patent Information
- Application Number
- CN202410581674.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-05-11
AI Technical Summary
In the existing technology, identification methods based solely on content features have low practicability, traditional clustering algorithms are slow and unstable, making it difficult to effectively detect abnormal network users, and neural network algorithms are highly complex and consume large amounts of computing resources.
By obtaining the log information, the user's initial feature information is extracted, the mutual information is calculated to represent the degree of dependence between feature information, the genetic algorithm is used to screen and optimize the feature information, and spherical clustering is performed to divide the feature information into user behavior sets for Train the model to estimate abnormal risk values.
It improves the detection efficiency, reduces the amount of calculation, improves the stability and efficiency of the algorithm, and solves the problems of low practicality of single feature recognition methods and slow speed of clustering algorithms.
Smart Images

Figure CN118171129B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of machine learning, and in particular to a method, system, electronic device, chip and medium for acquiring user data. Background Art
[0002] In today's highly developed Internet technology, the importance of logs is increasingly prominent. Due to the concealment of online communication platforms, there are a large number of abnormal network users who disrupt public opinion in online social platforms. It is very important to improve the accuracy of abnormal user detection through logs, which can enable service providers to win more customer trust, protect company interests, and promote enterprise development. In recent years, researchers have mainly used the following technologies for abnormal log user detection: abnormal log user detection technology based on basic methods and abnormal log user detection technology based on neural networks. However, the first type of method mainly uses basic methods to detect abnormal users. Since such users have a stronger sense of self-concealment, simple text content analysis often misses most of the water army that uses normal text features to spread false images. Therefore, the traditional single content feature-based recognition method is less practical; the second type of method mainly uses neural networks to detect abnormal users. Neural networks often have a large number of parameters, and the algorithm complexity will increase exponentially with the increase in the number of parameters, which consumes a lot of computing resources. Summary of the invention
[0003] In order to solve the problems existing in the related art, the present disclosure proposes a user data acquisition method, including: obtaining log information and extracting initial feature information of multiple users from the log information; determining mutual information based on the initial feature information, where the mutual information is used to represent the degree of dependence between any two feature information of the same user; screening the feature information of multiple users using mutual information based on a genetic algorithm to determine optimized feature information; performing ball clustering on the log information based on the optimized feature information, dividing the optimized feature information into multiple user behavior sets, where the multiple user behavior sets are used as training data to train a first model, and the first model is used to evaluate the abnormal risk value of the user log. Through the user's log information, combined with the mutual information, ball clustering is used to classify the user data, which is used to train the model and evaluate the abnormal risk of the user log.
[0004] The user data acquisition method, system, electronic device, chip and medium provided by the present invention are intended to solve the problem of low practicality of a single content feature-based recognition method in the related art, as well as the defects of slow speed and instability of traditional clustering algorithms, thereby reducing the amount of calculation and further improving search efficiency.
[0005] The first aspect of the present disclosure proposes a user data acquisition method, which includes: acquiring log information and extracting initial feature information of multiple users from the log information; determining mutual information based on the initial feature information, where the mutual information is used to represent the degree of dependence between any two feature information of the same user; based on a genetic algorithm, using the mutual information to screen the feature information of multiple users to determine optimized feature information; performing spherical clustering processing on the log information based on the optimized feature information, dividing the optimized feature information into multiple user behavior sets, where the multiple user behavior sets are used as training data to train a first model, and the first model is used to evaluate the abnormal risk value of the user log.
[0006] In some embodiments of the present disclosure, determining mutual information based on initial feature information includes: using an information gain method to determine the mutual information between any two feature information of the same user, wherein the mutual information includes at least one of information entropy, conditional entropy, and information gain.
[0007] In some embodiments of the present disclosure, based on a genetic algorithm, feature information of multiple users is screened using mutual information to determine optimized feature information, including: encoding feature information of multiple users to obtain encoded feature information; performing random initialization space processing on the encoded feature information to generate multiple initialized populations, and calculating the individual fitness of each encoded feature information in the multiple initialized populations; based on the individual fitness, performing tournament selection processing on each initialized population to obtain multiple optimized populations; based on mutual information, performing crossover operations and mutation operations on the multiple optimized populations, and iterating in a loop until the optimized feature information is obtained.
[0008] In some embodiments of the present disclosure, performing a crossover operation on multiple optimized populations includes: for each optimized population, randomly selecting two coding feature information for a crossover operation to obtain an offspring feature; if the two coding feature information have the same edge, retaining the same edge as the first edge of the offspring feature; respectively calculating the mutual information of multiple different edges of the two coding feature information to the same edge to obtain the first mutual information and the second mutual information; if the first mutual information is greater than the second mutual information, using the different edges corresponding to the first mutual information as the second edge of the offspring feature; if the two coding feature information do not have the same edge, randomly cross to obtain the edge of the offspring feature.
[0009] In some embodiments of the present disclosure, ball clustering processing is performed on log information based on optimized feature information, including: performing standard K-means division on the optimized feature information to obtain multiple initial balls, each initial ball corresponding to a user behavior category; for each initial ball, determining a random initial center as the center of mass of the initial ball; initializing the center of mass of each initial ball, and calculating the radius of each initial ball; calculating the center of mass distance matrix based on the distance between the centers of mass of any two initial balls among the multiple initial balls; determining the center of mass set of neighboring balls of the center of mass of each initial ball, and redistributing the optimized feature information in the initial ball to obtain an optimized ball; and iteratively calculating the center of mass and radius of each optimized ball until the center of mass of each optimized ball stops changing.
[0010] In some embodiments of the present disclosure, a set of neighboring sphere centroids of the centroid of each initial sphere is determined, and optimized feature information in the initial sphere is redistributed to obtain the optimized sphere, including: for the first initial sphere in each initial sphere, the centroids of the adjacent spheres that meet a preset condition are determined as a set of neighboring sphere centroids, and the preset condition is that the distance between the centroid of the first initial sphere and the centroid of the adjacent sphere is less than or equal to twice the radius of the first initial sphere; the first initial sphere is divided into multiple regions, wherein: the region within the first boundary is a stable region, the first boundary and the centroid of the first initial sphere are a first preset distance, and the first preset distance is less than the radius of the first initial sphere; the region between the first boundary and the second boundary is a first moving region, the second boundary and the centroid of the first initial sphere are a second preset distance, and the second preset distance is greater than the first preset distance; the region between the second boundary and the outer boundary of the first initial sphere is a second moving region; the optimized feature information in the first moving region is redistributed among the adjacent spheres of the first initial sphere, and the optimized feature information in the second moving region is redistributed among the adjacent spheres of the first initial sphere, so as to obtain the optimized sphere.
[0011] A second aspect embodiment of the present disclosure proposes a user data acquisition system, which includes: an acquisition module, a determination module, a screening module and a processing module, wherein the acquisition module is used to acquire log information and extract initial feature information of multiple users from the log information; the determination module is used to determine mutual information based on the initial feature information, and the mutual information is used to represent the degree of dependence between any two feature information of the same user; the screening module is used to screen the feature information of multiple users using mutual information based on a genetic algorithm to determine optimized feature information; the processing module is used to perform spherical clustering processing on the log information according to the optimized feature information, and divide the optimized feature information into multiple user behavior sets, and the multiple user behavior sets are used to train a first model as training data, and the first model is used to evaluate the abnormal risk value of the user log.
[0012] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: one or more processors; a storage device communicatively connected to the one or more processors, on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the first aspect embodiment of the present disclosure.
[0013] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.
[0014] The fifth aspect embodiment of the present disclosure proposes a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from a memory of an electronic device and send signals to the processor, the signals including computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the method described in the first aspect embodiment of the present disclosure.
[0015] The sixth aspect embodiment of the present disclosure proposes a computer program product, including a computer program, and the computer program implements the method described in the first aspect embodiment of the present disclosure after being executed.
[0016] In summary, according to the user data acquisition method proposed in the present disclosure, log information is obtained and initial feature information of multiple users is extracted from the log information; based on the initial feature information, mutual information is determined, and mutual information is used to represent the degree of dependence between any two feature information of the same user; based on a genetic algorithm, the feature information of multiple users is screened using mutual information to determine the optimized feature information; based on the optimized feature information, the log information is spherically clustered, and the optimized feature information is divided into multiple user behavior sets, and the multiple user behavior sets are used as training data to train the first model, and the first model is used to evaluate the abnormal risk value of the user log. The method proposed in the present disclosure is based on mutual information, combined with intelligent algorithms, to mine potential connections in data, obtain optimal features, and improve efficiency, reduce the amount of calculation, and improve the stability of the algorithm through the spherical clustering algorithm.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0019] Figure 1A flowchart of a method for obtaining user data proposed in an embodiment of the present disclosure;
[0020] Figure 2 A flowchart of extracting initial feature information of multiple users proposed in an embodiment of the present disclosure;
[0021] Figure 3 A schematic diagram of a process for determining mutual information proposed in an embodiment of the present disclosure;
[0022] Figure 4 A schematic diagram of a process for determining optimized feature information proposed in an embodiment of the present disclosure;
[0023] Figure 5 A schematic diagram of a process of performing a crossover operation on multiple optimized populations proposed in an embodiment of the present disclosure;
[0024] Figure 6 A schematic diagram of a process of performing ball clustering processing on log information proposed in an embodiment of the present disclosure;
[0025] Figure 7 A schematic diagram of adjacent clusters provided for an embodiment of the present disclosure;
[0026] Figure 8 A schematic diagram of redistributing optimized feature information in an initial ball provided by an embodiment of the present disclosure;
[0027] Fig. 9 A schematic diagram of a process for obtaining an optimized ball according to an embodiment of the present disclosure;
[0028] Fig.10 A schematic diagram of the structure of a user data acquisition system provided by an embodiment of the present disclosure;
[0029] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. Embodiments are described below with reference to the accompanying drawings.
[0031] The method proposed in this disclosure is based on the GA algorithm, combined with mutual information to analyze log information, effectively extracts feature information through iterative evolution algorithm, and further uses ball clustering to classify user information and establish a Bayesian network based on user characteristics to identify abnormal users. Compared with related technologies, it improves efficiency, reduces calculation amount, and has certain stability.
[0032] The user data acquisition method provided by the present application is described in detail below with reference to the accompanying drawings.
[0033] Figure 1 Flow chart of a method for acquiring user data proposed in an embodiment of the present disclosure. Figure 1 As shown, the user data acquisition method includes steps 101-104.
[0034] Step 101: Obtain log information, and extract initial feature information of multiple users from the log information.
[0035] In the embodiment of the present disclosure, the log information is log data of multiple users, and initial feature information of the multiple users is extracted from the log data of the multiple users by acquiring the log information.
[0036] In the embodiments of the present disclosure, the log information may be user operation information, such as operations clicked by the user, resources used, and the like.
[0037] In an embodiment of the present disclosure, the obtained log information may be used as training data for model training, and the model is trained so that the trained model has universal applicability and is used for detecting each user.
[0038] In an embodiment of the present disclosure, the initial feature information may be multiple abnormal behavior features of each user's operation. The initial feature information includes multiple feature information. In other words, each user can obtain feature information of multiple abnormal behaviors of the user based on his log data, and each feature information reflects an abnormal behavior of the user's operation. For example, the initial feature information of user A includes feature information 1 and feature information 2, wherein feature information 1 indicates that user A performs behavior A, which is the operation data of tampering with data, and feature information 2 indicates that user A performs behavior B, which is the operation data of opening an abnormal web page.
[0039] In the embodiment of the present disclosure, the initial characteristic information of the user includes multiple characteristic information of the user, and each characteristic information includes the identification of the user, the operation performed by the user, the type of operation and the specific process of the operation.
[0040] In the embodiments of the present disclosure, by extracting initial feature information, multiple feature information of each user's operation can be obtained. By using the initial feature information of multiple users as the basis for subsequent methods, multiple users can be classified to obtain user sets under multiple features, and each user set represents a behavioral feature.
[0041] Step 102: determine mutual information based on the initial feature information.
[0042] In the embodiments of the present disclosure, mutual information is used to indicate the degree of dependence between any two pieces of feature information of the same user.
[0043] In the embodiment of the present disclosure, determining mutual information based on the initial eigenvalues may be to calculate the initial eigenvalues using an information gain method to determine the degree of dependence between any two eigenvalues of each user.
[0044] In an embodiment of the present disclosure, based on initial feature information of each user, multiple mutual information of each user is determined to perform feature selection on multiple feature information of each user, and the correlation between each two feature information in the multiple feature information is determined through mutual information.
[0045] For example, the mutual information of feature information 1 and feature information 2 of user A is calculated to obtain a mutual information of user A. Similarly, the mutual information of feature information 2 and feature information 3 of user A, and the mutual information of feature information 4 and feature information 5 can be calculated. Each mutual information reflects the degree of dependence between two feature information. Feature information 1 is the behavior data of the wrong operation, and feature information 2 is the behavior data of opening an abnormal web page. Then the value of the mutual information of feature information 1 and feature information 2 will be higher, indicating that the degree of dependence between the wrong operation and opening an abnormal web page is higher.
[0046] In some embodiments, the mutual information may be information entropy or conditional entropy or information gain between two feature information.
[0047] In the above embodiment, multiple mutual information of each user is determined through initial feature information of each user, which can be used to screen multiple feature information of each user, for example, feature information with larger mutual information is used as the basis for clustering multiple users.
[0048] Step 103: Based on a genetic algorithm, the feature information of multiple users is screened using mutual information to determine optimized feature information.
[0049] In the embodiments of the present disclosure, the genetic algorithm starts from an initial population, selects individuals using the natural law of survival of the fittest, and generates a new generation of populations through hybridization and mutation, evolving from generation to generation until the goal is met.
[0050] In the embodiments of the present disclosure, through a genetic algorithm, based on the multiple mutual information of each user, feature information with a higher degree of relevance can be screened out from the multiple feature information of each user as the optimized feature information of each user. The optimized feature information can better reflect the behavioral characteristics of the user's operation, and each feature information in the optimized feature information is closer to independence, that is, the degree of repetition is low, the amount of calculation for subsequent operations is less, and the efficiency is higher.
[0051] For example, by using the mutual information between the feature information 1 and the feature information 2 of the user A, one feature information is determined from the feature information 1 and the feature information 2 as the best feature information.
[0052] In an embodiment of the present disclosure, utilizing mutual information to determine optimized feature information may be to utilize the mutual information between multiple feature information, and among the feature information of multiple users, not only the key feature information existing in multiple users is retained, but also the key feature information existing only in some users is retained.
[0053] In an embodiment of the present disclosure, the optimization feature information includes a user identifier.
[0054] Step 104: perform spherical clustering processing on the log information according to the optimized feature information, and divide the optimized feature information into multiple user behavior sets.
[0055] In an embodiment of the present disclosure, a plurality of user behavior sets are used as training data to train a first model, and the first model is used to evaluate abnormal risk values of user logs.
[0056] In an embodiment of the present disclosure, ball clustering can be classified based on optimized feature information of multiple users, so that users with closer feature information are a user behavior set, each user behavior set reflects a type of behavior feature, and each user behavior set includes multiple users.
[0057] In an embodiment of the present disclosure, using multiple user behavior sets as training data to train a first model may be to use the divided user behavior sets as training sets to establish a Bayesian network, and the trained first model may be used to evaluate the risk value of a new user.
[0058] In summary, according to the user data acquisition method proposed in the present disclosure, log information is obtained and initial feature information of multiple users is extracted from the log information; mutual information is determined based on the initial feature information; based on a genetic algorithm, the feature information of multiple users is screened using mutual information to determine optimized feature information; based on the optimized feature information, the log information is spherically clustered to divide the optimized feature information into multiple user behavior sets, and the multiple user behavior sets are used as training data to train a first model, and the first model is used to evaluate the abnormal risk value of the user log. By determining the mutual information between multiple feature information of each user, and using the mutual information to screen the feature information, determining the optimized feature information of each user, using the optimized feature information for clustering analysis, and dividing multiple users into multiple user behavior sets, the amount of calculation in the model training process can be reduced, and efficiency and stability can be improved.
[0059] based on Figure 1 The embodiment shown, Figure 2 The following is a schematic diagram of a process for extracting initial feature information of multiple users proposed in the present disclosure. Figure 2 based on Figure 1 The embodiment shown, Figure 1 Step 101 in is further described as follows: Figure 2 As shown, the following steps are included:
[0060] Step 201 : pre-processing the log information, and extracting user-related information of multiple users from the pre-processed log information.
[0061] In an embodiment of the present disclosure, preprocessing the log information may be to remove useless information from the acquired log information and process records where errors occur, so that the preprocessed log information is suitable for extracting feature information in a subsequent method.
[0062] In an embodiment of the present disclosure, extracting user-related information of multiple users from preprocessed log information may be extracting relevant information of multiple users from massive log data, wherein the user-related information includes information such as user identification, features, operations performed by the user, resources used, and modules called.
[0063] In the embodiment of the present disclosure, the relevant information of the user is used for subsequent extraction of the characteristic information of the user.
[0064] Step 202: extract initial feature information from user-related information using principal component analysis.
[0065] In an embodiment of the present disclosure, principal component analysis (PCA) can be used to simplify user-related information. In other words, the initial feature information extracted by principal component analysis can reflect the user's behavioral characteristics, including the user's identification and information that can reflect the user's behavioral characteristics.
[0066] In an embodiment of the present disclosure, extracting initial feature information from user-related information may be determining multiple feature information of the user, each feature information reflecting a behavioral feature of the user.
[0067] For example, there are multiple types of information in the relevant information of user A, but each type of information does not necessarily reflect the behavioral characteristics of the user's operation. It is necessary to use the principal component analysis method to extract multiple feature information of user A's abnormal operation from the multiple types of information, where each feature information reflects a behavioral characteristic of user A. For example, feature information 1, feature information 2, feature information 3, feature information 4, and feature information 5 can be extracted from 10 relevant information of user A. These 5 feature information constitute the initial feature information of user A, and each feature information reflects a behavioral characteristic of user A's operation.
[0068] In the above embodiment, by preprocessing the log information and extracting relevant information, and simplifying the relevant information using the principal component analysis method, the user's initial feature information can reflect the user's behavioral characteristics, and other useless information can be filtered out, so that the amount of information used subsequently is reduced, which can improve efficiency and reduce the amount of subsequent calculations.
[0069] based on Figure 1 , Figure 2 The embodiment shown, Figure 3 The following is a schematic diagram of a process for determining mutual information proposed in the present disclosure. Figure 3 based on Figure 1 In the embodiment shown, step 102 is further defined. Figure 3 As shown, the method comprises the following steps:
[0070] Step 301: using the information gain method, determine the mutual information between any two feature information of the same user.
[0071] In the embodiments of the present disclosure, the information gain method (IG) may be used to determine the mutual information between any two feature information of the same user, that is, the degree of mutual dependence.
[0072] In an embodiment of the present disclosure, mutual information includes at least one of information entropy, conditional entropy, and information gain.
[0073] Information entropy is calculated as follows: , where X is a discrete random variable with finite values and its probability distribution is represents the entropy of X, Represents the i-th feature information.
[0074] The conditional entropy is calculated as follows: , where H(X|Y) represents the uncertainty of Y under the condition of random variable X.
[0075] The information gain is calculated as follows: ,in, Represents the information gain of feature A to the information of training set D, represents the entropy of set D, Represents the conditional entropy of feature A under given conditions D.
[0076] As described above, the mutual information between any two feature information of the same user can be calculated by any one of information entropy, conditional entropy or information gain to obtain multiple mutual information of each user.
[0077] In the above embodiment, by calculating the mutual information between any two feature information of the same user, the similarity between any two feature information, or the degree of dependence between any two feature information, can be determined. Based on the mutual information, feature information with high similarity can be filtered to obtain a small amount of feature information that can directly reflect the user behavior characteristics.
[0078] based on Figure 1 , Figure 2 , Figure 3 The embodiment shown, Figure 4 The following is a schematic diagram of a process for determining optimized feature information proposed in the present disclosure. Figure 4 based on Figure 1 , Figure 2 , Figure 3 In the embodiment shown, step 103 is further defined. Figure 4 As shown, the following steps are included:
[0079] Step 401, encoding characteristic information of multiple users to obtain encoded characteristic information.
[0080] In the embodiment of the present disclosure, encoding the characteristic information of multiple users may be that when a characteristic information is selected, the encoding value of the characteristic information is 1, otherwise, the encoding value of the characteristic information is 0, thereby obtaining the encoded characteristic information of each user.
[0081] In the embodiment of the present disclosure, the characteristic information of each user is encoded into a binary code of a string of 0 or 1.
[0082] Step 402: Perform random initialization space processing on the coding feature information to generate multiple initialization populations, and calculate the individual fitness of each coding feature information in the multiple initialization populations.
[0083] In the embodiments of the present disclosure, the coding feature information is randomly initialized by directly randomly generating a group of individuals in the coding feature information as an initialization population, thereby obtaining multiple initialization populations, each of which includes multiple coding feature information.
[0084] In an embodiment of the present disclosure, calculating the individual fitness of each coding feature information in multiple initialized populations may be calculating the individual fitness of multiple coding feature information of the same user in each initialized population, wherein the individual fitness is a measure of the degree of advantage of an individual in the survival of a population, and is used to distinguish between good and bad individuals, that is, the degree of advantage of each coding feature information of the user in the initialized population.
[0085] In the embodiment of the present disclosure, the individual fitness of each encoding feature information reflects whether the encoding feature information is abnormal.
[0086] In the embodiments of the present disclosure, individual fitness can be calculated through a fitness function. The phenotype corresponding to each encoded feature information can be obtained after decoding the encoded feature information. Each encoded feature information corresponds to a feature information. The objective function value of the corresponding feature information can be calculated from the phenotype of the feature information. According to the type of optimization problem, the individual fitness is calculated from the objective function value according to a certain conversion rule, that is, the individual fitness of each feature information.
[0087] Step 403: Based on the individual fitness, a tournament selection process is performed on each initialized population to obtain multiple optimized populations.
[0088] In an embodiment of the present disclosure, the tournament selection may be to select feature information with the best individual fitness value for each initialized population to form multiple optimized populations.
[0089] Step 404: Based on the mutual information, a crossover operation and a mutation operation are performed on the multiple optimized populations, and the operation is repeated repeatedly until the optimized feature information is obtained.
[0090] In an embodiment of the present disclosure, a crossover operation is performed on multiple optimized populations based on mutual information, which may be a crossover operation on multiple coded feature information in the optimized populations to obtain offspring features. There are multiple optimized populations corresponding to multiple parent features, and the feature information therein can make the population potential value composed of the obtained offspring features larger and more stable through the crossover operation.
[0091] In the embodiments of the present disclosure, the mutation operation may be to change the population composed of offspring features with a certain probability, which may increase the diversity of the population. In other words, the feature information in multiple optimized populations is randomly changed so that the obtained new population can be more diverse.
[0092] In an embodiment of the present disclosure, the mutation operation may be to obtain the importance of the edge to the population by calculating the eigenvector centrality of the edge in the population, and to set a greater mutation probability for the edge with a smaller eigenvector centrality.
[0093] In the above embodiment, by using mutual information based on a genetic algorithm, crossover operations and mutation operations to obtain optimized feature information, the obtained feature information can be made more stable and diverse, and it is easier to retain advantageous feature information, thereby improving search efficiency.
[0094] based on Figure 1-Figure 4 The embodiment shown, Figure 5 The following is a schematic diagram of a flow chart of performing a crossover operation on multiple optimized populations proposed in the present disclosure. Figure 5 based on Figure 4 The embodiment shown, Figure 4Step 404 in the method is further described, the method comprises the following steps:
[0095] Step 501: For each optimized population, two encoding feature information are randomly selected for crossover operation to obtain offspring features.
[0096] In an embodiment of the present disclosure, randomly selecting two pieces of coding feature information for crossover operation may be performing a crossover operation on feature information corresponding to the two randomly selected pieces of coding feature information to obtain offspring features, so that the offspring features are different from the parent features.
[0097] Step 502: If two encoded feature information have the same edge, the same edge is retained as the first edge of the descendant feature.
[0098] In the embodiment of the present disclosure, the existence of the same edge in two coded feature information may be that the same feature exists in the feature information corresponding to the two coded feature information selected in step 501, and the same feature is used as the first edge of the descendant feature.
[0099] Step 503, respectively calculate the mutual information of multiple different edges of two encoding feature information with respect to the same edge, and obtain the first mutual information and the second mutual information.
[0100] In an embodiment of the present disclosure, calculating the mutual information between a plurality of different edges and a same edge may be calculating the mutual information between a plurality of different feature information and the same feature information to obtain a plurality of first mutual information and second mutual information.
[0101] Step 504: If the first mutual information is greater than the second mutual information, the different edge corresponding to the first mutual information is used as the second edge of the descendant feature.
[0102] In the embodiment of the present disclosure, the second edge of the offspring feature that uses the different edge corresponding to the first mutual information can be the multiple mutual information calculated in the comparison step 503, and the feature information corresponding to the maximum mutual information is used as the second edge of the offspring feature. In other words, through the calculation of the mutual information, the edge with a larger mutual information value is more likely to be retained in the crossover process, and through the above operation, the potential value of the obtained population will be larger and more stable.
[0103] Step 505: If the two encoded feature information do not have the same edges, randomly cross them to obtain the edges of the descendant features.
[0104] In the embodiment of the present disclosure, if two pieces of coded feature information do not have the same edge, that is, if the two pieces of coded feature information randomly selected in step 501 do not have the same feature information, random crossover is performed to obtain offspring features.
[0105] In the above embodiment, by performing a cross operation on the coding feature information of multiple optimized populations, the obtained offspring features are made more diverse, so that the potential value of the population is larger and more stable.
[0106] based on Figure 1-Figure 5 The embodiment shown, Figure 6 The following is a schematic diagram of a process for performing spherical clustering processing on log information proposed in the present disclosure. Figure 6 based on Figure 1 The embodiment shown, Figure 1 Step 104 in the method is further described, the method comprises the following steps:
[0107] Step 601, perform standard K-means division on the optimized feature information to obtain multiple initial spheres.
[0108] In an embodiment of the present disclosure, the standard K-means partitioning may be to randomly determine the number of categories, determine K centers as the centers of the initial spheres from multiple optimized feature information, attribute the surrounding optimized feature information to each initial sphere, and obtain multiple initial spheres.
[0109] Step 602: for each initial sphere, determine a random initial center as the center of mass of the initial sphere.
[0110] In an embodiment of the present disclosure, for each initial sphere, one piece of optimized feature information is randomly determined from a plurality of optimized feature information as the centroid of the initial sphere.
[0111] For example, the random initial center is taken as the center of mass of the ball, denoted as .
[0112] Step 603, initializing the center of mass of each initial sphere and calculating the radius of each initial sphere.
[0113] In an embodiment of the present disclosure, initializing the centroid of each initial sphere may be to use the optimized feature information of the centroid of each initial sphere as the origin in the vector coordinates.
[0114] In an embodiment of the present disclosure, the radius of each initial sphere is calculated to divide and cluster the optimized feature information.
[0115] Step 604, calculating a centroid distance matrix according to the distance between the centroids of any two initial spheres among the multiple initial spheres.
[0116] In an embodiment of the present disclosure, determining the distance between the centroids of any two initial spheres may be determining whether the two initial spheres belong to adjacent clusters.
[0117] For example, the distance between the centers of mass of any two initial balls is calculated, and the relationship between the two initial balls is determined by determining the relationship between the distance and the radius of the initial balls. || ||< ,in Refers to two initial balls respectively, Refers to the center of mass of the two initial balls respectively. If Radius If the above inequality is satisfied, then yes adjacent clusters.
[0118] For example, Figure 7 The adjacent clusters are shown in the figure. The red dashed line represents the bisector of the line segment connecting the centroids of the two initial spheres. The yellow triangle and green line represent the centroid and radius of the initial spheres, respectively. The adjacent initial spheres become adjacent clusters. and are adjacent clusters, but no The adjacent clusters of and No relationship.
[0119] Step 605, determine the set of neighboring sphere centroids of the centroid of each initial sphere, and redistribute the optimized feature information in the initial sphere to obtain an optimized sphere.
[0120] In an embodiment of the present disclosure, by calculating the radius of each initial sphere and the distance between the centers of mass of any two initial spheres, the initial spheres of the adjacent clusters of each initial sphere can be determined, thereby determining the set of neighboring sphere centers of mass of the center of mass of each initial sphere, that is, the set of centers of mass of the initial spheres of each adjacent cluster.
[0121] In the embodiment of the present disclosure, reallocating the optimized feature information in the initial sphere may be moving the optimized feature information between the initial spheres of adjacent clusters to obtain the optimized sphere.
[0122] For example, Figure 7 As shown, and are adjacent clusters, so in the current iteration, ( ) may be moved to ( )middle; yes adjacent clusters, but no In this case, Some points in can be moved to In, but Any point in the middle; and No relationship, in which case, in the current iteration, ( ) cannot be moved to any point in ( )middle.
[0123] For example, Figure 8 Schematic diagram of redistributing the optimized feature information in the initial sphere, yes The area surrounded by the green dotted circle is the stable area. In this step, the points in the stable area do not participate in the allocation. The first annular area is the area between the green dotted circle and the blue dotted circle. In this step, the points in the first annular area, such as Only in and The second annular area is the area between the blue dotted circle and the black solid circle. In the allocation, the points in the second annular area, May be in , and Move inside.
[0124] Step 606, iteratively calculate the center of mass and radius of each optimization sphere until the center of mass of each optimization sphere stops changing.
[0125] In the embodiment of the present disclosure, the loop iteration until the center of mass of each optimized ball stops changing can be to continuously update the center of mass and the radius of the ball, and repeat step 603, step 604, and step 605 until all balls will not become adjacent clusters of another ball and the balls will not affect each other, and the clustering is completed.
[0126] In the above embodiment, multiple optimization feature information may be classified through sphere clustering, so that each type of optimization feature information will not affect each other, and the obtained classification is more stable.
[0127] based on Figure 1-Figure 6 The embodiment shown, Fig. 9 The following is a schematic diagram of the process of obtaining the optimized ball proposed in the present disclosure. Fig. 9 based on Figure 6 The embodiment shown, Figure 6 Further describing step 605 in the method, the method comprises the following steps:
[0128] Step 901: for the first initial sphere in each initial sphere, the centroids of adjacent spheres that meet a preset condition are determined as a set of adjacent sphere centroids.
[0129] In an embodiment of the present disclosure, the preset condition is that the distance between the center of mass of the first initial sphere and the center of mass of the adjacent sphere is less than or equal to twice the radius of the first initial sphere.
[0130] In an embodiment of the present disclosure, determining the centroids of adjacent spheres satisfying a preset condition as a set of adjacent sphere centroids may be determining an adjacent cluster of each initial sphere, that is, determining an initial sphere whose distance from the centroid of a first initial sphere is less than or equal to twice the radius of the first initial sphere as an initial sphere of an adjacent cluster of the first initial sphere, determining the centroid of the sphere as the adjacent sphere centroid of the first initial sphere, and then determining a set of adjacent sphere centroids of each initial sphere.
[0131] Step 902: Divide the first initial sphere into multiple areas.
[0132] In an embodiment of the present disclosure, the area within the first boundary is a stable area, and the first boundary and the center of mass of the first initial sphere are at a first preset distance, which is smaller than the radius of the first initial sphere.
[0133] In an embodiment of the present disclosure, the area between the first boundary and the second boundary is the first moving area, and the area between the second boundary and the center of mass of the first initial ball is the second preset distance, which is greater than the first preset distance.
[0134] In an embodiment of the present disclosure, the area between the second boundary and the outer boundary of the first initial sphere is the second moving area.
[0135] For example, Figure 8 As shown, the green dotted line is the first boundary, the area within the first boundary is the stable area, the blue dotted line is the second boundary, the area between the first boundary and the second boundary is the first moving area, and the area from the second boundary to the outer boundary of the first initial ball, that is, the area between the blue dotted line and the outer boundary of C1, is the second moving area.
[0136] In the above embodiment, the first initial sphere is divided into several areas, thereby determining the range in which the optimized feature information is moved in the first initial sphere.
[0137] Step 903, redistribute the optimized feature information in the first moving area among the adjacent balls of the first initial ball, and redistribute the optimized feature information in the second moving area among the adjacent balls and non-adjacent balls of the first initial ball to obtain optimized balls.
[0138] In the embodiments of the present disclosure, the optimized feature information of the first moving zone and the second moving zone is reallocated, while the optimized feature information of the stable zone does not participate in the allocation, so that the optimized feature information in the first initial sphere can be reallocated, and the optimized feature information in the obtained optimized sphere can be made more stable and the feature information can be closer.
[0139] For example, the points within the green dotted line do not move, the points between the green dotted line and the blue dotted line move between the adjacent balls of the first initial ball, namely C2, that is, x2 can only move within C1 and C2, and the points between the blue dotted line and the outer boundary can move between C1, C2, and C3.
[0140] In summary, the method proposed in the present disclosure obtains log information and extracts initial feature information of multiple users from the log information; based on the initial feature information, mutual information is determined, and the mutual information is used to represent the degree of dependence between any two feature information of the same user; based on a genetic algorithm, the feature information of multiple users is screened using mutual information to determine the optimized feature information; based on the optimized feature information, the log information is subjected to ball clustering processing, and the optimized feature information is divided into multiple user behavior sets, and the multiple user behavior sets are used as training data to train the first model, and the first model is used to evaluate the abnormal risk value of the user log. The feature information is screened through the mutual information between the multiple feature information of the user, and the users are classified using ball clustering to obtain training data for model training, which solves the problem of low practicality of the single content-based feature recognition method in the related technology, reduces the amount of calculation, and further improves the search efficiency.
[0141] The following is a detailed introduction to a specific implementation of a method for obtaining user data provided by an embodiment of the present disclosure.
[0142] Step 1: Obtain log information, perform preprocessing operations on the information, and extract user-related information.
[0143] Step 2: Use principal component analysis (PCA) to simplify feature information.
[0144] Optionally, simplifying the feature information by using PCA may be extracting initial feature information from the user-related information by using a principal component analysis method.
[0145] In some embodiments, the simplified feature information may be initial feature information of multiple users, wherein the simplified feature information includes user identification and information on the behavioral features of user operations.
[0146] Step 3: Use the information gain (IG) method to obtain mutual information.
[0147] Optionally, the mutual information obtained by using the information gain method may be the mutual information between any two feature information of the same user.
[0148] Step 4: Based on the genetic algorithm, the mutual information and the eigenvector centrality of the edge are used to obtain the optimal feature subset.
[0149] Optionally, using mutual information and edge feature vector centrality to obtain the best feature subset may be to use mutual information to screen feature information of multiple users to determine optimized feature information.
[0150] 4.1 Encoding features: When a feature is selected, the data is represented as 1, otherwise it is represented as 0.
[0151] 4.2 Randomly initialize the space and generate the initialized population, and calculate the fitness of the individuals in the population.
[0152] 4.3 Perform tournament selection on the population.
[0153] 4.4 Perform crossover operations on the population based on mutual information.
[0154] 4.5 Calculate the eigenvector centrality of the edges and perform mutation operations on the population.
[0155] 4.6 Iterate the loop to obtain the best feature subset.
[0156] In step 4.4, if there are no identical edges in the crossover parent, a regular crossover operation is performed. If there are identical edges in the crossover parent, the edge is retained and the mutual information value between the remaining two edges and the edge is calculated. The larger the mutual information value, the greater the correlation between the nodes. Among them, the edges with large mutual information values are more likely to be retained during the crossover process. Through this operation, the population potential value obtained is larger and more stable.
[0157] 4.4.1 Randomly select two individuals p1 and p2 for crossover operation to obtain the offspring p_child.
[0158] 4.4.2 If p1 and p2 have the same edge: retain the same edge side to the subband p_child, calculate the mutual information of the remaining edges of p1 and p2 on side as H1 and H2 respectively; compare the sizes of H1 and H2, and select the larger one as the other side of p_child.
[0159] 4.4.3 If p1 and p2 do not have the same edges, randomly cross them to obtain the subband p_child.
[0160] Step 5: Based on the feature set obtained in step 4, perform spherical clustering on the log information to achieve user classification.
[0161] Optionally, the feature set obtained in step 4 may be optimized feature information. According to the optimized feature information, spherical clustering is performed on the log information, and the optimized feature information may be divided into a plurality of user behavior sets.
[0162] Step 6: Use the divided data set as a training set to establish a Bayesian network to determine the risk value of new users.
[0163] Optionally, multiple user behavior sets can be used as training data to train a first model. The first model is a Bayesian network model established using the divided data sets as training sets. The first model is used to determine the risk value of a new user.
[0164] based on Figure 1-Figure 6 , Fig. 9 The embodiment shown, as Fig.10 As shown, the present disclosure provides a structural diagram of a user data acquisition system 1000. The system 1000 includes an acquisition module 1001, a determination module 1002, a screening module 1003 and a processing module 1004.
[0165] The acquisition module 1001 is used to acquire log information and extract initial feature information of multiple users from the log information.
[0166] The determination module 1002 is used to determine mutual information based on the initial feature information, where the mutual information is used to indicate the degree of dependence between any two feature information of the same user.
[0167] The screening module 1003 is used to screen the feature information of multiple users based on a genetic algorithm and using mutual information to determine the optimized feature information.
[0168] The processing module 1004 is used to perform spherical clustering processing on the log information according to the optimized feature information, and divide the optimized feature information into multiple user behavior sets. The multiple user behavior sets are used as training data to train the first model, and the first model is used to evaluate the abnormal risk value of the user log.
[0169] In the embodiment of the present disclosure, the acquisition module is also used to preprocess the log information and extract user-related information of multiple users from the preprocessed log information; and extract initial feature information from the user-related information using principal component analysis.
[0170] In an embodiment of the present disclosure, the determination module is further used to determine the mutual information between any two feature information of the same user using the information gain method, wherein the mutual information includes at least one of information entropy, conditional entropy, and information gain.
[0171] In an embodiment of the present disclosure, the screening module is also used to encode feature information of multiple users to obtain encoded feature information; perform random initialization space processing on the encoded feature information to generate multiple initialized populations, and calculate the individual fitness of each encoded feature information in the multiple initialized populations; based on the individual fitness, perform tournament selection processing on each initialized population to obtain multiple optimized populations; based on mutual information, perform crossover operations and mutation operations on the multiple optimized populations, and iterate repeatedly until the optimized feature information is obtained.
[0172] In an embodiment of the present disclosure, the screening module is also used to randomly select two coding feature information for each optimized population to perform a crossover operation to obtain an offspring feature; if the two coding feature information have the same edge, retain the same edge as the first edge of the offspring feature; respectively calculate the mutual information of multiple different edges of the two coding feature information to the same edge to obtain the first mutual information and the second mutual information; if the first mutual information is greater than the second mutual information, use the different edges corresponding to the first mutual information as the second edge of the offspring feature; if the two coding feature information do not have the same edge, randomly cross to obtain the edge of the offspring feature.
[0173] In an embodiment of the present disclosure, the processing module is also used to perform standard K-means division on the optimized feature information to obtain multiple initial spheres, each initial sphere corresponding to a user behavior category; for each initial sphere, a random initial center is determined as the center of mass of the initial sphere; the center of mass of each initial sphere is initialized, and the radius of each initial sphere is calculated; the center of mass distance matrix is calculated based on the distance between the centers of mass of any two initial spheres among the multiple initial spheres; the center of mass set of neighboring spheres of the center of mass of each initial sphere is determined, and the optimized feature information in the initial sphere is redistributed to obtain an optimized sphere; the center of mass and radius of each optimized sphere are calculated iteratively until the center of mass of each optimized sphere stops changing.
[0174] In an embodiment of the present disclosure, the processing module is also used to determine, for the first initial sphere in each initial sphere, the centroids of adjacent spheres that meet a preset condition as a set of adjacent sphere centroids, wherein the preset condition is that the distance between the centroid of the first initial sphere and the centroid of the adjacent spheres is less than or equal to twice the radius of the first initial sphere; the first initial sphere is divided into multiple regions, wherein: the region within the first boundary is a stable region, the first boundary and the centroid of the first initial sphere are at a first preset distance, and the first preset distance is less than the radius of the first initial sphere; the region between the first boundary and the second boundary is a first moving region, the second boundary and the centroid of the first initial sphere are at a second preset distance, and the second preset distance is greater than the first preset distance; the region between the second boundary and the outer boundary of the first initial sphere is a second moving region; the optimized feature information within the first moving region is redistributed among the adjacent spheres of the first initial sphere, and the optimized feature information within the second moving region is redistributed among the adjacent spheres of the first initial sphere, to obtain an optimized sphere.
[0175] In summary, the user data acquisition system proposed in the embodiment of the present disclosure acquires log information through an acquisition module, and extracts initial feature information of multiple users from the log information; the processing module determines mutual information based on the initial feature information, and the mutual information is used to represent the degree of dependence between any two feature information of the same user; based on a genetic algorithm, the feature information of multiple users is screened using mutual information to determine optimized feature information; based on the optimized feature information, the log information is spherically clustered, and the optimized feature information is divided into multiple user behavior sets, and the multiple user behavior sets are used as training data to train a first model, and the first model is used to evaluate the abnormal risk value of the user log.
[0176] In the embodiments provided in the present application, the methods and systems provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function in the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.
[0177] Fig.11 is a block diagram of an electronic device 1100 for implementing the above-mentioned user data acquisition method according to an exemplary embodiment.
[0178] Reference Fig.11 The electronic device 1100 may include a communication interface 1101, which can interact with other devices; a processor 1102, which is connected to the communication interface 1101 to interact with other devices and is used to execute the method provided by one or more of the above technical solutions when running a computer program; and a memory 1103, on which the computer program is stored. Specifically, the specific processing process of the processor 1102 can refer to the container safety detection method described in the above embodiment of the present disclosure.
[0179] Of course, in actual application, the various components in the electronic device 1100 are coupled together through the bus system 1104. It can be understood that the bus system 1104 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1104 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.11 Various buses are labeled as bus system 1104 .
[0180] The memory 1103 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device 1100. Examples of such data include: any computer program used to operate on the electronic device 1100.
[0181] The method disclosed in the above embodiment of the present application can be applied to the processor 1102, or implemented by the processor 1102. The processor 1102 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1102. The above processor 1102 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1102 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 1103, and the processor 1102 reads the information in the memory 1103, and completes the steps of the above method in combination with its hardware.
[0182] In an exemplary embodiment, the electronic device 1100 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.
[0183] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the user data acquisition method described in the above embodiments of the present disclosure.
[0184] An embodiment of the present disclosure further provides a computer program product, including a computer program, which executes the user data acquisition method described in the above embodiment of the present disclosure when a processor is used to execute the computer program.
[0185] An embodiment of the present disclosure also proposes a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from a memory of an electronic device and send signals to the processor, the signals include computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the user data acquisition method described in the above embodiments of the present disclosure.
[0186] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0187] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0188] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0189] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0190] It should be understood that the various parts of the embodiments of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0191] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0192] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0193] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for obtaining user data, characterized in that: The method comprises: Obtaining log information, preprocessing the log information, and extracting user-related information of multiple users from the preprocessed log information, and extracting initial feature information of multiple users from the user-related information using a principal component analysis method, wherein the initial feature information can reflect multiple feature information of the user, and each feature information reflects a behavior feature of the user, including a user identifier and information that can reflect the user's behavior feature; Based on the initial feature information, determine mutual information, where the mutual information is used to represent the degree of dependence between any two feature information of the same user; Encode the feature information of the multiple users to obtain coded feature information, perform random initialization space processing on the coded feature information to generate multiple initialization populations, and calculate the individual fitness of each coded feature information in the multiple initialization populations, perform tournament selection processing on each initialization population based on the individual fitness to obtain multiple optimized populations, perform crossover operations and mutation operations on the multiple optimized populations based on the mutual information, and iterate repeatedly until the optimized feature information is obtained; According to the optimized feature information, the log information is subjected to ball clustering processing, and the optimized feature information is divided into multiple user behavior sets. The multiple user behavior sets are used as training data to train a first model. The first model is used to evaluate the risk value of a new user. The ball clustering processing includes performing standard K-means division on the optimized feature information to obtain multiple initial balls, each initial ball corresponding to a user behavior category. For each initial ball, a random initial center is determined as the center of mass of the initial ball, the center of mass of each initial ball is initialized, and the radius of each initial ball is calculated. According to the distance between the centers of mass of any two initial balls among the multiple initial balls, a center of mass distance matrix is calculated, the center of mass set of neighboring balls of the center of mass of each initial ball is determined, and the optimized feature information in the initial ball is redistributed to obtain the optimized ball, and the center of mass and radius of each optimized ball are calculated iteratively until the center of mass of each optimized ball stops changing.
2. The method according to claim 1, characterized in that: The determining the mutual information based on the initial feature information includes: Using the information gain method, the mutual information between any two feature information of the same user is determined. The mutual information includes at least one of information entropy, conditional entropy and information gain.
3. The method according to claim 1, characterized in that: The crossover operation on the multiple optimized populations comprises: For each optimized population, two encoding feature information are randomly selected for crossover operation to obtain offspring features; If the two encoded feature information have the same edge, retain the same edge as the first edge of the descendant feature; Respectively calculating the mutual information of a plurality of different edges of the two encoding feature information with respect to the same edge to obtain a first mutual information and a second mutual information; If the first mutual information is greater than the second mutual information, taking the different edge corresponding to the first mutual information as the second edge of the descendant feature; If the two encoded feature information do not have the same edge, they are randomly crossed to obtain the edge of the descendant feature.
4. The method according to claim 1, characterized in that: The step of determining a set of neighboring sphere centroids of the centroid of each initial sphere and redistributing the optimized feature information in the initial sphere to obtain the optimized sphere comprises: For a first initial sphere in each initial sphere, the centroids of adjacent spheres that meet a preset condition are determined as the adjacent sphere centroid set, wherein the preset condition is that the distance between the centroid of the first initial sphere and the centroid of the adjacent sphere is less than or equal to twice the radius of the first initial sphere; The first initial sphere is divided into a plurality of regions, wherein: the region within the first boundary is a stable region, the first boundary and the mass center of the first initial sphere are at a first preset distance, and the first preset distance is less than the radius of the first initial sphere; the region between the first boundary and the second boundary is a first moving region, the second boundary and the mass center of the first initial sphere are at a second preset distance, and the second preset distance is greater than the first preset distance; the region between the second boundary and the outer boundary of the first initial sphere is a second moving region; The optimized feature information in the first moving area is redistributed among the adjacent balls of the first initial ball, and the optimized feature information in the second moving area is redistributed among the adjacent balls and non-adjacent balls of the first initial ball to obtain the optimized ball.
5. A user data acquisition system, characterized in that: The system includes an acquisition module, a determination module, a screening module and a processing module. The acquisition module is used to acquire log information, preprocess the log information, and extract user-related information of multiple users from the preprocessed log information, and extract initial feature information of multiple users from the user-related information using a principal component analysis method, wherein the initial feature information can reflect multiple feature information of the user, and each feature information reflects a behavioral feature of the user, including a user identifier and information that can reflect the user's behavioral feature; The determination module is used to determine mutual information based on the initial feature information, where the mutual information is used to indicate the degree of dependence between any two feature information of the same user; The screening module is used to encode the feature information of the multiple users to obtain the encoded feature information, perform random initialization space processing on the encoded feature information to generate multiple initialization populations, and calculate the individual fitness of each encoded feature information in the multiple initialization populations, perform tournament selection processing on each initialization population based on the individual fitness to obtain multiple optimized populations, perform crossover operations and mutation operations on the multiple optimized populations based on the mutual information, and iterate repeatedly until the optimized feature information is obtained; The processing module is used to perform ball clustering processing on the log information according to the optimized feature information, divide the optimized feature information into multiple user behavior sets, and the multiple user behavior sets are used to train a first model as training data. The first model is used to evaluate the risk value of a new user. The ball clustering processing includes performing standard K-means division on the optimized feature information to obtain multiple initial balls, each initial ball corresponding to a user behavior category, for each initial ball, determining a random initial center as the center of mass of the initial ball, initializing the center of mass of each initial ball, and calculating the radius of each initial ball, calculating the center of mass distance matrix according to the distance between the centers of mass of any two initial balls among the multiple initial balls, determining the center of mass set of neighboring balls of the center of mass of each initial ball, and redistributing the optimized feature information in the initial ball to obtain the optimized ball, and iteratively calculating the center of mass and radius of each optimized ball until the center of mass of each optimized ball stops changing.
6. An electronic device, characterized in that: include: one or more processors; A storage device communicatively connected to the one or more processors, on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 4.
8. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 4 after being executed.
