Training method of classification model, portrait generation method, device, medium and equipment

By training an abnormal behavior classification model using entity segmentation analysis of normal human behavior data, the problem of the inability to predict risks for specific individuals in existing technologies is solved, and simplified training and risk prediction without the need for criminal data are achieved.

CN116089612BActive Publication Date: 2026-07-21JINGDONG CITY BEIJING DIGITS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINGDONG CITY BEIJING DIGITS TECH CO LTD
Filing Date
2023-01-19
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies cannot effectively predict risks for specific individuals, and traditional methods require a large amount of criminal case information for supervision and training, but criminal information is highly confidential and difficult to obtain.

Method used

By acquiring behavioral data from normal individuals, entity segmentation is performed, and an abnormal behavior classification model is trained based on part-of-speech and type. This eliminates the need for criminal data and simplifies the training process.

Benefits of technology

It enables the prediction of abnormal behavior risks of specific individuals, reducing the difficulty of collecting sample behavior data and the complexity of training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116089612B_ABST
    Figure CN116089612B_ABST
Patent Text Reader

Abstract

The application discloses a training method of a classification model, a portrait generation method, a device, a medium and equipment. The training method of the classification model comprises the following steps: obtaining sample behavior data, and extracting entity segmentation in the sample behavior data; determining a sample type of the sample behavior data according to the part of speech of the entity segmentation contained in the sample behavior data, and determining an abnormal behavior type corresponding to the sample behavior data according to the type to which the entity segmentation contained in the sample behavior data belongs; and training a classification model of any abnormal behavior type based on sample behavior data of each sample type corresponding to the abnormal behavior type. The positive and negative sample library is constructed by unsupervisedly marking the positive and negative part of speech of the words according to the word frequency difference of each word in the normal personnel word library, the training of the classification model is realized, and the difficulty of obtaining the training data is reduced. The classification model obtained by training can determine the risk portrait of a specific person, and the risk prediction of the specific person is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of deep learning technology and smart city technology, and in particular to training methods for classification models, methods for generating user profiles, devices, media and equipment. Background Technology

[0002] Risk prediction or crime prediction can provide early warning information for law enforcement agencies, making it easier for them to focus on the predicted time period or predicted area.

[0003] In the process of realizing this invention, it was found that the prior art has at least the following technical problems: Current crime prediction generally predicts the structure and trend of future risks and crimes by associating the location, time, and type of historical risks or crimes, but it cannot predict risks for specific individuals. At the same time, traditional risk or crime prediction methods require a large number of known risk or crime cases for supervised training of the model, but the information on risks and crimes is often highly confidential, making it difficult to obtain relevant information. Summary of the Invention

[0004] This invention provides a method for training a classification model, a method for generating a profile, an apparatus, a medium, and a device, which trains a classification model of abnormal behavior using behavioral data of normal people, and can be used to identify and profile the abnormal behavior of specific people.

[0005] According to one aspect of the present invention, a method for training a classification model is provided, comprising:

[0006] Acquire sample behavior data and extract entity word segments from the sample behavior data;

[0007] Based on the part-of-speech tags of the entity segments contained in the sample behavior data, the sample type of the sample behavior data is determined, and based on the type of the entity segments contained in the sample behavior data, the abnormal behavior type corresponding to the sample behavior data is determined.

[0008] A classification model for the abnormal behavior type is trained based on the sample behavior data of each sample type corresponding to any abnormal behavior type.

[0009] According to another aspect of the present invention, a portrait generation method is provided, comprising:

[0010] Obtain the behavioral data of the target object and determine the behavioral vector of each behavioral data;

[0011] Each of the aforementioned behavior vectors is input into the classification model corresponding to each abnormal behavior type to obtain the output results of each of the aforementioned classification models;

[0012] Behavioral labels are set for the target object based on the output results of each classification model, and a risk profile of the target object is formed based on the behavioral labels of the target object.

[0013] According to another aspect of the present invention, a training apparatus for a classification model is provided, comprising:

[0014] The entity segmentation and extraction module is used to acquire sample behavior data and extract entity segments from the sample behavior data.

[0015] The sample type determination module is used to determine the sample type of the sample behavior data based on the part-of-speech tags of the entity segments contained in the sample behavior data.

[0016] The abnormal behavior type matching module is used to determine the abnormal behavior type corresponding to the sample behavior data based on the type of entity segmentation contained in the sample behavior data.

[0017] The model training module is used to train a classification model for any abnormal behavior type based on sample behavior data of each sample type corresponding to any abnormal behavior type.

[0018] According to another aspect of the present invention, an image generation apparatus is provided, comprising:

[0019] The behavior vector determination module is used to acquire the behavior data of the target object and determine the behavior vector of each behavior data.

[0020] The classification module is used to input each of the aforementioned behavior vectors into the classification model corresponding to each abnormal behavior type, and obtain the output results of each of the aforementioned classification models;

[0021] The profile generation module is used to set behavioral labels for the target object based on the output results of each classification model, and to form a risk profile of the target object based on the behavioral labels of the target object.

[0022] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0023] At least one processor; and

[0024] A memory communicatively connected to the at least one processor; wherein,

[0025] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the training method of the classification model according to any embodiment of the present invention, or the portrait generation method.

