Method, device, electronic equipment and storage medium for object risk prediction
By combining a feature extraction module and a mapping network, the problem of relying on manual labeling in traditional object risk assessment is solved, and more accurate risk prediction and interpretable results output are achieved.
Patent Information
- Application Number
- CN202210614757.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2042-05-30
AI Technical Summary
Traditional risk assessment relies on manual labeling, resulting in poor assessment results. It is difficult to accurately understand and remember large amounts of complaint data, and the amount of information gradually disappears.
A risk prediction model employing a feature extraction module, a first mapping network, a second mapping network, and a third mapping network reduces reliance on human experience by performing feature extraction, weighted aggregation, and risk probability prediction on complaint text data.
It improves the accuracy of target risk assessment and the interpretability of prediction results, and can output important complaint text data to support subsequent analysis.
Smart Images

Figure CN117216645B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data analysis, and more particularly, to a method, device, equipment and storage medium for object risk prediction. BACKGROUND
[0002] Customer complaints are the concentrated feedback of customers on objects in product quality, service level, service attitude and other aspects. With the development of mobile Internet technology, customers can quickly complain about objects through various mobile applications, generating a large amount of complaint data.
[0003] In the traditional scheme for object risk scoring, the training sample set of the model is usually obtained by manually labeling the risk of each complaint data of the object. The trained model can be used to predict the risk of a single complaint data, and finally the risk of the object is predicted using the risk results of all complaint data corresponding to the object. Since the risk of the complaint data is labeled by human, the traditional scheme relies on the experience of the human in predicting the risk of the complaint data. However, people cannot understand and remember the details of millions of complaints, and the judgment result of the risk of the complaint by subjective intuition is always limited. Moreover, the traditional scheme also increases the strategy judgment, which causes the information of the complaint data to gradually disappear, resulting in poor effect of risk assessment of the object.
[0004] Therefore, how to improve the accuracy of object risk assessment is a problem to be solved. SUMMARY
[0005] Embodiments of the present application provide a method, device, equipment and storage medium for object risk prediction, which can help to improve the accuracy of object risk assessment.
[0006] In a first aspect, a method for object risk prediction is provided, which is applied to a risk prediction model including a feature extraction module, a first mapping network, a second mapping network and a third mapping network. The method comprises:
[0007] Obtaining at least one complaint text data for an object;
[0008] Performing feature extraction on the at least one complaint text data by using the feature extraction module to obtain a first text vector representation of each complaint text data in the at least one complaint data;
[0009] Inputting the first text vector representation into the first mapping network to obtain a complaint type corresponding to the each complaint text data;
[0010] Inputting the first text vector representation into the second mapping network to obtain a weight corresponding to the each complaint text data;
[0011] weighting and aggregating the first text vector representation of each complaint text data according to the weight corresponding to the complaint text data, to obtain a second text vector representation of the object;
[0012] inputting the second text vector representation into the third mapping network to obtain a risk probability of the object.
[0013] In a second aspect, a method for model training for object risk assessment is provided, including:
[0014] obtaining a training sample set, the training sample set including a plurality of complaint text data samples for each object in a plurality of objects, a type label corresponding to each of the plurality of complaint text data samples, and a black-white label corresponding to each of the objects;
[0015] inputting the plurality of complaint text data samples of each object into a risk prediction model to obtain a complaint type corresponding to each of the plurality of complaint text data samples and a risk probability of each of the objects;
[0016] determining a first loss according to the complaint type corresponding to each of the complaint text data samples and the type label corresponding to each of the complaint text data samples;
[0017] determining a second loss according to the risk probability of each of the objects and the black-white label of each of the objects;
[0018] training the risk prediction model according to the first loss and the second loss.
[0019] In a third aspect, a device for object risk prediction is provided, the device including an obtaining unit, a risk prediction model, and an aggregation unit, the risk prediction model including a feature extraction module, a first mapping network, a second mapping network, and a third mapping network;
[0020] The obtaining unit is configured to obtain at least one complaint text data for an object.
[0021] The feature extraction module is configured to input the at least one complaint text data and perform feature extraction on the at least one complaint text data to obtain a first text vector representation of each complaint text data in the at least one complaint data.
[0022] The first mapping network is configured to input the first text vector representation to obtain a complaint type corresponding to each complaint text data.
[0023] The second mapping network is configured to input the first text vector representation to obtain a weight corresponding to each complaint text data.
[0024] The aggregation unit is configured to input the weight corresponding to each complaint text data and the first text vector representation, and aggregate the first text vector representation according to the weight corresponding to each complaint text data to obtain a second text vector representation of the object.
[0025] The third mapping network is configured to input the second text vector representation to obtain the risk probability of the object.
[0026] In a fourth aspect, a device for model training for object risk assessment is provided, including:
[0027] The acquisition unit is configured to acquire a training sample set, the training sample set including a plurality of complaint text data samples for each object in a plurality of objects, type labels respectively corresponding to the plurality of complaint text data samples, and black and white labels respectively corresponding to the objects.
[0028] The risk prediction model is configured to input the plurality of complaint text data samples of each object to obtain a complaint type respectively corresponding to the plurality of complaint text data samples and a risk probability of the object.
[0029] The determination unit is configured to determine a first loss according to the complaint type corresponding to each complaint text data sample and the type label corresponding to each complaint text data sample.
[0030] The determination unit is further configured to determine a second loss according to the risk probability of each object and the black and white label of each object.
[0031] The training unit is configured to train the risk prediction model according to the first loss and the second loss.
[0032] In a fifth aspect, the present application provides an electronic device, including:
[0033] A processor adapted to implement computer instructions; and
[0034] A memory storing computer instructions, the computer instructions being adapted to be loaded and executed by the processor to implement the method of the first aspect or the method of the second aspect.
[0035] In a sixth aspect, the present application provides a computer readable storage medium storing computer instructions, the computer instructions being read and executed by a processor of a computer device to cause the computer device to implement the method of the first aspect or the method of the second aspect.
[0036] In a seventh aspect, an embodiment of the present application provides a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the method of the first aspect or the method of the second aspect.
[0037] Based on the above technical solution, the embodiments of the present application can predict the complaint type, the weight of each complaint text data, and the risk probability of the object by inputting at least one complaint text data of the object into the risk prediction model. Since the feature extraction module in the risk prediction model can extract the object risk related text information in the complaint text data, the embodiments of the present application do not rely on the experience of people on the complaint when predicting the risk of the complaint data, thereby the embodiments of the present application help to improve the accuracy of predicting the complaint type, the weight of each complaint text data, and the risk probability of the object.
[0038] Further, since the weight of each complaint text data can represent the effectiveness and importance of the complaint text data, the risk prediction model of the embodiments of the present application can output the relatively important complaint text data, so that the model has certain explainability for the output prediction result. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
[0040] Figure 2 FIG. 2 is a schematic flowchart of a method for training a model for object risk prediction according to an embodiment of the present application;
[0041] Figure 3 FIG. 3 is a schematic diagram of a network architecture of a risk prediction model according to an embodiment of the present application;
[0042] Figure 4 FIG. 4 is an example of a commodity complaint interface of a third-party payment platform according to an embodiment of the present application;
[0043] Figure 5 FIG. 5 is a specific example of object risk prediction according to an embodiment of the present application;
[0044] Figure 6 FIG. 6 is a schematic flowchart of another method for training a model according to an embodiment of the present application;
[0045] Figure 7 FIG. 7 is a schematic flowchart of a method for object risk prediction according to an embodiment of the present application;
[0046] Figure 8An example of a risk prediction model output result provided by an embodiment of the present application;
[0047] Figure 9 A schematic block diagram of an object risk prediction device provided by an embodiment of the present application;
[0048] Figure 10 A schematic block diagram of a model training device provided by an embodiment of the present application;
[0049] Figure 11 A schematic block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0051] It should be understood that, in the embodiments of the present application, "B corresponding to A" means that B is associated with A. In an implementation, B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.
[0052] In the description of the present application, "at least one" means one or more, and "multiple" means two or more than two. In addition, "and / or" describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
[0053] It should also be understood that the first, second, and the like descriptions in the embodiments of the present application are only for illustration and distinction of the described objects, and there is no order, nor does it represent a special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.
[0054] It should also be understood that any reference to will be understood to include one or more embodiments of the present application. Also, the application can be used in any suitable combination with any other application.
[0055] Furthermore, the terms "comprise / comprising" when used in this specification are taken to specify the presence of stated features, integers, steps or components but do not preclude the presence or addition of one or more other features, integers, steps, components or groups thereof.
[0056] Embodiments of the present application apply to the field of artificial intelligence technology.
[0057] Artificial intelligence (AI) is the use of digital computers or computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which aims to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0058] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning / deep learning and other fields.
[0059] With the research and progress of artificial intelligence technology, artificial intelligence technology has been researched and applied in many fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned vehicles, autonomous vehicles, drones, robots, intelligent medical care, intelligent customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0060] Embodiments of the present application can relate to natural language processing (NLP) technology in artificial intelligence technology. NLP is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that can enable effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, the research in this field will involve natural language, i.e. the language used in daily life, so it has a close relationship with the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question and answer, knowledge graph, etc.
[0061] Embodiments of the present application can also relate to machine learning (ML) in artificial intelligence technology. ML is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is a subject that studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent. Its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rule-based learning.
[0062] Figure 1 For a system architecture involved in embodiments of the present application, as shown in Figure 1 , the system architecture can include a user device 101, a data collection device 102, a training device 103, an execution device 104, a database 105, and a content library 106.
[0063] The data collection device 102 is configured to read training data from the content library 106 and store the read training data into the database 105. The training data involved in embodiments of the present application includes complaint text data of an object, type labels of the complaint text data, and black and white labels of the object.
[0064] The training device 103 trains a machine learning model based on the training data maintained in the database 105, so that the trained machine learning model can effectively predict the risk of the object or classify the complaint text data, such as predicting the risk probability of the object, the complaint type of the complaint text data, and / or the importance of a single complaint, etc. The machine learning model obtained by the training device 103 can be applied to different systems or devices.
[0065] In addition, with reference to Figure 1The execution device 104 is configured with an I / O interface 107 to interact with external devices for data exchange. For example, the I / O interface receives at least one complaint text data of the object sent by the user device 101. The computing module 109 in the execution device 104 uses the trained prediction model to predict the inputted at least one complaint text data, and outputs the risk probability of the object. Optionally, the prediction model can also output the prediction results of the complaint type of the complaint text data, and / or the importance of a single complaint. The prediction model can send the corresponding results to the user device 101 through the I / O interface.
[0066] The user device 101 can include a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle terminal, a mobile internet device (MID), or other terminal devices.
[0067] The execution device 104 can be a server.
[0068] For example, the server can be a rack server, a blade server, a tower server, or a cabinet server, etc. The server can be a standalone test server, or a test server cluster composed of multiple test servers.
[0069] The server can be one or more. When the server is multiple, at least two servers are used to provide different services, and / or at least two servers are used to provide the same service, such as providing the same service in a load balancing manner, which is not limited in the embodiments of the present application.
[0070] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms. The server can also be a node of a blockchain.
[0071] In this embodiment, the execution device 104 is connected with the user device 101 through a network. The network can be an intranet, the Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, Wi-Fi, a telephone network, or other wireless or wired networks.
[0072] It should be noted that, Figure 1 The above-mentioned data collection device 102, the user device 101, the training device 103, and the execution device 104 can be the same device in some embodiments. The above-mentioned database 105 can be distributed on one server or multiple servers, and the above-mentioned content library 106 can be distributed on one server or multiple servers.
[0073] For example, the application scenarios of the embodiments of the present application include, but are not limited to, risk assessment for objects on a third-party payment platform. Specifically, the risk of an object, the importance of a single complaint, and the complaint type can be evaluated or predicted according to one or more pieces of complaint data of the object. As an example, the object can include a merchant.
[0074] In the traditional scheme for scoring the risk of an object, the training sample set of the model is usually obtained by manually labeling the risk of each piece of complaint data of the object. The trained model can be used to predict the risk of a single piece of complaint data, and finally the risk of the object is predicted using the risk results of all the complaint data corresponding to the object. Since the risk of the complaint data is labeled manually, the traditional scheme relies on the experience of the person in predicting the risk of the complaint data. However, the person cannot understand and remember the details of the complaint data in the order of ten thousand, and the subjective judgment of the risk of the complaint data is always limited. In addition, the traditional scheme also increases the strategy judgment, which causes the information of the complaint data to gradually disappear, resulting in poor effect of risk assessment of the object.
[0075] Therefore, the embodiments of the present application provide a method and device for predicting the risk of an object, an electronic device, and a storage medium, which can help to improve the accuracy of risk assessment of the object by extracting the text information related to the risk of the object in the complaint text data.
[0076] The object risk prediction method can be used in a risk prediction model. The risk prediction model includes a feature extraction module, a first mapping network, a second mapping network, and a third mapping network.
[0077] Specifically, at least one complaint text data for an object can be obtained, and the feature extraction module is used to perform feature extraction on the at least one complaint text data to obtain a first text vector representation of each complaint text data in the at least one complaint data. Then, the first text vector representation is input into the first mapping network to obtain a complaint type corresponding to each complaint text data, and the first text vector representation is input into the second mapping network to obtain a weight corresponding to each complaint text data. Then, the first text vector representation of each complaint text data is weighted and aggregated according to the weight corresponding to each complaint text data to obtain a second text vector representation of the object. Finally, the second text vector representation is input into the third mapping network to obtain a risk probability of the object.
[0078] Therefore, by inputting at least one complaint text data for an object into the risk prediction model, the complaint type, the weight, and the risk probability of the object can be predicted. Since the feature extraction module in the risk prediction model can extract text information related to the risk of the object in the complaint text data, the accuracy of predicting the risk of the complaint data is improved without relying on the experience of people in complaints.
[0079] Further, since the weight of each complaint text data can represent the effectiveness and importance of the complaint text data, the risk prediction model of the present application can output relatively important complaint text data, so that the model has certain interpretability for the output prediction result.
[0080] As an example, when a single complaint text data of a merchant is input into the risk prediction model, the model outputs the complaint type of the single complaint text and the risk probability of the merchant, where the risk probability of the merchant can represent the risk degree of the single complaint text data. At this time, the weight of the single complaint text is 1.
[0081] As another example, when multiple complaint texts from a merchant are input into a risk prediction model, the model can output the complaint type, weight, and risk probability of each complaint text. The weight of each complaint text can be used to determine its validity and importance; that is, complaints with higher weights are more likely to indicate the merchant's risk. Furthermore, based on the weights of each complaint text output by the model, important complaint texts can be quickly filtered from a massive number of complaints, facilitating bad case identification and manual review, thus improving the interpretability of the model's output and providing better support for subsequent complaint text data analysis.
[0082] In some embodiments, the risk prediction model described above can be trained using multiple complaint text data samples targeting multiple objects, type labels corresponding to each of the multiple complaint text data samples, and black and white labels corresponding to each object.
[0083] The object risk prediction method provided in this application can include a model training phase and a model prediction phase. The object risk prediction method involved in this application embodiment is described below with reference to the accompanying drawings.
[0084] First, the model training phase will be described.
[0085] Figure 2 This is a schematic flowchart illustrating a method 200 for model training in object risk prediction, provided in an embodiment of this application. Method 200 can be executed by any electronic device with data processing capabilities. For example, the electronic device can be implemented as a server or terminal device; or, for example, the electronic device can be implemented as... Figure 1 The training device 103 in this application is not limited thereto. For example, the model can be used to predict the risks of merchants.
[0086] In some embodiments, the electronic device may include (e.g., deploy) a machine learning model, which may be a deep learning model, a neural network model, or other models, without limitation. In some embodiments, the machine learning model may be a risk prediction model, which can be used to predict the risk of an object. Figure 3 This is a schematic diagram of a network architecture 300 for a risk prediction model provided in an embodiment of this application, including a feature extraction module 310, a first mapping network 320, a second mapping network 330, and a third mapping network 340. The following will be combined with... Figure 3 The network architecture described in section 200 describes the method for training the model.
[0087] like Figure 2 As shown, the method 200 for training the model may include steps 210 to 240.
[0088] 210, obtain a training sample set, the training sample set comprising a plurality of complaint text data samples for each of a plurality of subjects, a type label corresponding to each of the plurality of complaint text data samples, and a black-white label corresponding to each of the plurality of subjects.
[0089] In some embodiments, the training sample set can be obtained according to historical complaint data in a period of time, and penalty records of the subjects and ratings of the subjects.
[0090] As an example, the historical complaint data in a period of time, the penalty records of the subjects and the ratings of the subjects can be obtained from complaint data of the subjects on a third-party payment platform.
[0091] Taking the subjects as merchants as an example, the complaint data of the merchants can be penalty records of the complained merchants, ratings of the complained merchants, and all complaint text data corresponding to the complained merchants in the past year. The complaint text data can include a complained commodity name, complaint content text, and a complaint type. Optionally, the complaint text data can further include time information of the complaint.
[0092] As an example, the complaint content text can be a complaint text input by a customer, for example, a specific complaint content for a complained commodity, such as 'I accidentally paid the wrong amount, please solve it as soon as possible, thank you', 'the purchased service is not displayed as credited', 'the commodity involves banned content, and I hope to get a refund', and the like.
[0093] As an example, the complaint type can include various types of complaints, such as complaints of illegal content, complaints of online gambling, complaints of online fraud, complaints of unsatisfactory commodities, complaints of unsatisfactory services, complaints of abnormal charges, and the like, or other types, which are not limited in the present application.
[0094] As a possible implementation, the complaint type can be selected by the customer when making a complaint. For example, referring to Figure 4 , a complaint interface 400 of the third-party payment platform for EasyPay commodities can display an input area 410, in which a customer can input complaint content text. Meanwhile, the interface 400 can further include an area 420, in which a plurality of complaint types corresponding to the complaint content text can be provided for the customer to select. In response to the complaint content text input by the customer in the area 410 and the complaint type selected by the customer in the area 420, the third-party payment platform can obtain the complained commodity name, the complaint content text, and the complaint type. Optionally, the complaint time of the complaint can also be obtained.
[0095] In some embodiments, after obtaining the complained commodity name, the complaint content text and the complaint type, the complaint text data sample can be determined according to the complained commodity name and the complaint content text, and the type label corresponding to the complaint text data sample can be determined according to the complaint type.
[0096] Optionally, the user can also not check the complaint type, which is not limited by the application. Correspondingly, the complaint text data sample obtained at this time has no corresponding type label.
[0097] In some embodiments, after obtaining the punishment record of the object and the object rating, the object can be black and white labeled according to at least one of the punishment record of the object and the object rating, to obtain the black and white label corresponding to the object.
[0098] As a specific example, taking the object as a merchant as an example, for the merchant whose punishment measures are relatively serious (such as limiting investment, closing payment, etc.), and the latest state still has not lifted these restrictions, the merchant can be labeled as a black merchant, and the rest of the merchants are labeled as white merchants. Or, for the merchant whose rating is relatively low, the merchant can be labeled as a black merchant, and the merchant whose rating is relatively high can be labeled as a white merchant.
[0099] For example, the black label can be 1, and the white label can be 0, or vice versa, which is not limited by the application.
[0100] After obtaining the multiple complaint text data samples for each object in the multiple objects, the type labels corresponding to the multiple complaint text data samples respectively, and the black and white labels corresponding to each object respectively, a training sample set can be established based thereon. Correspondingly, the training sample set includes the multiple complaint text data samples of each object in the multiple objects, the type labels corresponding to the multiple complaint text data samples respectively, and the black and white labels corresponding to each object respectively.
[0101] In some embodiments, the complaint text data sample of a first object can be excluded from the training sample set, wherein the business volume of the first object is greater than a preset value.
[0102] For example, the first object can be a key large merchant (KA merchant). That is, since the business volume of the key large merchant is large, the key large merchant itself is a low-risk merchant or a merchant without risk. Because the business operated by the key large merchant itself has no problem, but due to the large business volume of these merchants or other reasons, they will be exploited by black production, resulting in more serious complaints, which will affect the effect of the model. Therefore, by excluding the complaint text data sample of the key large merchant from the training sample set, the accuracy of the model can be improved.
[0103] In some embodiments, the complaint text data samples in the training sample set can be cleaned. Specifically, the product name and the complaint text information in the complaint text data samples can be concatenated to obtain the concatenated complaint text data samples, and the numbers in the concatenated complaint text data samples can be replaced with a first text. Here, the first text can be a single character or symbol, and the present application does not limit this.
[0104] As a specific example, the product name and the complaint content text in each complaint text data sample can be concatenated using the symbol "&", such as: "EasyPay product & I don't know what's going on, automatically deducted 648 yuan". For the concatenated complaint text data samples, the numbers (including capital numbers and Arabic numerals) in them can also be replaced with a single character or symbol respectively. For example, the numbers in the complaint text can be replaced with "捌" and "8" respectively. Continuing with the above example, "EasyPay product & I don't know what's going on, automatically deducted 648 yuan" can be further updated to: "EasyPay product & I don't know what's going on, automatically deducted 888 yuan".
[0105] Therefore, by concatenating the product name and the complaint text information, the complaint text data can be made more standardized in the embodiments of the present application, which is beneficial to subsequent feature extraction of the complaint text data. Further, by replacing the digital part in the complaint text data, it is possible to avoid the interference of the digital part on the feature extraction of the complaint text data.
[0106] 220, input the multiple complaint text data samples of each object into the risk prediction model to obtain the complaint types corresponding to the multiple complaint text data samples respectively and the risk probability of each object.
[0107] Exemplarily, referring to Figure 3 , the multiple complaint text data samples of each object can be input into the feature extraction module 310 respectively, and the feature extraction module 310 is used to extract features from each complaint text data sample to obtain the text vector representation of each complaint text data sample. Then, the text vector representation of the complaint text data sample can be input into the first mapping network 320 to obtain the complaint type corresponding to each complaint text data sample, and the text vector representation of the complaint text data sample can be input into the second mapping network 330 to obtain the weight corresponding to each complaint text data sample. After that, according to the weight corresponding to each complaint text data sample, the text vector representations of each complaint text data sample can be weighted and aggregated to obtain the text vector representation of each object. Finally, the text vector representation of each object can be input into the third mapping network 330 to obtain the risk probability of each object. The risk probability can also be referred to as a risk score, and the present application does not limit this.
[0108] In some embodiments, the training samples input into the model in each round of training can be obtained in combination with the time information corresponding to the complaint text data samples and a random sampling manner.
[0109] Specifically, the first part of complaint text data samples can be obtained according to the time information corresponding to the complaint text data samples of each object, and the second part of complaint text data samples can be obtained by randomly sampling from the multiple complaint text data samples of each object. Then, the first part of complaint text data samples and the second part of complaint text data samples are input into the risk prediction model to train the risk prediction model.
[0110] When the number of complaint text data samples selected from the training sample set in one iteration is greater than the maximum sample number input into the model in each iteration, if only simple sampling is performed to obtain the samples input into the model, a part of data will be discarded.
[0111] Compared with the simple sampling manner, in the embodiments of the present application, the most recent complaint text data samples in time can be further selected from the selected complaint text data samples according to the time information corresponding to the complaint text data samples, as the first part of complaint text data samples. Then, the second part of complaint text data samples can be obtained by randomly sampling from the remaining complaint text data samples. Here, the sum of the number of the first part of complaint text data samples and the number of the second part of complaint text data samples can be equal to the maximum sample number input into the model in each iteration.
[0112] As an example, when the number of complaint text data samples selected from the training sample set in one iteration is greater than 50 (the maximum sample number input into the model in each iteration), the most recent 10 complaint text data samples in time can be selected, and then 40 complaint text data samples can be randomly sampled from the remaining complaint text data samples. Finally, the 50 complaint text data samples are input into the model to perform the model training in this round.
[0113] Therefore, by combining the time information corresponding to the complaint text data samples and the random sampling manner, the embodiments of the present application can obtain the training samples input into the model in each round of training, so that the number of complaint text data samples loaded each time does not exceed the maximum sample number input into the model in each iteration, thereby ensuring that the video memory does not overflow during training, and thereby fully utilizing the data under limited hardware resources. In addition, the embodiments of the present application can retain the part of data discarded by the simple sampling manner.
[0114] In some embodiments, the feature extraction module 310 can be a BERT (Bidirectional Encoder Representations from Transformers), a long-short term memory (LSTM) model, a TextCNN, or other models. The text vector representation extracted by the feature extraction module 310 can be an embedding vector of the complaint text data sample.
[0115] As an example, the first mapping network 320 can be a Multilayer Perceptron (MLP).
[0116] As a specific example, for a merchant m i , which corresponds to j complaint text data samples, can be represented as C i = {c i1 , c i2 ,..., c ij}. The process of predicting the complaint type for a single complaint text data sample can be regarded as a conventional text classification task.
[0117] As an example, the feature extraction module 310 is a BERT model, and the first mapping network 320 is an MLP c , the complaint text data sample C i = {c i1 , c i2 ,..., c ij} is input into the BERT model to obtain the text representation vector of each complaint text data sample c ij . As an example, the BERT model can use the first six layers, and after the single complaint text data sample c ij passes through the BERT model, the 768-dimensional CLS vector of the last layer of the BERT model can be used as the text vector representation of the complaint text data sample c ij , which can be represented as BERT(c ij ).
[0118] Then, the text representation vector BERT(c ij ) of the complaint text data sample c ij is input into the MLP c , and the output complaint type t′ ij corresponding to the complaint text data sample c ij can be represented as the following formula (1):
[0119] t′ ij = softmax(MLP c (BERT(cij ))) (1)
[0120] wherein,
[0121] Specifically, the complaint text data sample c ij is mapped to a text vector representation BERT(c ij ) through a second mapping network 330. c The text vector representation BERT(c c ) is mapped to a vector of the same dimension as the number of complaint types through an MLP ij , and the vector t' is obtained by using a softmax function to convert the vector output by the MLP ij . Each dimension of the vector t' corresponds to the probability that the complaint text data sample c ij belongs to the corresponding complaint type. The complaint type with the highest probability is the corresponding complaint type of the complaint text data sample c ij .
[0122] For example, the second mapping network 330 can include an MLP, which can specifically be a self-attention mechanism module.
[0123] Taking the case where the second mapping network 330 includes a self-attention mechanism module (denoted as MLP at ), the text representation vector BERT(c ij ) of the complaint text data sample c ij is input into the self-attention mechanism module MLP at , and the output weight attention ij corresponding to the complaint text data sample c ij can be represented as the following formula (2):
[0124]
[0125] wherein, ∑ j attention ij = 1, i.e., the sum of the weights of the j complaint text data samples C i = {c i , c i1 ,..., c i2} of the merchant m ij is 1.
[0126] Specifically, the text vector representation BERT(c ij ) of the complaint text data sample c ij is mapped to a scalar corresponding to the complaint text data sample c at through an MLP ij , and the scalar is combined with C i={c i1 c i2 c ij All complaint text data samples in} were processed by MLP at The scalar obtained from the mapping can be used to obtain the complaint text data sample c. ij Corresponding weights attention ij Among them, complaint text data sample c ij Corresponding weights attention ij This can represent the text data sample c of the complaint. ij The validity and importance of this. For example, complaint text data sample c ij Corresponding weights attention ij The larger the value, the larger the sample value of the complaint text data c. ij The greater the risk to merchants.
[0127] Then, based on merchant m i j complaint text data samples C i ={c i1 c i2 c ij Each complaint text data sample c ij weights attention ij For complaint text data sample c ij BERT(c) is a text representation vector. ij After weighted aggregation, we can obtain merchant m. i The text vector representation of can be expressed as ∑ j attention ij *BERT(c ij For example, it can be a 768-dimensional vector.
[0128] For example, the third mapping network 340 may include an MLP.
[0129] The third mapping network 340 includes MLP m For example, the above merchants m i The text vector representation, i.e., ∑ j attention ij *BERT(c ij Input MLP m This yields the merchant's risk probability. The merchant's risk probability y i ′ can be expressed as the following formula (3):
[0130] y i = sigmoid(MLP) m (∑ jattention ij *BERT(c ij ))) (3)
[0131] Specifically, the second text vector represents ∑ j attention ij *BERT(c ij After MLP m (An example of a third mapping network) is mapped to a one-dimensional scalar, and then the softmax function is used to transform the MLP. m The output scalar conversion yields merchant m i Risk probability y i ′.
[0132] Figure 5 This illustration shows a specific example of object risk prediction provided in an embodiment of this application. For example... Figure 5 As shown, n complaint data samples of a merchant, such as product name & complaint text 1, can be input into BERT1 for semantic information extraction to obtain the first text vector representation 1 of product name & complaint text 1. Product name & complaint text 2 can be input into BERT2 for semantic information extraction to obtain the first text vector representation 2 of product name & complaint text 2, ..., product name & complaint text n can be input into BERT1 for semantic information extraction to obtain the first text vector representation n of product name & complaint text n.
[0133] Then, each first text vector representation can be input into the corresponding first mapping network to obtain the complaint type for each first text vector representation, such as complaint type 1 for first text vector representation 1, complaint type 2 for first text vector representation 2, and so on. Here, the complaint type can correspond to t′ in the above text. ij .
[0134] Simultaneously, each first text vector representation can be input into the corresponding second mapping network to obtain the weight of each first text vector representation, such as weight 1 for first text vector representation 1, weight 2 for first text vector representation 2, and so on. Here, this weight can correspond to the attention mentioned above. ij .
[0135] Then, based on the weight of each first text vector representation, the n first text vector representations are weighted and aggregated to obtain the merchant's second text vector representation. This second text vector representation is then input into a third mapping network to obtain the merchant's risk probability. Here, the merchant's risk probability can correspond to y in the above context. i ′.
[0136] 230. Determine the first loss based on the complaint type and type label corresponding to each complaint text data sample.
[0137] Continuing with the example above, for complaint text data sample c ij The complaint text data sample c can be obtained from the output of the risk prediction model in 220. ij Complaint type t′ ij And the complaint text data sample c in the training sample set ij The corresponding type tag t ij Obtain complaint text data sample c ij loss ij As shown in formula (4) below:
[0138] loss ij =crossentropy(t′ ij , t ij (4)
[0139] Where, crossentropy(X, X′) = ∑ k -x k logx' k .
[0140] For merchant m i j complaint text data samples C i ={c i1 c i2 c ij The sum of the losses of}, i.e. the first loss, can be expressed as the following formula (5):
[0141]
[0142] It should be noted that the training sample set may include samples without type labels t ij Given the sample of complaint text data, formula (5) can only calculate the type label t. ij The complaint text data sample, i.e., j∈J l J l This indicates a t with a type label. ij A collection of complaint text data samples.
[0143] See also Figure 5 For each complaint data sample, the loss corresponding to its complaint type and its corresponding type label can be calculated. For example, the loss 1 between complaint type 1 and type label 1 can be calculated, the loss 2 between complaint type 2 and type label 2 can be calculated, and so on, until the loss n between complaint type n and type label n is calculated. Then, based on the loss 1 to loss n, the first loss can be obtained.
[0144] 240, determine the second loss according to the risk probability of each object and the black and white label of each object.
[0145] Continuing the above example, for the merchant m i , the second loss of the merchant m i can be obtained according to the risk probability y i ' of the merchant m i output by the risk prediction model in 220 and the black and white label y i of the merchant m i in the training sample set, as shown in the following formula (6):
[0146] MerchantLoss = ∑ i -y i logy i '-(1-y i )log(1-y i ') (6)
[0147] Continuing to refer to Figure 5 , for a merchant, the loss of the risk probability corresponding to the merchant and the merchant label corresponding to the merchant can be calculated to obtain the second loss.
[0148] 250, train the risk prediction model according to the first loss and the second loss.
[0149] Specifically, the risk prediction model is a multi-task model, that is, two tasks are performed at the same time, that is, the complaint type prediction of the complaint text data and the object risk prediction. Among them, the two tasks share a part of the network structure. The complaint type prediction task can correspond to the first loss, and the object risk prediction task can correspond to the second loss. Therefore, the embodiments of the present application can update the parameters of each module in the risk prediction model according to the first loss and the second loss to complete the training of the risk prediction model.
[0150] Exemplarily, the final loss function to be optimized can be determined according to the first loss, the second loss and the first parameter corresponding to the first loss, as shown in the following formula (7):
[0151] Loss = MerchantLoss + a ComplaintLoss (7)
[0152] Wherein, a is the first parameter. Exemplarily, the first parameter a can be a hyperparameter, and the value of a can be manually set.
[0153] As a possible implementation manner, referring to Figure 6 , the risk prediction model can be trained through processes 251 to 253.
[0154] 251. Based on the first parameter, first loss and second loss corresponding to the first loss, the risk prediction model is trained until the first loss converges.
[0155] 252, lower the value of the first parameter.
[0156] 253. Based on the adjusted first parameter, first loss, and second loss, the risk prediction model is trained until the second loss converges.
[0157] In other words, the first parameter α can be set to a relatively large value in the early stages of training. As training progresses, the first loss will converge, and the model's prediction of the type of each complaint text will also tend to stabilize. At this point, the first parameter α can be appropriately lowered before training continues. As the value of the first parameter α is continuously lowered, the second loss and the prediction of the risk probability of the object approach a stable level, at which point the training of the risk prediction model is complete.
[0158] Therefore, in this embodiment, by using multiple complaint text data samples targeting multiple objects, type labels corresponding to each of the multiple complaint text data samples, and black and white labels corresponding to each object, a risk prediction model can be trained to obtain a trained risk prediction layer model. Since the risk prediction model extracts object risk-related text information from the complaint text data samples, the risk prediction model in this embodiment does not rely on human experience with complaints. Therefore, this embodiment helps improve the accuracy of predicting the complaint type, weight, and risk probability of each object in each complaint text data.
[0159] The following describes the model prediction phase.
[0160] Figure 7 This is a schematic flowchart illustrating a method 700 for object risk prediction provided in an embodiment of this application. Method 700 can be executed by any electronic device with data processing capabilities. For example, the electronic device can be implemented as a server or terminal device; or, for example, the electronic device can be implemented as... Figure 1 The execution device 104 in this application is not limited thereto.
[0161] In some embodiments, the electronic device may include (e.g., deploy) a machine learning model that can be used to perform a method 700 for risk prediction of the object. For example, the machine learning model may input at least one complaint text data of the object to be predicted into the machine learning model, which then predicts the complaint type and weight of the complaint text data, as well as the risk probability of the object. Exemplarily, the machine learning model may be a deep learning model, a neural network model, or other models, without limitation. Specifically, the machine learning model may be... Figure 3The risk prediction model in the risk prediction model can include a feature extraction module, a first mapping network, a second mapping network, and a third mapping network.
[0162] As shown in Figure 7 The object risk prediction method 700 can include steps 710-760.
[0163] 710, obtaining at least one complaint text data for the object.
[0164] Here, the object is a to-be-predicted object, and the at least one complaint text data is to-be-predicted complaint text data. Exemplarily, the at least one complaint text data of the object can be obtained from complaint data for the object (such as a merchant) on a third-party payment platform.
[0165] In some embodiments, the complaint text data can include a commodity name and complaint content text.
[0166] In some embodiments, the commodity name and the complaint content text can be spliced to obtain spliced complaint text data, and then numbers in the spliced complaint text data are replaced with first text.
[0167] Specifically, the complaint text data has a similar data structure and processing manner to the complaint text data sample, and reference can be made to the related description of the complaint text data sample in the foregoing, which will not be repeated here.
[0168] 720, using a feature extraction module to perform feature extraction on the at least one complaint text data to obtain a first text vector representation of each complaint text data in the at least one complaint data.
[0169] Specifically, the at least one complaint text data for the object can be input into the risk prediction model, and the feature extraction module in the risk prediction model can perform feature extraction on the at least one complaint text data to obtain a first text vector representation of each complaint text data in the at least one complaint data.
[0170] 730, inputting the first text vector representation into the first mapping network to obtain a complaint type corresponding to each complaint text data.
[0171] Specifically, the first mapping network in the risk prediction model can map the first text vector to obtain a complaint type corresponding to each complaint text data.
[0172] 740, inputting the first text vector representation into the second mapping network to obtain a weight corresponding to each complaint text data.
[0173] Specifically, the second mapping network in the risk prediction model can map the first text vector to obtain a weight corresponding to each complaint text data.
[0174] 750, weighting and aggregating the first text vector representation of each complaint text data according to the weight corresponding to each complaint text data, to obtain a second text vector representation of the object.
[0175] 760, inputting the second text vector representation into a third mapping network to obtain a risk probability of the object.
[0176] Specifically, the third mapping network in the risk prediction model can map the second text vector to obtain a risk probability of the object.
[0177] The processing of the complaint text data by the feature extraction module, the first mapping network, the second mapping network and the third mapping network in the risk prediction model can refer to the processing of the complaint text data samples by the modules in Figure 2 The specific description can be referred to in the above, and will not be repeated here.
[0178] As an example, when a single complaint text data of a merchant is input into the risk prediction model, the model outputs the complaint type of the single complaint text and the risk probability of the merchant, wherein the risk probability of the merchant can represent the risk degree of the single complaint text data. At this time, the weight of the single complaint text is 1.
[0179] As another example, when multiple complaint text data of a merchant is input into the risk prediction model, the model can output the complaint type corresponding to each complaint text data, the weight, and the risk probability of the merchant. Wherein, the weight corresponding to each complaint text data can be used to judge the effectiveness and importance of the corresponding complaint text data, that is, according to the complaint text data corresponding to a larger weight, the risk of the merchant is more easily judged.
[0180] Figure 8 An example of the model output result is shown, wherein the risk probability of the merchant "XX District XX" is 99.54%, and the risk probability is high. Further, Figure 8 The weight of the complaint text data 'EasyPay commodity & suspected unhealthy content cheated 88 yuan, browser payment, nothing, hope the official help me to get back the fund, will not be an example, thank you official' in is 69.18%, the effectiveness and importance of this complaint text data is the highest, and the risk of the merchant is more easily judged according to this complaint text data. That is, this complaint text data is more likely to cause the risk probability of the merchant "XX District XX" to be 99.54%.
[0181] In some embodiments, the risk level of an object can be determined based on its risk probability. For example, when the risk probability of an object is above 80%, the object can be determined as high-risk; when the risk probability of an object is between 60% and 80%, the object can be determined as medium-risk; and when the risk probability of an object is below 60%, the object can be determined as low-risk.
[0182] Furthermore, based on the weights corresponding to each complaint text data output by the model, important complaint text data can be quickly filtered from a massive number of complaints. This facilitates the identification of bad cases and manual review, enhancing the interpretability of the model's output and providing strong support for subsequent complaint text data analysis. See also... Figure 8 Based on the model's output, it is possible to quickly filter out complaint text data with higher weight from the complaint text data, such as complaint text data with a weight of 69.18% and complaint text data with a weight of 15.30%. Based on these complaint text data with higher weight, bad cases can be quickly located and manually reviewed to further verify the risk of the merchant "XX District XX".
[0183] Therefore, by inputting at least one complaint text data point targeting an object into a risk prediction model, this embodiment of the application can predict the complaint type, weight, and risk probability of the object for each complaint text data point. Since the feature extraction module in the risk prediction model can extract risk-related text information from the complaint text data, this embodiment of the application does not rely on human experience with complaints when predicting the risk of complaint data. Therefore, this embodiment of the application helps improve the accuracy of predicting the complaint type, weight, and risk probability of the object for each complaint text data point.
[0184] Furthermore, since the weight of each complaint text data can represent the validity and importance of that complaint text data, the risk prediction model of this application embodiment can output relatively important complaint text data, making the model's output prediction results somewhat interpretable.
[0185] The specific embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solutions of this application, and these simple modifications all fall within the protection scope of this application. For example, the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this application will not describe the various possible combinations separately. Furthermore, various different embodiments of this application can also be arbitrarily combined, as long as they do not violate the spirit of this application, they should also be considered as the content disclosed in this application.
[0186] It should also be understood that the size of the serial number of each process described above does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. It should be understood that these serial numbers can be interchanged under appropriate circumstances, so that the described embodiments of the present application can be implemented in an order other than that illustrated or described.
[0187] The method embodiments of the present application are described in detail above, and the device embodiments of the present application are described in detail below in conjunction with Figure 9 to Figure 11 .
[0188] Figure 9 is a schematic block diagram of the object risk prediction device 900 provided by the embodiments of the present application. As shown in Figure 9 , the object risk prediction device 900 can include an acquisition unit 810, a risk prediction model 920, and an aggregation unit 930. Wherein, the risk prediction model 920 can further include a feature extraction module 921, a first mapping network 922, a second mapping network 923, and a third mapping network 924.
[0189] The acquisition unit 910 is configured to acquire at least one complaint text data for an object;
[0190] The feature extraction module 921 is configured to input the at least one complaint text data, and perform feature extraction on the at least one complaint text data to obtain a first text vector representation of each complaint text data in the at least one complaint data;
[0191] The first mapping network 922 is configured to input the first text vector representation to obtain a complaint type corresponding to the each complaint text data;
[0192] The second mapping network 923 is configured to input the first text vector representation to obtain a weight corresponding to the each complaint text data;
[0193] The aggregation unit 930 is configured to input the weight corresponding to the each complaint text data and the first text vector representation, and perform weighted aggregation on the first text vector representation according to the weight corresponding to the each complaint text data to obtain a second text vector representation of the object;
[0194] The third mapping network 924 is configured to input the second text vector representation to obtain a risk probability of the object.
[0195] In some embodiments, the acquisition unit 910 is further configured to:
[0196] obtain a training sample set, the training sample set comprising a plurality of complaint text data samples for each object in a plurality of objects, a type label corresponding to each of the plurality of complaint text data samples respectively, and a black-white label corresponding to each of the objects respectively.
[0197] The risk prediction model 920 is further configured to input the plurality of complaint text data samples of each object to obtain a complaint type corresponding to each of the plurality of complaint text data samples and a risk probability of each of the objects.
[0198] The apparatus 900 can further comprise a determination unit configured to determine a first loss according to the complaint type corresponding to each of the complaint text data samples and the type label corresponding to each of the complaint text data samples, and determine a second loss according to the risk probability of each of the objects and the black-white label of each of the objects.
[0199] The apparatus 900 can further comprise a training unit configured to train the risk prediction model according to the first loss and the second loss.
[0200] In some embodiments, the training unit is specifically configured to:
[0201] train the risk prediction model according to the first parameter corresponding to the first loss, the first loss and the second loss, until the first loss converges;
[0202] lower the value of the first parameter;
[0203] train the risk prediction model according to the adjusted first parameter, the first loss and the second loss, until the second loss converges.
[0204] In some embodiments, the training sample set further comprises time information corresponding to each of the plurality of complaint text data samples.
[0205] The obtaining unit 910 is specifically configured to:
[0206] obtain a first part of complaint text data samples according to the time information corresponding to the complaint text data samples of each of the objects;
[0207] obtain a second part of complaint text data samples by randomly sampling from the plurality of complaint text data samples of each of the objects.
[0208] The risk prediction model 920 is specifically configured to input the first part of complaint text data samples and the second part of complaint text data samples.
[0209] In some embodiments, the black-white label corresponding to each of the objects is obtained according to at least one of a penalty record and an object rating of each of the objects.
[0210] In some embodiments, the obtaining unit 910 is further configured to:
[0211] eliminate the complaint text data sample of the first object from the training sample set, wherein a business volume of the first object is greater than a preset value.
[0212] In some embodiments, the second mapping network comprises a self-attention mechanism module.
[0213] In some embodiments, the complaint text data comprises a commodity name and complaint content text.
[0214] In some embodiments, the apparatus 900 further comprises a processing unit configured to splice the commodity name and the complaint text information to obtain spliced complaint text data, and replace a number in the spliced complaint text data with a first text.
[0215] It should be understood that the apparatus embodiments and the method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, no longer described here. Specifically, the apparatus 900 for object risk prediction in this embodiment can correspond to the corresponding subject performing the method 700 of the embodiments of the present application, and the foregoing and other operations and / or functions of each module in the apparatus 900 are respectively for realizing the corresponding processes in the method 700 in the foregoing, for the sake of brevity, no longer described here.
[0216] Figure 10 is a schematic block diagram of the apparatus 1000 of the training model of the embodiments of the present application. As shown in the figure, the apparatus 1000 of the training model can comprise an obtaining unit 1010, a risk prediction model 1020, a determining unit 1030 and a training unit 1040. Figure 10
[0217] The obtaining unit 1010 is configured to obtain a training sample set, wherein the training sample set comprises a plurality of complaint text data samples for each object in a plurality of objects, type labels respectively corresponding to the plurality of complaint text data samples, and black-white labels respectively corresponding to the each object.
[0218] The risk prediction model 1020 is configured to input the plurality of complaint text data samples of the each object to obtain complaint types respectively corresponding to the plurality of complaint text data samples and risk probabilities of the each object.
[0219] The determining unit 1030 is configured to determine a first loss according to the complaint types respectively corresponding to the each complaint text data sample and the type labels respectively corresponding to the each complaint text data sample.
[0220] The determination unit 1030 is further configured to determine a second loss according to the risk probability of each object and the black-and-white label of each object.
[0221] The training unit 1040 is configured to train the risk prediction model 1020 according to the first loss and the second loss.
[0222] In some embodiments, the training unit 1040 is specifically configured to:
[0223] train the risk prediction model according to the first parameter corresponding to the first loss, the first loss, and the second loss, until the first loss converges;
[0224] lower the value of the first parameter;
[0225] train the risk prediction model according to the adjusted first parameter, the first loss, and the second loss, until the second loss converges.
[0226] In some embodiments, the training sample set further includes time information corresponding to each of the plurality of complaint text data samples.
[0227] The acquisition unit 1010 is further configured to:
[0228] acquire a first part of complaint text data samples according to the time information corresponding to each of the complaint text data samples of each object;
[0229] acquire a second part of complaint text data samples by randomly sampling from the plurality of complaint text data samples of each object.
[0230] The risk prediction model 1020 is specifically configured to input the first part of complaint text data samples and the second part of complaint text data samples.
[0231] In some embodiments, the black-and-white label corresponding to each object is obtained according to at least one of a penalty record and an object rating of each object.
[0232] In some embodiments, the acquisition unit 1010 is further configured to:
[0233] remove the complaint text data samples of a first object from the training sample set, wherein the business volume of the first object is greater than a preset value.
[0234] It should be understood that the apparatus embodiments and the method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, no further description is given here. Specifically, the apparatus 1000 for training the model in this embodiment can correspond to the corresponding subject performing the method 200 of the embodiments of the present application, and the foregoing and other operations and / or functions of the various modules in the apparatus 1000 are respectively for realizing the corresponding processes in the method 200 described above. For the sake of brevity, no further description is given here.
[0235] The apparatus and system of the embodiments of the present application are described above in the perspective of functional modules in combination with the drawings. It should be understood that the functional modules can be realized by hardware, instructions in the form of software, or a combination of hardware and software modules. Specifically, the steps of the method embodiments in the embodiments of the present application can be completed by integrated logic circuits of hardware in the processor and / or instructions in the form of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware code processing for execution by the processor, or executed by a combination of hardware and software modules in the code processing. Alternatively, the software modules can be located in mature storage media in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc. The storage media is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps in the above method embodiments.
[0236] As shown in Figure 11 is a schematic block diagram of an electronic device 1100 provided by the embodiments of the present application.
[0237] As shown in Figure 11 The electronic device 1100 can include:
[0238] The memory 1110 is used to store computer programs and transmit the program codes to the processor 1120. In other words, the processor 1120 can call and run the computer programs from the memory 1110 to implement the method in the embodiments of the present application.
[0239] For example, the processor 1120 can be used to execute the steps in the above method 200 or 700 according to the instructions in the computer program.
[0240] In some embodiments of the present application, the processor 1120 can include but is not limited to:
[0241] A general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc.
[0242] In some embodiments of the present application, the memory 1110 includes, but is not limited to:
[0243] volatile memory and / or non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0244] In some embodiments of the present application, the computer program can be divided into one or more modules, which are stored in the memory 1110 and executed by the processor 1120 to complete the method provided by the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device 1100.
[0245] Optionally, as shown in Figure 11 the electronic device 1100 can further include:
[0246] a transceiver 1130, which can be connected to the processor 1120 or the memory 1110.
[0247] The processor 1120 can control the transceiver 1130 to communicate with other devices, specifically, can send information or data to other devices, or receive information or data sent by other devices. The transceiver 1130 can include a transmitter and a receiver. The transceiver 1130 can further include an antenna, and the number of antennas can be one or more.
[0248] It should be understood that various components in the electronic device 1100 are connected through a bus system, which includes, in addition to a data bus, a power supply bus, a control bus, and a status signal bus.
[0249] According to an aspect of the present application, a communication apparatus is provided, which includes a processor and a memory for storing a computer program, the processor being configured to invoke and run the computer program stored in the memory, so that the encoder performs the method of the above-mentioned method embodiments.
[0250] According to an aspect of the present application, a computer storage medium is provided, which stores a computer program, and the computer program is executed by a computer to enable the computer to perform the method of the above-mentioned method embodiments. Alternatively, the embodiments of the present application also provide a computer program product containing instructions, and the instructions are executed by a computer to enable the computer to perform the method of the above-mentioned method embodiments.
[0251] According to another aspect of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the method of the above-mentioned method embodiments.
[0252] In other words, when implemented using software, the embodiments of the present application can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the whole or part of the flow or function according to the embodiments of the present application is generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, digital video disc (DVD)), or a semiconductor medium (for example, solid state disk (SSD)), etc.
[0253] It can be understood that in the specific embodiments of the present application, user information and other related data may be involved. When the above embodiments of the present application are applied to specific products or technologies, the user's permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0254] Those skilled in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0255] In several embodiments provided in the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, for example, the division of the modules is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed ones can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0256] The modules illustrated as separate components can or can not be physically separate, and the components illustrated as modules can or can not be physical modules, that is, can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiments according to actual needs. For example, the functional modules in each embodiment of the present application can be integrated into a processing module, or each module can be physically present separately, or two or more modules can be integrated into one module.
[0257] The above is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of object risk prediction, characterized in that, The method is applied to a risk prediction model comprising a feature extraction module, a first mapping network, a second mapping network and a third mapping network, and the method comprises: obtaining at least one complaint text data for an object; performing feature extraction on the at least one complaint text data using the feature extraction module to obtain a first text vector representation of each complaint text data in the at least one complaint data; inputting the first text vector representation into the first mapping network to obtain a complaint type corresponding to the each complaint text data; inputting the first text vector representation into the second mapping network to obtain a weight corresponding to the each complaint text data; performing weighted aggregation on the first text vector representation of the each complaint text data according to the weight corresponding to the each complaint text data to obtain a second text vector representation of the object; inputting the second text vector representation into the third mapping network to obtain a risk probability of the object; The method further comprises: obtaining a training sample set comprising a plurality of complaint text data samples for each object in a plurality of objects, type labels respectively corresponding to the plurality of complaint text data samples, and black and white labels respectively corresponding to the each object; inputting the plurality of complaint text data samples of the each object into the risk prediction model to obtain a complaint type respectively corresponding to the plurality of complaint text data samples and a risk probability of the each object; determining a first loss according to the complaint type corresponding to the each complaint text data sample and the type label corresponding to the each complaint text data sample; determining a second loss according to the risk probability of the each object and the black and white label of the each object; training the risk prediction model according to the first loss and the second loss; wherein the black and white label corresponding to the each object is obtained according to at least one of a penalty record and an object rating of the each object.
2. The method of claim 1, wherein, The training of the risk prediction model according to the first loss and the second loss comprises: training the risk prediction model according to a first parameter corresponding to the first loss, the first loss and the second loss until the first loss converges; lowering the value of the first parameter; training the risk prediction model according to the adjusted first parameter, the first loss and the second loss until the second loss converges.
3. The method of claim 1, wherein, The training sample set further comprises time information respectively corresponding to the plurality of complaint text data samples; wherein inputting the plurality of complaint text data samples of the each object into the risk prediction model comprises: obtaining a first part of complaint text data samples according to the time information corresponding to the complaint text data samples of the each object; randomly sampling a second part of complaint text data samples from the plurality of complaint text data samples of the each object; inputting the first part of complaint text data samples and the second part of complaint text data samples into the risk prediction model.
4. The method of claim 1, wherein, Further comprising: Discard a complaint text data sample of a first object from the training sample set, wherein a business volume of the first object is greater than a preset value.
5. The method according to any one of claims 1 to 4, characterized in that, The second mapping network comprises a self-attention mechanism module.
6. The method according to any one of claims 1 to 4, characterized in that, The complaint text data comprises a commodity name and complaint content text.
7. The method of claim 6, wherein, Further comprising: Splicing the commodity name and the complaint text information to obtain spliced complaint text data; Replacing a number in the spliced complaint text data with a first text.
8. A method for model training for object risk prediction, characterized in that, Comprising: Obtain a training sample set, wherein the training sample set comprises a plurality of complaint text data samples for each object in a plurality of objects, type labels corresponding to the plurality of complaint text data samples respectively, and black and white labels corresponding to the each object respectively; Input the plurality of complaint text data samples of the each object into a risk prediction model to obtain complaint types corresponding to the plurality of complaint text data samples respectively and risk probabilities of the each object; Determine a first loss according to the complaint types corresponding to each complaint text data sample and the type labels corresponding to the each complaint text data sample; Determine a second loss according to the risk probabilities of the each object and the black and white labels of the each object; Train the risk prediction model according to the first loss and the second loss. The black and white labels corresponding to the each object are obtained according to at least one of a punishment record and an object rating of the each object.
9. An apparatus for object risk prediction, the apparatus comprising: The device comprises an obtaining unit, a risk prediction model, and an aggregation unit, wherein the risk prediction model comprises a feature extraction module, a first mapping network, a second mapping network, and a third mapping network. The obtaining unit is configured to obtain at least one complaint text data for an object. The feature extraction module is configured to input the at least one complaint text data and perform feature extraction on the at least one complaint text data to obtain a first text vector representation of each complaint text data in the at least one complaint data. The first mapping network is configured to input the first text vector representation to obtain a complaint type corresponding to the each complaint text data. The second mapping network is configured to input the first text vector representation to obtain a weight corresponding to the each complaint text data. The aggregation unit is configured to input the weight corresponding to the each complaint text data and the first text vector representation, and perform weighted aggregation on the first text vector representation according to the weight corresponding to each complaint text data to obtain a second text vector representation of the object. The third mapping network is configured to input the second text vector representation to obtain a risk probability of the object. The obtaining unit is further configured to obtain a training sample set, wherein the training sample set comprises a plurality of complaint text data samples for each object in a plurality of objects, type labels corresponding to the plurality of complaint text data samples respectively, and black and white labels corresponding to the each object respectively. The risk prediction model is configured to input the plurality of complaint text data samples of the each object to obtain complaint types corresponding to the plurality of complaint text data samples respectively and risk probabilities of the each object. determine a first loss according to the complaint type corresponding to each complaint text data sample and the type label corresponding to each complaint text data sample; the determination unit is further configured to determine a second loss according to the risk probability of each object and the black-and-white label corresponding to each object; a training unit configured to train the risk prediction model according to the first loss and the second loss. The black-and-white label corresponding to each object is obtained according to at least one of the punishment record and the object rating of each object.
10. An apparatus for training a model for object risk prediction, characterized in that, comprising: an acquisition unit configured to acquire a training sample set, the training sample set comprising a plurality of complaint text data samples for each object in a plurality of objects, type labels corresponding to the plurality of complaint text data samples respectively, and black-and-white labels corresponding to each object respectively; a risk prediction model configured to input a plurality of complaint text data samples of each object to obtain the complaint type corresponding to the plurality of complaint text data samples respectively and the risk probability of each object; determine a first loss according to the complaint type corresponding to each complaint text data sample and the type label corresponding to each complaint text data sample; the determination unit is further configured to determine a second loss according to the risk probability of each object and the black-and-white label corresponding to each object; a training unit configured to train the risk prediction model according to the first loss and the second loss. The black-and-white label corresponding to each object is obtained according to at least one of the punishment record and the object rating of each object.
11. An electronic device, comprising: comprising a processor and a memory, the memory storing instructions, and the processor executing the instructions to perform the method of any one of claims 1-8.
12. A computer storage medium, characterized in that A computer program for storing, the computer program comprising instructions for executing the method of any one of claims 1-8.
13. A computer program product, characterised in that, comprising computer program code which, when executed by an electronic device, causes the electronic device to perform the method of any one of claims 1-8.
Citation Information
Patent Citations
Text risk identification method, device and equipment
CN111401062A