Target object description information output control method and device
The pre-trained language model processes standardized requests and generates accurate target object description information, which solves the problem of inconsistent description information from different departments within the enterprise and improves the efficiency and accuracy of information acquisition.
Patent Information
- Application Number
- CN202410836712.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-20
AI Technical Summary
Within an enterprise, different departments or positions have different descriptions of the same object, resulting in employees needing to consult multiple departments or teams to obtain accurate descriptions, which is inefficient and inaccurate.
Using a pre-trained language model, by receiving the description information and application scenario information in the standardized request, the general module and processing module are used to generate standardized description information, and sub-module processing is performed according to the account category to improve the accuracy and efficiency of the description information.
It effectively improves the efficiency and accuracy of obtaining target object description information, reduces the time and energy of employees communicating in different departments, and provides description information that matches the usage scenarios and employees.
Smart Images

Figure CN118673135A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for controlling the output of target object description information. Background Art
[0002] In an enterprise, employees in different departments or positions may have different descriptions of the same object or the same information. Therefore, in order to obtain appropriate and accurate description information of an object, employees need to manually consult multiple departments or teams. For example, customer portrait information is the cornerstone for all industries to provide precise services to customers. However, in an enterprise, the description information used for the same portrait is different in different departments, different positions or different business scenarios. For example, the description information of a portrait by the business department is a sentence, while the description of the portrait by the technical department may be a string of code. Accurate portrait description information is the basis for obtaining portraits or providing services to users based on portraits, so it is crucial to provide accurate portrait description information for each employee in the enterprise. At present, if employees want to obtain accurate description information of a portrait, they need to consult multiple departments or teams, which is time-consuming, labor-intensive and inefficient. Summary of the invention
[0003] The present application provides a method and device for controlling the output of target object description information, which uses a pre-trained language model to automatically output accurate description information for the target object, thereby improving the efficiency of obtaining description information of the target object.
[0004] In a first aspect, the present application proposes a method for controlling output of target object description information, comprising:
[0005] Receive a standardization request for description information; the description information is used to describe a target object, and the standardization request carries application scenario information of the description information for which standardization is requested;
[0006] The application scenario information and the description information are input into a general module of a pre-trained language model, a phrase for standardizing the description information is output, and the phrase is input into a processing module of the language model to output the standardized description information; wherein the language model is trained using a plurality of text pairs consisting of the description information of each object, wherein the text in any text pair includes a historical text and a standard text of the description information, and the text in any text pair is processed from at least two phrases.
[0007] Based on the above scheme, this application proposes to output the description information of the target object suitable for the user's usage scenario through a pre-trained language model. Compared with the traditional method of obtaining description information through manual consultation, this application scheme can effectively improve the efficiency of obtaining description information. In the language model, it is divided into a general module and a processing module according to its function. The general module can output phrases for standardized processing of description information for different application scenarios, and the processing module can process the phrases and output standardized description information. Compared with the traditional scheme, it effectively improves the accuracy of the description information.
[0008] In some embodiments, the standardized request also carries account information; the step of inputting the phrase output by the general module into the processing module of the language model and outputting standardized description information specifically includes:
[0009] Determining a target sub-processing module from a plurality of sub-processing modules included in the processing module according to the account category to which the account information belongs;
[0010] The phrase output by the general module is input to the target sub-processing module, and the standardized description information is output.
[0011] Based on the above scheme, different standardized processing phrases are used in different application scenarios, and different processing methods are used in different account categories. Therefore, the model can generate the definition that best matches the usage scenario and the user.
[0012] In some embodiments, the language model is trained using the following method:
[0013] Obtain multiple historical texts of any description information in any application scenario; wherein the historical text is the text that has been used historically for any description information;
[0014] According to the account information corresponding to the multiple historical texts and the account categories to which the account information belongs, the multiple historical texts are divided to obtain historical texts corresponding to each account category;
[0015] The historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category.
[0016] In some embodiments, after obtaining the historical text corresponding to each account category, the method further includes:
[0017] Get the usage time of each historical text;
[0018] The method uses the historical text corresponding to any account category and the standard text corresponding to any account category to train the general module included in the language model and the sub-processing module corresponding to any account category; specifically includes:
[0019] The common module included in the language model and the sub-processing module corresponding to any account category are trained by using the historical texts corresponding to any account category, the usage time of each historical text and the standard text corresponding to any account category.
[0020] In some embodiments, the historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category; specifically, the training includes:
[0021] Inputting the any description information and the any application scenario information into the general module to obtain a phrase for standardizing the any description information, and inputting the obtained phrase into a sub-processing module corresponding to the any account category to obtain a predicted text;
[0022] Calculating a loss function value of the language model according to the predicted text and the standard text corresponding to any one of the account categories;
[0023] The model parameters of the general module included in the language model and the model parameters of the sub-processing module corresponding to any account category are adjusted according to the loss function value.
[0024] In some embodiments, adjusting the model parameters of the general module included in the language model and the model parameters of the sub-processing module corresponding to any one of the account categories according to the loss function value specifically includes:
[0025] Setting a first adjustment weight of the general module and a second adjustment weight of the sub-processing module according to the loss function value;
[0026] The model parameters of the general module are adjusted based on the loss function value and the first adjustment weight, and the model parameters of the sub-processing module corresponding to any one account category are adjusted based on the loss function value and the second adjustment weight.
[0027] Based on the above solution, in the process of adjusting the model parameters based on the loss function value, the adjustment weights of different modules of the model are added. Targeted adjustments are made to different modules of the model to improve the efficiency of model adjustment.
[0028] In some embodiments, setting the first adjustment weight of the general module and the second adjustment weight of the sub-processing module according to the loss function value specifically includes:
[0029] When the loss function value is greater than a set threshold, setting the first adjustment weight to be greater than the second adjustment weight;
[0030] When the loss function value is not greater than the set threshold, the second adjustment weight is set to be greater than the first adjustment weight.
[0031] Based on the above scheme, when the loss function value is large, it means that there is an error in the fundamental parameters, so the adjustment weight of the general module is set to be large; when the loss function value is small, it means that the parameters are relatively accurate and the processing process is incorrect, so the adjustment weight of the processing module is set to be large.
[0032] In a second aspect, the present application proposes a device for controlling output of target object description information, the device comprising:
[0033] A communication unit, configured to receive a request for standardization of description information; the description information is used to describe a target object, and the standardization request carries application scenario information of the description information for which standardization is requested;
[0034] A processing unit is used to input the application scenario information and the description information into a general module of a pre-trained language model, output a phrase for standardizing the description information, and input the phrase into a processing module of the language model to output the standardized description information; wherein the language model is trained using a plurality of text pairs consisting of the description information of each object, wherein the text in any text pair includes a historical text and a standard text of the description information, and the text in any text pair is processed by at least two phrases.
[0035] In some embodiments, the standardized request also carries account information; the processing unit is specifically configured to:
[0036] Determining a target sub-processing module from a plurality of sub-processing modules included in the processing module according to the account category to which the account information belongs;
[0037] The phrase output by the general module is input to the target sub-processing module, and the standardized description information is output.
[0038] In some embodiments, the processing unit is further configured to:
[0039] Obtain multiple historical texts of any description information in any application scenario; wherein the historical text is the text that has been used historically for any description information;
[0040] According to the account information corresponding to the multiple historical texts and the account categories to which the account information belongs, the multiple historical texts are divided to obtain historical texts corresponding to each account category;
[0041] The historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category.
[0042] In some embodiments, the processing unit is further configured to:
[0043] Get the usage time of each historical text;
[0044] When the historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category, the processing unit is specifically used to:
[0045] The common module included in the language model and the sub-processing module corresponding to any account category are trained by using the historical texts corresponding to any account category, the usage time of each historical text and the standard text corresponding to any account category.
[0046] In some embodiments, the processing unit is specifically configured to:
[0047] Inputting the any description information and the any application scenario information into the general module to obtain a phrase for standardizing the any description information, and inputting the obtained phrase into a sub-processing module corresponding to the any account category to obtain a predicted text;
[0048] Calculating a loss function value of the language model according to the predicted text and the standard text corresponding to any one of the account categories;
[0049] The model parameters of the general module included in the language model and the model parameters of the sub-processing module corresponding to any account category are adjusted according to the loss function value.
[0050] In some embodiments, the processing unit is specifically configured to:
[0051] Setting a first adjustment weight of the general module and a second adjustment weight of the sub-processing module according to the loss function value;
[0052] The model parameters of the general module are adjusted based on the loss function value and the first adjustment weight, and the model parameters of the sub-processing module corresponding to any one account category are adjusted based on the loss function value and the second adjustment weight.
[0053] In some embodiments, the processing unit is specifically configured to:
[0054] When the loss function value is greater than a set threshold, setting the first adjustment weight to be greater than the second adjustment weight;
[0055] When the loss function value is not greater than the set threshold, the second adjustment weight is set to be greater than the first adjustment weight.
[0056] In a third aspect, the present application provides an electronic device, including:
[0057] A memory for storing program instructions;
[0058] The processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the methods in the first aspect according to the obtained program instructions.
[0059] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes any one of the methods described in the first aspect.
[0060] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes any one of the methods described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application.
[0062] Figure 1 A schematic diagram of a method for controlling the output of target object description information provided in an embodiment of the present application;
[0063] Figure 2 A schematic diagram of the architecture of a language model provided in an embodiment of the present application;
[0064] Figure 3 A schematic diagram of a process for training a language model provided in an embodiment of the present application;
[0065] Figure 4 A schematic diagram of the structure of a device for outputting control information of a target object provided in an embodiment of the present application;
[0066] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0068] The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in this application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0069] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0070] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0071] Large models usually refer to neural network models, such as neural networks, deep neural networks, and convolutional neural networks. Large models are widely used in the field of artificial intelligence, especially in the fields of natural language processing and computer vision. Among them, the models used in the field of natural language processing can also be referred to as language models. Language models use a large amount of storage space and computing resources to store and train large-scale data sets. In terms of natural language processing, they can perform complex tasks such as machine translation, speech recognition, sentiment analysis, and question-answering systems. With the continuous development of the financial technology field, financial institutions have gradually changed their traditional methods, expanded more offline services to online, and continuously explored the optimization of intelligent customer service through language model technology, using chatbots to interact with customers in natural language, and answering questions for customers quickly and accurately based on a massive financial knowledge base, greatly improving customer experience and efficiency, and reducing the cost of manual customer service.
[0072] Therefore, in order to better serve customers, obtaining accurate customer portrait information is the basis for all walks of life to provide customers with precise services. However, in different departments, different positions or different application scenarios within the enterprise, the text used for the description information of the same portrait is different. Among them, the description information of the portrait can also be called the portrait indicator, and the text of the description information can also be called the indicator caliber. For the convenience of description, the description information of the portrait and the text of the description information will continue to be introduced. If employees want to get the most appropriate description information, they need to invest a lot of time and energy to communicate with other departments or teams, which is inefficient and the accuracy of the obtained description information is low. Of course, the above-mentioned process of obtaining the description information of the customer portrait is only used as an example. In the actual operation of the enterprise, the description information of employees in different positions for any object is different, not limited to the description information of the customer portrait.
[0073] Based on this, in order to solve the problem of inefficient acquisition of object description information, the present application proposes an output control method for target object description information, which provides immediate and accurate response to employees' needs for standardized description information through a pre-trained language model, and provides employees with the most appropriate description information in combination with the scenarios in which the description information is applied, thereby improving the efficiency of obtaining description information and the accuracy of description information.
[0074] The following is a detailed introduction to the solution of this application. Figure 1 , is a flow chart of a method for controlling the output of target object description information provided in an embodiment of the present application. Optionally, Figure 1The method flow shown can be executed by any electronic device. Figure 1 The execution subject of the method flow shown is not limited. Figure 1 The method flow shown specifically includes:
[0075] 101, receiving a standardization request for description information.
[0076] The description information is used to describe the target object, such as customer profile information. The standardization request carries the application scenario information of the description information requested for standardization, for example, when the target object is a customer profile, the description information is used to provide which service to the customer. The description information standardization request can be submitted by an enterprise user, and it also carries the user's account information, which is used to request the appropriate standardized description information text for the user in the corresponding application scenario.
[0077] 102, input the application scenario information and the description information into the general module of the pre-trained language model, and output the phrases for standardizing and processing the description information.
[0078] Among them, the language model includes a general module and a processing module. The general module is used to output a phrase for standardized processing of the description information according to the application scenario information of the description information, and the processing module is used to process the phrase and output the standardized description information. Exemplarily, the processing module may include sub-processing modules corresponding to different account categories. In other words, the standardization request carries the account information of the user who submitted the request, and the account category to which the user belongs can be determined based on the account information. Further, the target sub-processing module corresponding to the account category in the language model can be determined, and the target sub-processing module can be used to process the phrase to obtain the standardized description information.
[0079] The language model is trained by using the historical texts of the description information used by different account categories in different application scenarios as input, and the standard texts of the description information submitted by each account category for different application scenarios as output. For example, there may be multiple historical texts for the same description information in the same application scenario and the same account category. Then, each historical text is combined with the standard text corresponding to the account category into a text pair, and the composed text pair is a training sample for training the language model. The text in each text pair is processed from at least two phrases.
[0080] As an example, see Figure 2, is a schematic diagram of the architecture of a language model provided in an embodiment of the present application, including a general module and a processing module, wherein the processing module includes multiple sub-processing modules, wherein each sub-processing module corresponds to an account category. It should be noted that the present application does not limit the type of language model used, for example, it can be any neural network model, or it can also be a natural language processing model such as Wenxin Yiyan.
[0081] 103, input the phrase output by the general module into the target sub-processing module, and output the standardized description information.
[0082] Exemplarily, the processing method is not limited to directly splicing the phrases, but is also limited to splicing after mapping and modifying some of the phrases, or splicing after deleting the phrases.
[0083] Based on the above scheme, this application proposes to output the description information of the target object suitable for the user's usage scenario through a pre-trained language model. Compared with the traditional method of obtaining description information through manual consultation, this application scheme can effectively improve the efficiency of obtaining description information. In the language model, it is divided into a general module and a processing module according to its function. The general module can output phrases for standardized processing of description information for different application scenarios, and the processing module can process the phrases and output standardized description information. Compared with the traditional scheme, it effectively improves the accuracy of the description information.
[0084] In some embodiments, when training a model, training samples may be first obtained. For example, multiple historical texts describing information used in any application scenario may be obtained. Further, among the multiple historical texts, account information of each historical text and the account category to which each account information belongs are used. Each historical text is divided according to the account category corresponding to each historical text to obtain the historical text used by each account category. Further, the language model may be trained using the historical text used by each account category and the submitted standard text.
[0085] Exemplarily, when obtaining training samples, they can be obtained from the enterprise's internal knowledge base, such as collecting all used descriptive information from various departments and systems. Optionally, the training samples can also include the usage time of each historical text of the descriptive information. If the usage time is long from the current time, it means that the historical text for the descriptive information is outdated, and the corresponding weight in the training model process is relatively small; conversely, if the usage time is short from the current time, it means that the historical text has been used recently, and the corresponding weight in the training process is relatively large. Furthermore, the standard text of each descriptive information submitted by each account type can also be counted, such as the standard text of requirements submitted by employees at the same position level in each department. Optionally, in order to improve the efficiency of model training, after collecting training samples, unified entry rules can be used to standardize each training sample. As an example, the 5W1H methodology can be used to formulate unified entry rules. For example, a training sample can include the following five items:
[0086] (1) What: the relevant content of the description information, such as the name of the description information, the number of the description information, etc. The number of the description information can be a unique identifier used to mark the training sample and serve as the primary key of the training sample.
[0087] (2) Who: describes the account category corresponding to each historical text of the information. For example, it may include the department or behavior level that used the historical text.
[0088] (3) Why (application scenario): Describe the application scenario of each historical text of the information.
[0089] (4) When: The time when the historical text is used.
[0090] (5) Where: The source of the historical text. This can be understood as a representation of an application scenario and account category, such as the field name of the historical text in the database, the table name of the table to which the historical text belongs, or the system name to which the historical text belongs.
[0091] (6) How: Historical text processing method. Indicates how to process the historical text so that it can be converted into the corresponding standard text. For example, if the historical text used is a business-level text and the standard text is a technical-level text, the processing method refers to how to convert the business-level text into the technical-level text. The types of processing methods include direct mapping or logical processing.
[0092] In some embodiments, after the training samples are collected, the training samples may be preprocessed, such as data cleaning, data standardization, and other preprocessing operations. Preprocessing is used to delete invalid, erroneous, or irrelevant data from the collected original training samples, such as deleting missing values or outliers in the data. Data standardization includes normalizing, binarizing, or discretizing the original training samples to change the data distribution form for easy input into the model.
[0093] In a possible implementation, when the model is trained, the preprocessed training sample can be input into the general module included in the model to obtain a phrase for standardizing the processing description information, and the phrase is input into the processing module to obtain the predicted text for the description information. Exemplarily, before inputting into the processing module, the corresponding sub-processing module can be first determined according to the account type included in the training sample, and the phrase output by the general module is input into the determined sub-processing module to obtain the predicted text.
[0094] Furthermore, the gap between the predicted text and the standard text can be calculated by forward propagation to determine the loss function value of the language model. It should be noted that this application does not limit the type of loss function used, for example, a cross entropy loss function, a mean square error loss function, etc. can be used. Among them, the greater the gap between the predicted text and the standard text, the greater the corresponding calculated loss function value.
[0095] Furthermore, the model parameters of the language model are updated and adjusted based on the calculated loss function value through back propagation. Exemplarily, the first adjustment weight of the general module and the second adjustment weight of the sub-processing module can be set first according to the size of the loss function value. As an optional way, when the loss function value is greater than the set threshold, the accuracy of the predicted text is low, indicating that the phrase for generating the predicted text is fundamentally wrong, then the first adjustment weight of the general module can be set to be greater than the second adjustment weight. Conversely, when the loss function value is not greater than the set threshold, the accuracy of the predicted text is high, indicating that the phrase accuracy is high but there are problems in the processing process, then the second adjustment weight of the sub-processing module can be set to be greater than the first adjustment weight.
[0096] After determining the first adjustment weight and the second adjustment weight, the model parameters included in the general module can be adjusted based on the loss function value and the first adjustment weight. During adjustment, the adjustment value of the model parameter to be adjusted can be determined based on the loss function. For example, if the adjustment value of model parameter A is -20, then the model parameter A is adjusted down by 20, and its value is adjusted from 100 to 80. Further, the adjustment value is corrected according to the first adjustment weight. For example, if the first adjustment weight is 10%, then the downward adjustment value of model parameter A is modified to 2, and its value is adjusted from 100 to 98. During adjustment, the model parameters included in the sub-processing module can be further adjusted based on the loss function and the second adjustment weight. For example, the adjustment process of the sub-processing module can refer to the adjustment process of the general module, which will not be repeated.
[0097] As an optional method, some training samples can be selected from the training sample set to form a verification sample set. After the language model is trained, the verification sample set can be used to evaluate the trained language model, and the language model can be evaluated by evaluating the accuracy, recall rate and other information calculated. Optionally, in the case of poor evaluation results of the language model, new training samples can be generated as the descriptive information used by the enterprise increases, and the language model can be iteratively optimized.
[0098] As an example, see Figure 3 , is a schematic diagram of a process of training a language model provided in an embodiment of the present application, specifically including:
[0099] Step S1: Collect training samples.
[0100] Exemplarily, historical texts used by each account category for each description information in different application scenarios and standard texts submitted by each account category for different application scenarios may be collected to form training samples.
[0101] Step S2: Preprocess the training sample data.
[0102] Exemplarily, the pretreatment may include cleaning and standardization. The specific treatment process can be found in the introduction of the above embodiments, which will not be described in detail here.
[0103] Step S3: Determine the language model.
[0104] Specifically, it includes choosing the appropriate model architecture and defining the model's loss function.
[0105] Step S4: Use the training samples to train the language model.
[0106] For example, the specific training process can be found in the introduction of the above embodiment, which will not be described in detail here.
[0107] Step S5: Evaluate the language model using the validation sample set.
[0108] Step S6: Iteratively optimize the language model based on the evaluation result of the language model.
[0109] Specifically, the language model may be retrained based on the text of the descriptive information added during the use of the model.
[0110] Based on the same concept as the above method, see Figure 4 , is a target object description information output control device 400 provided in an embodiment of the present application, the device 400 is used to implement each step in the above method embodiment, and in order to avoid repetition, it will not be described here. The device 400 includes: a communication unit 401 and a processing unit 402.
[0111] The communication unit 401 is used to receive a standardization request for description information; the description information is used to describe a target object, and the standardization request carries application scenario information of the description information for which standardization is requested;
[0112] The processing unit 402 is used to input the application scenario information and the description information into a general module of a pre-trained language model, output a phrase for standardizing the description information, and input the phrase into a processing module of the language model to output the standardized description information; wherein the language model is trained using a plurality of text pairs consisting of the description information of each object, wherein the text in any text pair includes a historical text and a standard text of the description information, and the text in any text pair is processed by at least two phrases.
[0113] In some embodiments, the standardized request also carries account information; the processing unit 402 is specifically configured to:
[0114] Determining a target sub-processing module from a plurality of sub-processing modules included in the processing module according to the account category to which the account information belongs;
[0115] The phrase output by the general module is input to the target sub-processing module, and the standardized description information is output.
[0116] In some embodiments, the processing unit 402 is further configured to:
[0117] Obtain multiple historical texts of any description information in any application scenario; wherein the historical text is the text that has been used historically for any description information;
[0118] According to the account information corresponding to the multiple historical texts and the account categories to which the account information belongs, the multiple historical texts are divided to obtain historical texts corresponding to each account category;
[0119] The historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category.
[0120] In some embodiments, the processing unit 402 is further configured to:
[0121] Get the usage time of each historical text;
[0122] When the historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category, the processing unit 402 is specifically used to:
[0123] The common module included in the language model and the sub-processing module corresponding to any account category are trained by using the historical texts corresponding to any account category, the usage time of each historical text and the standard text corresponding to any account category.
[0124] In some embodiments, the processing unit 402 is specifically configured to:
[0125] Inputting the any description information and the any application scenario information into the general module to obtain a phrase for standardizing the any description information, and inputting the obtained phrase into a sub-processing module corresponding to the any account category to obtain a predicted text;
[0126] Calculating a loss function value of the language model according to the predicted text and the standard text corresponding to any one of the account categories;
[0127] The model parameters of the general module included in the language model and the model parameters of the sub-processing module corresponding to any account category are adjusted according to the loss function value.
[0128] In some embodiments, the processing unit 402 is specifically configured to:
[0129] Setting a first adjustment weight of the general module and a second adjustment weight of the sub-processing module according to the loss function value;
[0130] The model parameters of the general module are adjusted based on the loss function value and the first adjustment weight, and the model parameters of the sub-processing module corresponding to any one account category are adjusted based on the loss function value and the second adjustment weight.
[0131] In some embodiments, the processing unit 402 is specifically configured to:
[0132] When the loss function value is greater than a set threshold, setting the first adjustment weight to be greater than the second adjustment weight;
[0133] When the loss function value is not greater than the set threshold, the second adjustment weight is set to be greater than the first adjustment weight.
[0134] Figure 5 The electronic device 500 in the embodiment of the present application may further include a communication interface 503, which is, for example, a network port, and the electronic device may transmit data through the communication interface 503. For example, the communication interface 503 may be used to implement the above Figure 4 The function of the communication unit 401.
[0135] In the embodiment of the present application, the memory 502 stores instructions that can be executed by at least one processor 501. The at least one processor 501 can be used to execute each step in the above method by executing the instructions stored in the memory 502. For example, the processor 501 can implement the above Figure 4 The function of the processing unit 402 in.
[0136] Among them, the processor 501 is the control center of the electronic device, and can use various interfaces and lines to connect various parts of the entire electronic device, by running or executing instructions stored in the memory 502 and calling data stored in the memory 502. Optionally, the processor 501 may include one or more processing units, and the processor 501 may integrate an application controller and a modem controller, wherein the application controller mainly processes the operating system and application programs, and the modem controller mainly processes wireless communications. It is understandable that the above-mentioned modem controller may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0137] The processor 501 may be a general controller, such as a central processing unit (CPU), a digital signal controller, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general controller may be a microcontroller or any conventional controller, etc. The steps disclosed in the embodiments of the present application may be directly executed by a hardware controller, or may be executed by a combination of hardware and software modules in the controller.
[0138] The memory 502 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 502 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, referred to as: RAM), a static random access memory (English: Static Random Access Memory, referred to as: SRAM), a programmable read-only memory (English: Programmable Read Only Memory, referred to as: PROM), a read-only memory (English: Read Only Memory, referred to as: ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, referred to as: EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 502 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0139] By designing and programming the processor 501, for example, the code corresponding to the method introduced in the above embodiment can be solidified into the chip, so that the chip can execute the above method steps when running. How to design and program the processor 501 is a technology well known to those skilled in the art and will not be repeated here.
[0140] Based on the same inventive concept, the embodiment of the present application provides a computer-readable storage medium, and the computer program product includes: computer program code, when the computer program code is run on a computer, the computer executes the method discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the above-mentioned method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0141] Based on the same inventive concept, the embodiment of the present application further provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the methods discussed above. Since the principle and method of solving the problem by the above computer program product are similar, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0142] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0143] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a controller of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the controller of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0146] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0147] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for controlling the output of target object description information, characterized in that: The method comprises: Receive a standardization request for description information; the description information is used to describe a target object, and the standardization request carries application scenario information of the description information for which standardization is requested; The application scenario information and the description information are input into a general module of a pre-trained language model, a phrase for standardizing the description information is output, and the phrase is input into a processing module of the language model to output the standardized description information; wherein the language model is trained using a plurality of text pairs consisting of the description information of each object, wherein the text in any text pair includes a historical text and a standard text of the description information, and the text in any text pair is processed from at least two phrases.
2. The method according to claim 1, characterized in that: The standardized request also carries account information; the processing module that inputs the phrase into the language model outputs standardized description information, specifically including: Determining a target sub-processing module from a plurality of sub-processing modules included in the processing module according to the account category to which the account information belongs; The phrase output by the general module is input to the target sub-processing module, and the standardized description information is output.
3. The method according to claim 2, characterized in that The language model is trained using the following method: Obtain multiple historical texts of any description information in any application scenario; wherein the historical text is the text that has been used historically for any description information; According to the account information corresponding to the multiple historical texts and the account categories to which the account information belongs, the multiple historical texts are divided to obtain historical texts corresponding to each account category; The historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category.
4. The method according to claim 3, characterized in that After obtaining the historical text corresponding to each account category, the method further includes: Get the usage time of each historical text; The method uses the historical text corresponding to any account category and the standard text corresponding to any account category to train the general module included in the language model and the sub-processing module corresponding to any account category; specifically includes: The common module included in the language model and the sub-processing module corresponding to any account category are trained by using the historical texts corresponding to any account category, the usage time of each historical text and the standard text corresponding to any account category.
5. The method according to claim 3 or 4, characterized in that: The method uses the historical text corresponding to any account category and the standard text corresponding to any account category to train the general module included in the language model and the sub-processing module corresponding to any account category; specifically includes: Inputting the any description information and the any application scenario information into the general module to obtain a phrase for standardizing the any description information, and inputting the obtained phrase into a sub-processing module corresponding to the any account category to obtain a predicted text; Calculating a loss function value of the language model according to the predicted text and the standard text corresponding to any one of the account categories; The model parameters of the general module included in the language model and the model parameters of the sub-processing module corresponding to any account category are adjusted according to the loss function value.
6. The method according to claim 5, characterized in that The adjusting of the model parameters of the general module included in the language model and the model parameters of the sub-processing module corresponding to any one of the account categories according to the loss function value specifically includes: Setting a first adjustment weight of the general module and a second adjustment weight of the sub-processing module according to the loss function value; The model parameters of the general module are adjusted based on the loss function value and the first adjustment weight, and the model parameters of the sub-processing module corresponding to any one account category are adjusted based on the loss function value and the second adjustment weight.
7. The method according to claim 6, characterized in that The step of setting the first adjustment weight of the general module and the second adjustment weight of the sub-processing module according to the loss function value specifically includes: When the loss function value is greater than a set threshold, setting the first adjustment weight to be greater than the second adjustment weight; When the loss function value is not greater than the set threshold, the second adjustment weight is set to be greater than the first adjustment weight.
8. A device for defining target object description information, characterized in that: The device comprises: A communication unit, configured to receive a request for standardization of description information; the description information is used to describe a target object, and the standardization request carries application scenario information of the description information for which standardization is requested; A processing unit is used to input the application scenario information and the description information into a general module of a pre-trained language model, output a phrase for standardizing the description information, and input the phrase into a processing module of the language model to output the standardized description information; wherein the language model is trained using a plurality of text pairs consisting of the description information of each object, wherein the text in any text pair includes a historical text and a standard text of the description information, and the text in any text pair is processed by at least two phrases.
9. The device according to claim 8, characterized in that The standardized request also carries account information; the processing unit is specifically configured to: Determining a target sub-processing module from a plurality of sub-processing modules included in the processing module according to the account category to which the account information belongs; The phrase output by the general module is input to the target sub-processing module, and the standardized description information is output.
10. The device according to claim 9, characterized in that The processing unit is further used for: Obtain multiple historical texts of any description information in any application scenario; wherein the historical text is the text that has been used historically for any description information; According to the account information corresponding to the multiple historical texts and the account categories to which the account information belongs, the multiple historical texts are divided to obtain historical texts corresponding to each account category; The historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category.
11. The device according to claim 10, characterized in that The processing unit is further used for: Get the usage time of each historical text; When the historical text corresponding to any account category and the standard text corresponding to any account category are used to train the general module included in the language model and the sub-processing module corresponding to any account category, the processing unit is specifically used to: The common module included in the language model and the sub-processing module corresponding to any account category are trained by using the historical texts corresponding to any account category, the usage time of each historical text and the standard text corresponding to any account category.
12. The device according to claim 10 or 11, characterized in that The processing unit is specifically used for: Inputting the any description information and the any application scenario information into the general module to obtain a phrase for standardizing the any description information, and inputting the obtained phrase into a sub-processing module corresponding to the any account category to obtain a predicted text; Calculating a loss function value of the language model according to the predicted text and the standard text corresponding to any one of the account categories; The model parameters of the general module included in the language model and the model parameters of the sub-processing module corresponding to any account category are adjusted according to the loss function value.
13. The device according to claim 12, characterized in that The processing unit is specifically used for: Setting a first adjustment weight of the general module and a second adjustment weight of the sub-processing module according to the loss function value; The model parameters of the general module are adjusted based on the loss function value and the first adjustment weight, and the model parameters of the sub-processing module corresponding to any one account category are adjusted based on the loss function value and the second adjustment weight.
14. The device according to claim 13, characterized in that The processing unit is specifically used for: When the loss function value is greater than a set threshold, setting the first adjustment weight to be greater than the second adjustment weight; When the loss function value is not greater than the set threshold, the second adjustment weight is set to be greater than the first adjustment weight.
15. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-7 according to the obtained program instructions.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 7.
17. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Voice recognition method, server and computer-readable storage medium
CN110634472A
Data processing method and device and computing equipment
CN113111652A
Machine translation model training method and machine translation method
CN114372480A
Multi-modal content classification method and device, electronic equipment and storage medium
CN118152875A