[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the training method of the classification model or the image generation method described in any embodiment of the present invention.

[0027] The technical solution of this invention trains classification models for various abnormal behavior types using sample behavior data of normal individuals, eliminating the need to collect crime data and reducing the difficulty of sample behavior data collection. By determining the part-of-speech tagging and type of entity segments in the acquired sample behavior data, the corresponding sample behavior dataset for each abnormal behavior type is determined, thus training the classification model for each abnormal behavior type. This eliminates the need to label the sample behavior data, simplifying the training data processing process and achieving unsupervised training of the classification model. The trained classification model can predict abnormal behavior of individuals, determine whether they pose a risk of abnormal behavior, and achieve risk prediction for specific individuals.

[0028] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a flowchart of a training method for a classification model provided in an embodiment of the present invention;

[0031] Figure 2 This is a flowchart of a training method for a classification model provided in an embodiment of the present invention;

[0032] Figure 3 This is a flowchart of a portrait generation method provided in an embodiment of the present invention;

[0033] Figure 4 This is a flowchart of a portrait generation method provided in an embodiment of the present invention;

[0034] Figure 5 This is a schematic diagram of the structure of a training device for a classification model provided in an embodiment of the present invention;

[0035] Figure 6 This is a schematic diagram of the structure of a training device for a classification model provided in an embodiment of the present invention;

[0036] Figure 7 This is a schematic diagram of the structure of an electronic device that implements an embodiment of the present invention. Detailed Implementation

[0037] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0039] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0040] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0041] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0042] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0043] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0044] Figure 1 This is a flowchart of a classification model training method provided in an embodiment of the present invention. This embodiment is applicable to situations where a classification model of abnormal behavior is trained based on behavioral data of normal individuals. The method can be executed by a classification model training device provided in this embodiment of the present invention. This classification model training device can be implemented in hardware and / or software, and can be configured in electronic devices such as computers and servers. Figure 1 As shown, the method includes:

[0045] S110. Obtain sample behavior data and extract entity word segmentation from the sample behavior data.

[0046] S120. Determine the sample type of the sample behavior data based on the part-of-speech of the entity segmentation contained in the sample behavior data, and determine the abnormal behavior type corresponding to the sample behavior data based on the type of the entity segmentation contained in the sample behavior data.

[0047] S130. Based on the sample behavior data of each sample type corresponding to any abnormal behavior type, a classification model for the abnormal behavior type is trained.

[0048] In this embodiment, the sample behavior data is the behavior data of normal individuals. This can be obtained by randomly selecting normal individuals from a de-identified database of normal individuals, and then using their behavior data as the sample behavior data. It should be noted that the method of obtaining this sample behavior data complies with relevant laws, regulations, and provisions. For example, the method of obtaining and using the behavior data may be confirmed with the sample individuals, and the sample behavior data may be obtained with their authorization. Furthermore, after training the classification model based on the sample behavior data, the sample behavior data is deleted to prevent leakage and improve data security.

[0049] Sample behavioral data can be internet behavioral data, including but not limited to search data, browsing data, and transaction data on the internet. Search data includes, but is not limited to, search content, search platform name, and attribute descriptions; browsing data includes, but is not limited to, browsed content; and transaction data includes, but is not limited to, transaction object name, attribute descriptions, and usage descriptions.

[0050] The sample behavior data contains a large number of meaningless words. Entity segmentation is extracted from the sample behavior data to reduce invalid segmentation, avoid interference from invalid segmentation, and reduce the number of segmented words, thus further reducing the amount of data to be processed. Specifically, the sample behavior data is segmented to obtain multiple segmented words for each sample behavior data. These segmented words are then filtered to remove modal particles and stop words to obtain entity segmented words. Specifically, the obtained segmented words can be matched against modal particle and stop word libraries respectively, and the successfully matched segmented words are discarded to obtain entity segmented words.

[0051] The sample type of the sample behavior data can be positive or negative. The sample type is determined by the part-of-speech tag of each entity segment included, where the part-of-speech tag can be positive or negative. For example, if the sample behavior data includes entity segments with negative part-of-speech tags, the sample behavior data is a negative sample; if the sample behavior data includes entity segments that are all positive, the sample behavior data is a positive sample.

[0052] Optionally, before determining the sample type of the sample behavior data based on the part-of-speech tags of the entity segments contained in the sample behavior data, the method further includes: determining the part-of-speech tag of each entity segment based on the frequency of occurrence of each entity segment, wherein the part-of-speech tag of the entity segment includes positive words and negative words. Positive words are entity words without abnormal risk, and negative words are entity words with abnormal risk.

[0053] In this embodiment, entity segmentation data from a large amount of sample behavior data is statistically analyzed to determine the frequency of occurrence of each entity segment. The frequency of occurrence includes the frequency of each entity segment occurring individually and the frequency of simultaneous occurrence of any two entity segments. The entity segmentation data from the large amount of sample behavior data is traversed to identify any two entity segment pairs and determine the frequency of simultaneous occurrence of each entity segment pair. The entity segmentation data from the large amount of sample behavior data is also traversed to statistically analyze the frequency of individual occurrence of each entity segment. The number of individual occurrences of any entity segment can be determined by the difference between the total number of occurrences of the entity segment and the number of simultaneous occurrences of the entity segment pair. It should be noted that the number of individual occurrences of an entity segment is determined relative to the entity segment pair; the number of individual occurrences of the same entity segment can differ depending on the entity segment pair. Taking the entity segments "pistol" and "toy" as an example, the frequency of individual occurrence of "pistol," the frequency of individual occurrence of "toy," and the frequency of simultaneous occurrence of "pistol" and "toy" are statistically analyzed. In this context, the total number of times "pistol" appears can be X, the total number of times "toy" appears can be Y, and the frequency of simultaneous occurrence of "pistol" and "toy" can be Z. Correspondingly, the frequency of "pistol" appearing alone can be XZ, and the frequency of "toy" appearing alone can be YZ. It should be noted that the total number of occurrences of any entity segmentation refers to the number of sample behavior data including that entity segmentation, and the number of simultaneous occurrences of two entity segments refers to the number of sample behavior data including both of the aforementioned entity segments.

