A text auditing method, device, equipment, medium and program product
By constructing a multi-task learning model and combining multiple hybrid expert networks and LDA models, the problems of insufficient content analysis and narrow application areas in existing text pre-review methods are solved. This achieves in-depth text analysis and broad applicability, improving the accuracy and efficiency of review.
Patent Information
- Application Number
- CN202310621762.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-05-30
AI Technical Summary
Existing text pre-review methods lack in-depth content analysis, have limited application areas, and poor versatility, making it difficult to meet the text review needs of multiple fields.
A multi-task learning model is constructed, which includes multiple hybrid expert networks. By combining gating networks and sub-networks, features from multiple libraries are used for comprehensive analysis. Combined with LDA model and cluster analysis, the review results of the target text are generated.
It enables in-depth analysis of target text, improves the relevance and rationality of text analysis, adapts to the needs of different business scenarios, expands the application field, and reduces the need for manual review.
Smart Images

Figure CN116484229B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular relates to a text auditing method, device, equipment, medium and program product. BACKGROUND
[0002] Text pre-examination mainly uses machines to replace part of manual examination and find materials, simplifies the steps of manual examination and reduces proofreading pressure. It can also help business personnel to write texts and then perform self-assisted examination on the texts, thereby reducing the number of repeated examinations after submission to an examiner.
[0003] Text pre-examination is an auxiliary tool for a staff member to create and publish formal customer-oriented knowledge in a knowledge management system. Through a creation-pre-examination-examination process, the system can help the staff member to improve the quality of knowledge, reduce examination time, and reduce the burden on the staff member. High-quality customer-oriented knowledge can avoid some customer disputes and complaints, improve customer satisfaction, facilitate customers to understand and handle related businesses, and reduce the communication cost of the staff member. In addition, the text pre-examination method can be well transplanted to text examination in other fields, assist in the development of text content examination, and improve the compliance of text content.
[0004] Some currently disclosed text pre-examinations are mainly used for bidding document examination. By extracting common qualification requirements in bidding documents for different bidding projects, a common qualification examination list is formed, common qualifications in the bidding document are quickly located, and the common qualifications are quickly examined to examine the submission format of the document and whether the materials are complete, thereby assisting bid evaluation experts to quickly and efficiently complete the bid evaluation work. However, this text pre-examination method has poor universality, insufficient in-depth analysis of the content of the text, is not widely applicable, and has poor scalability. SUMMARY
[0005] In view of the above problems of the prior art, the present application aims to provide a text auditing method, device, equipment, medium and program product, which can perform more in-depth analysis on the content of a target text and improve the relevance and rationality of text analysis.
[0006] To solve the above problems, the present application provides a text auditing method, comprising:
[0007] acquiring a target text to be examined;
[0008] inputting the target text into a pre-constructed multi-task learning model, the multi-task learning model comprising a plurality of mixed expert networks corresponding to a plurality of subtasks of different analysis targets, each mixed expert network comprising a gating network and a plurality of subnetworks, and the plurality of mixed expert networks sharing the plurality of subnetworks;
[0009] acquiring analysis results of the analysis target corresponding to each of the mixed expert network outputs;
[0010] generating an audit result of the target text according to the analysis results of each of the mixed expert networks.
[0011] Further, the method further comprises:
[0012] acquiring a target text label corresponding to the target text;
[0013] determining a target scene to which the target text belongs according to the target text label;
[0014] determining a weight parameter corresponding to a gating network in each of the mixed expert networks and a network parameter of each of the sub-networks according to the target scene;
[0015] wherein inputting the target text into a pre-constructed multi-task learning model comprises:
[0016] inputting the weight parameter and the network parameter into the multi-task learning model together with the target text.
[0017] Further, the acquiring of the target text label corresponding to the target text comprises:
[0018] acquiring a first text label obtained by pre-annotating the target text;
[0019] extracting a second text label of the target text based on an LDA model;
[0020] merging the first text label and the second text label to obtain the target text label corresponding to the target text.
[0021] Further, the determining of the target scene to which the target text belongs according to the target text label comprises:
[0022] acquiring a plurality of sample texts and sample labels corresponding thereto;
[0023] matching the target text label with sample labels corresponding to each of the sample texts, respectively;
[0024] determining a scene to which a sample text corresponding to a sample label matched with the target text label belongs as the target scene to which the target text belongs.
[0025] Further, the method further comprises pre-training the multi-task learning model, and the training process of the multi-task learning model comprises:
[0026] acquiring training text data, the training text data comprising a first training text set and a second training text set;
[0027] extract text feature data of each training text in the first training text set and the second training text set respectively to obtain a feature data set;
[0028] construct a multi-task neural network, the multi-task neural network comprising a plurality of mixed expert networks corresponding to a plurality of sub-tasks of different analysis targets, each of the mixed expert networks comprising a gating network and a plurality of sub-networks, the plurality of mixed expert networks sharing the plurality of sub-networks;
[0029] train the multi-task neural network based on the feature data set with training texts in the first training text set as input data to obtain a multi-task learning model.
[0030] Further, the extracting of the text feature data of each training text in the first training text set and the second training text set respectively comprises:
[0031] obtain training text labels corresponding to each training text in the first training text set and the second training text set respectively;
[0032] extract features from the training text labels to obtain corresponding text feature data.
[0033] Further, the training of the multi-task neural network based on the feature data set with the training texts in the first training text set as input data comprises:
[0034] perform clustering analysis on the training texts in the first training text set to divide the first training text set into a plurality of training text subsets under different scenarios;
[0035] train the multi-task neural network based on the feature data set with training texts in each of the training text subsets as input data to determine weight parameters of the gating network in each of the mixed expert networks and network parameters of each of the sub-networks under the corresponding scenario.
[0036] Another aspect of the present application provides a text auditing device, comprising:
[0037] a text acquisition module configured to acquire a target text to be audited;
[0038] an input module configured to input the target text into a pre-constructed multi-task learning model, the multi-task learning model comprising a plurality of mixed expert networks corresponding to a plurality of sub-tasks of different analysis targets, each of the mixed expert networks comprising a gating network and a plurality of sub-networks, the plurality of mixed expert networks sharing the plurality of sub-networks;
[0039] An analysis result acquisition module is configured to acquire the analysis result of the corresponding analysis target output by each of the mixed expert networks.
[0040] An audit result generation module is configured to generate the audit result of the target text according to the analysis result output by each of the mixed expert networks.
[0041] In another aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the text auditing method as described above.
[0042] In another aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the text auditing method as described above.
[0043] In another aspect, the present application provides a computer program product comprising a computer program / instruction, wherein the computer program / instruction is executed by a processor to implement the steps of the text auditing method as described above.
[0044] Thanks to the above technical solutions, the present application has the following beneficial effects:
[0045] According to the text auditing method of the present application, a multi-task learning model is constructed in advance to analyze the target text to be audited, and the analysis result corresponding to multiple sub-tasks of different analysis targets is obtained, and then the audit result of the target text is obtained, without human intervention, so that automatic auditing and analysis of the text are realized. By introducing multiple analysis targets that are correlated but not consistent and using multiple libraries of features for comprehensive consideration of modeling, and by constructing multiple sub-networks to extract different feature information for combined analysis, the multi-task learning model can well consider the strong features of different tasks and the correlation between the tasks, so that the content of the target text is analyzed more deeply, and the relevance and rationality of the text analysis are improved. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0047] Figure 1 is an implementation environment schematic diagram provided by an embodiment of the present application;
[0048] Figure 2 is a flowchart of a text auditing method provided by one embodiment of the present application;
[0049] Figure 3 is a structural schematic diagram of a multi-task learning model provided by one embodiment of the present application;
[0050] Figure 4 is a flowchart of a text auditing method provided by another embodiment of the present application;
[0051] Figure 5 is a flowchart of a text auditing method provided by another embodiment of the present application;
[0052] Figure 6 is a flowchart of a training method of a multi-task learning model provided by one embodiment of the present application;
[0053] Figure 7 is a structural schematic diagram of a text auditing device provided by one embodiment of the present application;
[0054] Figure 8 is a structural schematic diagram of an electronic device provided by one embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the personnel in the art better understand the present application scheme, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.
[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, device, product or equipment including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.
[0057] For the purposes of the present disclosure, the technical solutions and advantages of the embodiments of the present application are more clearly and clearly understood, the following will be further described in detail in conjunction with the drawings and embodiments. The technical solutions of the embodiments of the present application conform to the relevant provisions of the national laws and regulations in data acquisition, storage, use, processing and the like. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, and are not used to limit the embodiments of the present application.
[0058] Reference is made to the accompanying drawings Figure 1 which shows the implementation environment schematic diagram of the text auditing method provided by an embodiment of the present application, as shown in the figure, Figure 1 The at least one client 120 and the server 110 can be directly or indirectly connected through wired or wireless communication, and the embodiments of the present application do not limit this.
[0059] The client 120 can include smart phones, tablet computers, notebook computers, desktop computers, digital assistants, smart speakers, smart wearable devices, vehicle terminals, servers and the like, and can also include software running in physical devices, such as application programs, but is not limited thereto. The operating system running on the client 120 can include but is not limited to Android system, iOS system, Linux system, Windows system and the like.
[0060] The server 110 can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or 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, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms and other basic cloud computing services.
[0061] In actual application, the client 120 can obtain the user inputted text to be audited and send it to the server 110. After receiving the text to be audited, the server 110 can adopt the text auditing method provided by the embodiments of the present application to audit the text to be audited, obtain the corresponding auditing result and feed back to the client 120.
[0062] It should be noted that, Figure 1 is only an example. Those skilled in the art can understand that although Figure 1 only two clients 120 are shown in the figure, this does not constitute a limitation on the embodiments of the present application, and more or fewer clients 120 than shown in the figure can be included.
[0063] Reference is made to the accompanying drawingsFigure 2 Fig. 1 shows a flow of a text auditing method provided by an embodiment of the present application, which can be applied to Figure 1 a server 110 in Fig. 1, and specifically as shown in Fig. 2, the method can include the following steps: Figure 2
[0064] S210: Obtain a target text to be audited.
[0065] The method provided by the embodiment of the present application can be applied to the field of general text, and is used for pre-auditing the text to verify the correctness and validity of the text. The target text can be various domain texts input by a user through a client and needing to be pre-audited, for example, can be some customer knowledge texts written by business personnel in the field of bank finance, including but not limited to product manuals, announcements, business handling manuals and business guidelines, etc. The type of the target text and the domain to which the target text belongs are not specifically limited in the embodiment of the present application.
[0066] S220: Input the target text into a pre-constructed multi-task learning model, the multi-task learning model including a plurality of mixed expert networks corresponding to a plurality of subtasks of different analysis targets, each of the mixed expert networks including a gating network and a plurality of subnetworks, and the plurality of mixed expert networks sharing the plurality of subnetworks.
[0067] In the embodiment of the present application, a plurality of mutually related but inconsistent analysis targets and a plurality of libraries of features are introduced for comprehensive consideration, a multi-task learning model is pre-constructed, and the strong features of different subtasks and the correlation between tasks can be well considered. By introducing a mixed expert (Mixture-of-Experts, MoE) network in multi-task learning using a multi-gate mixture-of-experts (MMoE) algorithm, the relationship between each subtask can be explicitly learned, and each subtask can be optimized using a threshold network to obtain more accurate analysis results.
[0068] Specifically, each subtask can correspond to a mixed expert network, and each mixed expert network can include a gating network and a plurality of subnetworks. In the MMoE algorithm, the plurality of mixed expert networks can share the plurality of subnetworks, and each subnetwork is a feedforward fully connected network. The MMoE algorithm further introduces an independent gating network for each subtask. The gating network can use input features and a softmax activation function to generate combined weights of different subnetworks, thereby allowing different subtasks to use the results of the subnetworks with different weights.
[0069] In a specific embodiment, in the field of bank finance, in combination with the attached Figure 3 The multi-task learning model 300 for auditing the opposite customer knowledge text can include a plurality of mixed expert networks corresponding to a plurality of sub-tasks of different analysis targets such as policy and regulation, internal system, legal clause, reply opinion and customer knowledge. The plurality of mixed expert networks share a policy and regulation sub-network 311, an internal system sub-network 312, a legal clause sub-network 313, a reply opinion sub-network 314 and a customer knowledge sub-network 315. The policy and regulation sub-network 311, the internal system sub-network 312, the legal clause sub-network 313, the reply opinion sub-network 314 and the customer knowledge sub-network 315 can all be a feedforward fully connected network.
[0070] Specifically, each mixed expert network can further include an independent gating network (such as 321-325 in FIG. 3) and a feature library (such as 331-335 in FIG. 3). Each gating network can be a multi-layer perceptron (MLP), and the feature library corresponds to the analysis target of the sub-task. For example, the sub-task of policy and regulation analysis corresponds to a policy and regulation feature library 331, the sub-task of internal system analysis corresponds to an internal system feature library 332, the sub-task of legal clause analysis corresponds to a legal clause feature library 333, the sub-task of reply opinion analysis corresponds to a reply opinion feature library 334, and the sub-task of customer knowledge analysis corresponds to a customer knowledge feature library 335. Figure 3 Figure 3 Each feature library can be constructed before the multi-task learning model is constructed. Specifically, the feature library can be constructed by combining the data of the analysis target of the sub-task and the corresponding label. For example, the policy and regulation feature library 331 can be constructed by combining the data of the policy and regulation analysis target and the corresponding label.
[0071] Figure 4 A plurality of knowledge bases can be constructed in advance, such as a policy and regulation base, an internal system base, a legal clause base, a reply opinion base, and a customer knowledge base. The core content of the policy and regulation base is derived from official documents of the government, such as documents of the People's Bank of China, documents of the China Banking and Insurance Regulatory Commission, documents of the Development and Reform Commission, documents of the China Securities Regulatory Commission, official websites of local governments, and documents of the Department of Human Resources. When a business staff uploads a document to the policy and regulation base, the document content needs to be manually labeled with tags, including but not limited to regulation number, issuing unit, time effectiveness, etc. The internal system refers to some internal documents, announcements, and internal control and compliance documents of the company. Similarly, when a business staff uploads a document to the internal system base, the document content needs to be manually labeled with tags, including but not limited to associated products, document number, document time, document department, time effectiveness, etc. The data of the legal clause base is derived from the national legal database, such as financial laws and regulations in the banking and financial field, and the internal control and compliance base of the national legal database. The internal control and compliance base includes internal control and compliance documents of the company. When a business staff uploads a document to the legal clause base, the document needs to be manually labeled with tags, including but not limited to compliance number, document department, time effectiveness, etc. The reply opinion refers to the audit opinion of the audit personnel in the customer knowledge publishing process, which generally includes modification opinions, explanations of the modified content, or audit passing opinions. The core content of the customer knowledge base is mainly some product manuals, announcements, business handling manuals, and business guidelines written by business staff.
[0072] Specifically, in combination with the reference description attached Figure 4 In addition, a corresponding tag base can be constructed based on each of the above knowledge bases. The tag base can include text tags of each text in the corresponding knowledge base, and the text tags can include first text tags obtained by manual annotation and second text tags extracted by the system. For example, based on the constructed policy and regulation base, internal system base, legal clause base, reply opinion base, and customer knowledge base, a policy and regulation tag base, internal system tag base, legal clause tag base, reply opinion tag base, and customer knowledge tag base can be obtained.
[0073] It should be noted that the text tags in the tag base can be used for dimension reduction expression of the text content on the one hand, and for feature extraction on the other hand, to construct a feature base as a gating training data of a multi-task learning model, and on the other hand, for label similarity comparison, to compare whether the target text tags of a target text are similar when scene subdivision is performed.
[0074] In actual application, the business personnel can manually label the text in the plurality of knowledge bases with a label to obtain a corresponding first text label. The system can also extract the label of the text in the plurality of knowledge bases, and perform dimension reduction extraction, information compression on the text to obtain a corresponding second text label. For example, the Latent Dirichlet Allocation (LDA) topic model method can be used to extract important keywords of each text as the result of system label extraction. Specifically, the label manually labeled by the business personnel can be used as the training data of the LDA model to train the LDA model. When performing system label extraction, the text can be first read into a data frame by using the pandas tool; then the stop word list and the user dictionary are loaded, and the accurate mode of the jieba tool is used to perform word segmentation processing on each text; then the Term Frequency-Inverse Document Frequency (TF-IDF) is trained to obtain a TF-IDF matrix as the input of the LDA model; the LDA model in the sklearn package is used, the solving algorithm of the parameter is set to online, 6 topics are set as the output, and a topic word representing each topic is output, and finally 6 keywords are obtained to represent the label of the text.
[0075] It should be noted that the above-mentioned label extraction method is only an example, and in some possible embodiments, other label extraction methods in the prior art can also be used to extract the label of the text in the plurality of knowledge bases, and the embodiments of the present application do not make specific limitations thereto.
[0076] Specifically, in combination with the description of the accompanying drawings Figure 4 After the label library is constructed, various feature extraction algorithms in the prior art can be used to perform feature extraction on the labels in each of the label libraries to obtain the corresponding feature library of the plurality of knowledge bases. For example, the labels in the constructed policy and regulation label library, internal system label library, legal clause label library, reply opinion label library and face customer knowledge label library can be subjected to feature extraction to obtain the policy and regulation feature library, internal system feature library, legal clause feature library, reply opinion feature library and face customer knowledge feature library.
[0077] In the embodiments of the present application, after the target text is input into the multi-task learning model, the multi-task learning model can first perform feature extraction on the target text to obtain the feature value x of the target text, then each of the gating networks can be used to generate the corresponding sub-network weight of the target text based on the feature value x, and finally the sub-network weight is combined and fused with the feature data in the corresponding feature library to obtain the analysis result corresponding to each sub-task.
[0078] Specifically, each of the gating networks can be a multi-layer perceptron, and a linear transformation and a softmax layer are added during calculation, denoted as:
[0079] g k (x)=softmax(W gk x)
[0080] wherein g k (x) is the output of the gating network corresponding to the kth subtask, i.e., the combined weight of different subnetworks, representing the probability of selecting different subnetworks, and W gk is the weight parameter of the gating network.
[0081] Specifically, the weighted sum of multiple subnetworks using the output of the gating network can be obtained as:
[0082]
[0083] wherein f k (x) is the calculation result corresponding to the kth (1≤k≤m, m is the number of subtasks) subtask, f(x) i is the output result of the ith subnetwork, and n represents the number of subnetworks. Figure 3 For the multi-task learning model as shown in
[0084] Specifically, the output of the kth subtask is represented as:
[0085] y k =h k f k (x)
[0086] wherein y k is the analysis result corresponding to the kth subtask, and h k is the feature data of the feature library corresponding to the kth subtask.
[0087] In the embodiment of the application, if the input is a similar task text, the parameters are shared, the modes are shared, and they are complementary to each other, if there is no similar task text, independent learning is performed, and they do not affect each other.
[0088] It can be understood that the multi-task learning model not only obtains information from a single library, but also considers the association relationship between the libraries as a feature, and the underlying parameters and network structure are shared for different subtasks, and then the upper layer obtains the output of the corresponding subtask through different neural networks. If the analysis of a certain subnetwork on the text is not considered, the weight parameter W gkThe control is performed so that the construction of the whole model has strong business meaning, and the business personnel can manually intervene. Through the business participable optimization mode, the output result of the whole auditing process can be better intervened, and the business change and development are adapted.
[0089] In addition, with the development of the business, the sub-networks can be increased or decreased at any time, and other business field text libraries can be added, so that the whole model is continuously developed, and the whole model has strong scalability.
[0090] In the embodiment of the application, the training text data of the existing auditing result can be used in advance, and supervised training is performed based on the pre-constructed multi-task neural network to obtain the multi-task learning model. It should be noted that the training process of the multi-task learning model will be described in detail in subsequent embodiments.
[0091] S230: obtaining the analysis result of the corresponding analysis target output by each mixed expert network.
[0092] In the embodiment of the application, since the multi-task learning model includes a plurality of mixed expert networks corresponding to a plurality of sub-tasks of different analysis targets, each mixed expert network can obtain the analysis result of the target text corresponding to the sub-task, and therefore, a plurality of analysis results of different analysis targets can be obtained based on the multi-task learning model.
[0093] Exemplarily, for the multi-task learning model 300 as shown in Figure 3 The analysis result corresponding to a plurality of sub-tasks of different analysis targets such as policy and regulation, internal system, legal clause, reply opinion and customer knowledge can be obtained.
[0094] In a specific embodiment, in the field of bank finance, the prepayment manual is a kind of customer knowledge text, which is mainly used for customer consultation of personal housing loan prepayment business, and mainly involves the policy of local public accumulation fund loan center, the agreement of personal mortgage loan contract, the matters needing attention of entrusted loan, and the repayment matters of mixed loan. After the business personnel complete a prepayment manual, the prepayment manual can be input into the multi-task learning model 300 as shown in Figure 3 The analysis results output by the plurality of mixed expert networks in the multi-task learning model 300 are as follows:
[0095] The network output corresponding to the policy and regulation: Loan Responsibility, issuing unit: People's Bank of China, Housing Accumulation Fund Management Regulations, downloaded from Chengdu Public Accumulation Fund Center website, www.cdfgjj.gov.cn, Chengdanfa
[2008] No. 50.
[0096] The network output corresponding to the internal system is: the contract of personal housing (commercial housing) loan, the loan period is verified according to the (Sichuan) knowledge base verification information application form, and the customer return sheet.
[0097] The network output corresponding to the legal provisions is: the reply of the Supreme People's Court on the issue of the application of the provisions of the General Principles of Civil Law to the lawsuit of the overdue two years of the loan of the enterprise or individual to the state bank, and the temporary measures for personal loans.
[0098] The network output corresponding to the reply opinion is: supplement the relevant response range.
[0099] The network output corresponding to the customer knowledge is: the personal loan repayment mode of Jilin, the personal loan repayment business, and the list of network points.
[0100] Among them, the network generation result corresponding to the reply opinion can be used as the reference of the audit opinion of the auditors; the network output result corresponding to the policy and regulations can show the content, number and effective period of the regulations referred to by the target text, which can help the auditors to intuitively understand whether the content of the created text is correctly quoted and whether it is within the effective period. The network output results corresponding to the internal system, the legal provisions and the policy and regulations are similar to the network output results corresponding to the policy and regulations; and through the network output results corresponding to the customer knowledge, it can be seen whether there are repeated paragraphs and contradictory paragraphs mentioned.
[0101] S240: generating the audit result of the target text according to the analysis results of each mixed expert network output.
[0102] In the embodiment of the application, the analysis results of each mixed expert network output can be directly combined as the audit result of the target text, or the analysis results of each mixed expert network output can be displayed in the original text of the target text through the marking form, so as to obtain the audit result of the target text.
[0103] Exemplarily, in the field of bank finance, the analysis results of each mixed expert network output in the multi-task learning model 300 can be directly displayed in the original text of the customer knowledge text through the marking form.
[0104] It can be understood that, by adopting the method provided by the embodiment of the present application, the customer-facing knowledge text written by the business personnel can be pre-audited, and it can be checked whether there are errors in the content and whether there are missing text information. After the audit is completed, the multi-dimensional results such as the source of the reference, the output analysis result of each analysis target, the part not recognized, and the original content not detected can be highlighted and marked. This can effectively help the knowledge audit personnel to quickly check the correctness of the information, confirm the information source, judge the effectiveness of the knowledge, and determine whether there is a repeated article publishing, thereby effectively verifying the correctness and effectiveness of the customer-facing knowledge written by the business personnel.
[0105] In addition, by prompting the user through technical means, the quality and compliance of the text content can be improved, and high-quality customer-facing knowledge can avoid some customer disputes and complaints, improve customer satisfaction, facilitate the customer to understand and handle related business, and reduce the communication cost of the staff.
[0106] In one possible embodiment, in combination with the description of the accompanying drawings Figure 5 The method can further include the following steps:
[0107] S211: Obtain a target text label corresponding to the target text.
[0108] In the embodiment of the present application, the target text label can include a first text label obtained by manual annotation and a second text label extracted by a system.
[0109] Optionally, the step of obtaining the target text label corresponding to the target text can include: obtaining a first text label obtained by pre-annotating the target text; extracting a second text label of the target text based on an LDA model; and merging the first text label and the second text label to obtain the target text label corresponding to the target text.
[0110] Specifically, the business personnel can manually annotate the target text to obtain a corresponding first text label, and the system can extract the label of the target text to obtain a corresponding second text label. The specific method of extracting the label by the system can refer to the specific content of the method embodiment shown in the description of the accompanying drawings, which will not be described here again in the embodiment of the present application. Figure 2
[0111] S212: Determine a target scene to which the target text belongs according to the target text label.
[0112] In the embodiment of the present application, because the starting point of the creation of each text is different, the emphasis is different, and / or the writing scene is different, it cannot be completely represented by a standard unified model. Therefore, a scene subdivision analysis layer can be added, so as to improve the analysis accuracy of a specific scene.
[0113] Optionally, the determining the target scenario to which the target text belongs according to the target text label can include: obtaining a plurality of sample texts and corresponding sample labels; matching the target text label with each sample label corresponding to each sample text; and determining the scenario to which the sample text corresponding to the sample label matched with the target text label belongs as the target scenario to which the target text belongs.
[0114] The sample text can be a text in each scenario, and various similarity calculation methods in the prior art can be used to calculate the similarity between the target text label and each sample label, and the sample label with the highest similarity to the target text label is taken as the sample label matched with the target text label, so as to determine the target scenario to which the target text belongs.
[0115] For example, for a customer knowledge text written by a business staff, the label of the customer knowledge text can be compared with the labels in the customer knowledge label library, an article with a similar label is found, and the scenario to which the article belongs is taken as the target scenario to which the customer knowledge text belongs.
[0116] Optionally, various text classification methods in the prior art can also be used to classify the target text, so as to determine the target scenario to which the target text belongs according to the type of the target text. Different types of texts can correspond to different scenarios.
[0117] It should be noted that the texts in different business fields in the embodiment of the present application can correspond to different scenarios. For example, in the banking and financial field, different customer knowledge texts can be clustered and analyzed by using a K-means clustering method to form a plurality of scenarios such as product information and marketing support, legal compliance risk prompt, business process operation guide, green financial credit development, etc. When a business staff writes an article related to a scenario, the clustering analysis can express the sub-network characteristic values with relatively strong correlation. The specific content of the K-means clustering method can refer to the prior art, and will not be described herein again.
[0118] S213: determining the weight parameter of the gating network in each mixed expert network in the multi-task learning model and the network parameter of each sub-network according to the target scenario.
[0119] In the embodiment of the present application, because the starting point of creation of each scene text is different, the emphasis is different and / or the writing scene is different, the sub-network parameters of each scene are very different, so the training text data in different scenes can be used to supervise the training based on the pre-constructed multi-task neural network to obtain different weight parameters and network parameters. The network parameters and the weight parameters can represent a specific scene.
[0120] In the embodiment of the present application, after determining the target scene to which the target text belongs, the weight parameters and the network parameters corresponding to the target scene can be obtained, and the parameters and the target text are input into the constructed multi-task learning model to generate the review result of the target text.
[0121] Correspondingly, the step of inputting the target text into the pre-constructed multi-task learning model (step S220) can be:
[0122] S220': inputting the weight parameters and the network parameters into the multi-task learning model together with the target text.
[0123] In the embodiment of the present application, the weight parameters corresponding to the gating network in each mixed expert network and the network parameters of each sub-network in the multi-task learning model can be assigned by using the weight parameters and the network parameters corresponding to the target scene, and then the target text is analyzed by using the assigned multi-task learning model to obtain the final review result.
[0124] It can be understood that, by increasing the scene judgment mode, when the text to be reviewed is obtained, the corresponding weight parameters and network parameters of the scene to which the text belongs are determined through clustering analysis and scene subdivision, and then the weight parameters and the network parameters are used as the initialization parameters of the multi-task learning model to analyze the text and obtain the review result, which can further improve the accuracy of the review result and better adapt to the changes and development of the business.
[0125] In summary, according to the text review method of the embodiment of the present application, the target text to be reviewed is analyzed by using the pre-constructed multi-task learning model to obtain the analysis results of multiple sub-tasks corresponding to different analysis targets, and then the review result of the target text is obtained, without human participation, realizing the automatic review and analysis of the text. By introducing multiple analysis targets that are related but not consistent and using multiple libraries of features for comprehensive consideration of modeling, and by constructing multiple sub-networks to extract different feature information for combined analysis, the multi-task learning model can well consider the strong features of different tasks and the correlation between tasks, so that the content of the target text can be analyzed more deeply, and the relevance and rationality of the text analysis are improved.
[0126] In addition, the method provided by the embodiment of the present application can be applied to text pre-examination in various fields, and can assist in the development of text content examination work, and has wide application fields and good universality.
[0127] Reference is made to the accompanying drawings Figure 6 which shows a flow of a training method of a multi-task learning model provided by an embodiment of the present application, and specifically as shown in Figure 6 The method can include the following steps:
[0128] S610: Obtain training text data, which includes a first training text set and a second training text set.
[0129] In the embodiment of the present application, multiple text data of different types in the same business field can be obtained as training text data. The training text in the first training text set can be the same type of text as the text to be examined, and the training text in the second training text set can be a different type of text from the text to be examined. The second training text set can include only one type of training text or multiple types of training text. The type of training text can be determined according to the analysis target of the text examination task.
[0130] For example, in combination with the accompanying drawings Figure 4 In the banking and financial field, multiple knowledge bases such as a policy and regulation base, an internal system base, a legal clause base, a reply opinion base, and a customer knowledge base can be constructed in advance. The customer knowledge base is used as the first training text set, and the policy and regulation base, the internal system base, the legal clause base, and the reply opinion base are used as the second training text set to train a multi-task learning model that can analyze customer knowledge text from multiple perspectives such as policy and regulation, internal system, legal clause, reply opinion, and customer knowledge. The specific content of each knowledge base can be referred to the method embodiment provided by Figure 2 The embodiment of the present application will not be described here.
[0131] It can be understood that by introducing the standard system base, the reference can be based on the content, and by introducing the reply opinion base, the examination opinion of the submitted text can be predicted, and by introducing the customer knowledge base, it can be determined whether a similar article has been published or whether an ambiguous article has been published.
[0132] In the embodiment of the present application, after obtaining the training text data, the analysis results of multiple analysis targets can be obtained by manually examining each training text in the first training text set, and then the training text data carrying the manual examination results is obtained.
[0133] S620: Extract text feature data of each training text in the first training text set and the second training text set respectively to obtain a feature data set.
[0134] In the embodiment of the present application, various feature extraction methods in the prior art can be used to extract the text feature data of each training text to obtain the feature data set.
[0135] Optionally, the extracting the text feature data of each training text in the first training text set and the second training text set respectively can include: obtaining a training text label corresponding to each training text in the first training text set and the second training text set respectively; and performing feature extraction on the training text label to obtain corresponding text feature data.
[0136] Specifically, the training text label of each training text can be determined first, and feature extraction is performed on the training text label to obtain corresponding text feature data. The training text label can include a manually annotated label and / or a system extracted label.
[0137] For example, in combination with the accompanying drawings, the first text label of each training text in the first training text set and the second training text set can be manually annotated, and the second text label of each training text in the first training text set and the second training text set can be extracted by a system. Figure 4 In the field of bank finance, the text in the plurality of knowledge bases can be manually annotated to obtain corresponding first text labels, and the text in the plurality of knowledge bases can also be systemically extracted to obtain corresponding second text labels, and then a label library corresponding to each knowledge base can be constructed. Further, various feature extraction algorithms in the prior art can be used to perform feature extraction on the labels in each of the label libraries, and a feature library corresponding to the plurality of knowledge bases can be obtained.
[0138] It should be noted that the specific content of systemically extracting text labels can refer to the specific content provided by the method embodiment shown in Figure 2 The embodiment of the present application will not be described here again.
[0139] S630: Construct a multi-task neural network, the multi-task neural network including a plurality of sub-task corresponding mixed expert networks of different analysis targets, each of the mixed expert networks including a gating network and a plurality of sub-networks, the plurality of mixed expert networks sharing the plurality of sub-networks.
[0140] In the embodiment of the present application, a plurality of mutually related but inconsistent analysis targets and a plurality of library features can be introduced for comprehensive consideration, the MMoE algorithm can be used to introduce the MoE network in multi-task learning, to explicitly learn the relationship between each sub-task, and the threshold network can be used to optimize each sub-task to obtain more accurate analysis results.
[0141] In the embodiment of the present application, the number of sub-tasks can be determined according to the number of analysis targets. For example, for the face-to-customer knowledge text in the field of bank finance, it is necessary to analyze it from multiple angles such as policy and regulation, internal system, legal provisions, reply opinion and face-to-customer knowledge, so a mixed expert network corresponding to 5 sub-tasks can be constructed.
[0142] In the embodiment of the present application, because each type of training text data has different characteristics, a corresponding sub-network is constructed separately, that is, the number of sub-networks can be determined according to the type of training text data. The number of sub-networks can be the same as or different from the number of sub-tasks, and preferably the number of sub-networks is the same as the number of sub-tasks. For example, assuming that the training text data includes texts of the types of policy and regulation, internal system, legal provisions, reply opinion and face-to-customer knowledge, then 5 sub-networks of policy and regulation sub-network, internal system sub-network, legal provisions sub-network, reply opinion sub-network and face-to-customer knowledge sub-network can be constructed.
[0143] It can be understood that in the embodiment of the present application, sub-networks can be added according to the needs of different business fields to expand the scope of review business, and the information of all knowledge bases can be well utilized to solve the problems of cold start and shared data in the sub-network scene, and multiple analysis results can be increased.
[0144] In the embodiment of the present application, a mixed expert network can be constructed for each sub-task, and each mixed expert network can share multiple sub-networks constructed, and each sub-network can be a feedforward fully connected network. The MMoE algorithm also introduces an independent gating network for each sub-task. The gating network can use input features and a softmax activation function to generate combined weights of different sub-networks, thereby allowing different sub-tasks to use the results of sub-networks with different weights.
[0145] It should be noted that the specific content of the multi-task neural network can refer to the specific content of the method embodiment shown in Figure 2 The embodiment of the present application will not be described here any more.
[0146] S640: Training the multi-task neural network based on the feature data set with the training text in the first training text set as input data to obtain a multi-task learning model.
[0147] In the embodiment of the present application, the feature data set can be classified according to the analysis target to obtain multiple feature libraries with different characteristics, and the multi-task neural network is trained based on the multiple feature libraries with the training text in the first training text set as input data and the corresponding artificial review result as supervision to obtain a multi-task learning model.
[0148] In a possible embodiment, after obtaining the training text data, the training text data can be classified according to the analysis target to obtain different types of training text sets. Then, the text feature data of the training text in each training text set is extracted to obtain multiple feature libraries with different features. In the model training process, the training text in the first training text set is taken as the input data, the corresponding artificial review result is taken as the supervision, and the multi-task neural network is trained based on the multiple feature libraries to obtain a multi-task learning model.
[0149] Exemplarily, the training text data in the bank financial field can be divided into a policy and regulation library, an internal system library, a legal clause library, a reply opinion library and a customer knowledge library, and the text feature data of each text in each knowledge library is extracted to obtain a corresponding policy and regulation feature library, an internal system feature library, a legal clause feature library, a reply opinion feature library and a customer knowledge feature library. In combination with the reference description attached Figure 4 The text in the customer knowledge library can be taken as the input data, the corresponding artificial review result is taken as the supervision, and the multi-task neural network is trained based on the policy and regulation feature library, the internal system feature library, the legal clause feature library, the reply opinion feature library and the customer knowledge feature library to obtain a multi-task learning model for reviewing the customer knowledge text.
[0150] It should be noted that in the embodiment of the present application, the feature library can correspond to the analysis target one by one.
[0151] It can be understood that, by constructing a multi-task learning network including multiple sub-networks and a hybrid expert network corresponding to the sub-tasks of multiple different analysis targets sharing the multiple sub-networks, and training the multi-task learning network, a multi-task learning model for text review can be obtained, the training method is simple, and the content of the target text can be analyzed more deeply by using the multi-task learning model, thereby improving the relevance and rationality of text analysis.
[0152] In a possible embodiment, the training of the multi-task neural network based on the feature data set with the training text in the first training text set as the input data can include: clustering analysis of the training text in the first training text set to divide the first training text set into multiple training text subsets under different scenarios; taking the training text in each training text subset as the input data, training the multi-task neural network based on the feature data set to determine the weight parameters of the gating network in each hybrid expert network corresponding to the scenario and the network parameters of each sub-network.
[0153] In practical applications, due to different starting points, different focuses and / or different writing scenes of each text, a standard unified model cannot completely represent. Therefore, a scene subdivision analysis layer can be added to improve the analysis accuracy of specific scenes.
[0154] Specifically, the first training text set can be divided into multiple training text subsets in different scenes by using a K-means clustering method, and the weight parameters corresponding to each gating network and the network parameters of each subnetwork in different scenes are trained based on the training texts in each training text subset, so that in the subsequent process of using the multi-task learning model, the texts to be audited in different scenes are audited by using the multi-task learning model with different weight parameters and network parameters, and the accuracy of text auditing is further improved.
[0155] For example, referring to the accompanying drawings Figure 4 In the field of bank finance, the texts in the customer knowledge base can be divided into text subsets in scenes such as product information and marketing support, legal compliance risk prompt, business process operation guide, green financial credit development, and the weight parameters corresponding to each gating network and the network parameters of each subnetwork in different scenes are trained based on each text subset. When the customer knowledge text is audited subsequently, scene subdivision analysis can be performed to obtain the corresponding text auditing result.
[0156] It should be noted that the specific content of the model training process in the embodiments of the present application can refer to the prior art, and the embodiments of the present application will not be repeated here.
[0157] It can be understood that, by increasing the scene judgment mode, different network parameters and weight parameters are trained for different scenes, and when the target text is audited subsequently, the weight parameters and network parameters corresponding to the scene to which the target text belongs can be determined through clustering analysis and scene subdivision, and then the target text is audited and analyzed by taking the weight parameters and the network parameters as the initialization parameters of the multi-task learning model, and the result of the auditing is obtained, which can further improve the accuracy of the auditing result.
[0158] For example, referring to the accompanying drawings Figure 7 which shows the structure of a text auditing device 700 provided by an embodiment of the present application. As shown in the figure, Figure 7 The device 700 can include:
[0159] A text acquisition module 710 is configured to acquire a target text to be audited.
[0160] The input module 720 is configured to input the target text into a pre-constructed multi-task learning model, the multi-task learning model including a plurality of mixed expert networks corresponding to a plurality of subtasks of different analysis targets, each of the mixed expert networks including one gating network and a plurality of subnetworks, the plurality of mixed expert networks sharing the plurality of subnetworks.
[0161] The analysis result acquisition module 730 is configured to acquire analysis results of the corresponding analysis targets output by each of the mixed expert networks.
[0162] The review result generation module 740 is configured to generate a review result of the target text according to the analysis results output by each of the mixed expert networks.
[0163] In one possible implementation, the apparatus 700 can further include:
[0164] The label acquisition module is configured to acquire a target text label corresponding to the target text.
[0165] The scene determination module is configured to determine a target scene to which the target text belongs according to the target text label.
[0166] The parameter determination module is configured to determine a weight parameter corresponding to the gating network in each of the mixed expert networks and a network parameter of each of the subnetworks according to the target scene.
[0167] The input module 720 is specifically configured to input the weight parameter and the network parameter into the multi-task learning model together with the target text.
[0168] In one possible implementation, the apparatus 700 can further include a model training module configured to pre-train the multi-task learning model, and the model training module can include:
[0169] The data acquisition unit is configured to acquire training text data, the training text data including a first training text set and a second training text set.
[0170] The feature extraction unit is configured to extract text feature data of each training text in the first training text set and the second training text set respectively, to obtain a feature data set.
[0171] The model construction unit is configured to construct a multi-task neural network, the multi-task neural network including a plurality of mixed expert networks corresponding to a plurality of subtasks of different analysis targets, each of the mixed expert networks including one gating network and a plurality of subnetworks, the plurality of mixed expert networks sharing the plurality of subnetworks.
[0172] A model training unit is configured to train the multi-task neural network based on the feature data set by taking the training text in the first training text set as input data, to obtain a multi-task learning model.
[0173] It should be noted that the apparatus provided in the above embodiments, in realizing its functions, only takes the above-mentioned division of each functional module as an example, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above-described functions. In addition, the apparatus provided in the above embodiments and the corresponding method embodiments belong to the same concept, and the specific implementation process is detailed in the corresponding method embodiments, which will not be described here.
[0174] One embodiment of the present application also provides an electronic device, which comprises a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the text auditing method provided in the above method embodiments.
[0175] The memory can be used to store software programs and modules, and the processor can execute various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory can also include a memory controller to provide access of the processor to the memory.
[0176] With reference to the accompanying drawings described in the specification Figure 8 , a block diagram of an electronic device 800 according to one embodiment of the present application is shown. The electronic device 800 can include one or more processors 802, system control logic 808 connected to at least one of the processors 802, system memory 804 connected to the system control logic 808, non-volatile memory (NVM) 806 connected to the system control logic 808, and a network interface 810 connected to the system control logic 808.
[0177] The processor 802 can include one or more single-core or multi-core processors. The processor 802 can include any combination of general-purpose processors and dedicated processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments herein, the processor 802 can be configured to perform one or more embodiments according to various embodiments as shown in Figures 2 to 6 .
[0178] In some embodiments, system control logic 808 can include any suitable interface controllers to provide for any suitable interface to at least one of the processors 802 and / or to any suitable device or component in communication with system control logic 808.
[0179] In some embodiments, system control logic 808 can include one or more memory controllers to provide an interface to system memory 804. System memory 804 can be used to load and store data and / or instructions. In some embodiments, memory 804 of device 800 can include any suitable volatile memory, such as suitable dynamic random access memory (DRAM).
[0180] NVM / memory 806 can include one or more tangible, non-transitory computer- readable media used for storage of data and / or instructions. In some embodiments, NVM / memory 806 can include any suitable non-volatile storage, such as flash memory and / or any suitable non-volatile storage device, such as at least one of a Hard Disk Drive (HDD), a Compact Disc (CD) drive, a Digital Versatile Disc (DVD) drive.
[0181] NVM / memory 806 can include a portion of the storage resources installed on the device 800 or it can be accessed by the device but not necessarily a part of the device. For example, NVM / memory 806 can be accessed over a network via network interface 810.
[0182] In particular, system memory 804 and NVM / memory 806 can include, respectively, a temporary copy of and a permanent copy of instructions 820. Instructions 820 can include instructions that, when executed by at least one of processors 802, cause device 800 to implement a text auditing method as shown in FIG. 8. In some embodiments, instructions 820, hardware, firmware, and / or software components thereof can additionally / alternatively be placed in system control logic 808, network interface 810, and / or processors 802. Figures 2 to 6
[0183] The network interface 810 can include a transceiver for providing radio interface for the device 800 to communicate with any other suitable devices (e.g., front end modules, antennas, etc.) over one or more networks. In some embodiments, the network interface 810 can be integrated with other components of the device 800. For example, the network interface 810 can be integrated with a communication module of the processor 802, the system memory 804, the NVM / memory 806, and firmware devices (not shown) having instructions that, when executed by at least one of the processors 802, enable the device 800 to implement Figures 2 to 6 one or more embodiments of the various embodiments shown.
[0184] The network interface 810 can further include any suitable hardware and / or firmware for providing a multiple-input multiple-output radio interface. For example, the network interface 810 can be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.
[0185] In one embodiment, at least one of the processors 802 can be packaged with logic for one or more controllers of the system control logic 808 to form a system in a package (SiP). In one embodiment, at least one of the processors 802 can be integrated on the same die with logic for one or more controllers of the system control logic 808 to form a system on a chip (SoC).
[0186] The device 800 can further include an input / output (I / O) device 812. The I / O device 812 can include a user interface that enables a user to interact with the device 800; a peripheral component interface that enables peripheral components to interact with the device 800. In some embodiments, the device 800 also includes sensors for determining at least one of environmental conditions and location information related to the device 800.
[0187] In some embodiments, the user interface can include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., a light emitting diode flash), and a keypad.
[0188] In some embodiments, the peripheral component interface can include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
[0189] In some embodiments, the sensors can include, but are not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit can also be part of or interact with the network interface 810 to communicate with components of a positioning network (e.g., global positioning system (GPS) satellites).
[0190] It can be understood that the structural schematic of the embodiments of the present application does not constitute a specific limitation to the electronic device 800. In other embodiments of the present application, the electronic device 800 can include more or less components than the schematic, or combine some components, or split some components, or different arrangement of components. The components of the schematic can be implemented in hardware, software or a combination of software and hardware.
[0191] An embodiment of the present application further provides a computer readable storage medium, which can be arranged in an electronic device to save at least one instruction or at least one program related to a text review method, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the text review method provided by the method embodiments.
[0192] Optionally, in the embodiments of the present application, the storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk and various storage program codes.
[0193] An embodiment of the present application further provides a computer program product, which includes computer programs / instructions, and when the computer program product is run on an electronic device, the computer programs / instructions are loaded and executed by the processor to implement the steps of the text review method provided in the various optional embodiments.
[0194] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments. And the above-mentioned description is for specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be executed in different order from the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or can be advantageous.
[0195] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts of each of the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Especially, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0196] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or can be instructed to relevant hardware by program. The program can be stored in a computer readable storage medium, and the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0197] The above description is merely preferred embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A text review method, characterized in that, include: Obtain the target text to be reviewed; Obtain the target text tag corresponding to the target text; The target scene to which the target text belongs is determined based on the target text tag; The weight parameters and network parameters, along with the target text, are input into a pre-constructed multi-task learning model. The multi-task learning model includes hybrid expert networks corresponding to multiple sub-tasks for different analysis objectives. Each hybrid expert network includes a gating network and multiple sub-networks, and the multiple hybrid expert networks share the multiple sub-networks. The weight parameters corresponding to the gating network in each hybrid expert network and the network parameters of each sub-network are determined according to the target scenario. Obtain the analysis results corresponding to the analysis objectives output by each of the hybrid expert networks; The review results of the target text are generated based on the analysis results output by each of the hybrid expert networks.
2. The method according to claim 1, characterized in that, The step of obtaining the target text tag corresponding to the target text includes: Obtain the first text tag obtained by pre-annotating the target text; Extract the second text tag of the target text based on the LDA model; The first text tag and the second text tag are merged to obtain the target text tag corresponding to the target text.
3. The method according to claim 1, characterized in that, The step of determining the target scene to which the target text belongs based on the target text tag includes: Obtain multiple sample texts and their corresponding sample labels; The target text labels are matched with the sample labels corresponding to each of the sample texts; The scene to which the sample text corresponding to the sample tag that matches the target text tag belongs is determined as the target scene to which the target text belongs.
4. The method according to claim 1, characterized in that, The method further includes pre-training the multi-task learning model, the training process of which includes: Acquire training text data, which includes a first training text set and a second training text set; The text feature data of each training text in the first training text set and the second training text set are extracted respectively to obtain the feature dataset; A multi-task neural network is constructed, which includes hybrid expert networks corresponding to multiple sub-tasks with different analysis objectives. Each hybrid expert network includes a gating network and multiple sub-networks, and the multiple hybrid expert networks share the multiple sub-networks. Using the training texts in the first training text set as input data, the multi-task neural network is trained based on the feature dataset to obtain a multi-task learning model.
5. The method according to claim 4, characterized in that, The step of extracting text feature data for each training text in the first training text set and the second training text set includes: Obtain the training text label corresponding to each training text in the first training text set and the second training text set, respectively; Feature extraction is performed on the training text labels to obtain the corresponding text feature data.
6. The method according to claim 4, characterized in that, The step of training the multi-task neural network based on the feature dataset, using training texts from the first training text set as input data, includes: Cluster analysis is performed on the training texts in the first training text set to divide the first training text set into training text subsets in multiple scenarios; The multi-task neural network is trained based on the feature dataset, using the training texts in each of the training text subsets as input data, to determine the weight parameters of the gating network in each of the hybrid expert networks and the network parameters of each of the sub-networks in the corresponding scenario.
7. A text verification device, characterized in that, The device includes: A text acquisition module is used to acquire the target text to be reviewed; acquire the target text tag corresponding to the target text; and determine the target scene to which the target text belongs based on the target text tag. An input module is used to input weight parameters and network parameters along with the target text into a pre-constructed multi-task learning model. The multi-task learning model includes hybrid expert networks corresponding to multiple sub-tasks of different analysis objectives. Each hybrid expert network includes a gating network and multiple sub-networks, and the multiple hybrid expert networks share the multiple sub-networks. The weight parameters corresponding to the gating network in each hybrid expert network and the network parameters of each sub-network are determined based on the target scene. The analysis result acquisition module is used to acquire the analysis results of the corresponding analysis targets output by each of the hybrid expert networks; The review result generation module is used to generate the review result of the target text based on the analysis results output by each of the hybrid expert networks.
8. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the text review method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the text review method as described in any one of claims 1-6.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the text review method as described in any one of claims 1-6.
Citation Information
Patent Citations
Multimedia resource classification model training method and multimedia resource recommendation method
CN113590849A
Content auditing method and system based on multi-task learning
CN116109276A