Risk identification method and apparatus
By performing vector representation and cluster analysis on the collected text, the problem of difficulty in identifying new risk types in existing technologies has been solved, and rapid and accurate risk identification has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies struggle to quickly identify new types of risks, leading to threats to cybersecurity.
By collecting multiple texts related to risk identification, using a representation model to obtain the vector representation of the texts, and performing cluster analysis, the model is trained by combining cross-entropy loss and cosine similarity to identify the trend of text quantity changes and determine new risk types.
It enables rapid identification of new risk types, reduces manual labeling costs, and improves the accuracy and efficiency of risk identification.
Smart Images

Figure CN116932752B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to electronic information technology in one or more embodiments, and more particularly to risk identification methods and apparatus. Background Technology
[0002] With the rapid development of internet technology, people are increasingly using the internet for communication, learning, work, and even for transactions, payments, money transfers, and investments. On the one hand, these activities may involve certain risks; on the other hand, some criminals can easily exploit technical and legal loopholes in the internet to commit illegal acts. All of these factors threaten the security of online activities, making risk identification particularly important.
[0003] Currently, corresponding risk control models have been adopted to identify the various types of risks that have been discovered, so as to promptly detect various risky behaviors in the network and avoid being attacked.
[0004] However, various perpetrators continue to attempt and launch new types of attacks. If these new types of attacks, or new risks, are not detected in time, they will cause significant harm to network security and usage, such as the leakage of user privacy. Therefore, there is an urgent need for an effective risk identification method to quickly identify new types of risks. Summary of the Invention
[0005] This specification describes one or more embodiments of a risk identification method and apparatus that can quickly identify new types of risks.
[0006] According to the first aspect, a risk identification method is provided, wherein the method includes:
[0007] We obtained multiple texts related to risk identification collected at different time periods;
[0008] For each text, obtain its vector representation;
[0009] Based on the vector representations of multiple texts collected in the same time period, the multiple texts collected in the same time period are clustered to obtain at least one text clustering result in each time period.
[0010] Based on the clustering results of texts within different time periods, it is determined whether new risk types have emerged.
[0011] Among them, texts related to risk identification include: complaint texts uploaded by users.
[0012] The method further includes:
[0013] Obtain a user's complaint text sample, and extract at least one keyword and / or key sentence from the complaint text sample; use the extracted at least one keyword and / or key sentence to form a keyword set and / or key sentence set;
[0014] Input the user's complaint text sample and the keyword set and / or key sentence set formed based on the complaint text sample into the currently trained representation model to obtain the first vector representation of the corresponding user's complaint text sample and the second vector representation of the corresponding keyword set and / or key sentence set output by the currently trained representation model.
[0015] Calculate the cosine similarity between the first vector representation and the second vector representation, and use this cosine similarity to continue training the current representation model using contrastive learning and cross-entropy loss until the representation model converges.
[0016] The step of obtaining the vector representation of each text includes: inputting each text into the trained representation model to obtain the vector representation of each text output by the representation model.
[0017] The process of obtaining multiple texts related to risk identification collected at different time periods includes obtaining multiple texts related to risk identification collected in multiple adjacent time periods, wherein there is a temporal overlap between each pair of adjacent time periods.
[0018] The process of determining whether new risk types have emerged based on the text clustering results from different time periods includes:
[0019] For each first text clustering result within each current time period, the following steps are performed: determine the intersection of the first text clustering result with each second text clustering result within the adjacent time period, and determine whether the first text clustering result and each second text clustering result belong to the same cluster based on the number of intersections.
[0020] For the same cluster, based on the time sequence of each time period and the number of texts corresponding to the same cluster within each time period, the trend of the change in the number of texts corresponding to the same cluster is obtained;
[0021] Clusters whose text quantity changes are greater than a preset value are identified as corresponding to new risk types.
[0022] Each time period has a length of M days in advance, where M is a positive integer greater than 1.
[0023] Among them, the time overlap between any two adjacent time periods is greater than half the length of each time period.
[0024] After obtaining at least one text clustering result for each time period, the method further includes:
[0025] For each text clustering result, the risk type corresponding to that text clustering result is manually labeled;
[0026] The risk type corresponding to the clustering result of this text is taken as the risk type of all texts included in the clustering result;
[0027] Using all the texts and their risk types, a risk recognition model corresponding to the text is trained.
[0028] According to a second aspect, a risk identification device is provided, the device comprising:
[0029] The text collection module is configured to obtain multiple texts related to risk identification collected at different time periods;
[0030] The vector representation acquisition module is configured to obtain the vector representation of each text.
[0031] The clustering module is configured to cluster multiple texts collected in the same time period based on their vector representations, and obtain at least one text clustering result for each time period.
[0032] The new risk identification module is configured to determine whether new risk types have emerged based on the clustering results of various texts within different time periods.
[0033] According to a third aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the methods described in any embodiment of this specification.
[0034] According to a fourth aspect, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method described in any embodiment of this specification.
[0035] The risk identification method and apparatus provided in the embodiments of this specification take into account that the behaviors of black market operators and violators are reflected in the data in the form of text. Therefore, the clustering of black market operator behaviors and violator behaviors will be reflected in the corresponding text clustering. For example, the activity of a certain new type of violation will lead to an increase in the number of corresponding fraud report texts. These reports usually have similar fraud report description texts. Therefore, discovering the clustering of texts can quickly identify new types of risks. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a flowchart of a risk identification method in one embodiment of this specification.
[0038] Figure 2 This is a flowchart of a method for training a representation model in one embodiment of this specification.
[0039] Figure 3 This is a flowchart of a method for training a risk identification model corresponding to text in one embodiment of this specification.
[0040] Figure 4 This is a schematic diagram of the risk identification device in one embodiment of this specification.
[0041] Figure 5 This is a schematic diagram of the risk identification device in another embodiment of this specification.
[0042] Figure 6 This is a schematic diagram of the risk identification device in another embodiment of this specification. Detailed Implementation
[0043] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0044] First, it should be noted that the terminology used in the embodiments of this invention is for the purpose of describing specific embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” used in the embodiments of this invention and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0045] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0046] Figure 1 This is a flowchart of a risk identification method in one embodiment of this specification. The subject executing this method is a risk identification device. It is understood that this method can also be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities. See also... Figure 1The method includes:
[0047] Step 101: Obtain multiple texts related to risk identification collected at different time periods;
[0048] Step 103: For each text, obtain the vector representation of that text;
[0049] Step 105: Based on the vector representations of multiple texts collected in the same time period, cluster the multiple texts collected in the same time period to obtain at least one text clustering result in each time period.
[0050] Step 107: Based on the clustering results of each text within different time periods, determine whether new risk types have emerged.
[0051] See Figure 1 The process illustrated in this embodiment of the specification considers that the behaviors of black market operators and violators are reflected in the data in the form of text. Therefore, the clustering of black market behaviors and violator behaviors will be reflected in the corresponding text clustering. For example, the activity of a certain new type of violation will lead to an increase in the number of corresponding report texts. These reports usually have similar report description texts. Therefore, discovering the clustering of texts can reveal new types of risks.
[0052] The following is about Figure 1 Each step in the process will be explained separately.
[0053] For step 101: obtain multiple texts related to risk identification collected at different time periods.
[0054] In one embodiment of this specification, the text related to risk identification may include: complaint text uploaded by users. For example, when a new type of violation occurs, a user may send a text message on the platform to file a complaint, such as what type of information was received at a certain time and the other party's core methods. Therefore, the complaint text uploaded by users can be considered as the text related to risk identification.
[0055] Of course, in the embodiments of this specification, other texts such as statistical information texts of the platform, reports of various communication situations newly released by the platform, etc., can also be used as the texts related to risk identification in this step.
[0056] In one embodiment of this specification, to ensure the diversity and richness of the collected text, multiple texts related to risk identification can be collected at different time periods. For example, in step 101, multiple texts related to risk identification can be collected once a day.
[0057] For example, these different time periods can be multiple adjacent time periods. That is, in step 101, multiple texts related to risk identification are collected within multiple adjacent time periods (where there is a temporal overlap between each pair of adjacent time periods). Furthermore, the length of each time period is a predetermined M days, where M is a positive integer greater than 1, such as M = 3. Preferably, the temporal overlap between each pair of adjacent time periods is greater than half the length of each time period. In other words, a greater temporal overlap between adjacent time periods facilitates better analysis of the changing trends in the number of texts within the same cluster. For example, 200 user complaint texts generated on the 1st-3rd of a month, 250 user complaint texts generated on the 2nd-4th of the same month, and 480 user complaint texts generated on the 3rd-5th of the same month, etc.
[0058] Next, for step 103: for each text, obtain the vector representation of that text.
[0059] In one embodiment of this specification, a representation model can be pre-trained and then used to obtain a vector representation of each text.
[0060] See Figure 2 In one embodiment of this specification, the method for training the representation model includes:
[0061] Step 201: Obtain a user's complaint text sample, and extract at least one keyword and / or key sentence from the complaint text sample; use the extracted at least one keyword and / or key sentence to form a keyword set and / or key sentence set;
[0062] Step 203: Input the user's complaint text sample and the keyword set and / or key sentence set formed based on the complaint text sample into the currently trained representation model to obtain the first vector representation of the corresponding user's complaint text sample and the second vector representation of the corresponding keyword set and / or key sentence set output by the currently trained representation model.
[0063] Step 205: Calculate the cosine similarity between the first vector representation and the second vector representation. Use this cosine similarity to continue training the current representation model using contrastive learning and cross-entropy loss until the representation model converges.
[0064] based on Figure 2 The representation model trained by the process shown, correspondingly, in this step 103, obtains the vector representation of each text, including: inputting each text into the trained representation model to obtain the vector representation of each text output by the representation model.
[0065] In existing technologies, representation models do not simultaneously utilize a text and the keywords / key phrases extracted from it for training. This leads to a failure to better meet the business needs of discovering new risk types. A text, such as a user complaint, includes many emotional descriptions, such as anger, bad luck, and "what to do?" These emotional words are not helpful in discovering new risk types. If the representation model focuses too much on these emotional descriptions during training, it will fail to pay attention to the similarities and keywords among different users' complaint texts. However, utilizing... Figure 2 The text representation model trained by the process shown will make it easier for texts with similar keywords / key sentences to have similar vector representations, which meets the needs of business scenarios, that is, it can better meet the business needs of discovering new types of risks.
[0066] Next, for step 105: based on the vector representations of multiple texts collected in the same time period, cluster the multiple texts collected in the same time period to obtain at least one text clustering result in each time period.
[0067] For example, if 200 user complaint texts generated on the 1st to 3rd of a certain month are collected, and after obtaining 200 vector representations of these 200 user complaint texts through the processing in step 103, the 200 user complaint texts can be clustered based on the distance between these 200 vector representations. For example, three clustering results may be obtained, in which 100 user complaint texts belong to the same cluster, three user complaint texts belong to the same cluster, and the remaining 97 user complaint texts belong to the same cluster.
[0068] Furthermore, 250 user complaint texts generated between the 2nd and 4th of the month were collected. After obtaining 250 vector representations of these 250 user complaint texts through the processing in step 103, the 250 user complaint texts can be clustered based on the distance between these 250 vector representations. For example, 5 clustering results were obtained, in which 80 user complaint texts belong to the same cluster, 98 user complaint texts belong to the same cluster, 3 user complaint texts belong to the same cluster, 3 user complaint texts belong to the same cluster, and the remaining 66 user complaint texts belong to the same cluster.
[0069] In one embodiment of this specification, density-based clustering algorithms such as DBSCAN or HDBSCAN can be used to cluster the representation vectors of text, thereby clustering similar texts together.
[0070] In one embodiment of this specification, after obtaining at least one text clustering result for each time period in step 105, in one aspect, the text clustering results can be used to train a risk identification model corresponding to the text. See also Figure 3 The methods for training a risk identification model corresponding to text include:
[0071] Step 301: For each text clustering result, manually label the risk type corresponding to that text clustering result;
[0072] Step 303: Use the risk type corresponding to the text clustering result as the risk type of all texts included in the text clustering result;
[0073] Step 305: Using all the texts and their risk types, train a risk recognition model corresponding to the text.
[0074] According to the above Figure 3 As shown in the flowchart, in step 301, manual annotation is performed on a single text clustering result (which includes multiple texts), i.e., a class of texts, rather than manually annotating each individual text. In this way, the risk type corresponding to a text clustering result becomes the risk type for all texts included in that clustering result. This allows for the training of a risk identification model corresponding to the text with low annotation costs, i.e., without requiring extensive manual annotation.
[0075] In one embodiment of this specification, after obtaining at least one text clustering result for each time period in step 105, the text clustering results can be used to determine whether a new risk type has been generated, i.e., step 107 is performed as follows.
[0076] Next, for step 107: determine whether new risk types have been generated based on the clustering results of each text in different time periods.
[0077] In one embodiment of this specification, the specific implementation process of step 107 includes:
[0078] Step 1071: For each first text clustering result within each current time period, perform the following: determine the intersection of the first text clustering result with each second text clustering result in the adjacent time period, and determine whether the first text clustering result and each second text clustering result belong to the same cluster based on the number of intersections.
[0079] Step 1073: For the same cluster, based on the time sequence of each time period and the number of texts corresponding to the same cluster in each time period, obtain the trend of the change in the number of texts corresponding to the same cluster.
[0080] Step 1075: Identify the same cluster whose text quantity change trend is greater than the preset value as corresponding to the new risk type.
[0081] The process of step 107 is illustrated with an example. See Table 1 below:
[0082]
[0083] Table 1
[0084] Referring to Table 1, in step 1071, for the period from the 1st to the 3rd of January, the first text clustering result (which includes 100 texts clustered together) is compared one by one with the five text clustering results from the adjacent period from the 2nd to the 4th of January, and the intersection is taken (i.e., the same texts are found in the two text clustering results). This will result in five intersections. For example, the number of intersections between the first text clustering result from the period from the 1st to the 3rd of January (which includes 100 texts clustered together) and the first text clustering result from the period from the 2nd to the 4th of January (which includes 80 texts clustered together) is 78. The number of intersections between the clustering results (which include 100 texts clustered together) and the second text clustering results (which include 98 texts clustered together) within the period from January 2nd to 4th is 5. The number of intersections between the first text clustering results (which include 100 texts clustered together) within the period from January 1st to 3rd is 10. This continues until the number of intersections between the first text clustering results (which include 100 texts clustered together) within the period from January 1st to 3rd is obtained and the fifth text clustering results within the period from January 2nd to 4th is obtained. Subsequently, based on the number of five intersections between the first text clustering result (which includes 100 texts clustered together) in the period from January 1st to 3rd and the five text clustering results in the adjacent period from January 2nd to 4th, it is determined whether the first text clustering result in the period from January 1st to 3rd belongs to the same cluster as one of the five text clustering results in the period from January 2nd to 4th. For example, if the first text clustering result (which includes 100 texts clustered together) within the period from January 1st to 3rd has an intersection of 78 with the first text clustering result (which includes 80 texts clustered together) within the period from January 2nd to 4th, which exceeds the pre-set percentage of 75% (meaning at least 75% of the texts are the same), then it can be considered that the first text clustering result (which includes 100 texts clustered together) within the period from January 1st to 3rd belongs to the same cluster as the first text clustering result (which includes 80 texts clustered together) within the period from January 2nd to 4th.
[0085] Next, for the second text clustering result within the period of January 1-3 (which includes 3 texts clustered together), it is compared one by one with the 5 text clustering results within the adjacent period of January 2-4, and the intersection is taken (i.e., the same texts in the two text clustering results are considered). This will result in 5 intersections. Based on the number of intersections, it is determined whether the second text clustering result within the period of January 1-3 (which includes 3 texts clustered together) belongs to the same cluster as one of the 5 text clustering results within the period of January 2-4.
[0086] Similarly, for the third text clustering result within the period from the 1st to the 3rd of January, the number of intersections determines whether it belongs to the same cluster as one of the five text clustering results within the period from the 2nd to the 4th of January.
[0087] Next, for the period from January 2nd to 4th, determine whether the first text clustering result belongs to the same cluster as one of the five text clustering results from January 3rd to 5th, and so on, until it is determined whether the fifth text clustering result from January 2nd to 4th belongs to the same cluster as one of the five text clustering results from January 3rd to 5th.
[0088] Next, in step 1073, for the same cluster, based on the time sequence of each time period and the number of texts corresponding to the same cluster in each time period, the trend of the change in the number of texts corresponding to the same cluster is obtained.
[0089] For example, if we determine that the same cluster 1 is included in time periods 1, 2, and 3, and the number of texts included in the text clustering results corresponding to cluster 1 is 100 in time period 1, 80 in time period 2, and 90 in time period 3, then we can obtain the trend of the number of texts corresponding to cluster 1 as 100→80→90, which is a relatively gentle trend.
[0090] For example, if it is determined that the same cluster 2 is included in time periods 1, 2, and 3, the number of texts included in the text clustering results corresponding to cluster 2 is 3 in time period 1, 98 in time period 2, and 290 in time period 3, then the trend of the number of texts corresponding to cluster 2 can be obtained as 3→98→290, which is a surge.
[0091] Next, in step 1075, the same cluster whose text quantity change trend is greater than a preset value will be identified as corresponding to the new risk type. That is, the above-mentioned cluster 2 will be identified as corresponding to the new risk type, and the text included in the text clustering result corresponding to cluster 2 is the text corresponding to the new risk type.
[0092] As can be seen, in step 107 above, the clustering results of different dates are aligned, the risk change trend of each category is analyzed, and risk monitoring is achieved.
[0093] In one embodiment of this specification, a risk identification device is proposed, see [link to relevant documentation]. Figure 4 The device includes:
[0094] The text collection module 401 is configured to obtain multiple texts related to risk identification collected at different time periods;
[0095] The vector representation acquisition module 402 is configured to obtain the vector representation of each text.
[0096] The clustering processing module 403 is configured to cluster multiple texts collected in the same time period based on the vector representation of multiple texts collected in the same time period, and obtain at least one text clustering result in each time period.
[0097] The new risk determination module 404 is configured to determine whether a new risk type has been generated based on the clustering results of various texts within different time periods.
[0098] In one embodiment of the device described in this specification, the text related to risk identification includes: complaint text uploaded by the user.
[0099] In one embodiment of the device described in this specification, see [link to embodiment]. Figure 5 It further includes: a representation model training module 501;
[0100] The representation model training module 501 is configured to perform:
[0101] Obtain a user's complaint text sample, and extract at least one keyword and / or key sentence from the complaint text sample; use the extracted at least one keyword and / or key sentence to form a keyword set and / or key sentence set;
[0102] Input the user's complaint text sample and the keyword set and / or key sentence set formed based on the complaint text sample into the currently trained representation model to obtain the first vector representation of the corresponding user's complaint text sample and the second vector representation of the corresponding keyword set and / or key sentence set output by the currently trained representation model.
[0103] Calculate the cosine similarity between the first vector representation and the second vector representation, and use this cosine similarity to continue training the current representation model using contrastive learning and cross-entropy loss until the representation model converges.
[0104] The vector representation acquisition module 402 is configured to perform the following: input each text into the trained representation model and obtain the vector representation of each text output by the representation model.
[0105] In one embodiment of the device described herein, the text collection module 401 is configured to perform: obtaining multiple texts related to risk identification collected in multiple adjacent time periods; wherein there is a temporal overlap between each pair of adjacent time periods;
[0106] The new risk assessment module 404 is configured to execute:
[0107] For each first text clustering result within each current time period, the following steps are performed: determine the intersection of the first text clustering result with each second text clustering result within the adjacent time period, and determine whether the first text clustering result and each second text clustering result belong to the same cluster based on the number of intersections.
[0108] For the same cluster, based on the time sequence of each time period and the number of texts corresponding to the same cluster within each time period, the trend of the change in the number of texts corresponding to the same cluster is obtained;
[0109] Clusters whose text quantity changes are greater than a preset value are identified as corresponding to new risk types.
[0110] In one embodiment of the device described in this specification, the length of each time period is a predetermined M days; where M is a positive integer greater than 1.
[0111] In one embodiment of the device described in this specification, the time overlap between any two adjacent time periods is greater than half the length of each time period.
[0112] See Figure 6 The device described in this specification may further include: a risk identification model training module 601;
[0113] Risk identification model training module 601 is configured to execute:
[0114] For each text clustering result, the risk type corresponding to that text clustering result is manually labeled;
[0115] The risk type corresponding to the clustering result of this text is taken as the risk type of all texts included in the clustering result;
[0116] Using all the texts and their risk types, a risk recognition model corresponding to the text is trained.
[0117] It should be noted that the above-mentioned devices are typically implemented on the server side. They can be set up on independent servers, or some or all of the devices can be combined and installed on the same server. This server can be a single server or a server cluster consisting of multiple servers. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system. The above-mentioned devices can also be implemented on computer terminals with strong computing capabilities.
[0118] This specification provides, in one embodiment, a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the methods of any embodiment in the specification.
[0119] This specification provides a computing device according to one embodiment, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to perform the method of any embodiment of the specification.
[0120] It is understood that the structures illustrated in the embodiments of this specification do not constitute a specific limitation on the apparatus of the embodiments of this specification. In other embodiments of the specification, the above-described apparatus may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0121] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0122] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, widgets, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0123] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. Risk identification methods, among which, The method includes: We obtained multiple texts related to risk identification collected at different time periods; For each text, obtain its vector representation; Based on the vector representations of multiple texts collected in the same time period, the multiple texts collected in the same time period are clustered to obtain at least one text clustering result in each time period. Based on the clustering results of texts within different time periods, determine whether new risk types have emerged; The process of obtaining multiple texts related to risk identification collected at different time periods includes obtaining multiple texts related to risk identification collected in multiple adjacent time periods, wherein there is a temporal overlap between each pair of adjacent time periods. The process of determining whether new risk types have emerged based on the clustering results of texts within different time periods includes: For each first text clustering result within each current time period, the following steps are performed: determine the intersection of the first text clustering result with each second text clustering result within the adjacent time period, and determine whether the first text clustering result and each second text clustering result belong to the same cluster based on the number of intersections. For the same cluster, based on the time sequence of each time period and the number of texts corresponding to the same cluster within each time period, the trend of the change in the number of texts corresponding to the same cluster is obtained; Clusters whose text quantity changes are greater than a preset value are identified as corresponding to new risk types.
2. The method according to claim 1, wherein, Text related to risk identification includes: complaint texts uploaded by users.
3. The method according to claim 1, wherein, The method further includes; Obtain a user's complaint text sample, and extract at least one keyword and / or key sentence from the complaint text sample; use the extracted at least one keyword and / or key sentence to form a keyword set and / or key sentence set; Input the user's complaint text sample and the keyword set and / or key sentence set formed based on the complaint text sample into the currently trained representation model to obtain the first vector representation of the corresponding user's complaint text sample and the second vector representation of the corresponding keyword set and / or key sentence set output by the currently trained representation model. Calculate the cosine similarity between the first vector representation and the second vector representation, and use this cosine similarity to continue training the current representation model using contrastive learning and cross-entropy loss until the representation model converges. The step of obtaining the vector representation of each text includes: inputting each text into the trained representation model to obtain the vector representation of each text output by the representation model.
4. The method according to claim 1, wherein, Each time period has a length of M days in advance; where M is a positive integer greater than 1.
5. The method according to claim 1, wherein, The overlap between any two adjacent time periods is greater than half the length of each time period.
6. The method according to claim 1, wherein, After obtaining at least one text clustering result for each time period, the method further includes: For each text clustering result, the risk type corresponding to that text clustering result is manually labeled; The risk type corresponding to the clustering result of this text is taken as the risk type of all texts included in the clustering result; Using all the texts and their risk types, a risk recognition model corresponding to the text is trained.
7. A risk identification device, comprising: The text collection module is configured to obtain multiple texts related to risk identification collected at different time periods; The vector representation acquisition module is configured to obtain the vector representation of each text. The clustering module is configured to cluster multiple texts collected in the same time period based on their vector representations, and obtain at least one text clustering result for each time period. The new risk determination module is configured to determine whether new risk types have been generated based on the clustering results of various texts within different time periods. The text collection module is configured to perform the following: obtain multiple texts related to risk identification collected in multiple adjacent time periods; wherein there is a temporal overlap between each pair of adjacent time periods; The new risk assessment module is configured to execute: For each first text clustering result within each current time period, the following steps are performed: determine the intersection of the first text clustering result with each second text clustering result within the adjacent time period, and determine whether the first text clustering result and each second text clustering result belong to the same cluster based on the number of intersections. For the same cluster, based on the time sequence of each time period and the number of texts corresponding to the same cluster within each time period, the trend of the change in the number of texts corresponding to the same cluster is obtained; Clusters whose text quantity changes are greater than a preset value are identified as corresponding to new risk types.
8. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-6.
9. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-6.
Citation Information
Patent Citations
Data risk prevention and control method, device and equipment
CN112966113A
Policy keyword extraction method and device, storage medium and electronic equipment
CN115964474A