[0054] Optionally, determining the part-of-speech tag of each entity segment based on its frequency of occurrence can be achieved by combining the individual occurrence frequency of each entity segment with the synchronous occurrence frequency of entity segment pairs. Since the sample behavioral data represents the behavior of normal individuals, segments with high frequency of occurrence are considered normal segments (positive part-of-speech tags), while segments with low frequency of occurrence are considered abnormal segments (negative part-of-speech tags).

[0055] In some embodiments, determining the part-of-speech tag of each entity segment based on the frequency of occurrence of each entity segment includes: traversing entity segment pairs, determining the synchronous occurrence frequency of any two entity segments, and if the difference between the individual occurrence frequency of the first entity segment and the individual occurrence frequency of the second entity segment is greater than a preset frequency when the synchronous occurrence frequency is greater than a preset threshold, then the second entity segment is determined to be a negative word and the first entity segment is determined to be a positive word.

[0056] The preset frequency can be set according to user needs and is not limited thereto. For example, taking any two entity segments "pistol" and "toy" as examples, if the synchronous occurrence frequency Z of "pistol" and "toy" is greater than the preset frequency, it is determined whether the difference between the individual occurrence frequency XZ of "pistol" and the individual occurrence frequency YZ of "toy" is greater than a preset threshold. This difference condition is used to characterize that the individual occurrence frequency of the first entity segment is much greater than the individual occurrence frequency of the second entity segment. In some embodiments, the difference threshold can be a preset fixed value. In some embodiments, the difference threshold can be determined with the individual occurrence frequencies of the two entity segments. For example, the difference threshold can be a preset proportion of the individual occurrence frequency of the first entity segment, such as 95% of the individual occurrence frequency of the first entity segment, etc., and is not limited thereto.

[0057] For example, if the frequency XZ of "pistol" alone is much less than the frequency YZ of "toy" alone, then "pistol" is determined to be a negative word and "toy" to be a positive word.

[0058] In some embodiments, determining the part-of-speech (POS) of each entity segment based on its frequency of occurrence includes: traversing entity segment pairs, determining the synchronous occurrence frequency of any two entity segments, and if the difference between the individual occurrence frequency of the first entity segment and the individual occurrence frequency of the second entity segment is greater than a preset frequency, then the negative word weight of the second entity segment is increased by a preset value, and the positive word weight of the first entity segment is also increased by a preset value; if the negative word weight of any entity segment is greater than its positive word weight, the POS of that entity segment is determined to be a negative word; if the negative word weight of any entity segment is less than its positive word weight, the POS of that entity segment is determined to be a positive word. If the negative word weight and the positive word weight of any entity segment are the same, that entity segment is discarded.

[0059] During the judgment process of each entity segmentation pair, if the frequency of simultaneous occurrence is less than a preset frequency, the judgment of the above entity segmentation pair is cancelled. If the difference between the individual occurrence frequency of the first entity segmentation and the individual occurrence frequency of the second entity segmentation is less than or equal to a preset threshold, the judgment of the above entity segmentation pair is cancelled. The initial values ​​of the negative word weight and positive word weight of each entity segmentation are both zero. During the judgment process of any entity segmentation pair, if the difference between the individual occurrence frequency of the first entity segmentation and the individual occurrence frequency of the second entity segmentation is greater than a preset threshold, the negative word weight of the second entity segmentation is increased by a preset value, and the positive word weight of the first entity segmentation is increased by a preset value. Here, the preset value can be a preset unit adjustment value, such as 1, which is not limited.

[0060] A large number of entity segmentation words can be extracted from sample behavior data. Part-of-speech (POS) determination is performed on each group of entity segmentation words. Based on the determination of each group of entity segmentation words, positive word weights are set for entities that tend to be positive words and negative word weights are set for entities that tend to be negative words. The POS of an entity segmentation word is determined by combining the determination results of each group of entity segmentation words, that is, by statistically calculating the positive word weights and negative word weights of each entity segmentation word. This avoids the randomness of the determination of a single group of entity segmentation words and improves the accuracy of POS determination.

[0061] For example, taking the entity segmentation word "pistol" as an example, the resulting entity segmentation pairs include, but are not limited to: pistol model, pistol toy, pistol bullet, pistol mold, etc. Taking the entity segmentation word "toy" as an example, the resulting entity segmentation pairs include, but are not limited to: pistol toy, children's toy, vehicle toy, etc. By traversing the entity segmentation pairs containing "pistol", the positive and negative word weights of "pistol" can be determined to determine the part of speech of "pistol". Similarly, by traversing the entity segmentation pairs containing "toy", the positive and negative word weights of "toy" can be determined to determine the part of speech of "toy".

[0062] Based on the part-of-speech tags of each entity segmented in the sample behavior data, the sample type of the sample behavior data is determined in order to construct a positive and negative sample library. For example, sample behavior data with a positive sample type forms a positive sample library, and sample behavior data with a negative sample type forms a negative sample library.

[0063] Specifically, the sample type of the sample behavior data is determined based on the part-of-speech tags of the entity segments contained in the sample behavior data. This includes: if the sample behavior data contains negative words but not positive words, then the sample type of the sample behavior data is determined to be a negative sample; if the sample behavior data contains positive words, then the sample type of the sample behavior data is determined to be a positive sample. In particular, each sample behavior data is traversed, and the part-of-speech tags of each entity segment in the sample behavior data are determined. If the sample behavior data contains only negative words, then the sample behavior data is determined to be a negative sample; if the sample behavior data contains only positive words, or if the sample behavior data contains both positive and negative words, then the sample behavior data is determined to be a positive sample.

[0064] In this embodiment, the label of the sample behavior data can be determined by the sample type. For example, the label of a negative sample can be a risky abnormal behavior label, and the label of a positive sample can be a risk-free normal behavior label. In some embodiments, it is not necessary to set labels for the sample behavior data; whether it is a risky abnormal behavior can be identified based on the sample type. That is, positive samples are risk-free normal behavior data, and negative samples are risky abnormal behavior data. Training the classification model using the above-mentioned sample behavior labels eliminates the need for setting supervision information, simplifying the preparation process of training data.

[0065] Different types of heterogeneous behaviors can correspond to different sample behavior datasets to train classification models for each abnormal behavior type. The abnormal behavior type corresponding to the sample behavior data is determined based on the type to which each entity segmentation belongs. The entity segmentation type is pre-defined; for example, an abnormal behavior lexicon is pre-defined, which includes the entity segmentation sets corresponding to each abnormal behavior type. If the entity segmentation in the sample behavior data includes any one or more entity segmentations from the entity segmentation set of a certain abnormal behavior type, then the sample behavior data corresponds to that abnormal behavior type, and is added to the dataset for that abnormal behavior type.

[0066] Based on the type of entity segmentation contained in the sample behavior data, the abnormal behavior type corresponding to the sample behavior data is determined, including: matching each entity segmentation in the sample form data with the entity segmentation set corresponding to each abnormal behavior type; if any entity segmentation is successfully matched in the entity segmentation set corresponding to an abnormal behavior type, then the entity segmentation is determined to belong to the abnormal behavior type, and the sample form data containing the entity segmentation is determined to correspond to the abnormal behavior type.

[0067] The sample behavior data for matching here includes positive samples and negative samples. For any positive sample, each entity segmentation in the positive sample is matched against the entity segmentation set of each abnormal behavior type. If the entity segmentation set of any abnormal behavior type is successfully matched, the positive sample is determined to be a positive sample of that abnormal behavior type. For any negative sample, each entity segmentation in the negative sample is matched against the entity segmentation set of each abnormal behavior type. If the entity segmentation set of any abnormal behavior type is successfully matched, the negative sample is determined to be a negative sample of that abnormal behavior type.

[0068] It should be noted that the execution order of the steps "determine the sample type of the sample behavior data based on the part-of-speech of the entity segmentation contained in the sample behavior data" and "determine the abnormal behavior type corresponding to the sample behavior data based on the type of the entity segmentation contained in the sample behavior data" is not limited. In some embodiments, the execution can be based on the order in S120, or the step "determine the abnormal behavior type corresponding to the sample behavior data based on the type of the entity segmentation contained in the sample behavior data" can be executed first to obtain the sample behavior dataset corresponding to each abnormal behavior type, and then the step "determine the sample type of the sample behavior data based on the part-of-speech of the entity segmentation contained in the sample behavior data" can be executed to determine the sample type of each sample behavior data in the sample behavior dataset corresponding to each abnormal behavior type, i.e., positive samples and negative samples.

[0069] Based on the above embodiments, sample behavior datasets corresponding to each abnormal behavior type are determined. Each sample behavior dataset for any abnormal behavior type includes both positive and negative samples, which are used to train a classification model corresponding to that abnormal behavior type. Here, the classification model may include, but is not limited to, classifiers, neural network models, support vector machines, and logistic regression models, etc.

[0070] An initial classification model is created, with initial model parameters set. This initial model is then trained on the sample behavior dataset corresponding to each abnormal behavior type, resulting in a classification model capable of classifying abnormal behaviors for that specific type. It should be noted that classification models for different abnormal behavior types can be trained simultaneously to accelerate training efficiency.

[0071] Optionally, a classification model for the abnormal behavior type is trained based on the sample behavior data of each sample type corresponding to any abnormal behavior type, including: for any abnormal behavior type, converting the sample behavior data of positive samples and negative samples corresponding to the abnormal behavior type into behavior vectors respectively; iteratively executing the following training process based on the behavior vectors corresponding to each sample behavior data until the training conditions are met to obtain the classification model corresponding to the abnormal behavior type; inputting the behavior vectors into the classification model to be trained to obtain the prediction result output by the classification model; generating a loss function based on the prediction result and the sample type corresponding to the behavior vectors; and adjusting the model parameters of the classification model based on the loss function.

[0072] In this embodiment, the sample behavior data can be vector-converted based on a preset vector conversion method. This preset vector conversion method includes, but is not limited to, word2vec conversion, bag-of-words model conversion, TF-IDF model conversion, etc., and is not limited thereto; the vector conversion of the sample behavior data can be implemented. Optionally, the entity word segments in the sample behavior data can be vector-converted, and the word segmentation vectors of each entity word can be combined to form a behavior vector.

[0073] Based on the behavior vectors corresponding to the above sample behavior data, the classification model to be trained is iteratively trained to optimize the model parameters in the classification model to be trained. When one or more termination conditions such as reaching the number of iterations, convergence of the iteration process, or meeting the prediction accuracy are met, the classification model corresponding to the abnormal behavior type is determined to be trained.

[0074] In each iteration of training, the behavior vector is input into the classification model to be trained, and the prediction result output by the classification model is obtained. This prediction result can be the probability that the sample data belongs to abnormal behavior. Based on the sample type corresponding to the behavior vector, the standard predicted value of the sample data can be determined. For example, the standard predicted value for negative samples can be 100%, and the standard predicted value for positive samples can be 0. A loss function is generated accordingly based on the prediction result and the sample type corresponding to the behavior vector. This loss function is used to adjust the model parameters of the classification model inversely. After completing one iteration, it is determined whether the termination condition is met. If not, the next iteration is performed; if yes, the trained classification model is obtained.

[0075] By using classification models for each type of abnormal behavior, abnormal behavior can be predicted based on the behavioral data of a specific individual, thereby enabling the prediction of the risk of abnormal behavior in a specific individual.

[0076] The technical solution of this embodiment trains classification models for various abnormal behavior types using sample behavior data of normal individuals, eliminating the need to collect crime data and reducing the difficulty of sample behavior data collection. By determining the part-of-speech tagging and type of entity segments in the acquired sample behavior data, the corresponding sample behavior dataset for each abnormal behavior type is determined, thus training the classification model for each abnormal behavior type. This eliminates the need to label the sample behavior data, simplifying the training data processing process and achieving unsupervised training of the classification model. The trained classification model can predict abnormal behavior of individuals, determine whether they pose a risk of abnormal behavior, and achieve risk prediction for specific individuals.

[0077] Based on the above embodiments, this invention also provides a preferred example of a classification model training method, see [link to example]. Figure 2 , Figure 2 This is a flowchart illustrating a training method for a classification model provided in this invention. Sample behavior data, including massive amounts of search, browsing, and purchase data from the internet, is obtained from a de-identified database of normal users. The massive search, browsing, and purchase data is then segmented into words, specifically including word segmentation of search records, browsing terms and product information, and text descriptions of purchased products. The segmentation results are then filtered, specifically by matching the results with a common modifier dictionary and a pause dictionary, removing all pause words and modifiers from the dictionaries to obtain entity words.

[0078] The filtered word segmentation results are then subjected to word frequency statistics, specifically including counting the number of text entries containing each word in the segmentation results, as well as counting the number of text entries containing any two words simultaneously. For example, the statistics show that there are X text entries containing the word "pistol", Y text entries containing the word "toy", and Z text entries containing both "pistol" and "toy".

[0079] Positive and negative part-of-speech tagging is identified using word frequency. If z > Δ, where Δ is a preset threshold, it indicates that "pistol" and "toy" appear frequently together. Further comparison of XZ and YZ shows that if XZ is significantly greater than YZ, "pistol" appears less frequently alone, and its part-of-speech tagging tends to be negative, so its weight is increased by 1. Conversely, "toy" tends to be positive, so its weight is increased by 1. Based on this, considering the word frequency statistics of all segmented words, if a word's weight for a negative part-of-speech tagging tendency is greater than its weight for a positive one, then that word is considered negative; otherwise, it is considered positive. If the positive and negative weights are equal, the word is discarded.

[0080] Construct a positive and negative sample library using a positive and negative word library: If the description of a search / browse / purchase segmented result contains only negative words, then the segmented result of that record is marked as a negative sample; otherwise, it is a positive sample.

[0081] All positive and negative samples are divided according to an abnormal behavior vocabulary. That is, for each type of abnormal behavior, all positive and negative samples are traversed. For example, for the i-th type of abnormal behavior, when traversing to the m-th negative sample, if the negative sample contains a word from the vocabulary of the i-th type of abnormal behavior, then the negative sample belongs to that type of abnormal behavior. Similarly, for the i-th type of abnormal behavior, when traversing to the n-th positive sample, if the positive sample contains a word from the vocabulary of the i-th type of abnormal behavior, then the positive sample belongs to that type of abnormal behavior. After obtaining the positive samples for each type of abnormal behavior, all negative samples belonging to that type of abnormal behavior and an equal number of positive samples are selected as the positive and negative sample library for that type of abnormal behavior.

[0082] We utilize word2vec to construct text features for various abnormal behaviors, generating embeddings (behavior vectors) of all positive and negative samples for each type of abnormal behavior. Using these embeddings as input, we construct a three-layer neural network model for training, obtaining a classification model for T types of abnormal behaviors.

[0083] Figure 3This is a flowchart of a portrait generation method provided in an embodiment of the present invention. This embodiment is applicable to situations where behavioral data of a specific object is classified based on a pre-set abnormal behavior classification model, and a portrait of the specific object is determined based on the classification results. This method can be executed by a portrait generation device, which can be implemented in hardware and / or software, and can be configured in electronic devices such as mobile phones, computers, and servers. Figure 3 As shown, the method specifically includes:

[0084] S210. Obtain the behavior data of the target object and determine the behavior vector of each of the behavior data.

[0085] S220. Input each of the behavior vectors into the classification model corresponding to each abnormal behavior type to obtain the output results of each classification model.

[0086] S230. Set behavioral labels for the target object based on the output results of each classification model, and form a risk profile of the target object based on the behavioral labels of the target object.

[0087] The target is a specific person being predicted. Generating a risk profile for the target is a legitimate process. The target is a legitimate person being predicted, and can be someone designated by law enforcement.

[0088] Acquire behavioral data of the target object, which can be the target object's internet behavior data within a preset time period, including but not limited to search data, browsing data, and transaction data. Convert the behavioral data into behavioral vectors, for example, through methods such as word2vec conversion, bag-of-words model conversion, or TF-IDF model conversion.

[0089] In some embodiments, determining the behavior vector for each behavior data item includes: performing word segmentation on the behavior data and filtering entity words from the obtained word segments; performing vector transformation on the entity words in the behavior data to obtain the behavior vector of the behavior data; combining the word vectors of each entity word according to the entity word segmentation order to obtain the behavior vector. By removing meaningless word segments such as stop words from the behavior data, the interference of meaningless word segments is reduced.

[0090] The behavior vectors are input into the classification models corresponding to each type of abnormal behavior, and the prediction results output by the classification models are obtained. These prediction results represent the probability that the behavior vector belongs to each type of abnormal behavior, indicating the probability that the target object will exhibit any of these abnormal behaviors. A risk profile of the target object can be formed based on the prediction results of each classification model. Any of the classification models described here can be trained using the training method provided in any of the above embodiments.

[0091] In some embodiments, setting behavioral labels for the target object based on the output results of each classification model includes: setting an abnormal behavior label corresponding to the classification model for the target object when the predicted probability of any classification model is greater than a preset threshold. Each abnormal behavior type may correspond to an abnormal behavior label. When the predicted probability of the classification model for any abnormal behavior type is greater than a preset threshold, an abnormal behavior label corresponding to that abnormal behavior type is set for the target object. Combining the various abnormal behavior labels can form a risk profile of the target object.

[0092] In some embodiments, abnormal behaviors of multiple abnormal behavior types can form abnormal risks, that is, multiple abnormal behavior types can correspond to an abnormal behavior label. For example, abnormal behaviors such as "heroin-related search / browsing / purchase", "syringe-related search / browsing / purchase", and "tin foil-related search / browsing / purchase" correspond to the "suspected drug use" risk label.

[0093] Accordingly, behavioral labels are set for the target object based on the output results of each classification model. This includes: weighting the prediction results of the classification models corresponding to each abnormal behavior type according to the correspondence between abnormal behavior types and risk labels to obtain the probability of setting the risk label; and setting the risk label for the target object if the probability of setting the risk label is greater than a preset probability threshold. For example, if risk label A corresponds to abnormal behavior types 1, 2, and 3, the behavior vector of the target object is input into the classification models corresponding to abnormal behavior types 1, 2, and 3 respectively to obtain the prediction results of each classification model. The prediction results are then weighted to obtain the probability of setting risk label A.

[0094] In some embodiments, there are multiple behavioral data of the target object. Accordingly, the classification model for each abnormal behavior type can obtain multiple prediction results. The highest prediction probability among the same classification results can be used as the prediction probability corresponding to the abnormal behavior type.

[0095] The technical solution of this embodiment acquires behavioral data of the target object, processes it based on a pre-set classification model for each abnormal behavior type, obtains a prediction result for the behavioral data, determines the risk label of the target object based on the prediction result, and further obtains a risk profile. This achieves risk prediction for the target object.

[0096] Based on the above embodiments, this invention also provides a preferred example of a portrait generation method, see [link to example]. Figure 4 , Figure 4It is a flowchart of an image generation method provided by an embodiment of the present invention. Based on a desensitization library of key personnel, massive search, browsing, and purchase data of a target object on the Internet within a specified time, that is, behavior data, is obtained. The behavior data of the target object is segmented, stop words are filtered, and its embedding representation, that is, a behavior vector, is also generated using Word2Vec. The relevant embedding data of the target object K is input into the j-th behavior classification model to obtain the probability K that the person has the j-th type of abnormal behavior j (0 < j ≤ T). For example, the probability K that the target object K has an abnormal behavior of "heroin-related search / browsing / purchase" is obtained j .

[0097] For the probability K of each type of abnormal behavior j (0 < j ≤ T), a weighted sum is performed to obtain the probability P that the person K has a risk label L K,L . If then the person K has a risk label L. By synthesizing all risk labels, an image of the target object K is generated

[0098] Figure 5 It is a schematic structural diagram of a training device for a classification model provided by an embodiment of the present invention. As Figure 5 shown, the device includes:

[0099] An entity word segmentation extraction module 310, configured to obtain sample behavior data and extract entity word segments in the sample behavior data

[0100] A sample type determination module 320, configured to determine the sample type of the sample behavior data according to the词性 of the entity word segments included in the sample behavior data

[0101] An abnormal behavior type matching module 330, configured to determine the abnormal behavior type corresponding to the sample behavior data according to the type to which the entity word segments included in the sample behavior data belong

[0102] A model training module 340, configured to train a classification model for the abnormal behavior type based on the sample behavior data of each sample type corresponding to any abnormal behavior type

[0103] Based on the above embodiment, optionally, the device further includes:

[0104] A词性 determination module, configured to determine the词性 of each entity word segment according to the occurrence frequency of each entity word segment before determining the sample type of the sample behavior data according to the词性 of the entity word segments included in the sample behavior data, where the词性 of the entity word segments includes positive words and negative words

[0105] Based on the above embodiment, optionally, the词性 determination module is configured to:

[0106] Determine the synchronous occurrence frequency of any two entity segment words. If the synchronous occurrence frequency is greater than a preset frequency, and the difference between the individual occurrence frequency of the first entity segment word and the individual occurrence frequency of the second entity segment word is greater than a preset threshold, then the second entity segment word is determined to be a negative word and the first entity segment word is determined to be a positive word.

[0107] Based on the above embodiments, optionally, the sample type determination module 320 is used for:

[0108] If the sample behavior data includes negative words but does not include positive words, then the sample type of the sample behavior data is determined to be a negative sample.

[0109] If the sample behavior data includes positive words, then the sample type of the sample behavior data is determined to be a positive sample.

[0110] Based on the above embodiments, optionally, the abnormal behavior type matching module 330 is used for:

[0111] Each entity segment in the sample data is matched against the entity segment set corresponding to each abnormal behavior type.

[0112] If any entity segmentation is successfully matched in the entity segmentation set corresponding to an abnormal behavior type, then it is determined that the entity segmentation belongs to the abnormal behavior type, and it is determined that the sample data containing the entity segmentation corresponds to the abnormal behavior type.

[0113] Based on the above embodiments, optionally, the model training module 340 is used for:

[0114] For any abnormal behavior type, the sample behavior data of the positive samples and the sample behavior data of the negative samples corresponding to the abnormal behavior type are converted into behavior vectors respectively.

[0115] Based on the behavior vectors corresponding to each sample behavior data, the following training process is iteratively executed until the training conditions are met, thereby obtaining the classification model corresponding to the abnormal behavior type:

[0116] The behavior vector is input into the classification model to be trained to obtain the prediction result output by the classification model. A loss function is generated based on the prediction result and the sample type corresponding to the behavior vector, and the model parameters of the classification model are adjusted based on the loss function.

[0117] The training apparatus for the classification model provided in this embodiment of the invention can execute the training method for the classification model provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0118] Figure 6 This is a schematic diagram of the structure of a portrait generation device provided in an embodiment of the present invention. Figure 6 As shown, the device includes:

[0119] The behavior vector determination module 410 is used to acquire the behavior data of the target object and determine the behavior vector of each behavior data.

[0120] The classification module 420 is used to input each of the behavior vectors into the classification model corresponding to each abnormal behavior type, and obtain the output results of each of the classification models;

[0121] The profile generation module 430 is used to set behavioral labels for the target object according to the output results of each classification model, and to form a risk profile of the target object based on the behavioral labels of the target object.

[0122] Based on the above embodiments, optionally, the behavior vector determination module 410 is used for:

[0123] The behavioral data is segmented into words, and entity words are filtered from the resulting word segments.

[0124] The entity segmentation in the behavioral data is vectorized to obtain the behavioral vector of the behavioral data.

[0125] Based on the above embodiments, optionally, the image generation module 430 is used for:

[0126] If the predicted probability of any classification model is greater than a preset threshold, an abnormal behavior label corresponding to the classification model is set for the target object.

[0127] The portrait generation apparatus provided in this embodiment of the invention can execute the portrait generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0128] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0129] like Figure 7As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0130] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0131] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as method XX.

[0132] In some embodiments, the XX method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the XX method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the XX method by any other suitable means (e.g., by means of firmware).

[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] Computer programs used to implement the XX method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] This invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a training method for a classification model, the method comprising:

[0136] Acquire sample behavior data and extract entity segmentation from the sample behavior data; determine the sample type of the sample behavior data based on the part-of-speech of the entity segmentation contained in the sample behavior data, and determine the abnormal behavior type corresponding to the sample behavior data based on the type of the entity segmentation contained in the sample behavior data; train a classification model for the abnormal behavior type based on the sample behavior data of each sample type corresponding to any abnormal behavior type.

[0137] Alternatively, computer instructions may be used to cause the processor to execute a portrait generation method, the method comprising:

[0138] Obtain behavioral data of the target object and determine the behavioral vector of each behavioral data; input each behavioral vector into the classification model corresponding to each abnormal behavior type to obtain the output result of each classification model; set behavioral labels for the target object according to the output results of each classification model, and form a risk profile of the target object based on the behavioral labels of the target object.

[0139] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0141] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0142] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0143] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0144] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for training a classification model, characterized in that, include: Obtain sample behavior data and extract entity word segments from the sample behavior data; wherein, the sample behavior data includes at least one of search records, browsing terms, product information, and text descriptions of purchased products; Based on the part-of-speech tags of the entity segments contained in the sample behavior data, the sample type of the sample behavior data is determined, and based on the type of the entity segments contained in the sample behavior data, the abnormal behavior type corresponding to the sample behavior data is determined. Based on the sample behavior data of each sample type corresponding to any abnormal behavior type, a classification model for the abnormal behavior type is trained. The step of training a classification model for an abnormal behavior type based on sample behavior data of each sample type corresponding to any abnormal behavior type includes: For any abnormal behavior type, the sample behavior data of the positive samples and the sample behavior data of the negative samples corresponding to the abnormal behavior type are converted into behavior vectors respectively. Based on the behavior vectors corresponding to each sample behavior data, the following training process is iteratively executed until the training conditions are met, thereby obtaining the classification model corresponding to the abnormal behavior type: The behavior vector is input into the classification model to be trained to obtain the prediction result output by the classification model. A loss function is generated based on the prediction result and the sample type corresponding to the behavior vector, and the model parameters of the classification model are adjusted based on the loss function.

2. The method according to claim 1, characterized in that, Before determining the sample type of the sample behavior data based on the part-of-speech tags of the entity segments contained in the sample behavior data, the method further includes: The part-of-speech tag of each entity segment is determined based on the frequency of occurrence of each entity segment, wherein the part-of-speech tag of the entity segment includes positive words and negative words.

3. The method according to claim 2, characterized in that, The part-of-speech tag of each entity segment is determined based on its frequency of occurrence, including: Traverse the entity segmentation pairs and determine the synchronous occurrence frequency of any two entity segmentations; If the frequency of simultaneous occurrence is greater than the preset frequency, and the difference between the frequency of individual occurrence of the first entity segment and the frequency of individual occurrence of the second entity segment is greater than the preset threshold, then the negative word weight of the second entity segment is increased by a preset value, and the positive word weight of the first entity segment is increased by a preset value. If the negative word weight of any entity segment is greater than the positive word weight, the part of speech of the entity segment is determined to be a negative word; if the negative word weight of any entity segment is less than the positive word weight, the part of speech of the entity segment is determined to be a positive word.

4. The method according to claim 2, characterized in that, Based on the part-of-speech tags of the entity segments contained in the sample behavior data, the sample type of the sample behavior data is determined, including: If the sample behavior data includes negative words but does not include positive words, then the sample type of the sample behavior data is determined to be a negative sample. If the sample behavior data includes positive words, then the sample type of the sample behavior data is determined to be a positive sample.

5. The method according to claim 1, characterized in that, Based on the type of entity segmentation contained in the sample behavior data, determine the abnormal behavior type corresponding to the sample behavior data, including: Each entity segment in the sample behavior data is matched against the entity segment set corresponding to each abnormal behavior type; If any entity segmentation is successfully matched in the entity segmentation set corresponding to an abnormal behavior type, then the entity segmentation is determined to belong to the abnormal behavior type, and the sample behavior data containing the entity segmentation is determined to correspond to the abnormal behavior type.

6. A method for generating an image, characterized in that, include: Obtain the behavioral data of the target object and determine the behavioral vector of each behavioral data; Each of the aforementioned behavior vectors is input into the classification model corresponding to each abnormal behavior type to obtain the output result of each of the aforementioned classification models; wherein, the classification model is trained by the training method of the classification model described in claim 1; Behavioral labels are set for the target object based on the output results of each classification model, and a risk profile of the target object is formed based on the behavioral labels of the target object.

7. The method according to claim 6, characterized in that, Determining the behavior vector for each of the behavior data includes: The behavioral data is segmented into words, and entity words are filtered from the resulting word segments. The entity segmentation in the behavioral data is vectorized to obtain the behavioral vector of the behavioral data.

8. The method according to claim 6, characterized in that, The step of setting behavioral labels for the target object based on the output results of each classification model includes: Based on the correspondence between abnormal behavior types and risk labels, the prediction results of the classification models corresponding to each abnormal behavior type are weighted to obtain the setting probability of the risk label. If the setting probability of the risk label is greater than a preset probability threshold, the risk label is set for the target object.

9. A training device for a classification model, characterized in that, include: The entity segmentation and extraction module is used to acquire sample behavior data and extract entity segments from the sample behavior data; wherein, the sample behavior data includes at least one of search records, browsing terms, product information, and text descriptions of purchased products; The sample type determination module is used to determine the sample type of the sample behavior data based on the part-of-speech tags of the entity segments contained in the sample behavior data. The abnormal behavior type matching module is used to determine the abnormal behavior type corresponding to the sample behavior data based on the type of entity segmentation contained in the sample behavior data. The model training module is used to train a classification model for any abnormal behavior type based on sample behavior data of each sample type corresponding to any abnormal behavior type. Specifically, the model training module is used for: For any abnormal behavior type, the sample behavior data of the positive samples and the sample behavior data of the negative samples corresponding to the abnormal behavior type are converted into behavior vectors respectively. Based on the behavior vectors corresponding to each sample behavior data, the following training process is iteratively executed until the training conditions are met, thereby obtaining the classification model corresponding to the abnormal behavior type: The behavior vector is input into the classification model to be trained to obtain the prediction result output by the classification model. A loss function is generated based on the prediction result and the sample type corresponding to the behavior vector, and the model parameters of the classification model are adjusted based on the loss function.

10. A portrait generation device, characterized in that, include: The behavior vector determination module is used to acquire the behavior data of the target object and determine the behavior vector of each behavior data. A classification module is used to input each of the aforementioned behavior vectors into the classification model corresponding to each abnormal behavior type, and obtain the output results of each of the aforementioned classification models; wherein, the classification model is trained by the training method of the classification model described in claim 1; The profile generation module is used to set behavioral labels for the target object based on the output results of each classification model, and to form a risk profile of the target object based on the behavioral labels of the target object.

11. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the training method of the classification model according to any one of claims 1-5, or the portrait generation method according to any one of claims 6-8.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the training method of the classification model according to any one of claims 1-5, or the portrait generation method according to any one of claims 6-8.