Model training method and device, information processing method and device, electronic equipment, storage medium and computer program product

By filtering the repetitive and low-quality sample Q&A pairs in the training center, and combining the sample Q&A pairs in the general knowledge field, the model is trained, which solves the accuracy and overfitting problems of network operation and maintenance knowledge Q&A in the existing technology, and improves the The ability to identify and solve communication network faults improves operation and maintenance efficiency.

CN119293162APending Publication Date: 2025-01-10CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411304196.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the existing network operation and maintenance knowledge Q&A methods, retrieval-based models are difficult to provide accurate answers, and deep learning models are prone to overfitting, resulting in poor performance on the test set.

Method used

Filter repeated and unpredictable sample Q&A pairs from the first training set, combine sample Q&A pairs in general knowledge fields, train the model, adopt incremental pre-training and phased training strategies to prevent overfitting and improve the generalization of the model ability.

Benefits of technology

It improves the accuracy of the model's identification of communication network failures and solutions, enhances the support capabilities for communication network operation and maintenance, and improves operation and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293162A_ABST
    Figure CN119293162A_ABST
Patent Text Reader

Abstract

The invention discloses a model training method and device, an information processing method and device, electronic equipment, a storage medium and a computer program product.The method comprises the steps that repeated sample question and answer pairs and / or sample question and answer pairs which cannot be predicted to obtain calibrated answers are filtered from sample question and answer pairs contained in a first training set, and a second training set is obtained, the first training set and the second training set comprise sample question and answer pairs related to the communication network; a first model is trained based on the second training set and a third training set, the third training set comprises sample question and answer pairs in the general knowledge field, and the first model is used for predicting corresponding answers based on questions in the sample question and answer pairs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a model training method, an information processing method, a device, an electronic device, a storage medium and a computer program product. Background Art

[0002] In the related technology, network operation and maintenance knowledge question and answer can be achieved through retrieval-based models or deep learning models. However, in the scenario where retrieval-based models or deep learning models are applied to answer questions related to network operation and maintenance, the answers output by existing solutions to questions related to network operation and maintenance are inaccurate. Summary of the invention

[0003] To solve related technical problems, the embodiments of the present application provide a model training method, an information processing method, an apparatus, an electronic device, a storage medium and a computer program product.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The present application embodiment provides a model training method, including:

[0006] Filtering repeated sample question-answer pairs and / or filtering sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set to obtain a second training set, wherein the first training set and the second training set include sample question-answer pairs related to the communication network;

[0007] The first model is trained based on the second training set and the third training set, wherein the third training set includes sample question-answer pairs in a general knowledge domain, and the first model is used to predict corresponding answers based on questions in the sample question-answer pairs.

[0008] In the above solution, filtering repeated sample question-answer pairs and / or filtering sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set includes one or more of the following:

[0009] Based on the similarity between the sample question-answer pairs, one or more first sample question-answer pairs are screened from the first training set, where the similarity between the first sample question-answer pairs is less than or equal to a first threshold;

[0010] Based on the similarity between the sample question-answer pairs, filtering repeated sample question-answer pairs from the sample question-answer pairs included in the first training set;

[0011] Based on the instruction following difficulty (IFD) of the sample question-answer pair, a second sample question-answer pair is obtained by screening from the first training set or the first sample question-answer pair, where the IFD of the second sample question-answer pair is less than or equal to a second threshold;

[0012] Based on the IFD of the sample question-answer pairs, filtering part or all of the third sample question-answer pairs from the sample question-answer pairs included in the first training set, where the IFD of the third sample question-answer pairs is greater than a second threshold;

[0013] Based on the IFD of the sample question-answer pair and the perplexity of the first model trained by using the first sample question-answer pair or the third sample question-answer pair in the test set, some third sample question-answer pairs are obtained by filtering or screening from the first training set, and the IFD of the third sample question-answer pair is greater than the second threshold;

[0014] Based on the perplexity of the first model trained with the first sample question-answer pair or the third sample question-answer pair in the test set, a portion of the fourth sample question-answer pairs is filtered from the first training set, and the perplexity of the portion of the fourth sample question-answer pairs is greater than a third threshold; wherein,

[0015] The IFD of the sample question-answer pair represents the difficulty of the first model predicting the corresponding calibrated answer based on the question in the sample question-answer pair; the test set includes the first sample question-answer pair in the first training set.

[0016] In the above scheme, the IFD based on the sample question-answer pair and the perplexity of the first model trained with the first sample question-answer pair or the third sample question-answer pair in the test set, filtering or screening some third sample question-answer pairs from the first training set, include:

[0017] Based on the IFD of the sample question-answer pair, a third sample question-answer pair is obtained by screening in the first training set;

[0018] Divide the third sample question-answer pairs into N sets according to the arrangement order of the IFDs of the third sample question-answer pairs, each set contains the same number of third sample question-answer pairs, and N is an integer greater than or equal to 2;

[0019] When the first perplexity is greater than or equal to the second perplexity, the first set in the N sets is deleted; or, when the first perplexity is less than the second perplexity, the first set in the N sets is retained; wherein,

[0020] The first perplexity represents the perplexity of the first model trained with a fourth training set in a test set, and the fourth training set includes N-1 sets among the N sets; the second perplexity represents the perplexity of the first model trained with a fifth training set in the test set; the fifth training set is obtained by deleting the first set on the basis of the fourth training set and adding the second set among the N sets.

[0021] In the above solution, the training of the first model based on the second training set and the third training set includes:

[0022] Dividing the third training set into a first subset and a second subset, wherein the sample question-answer pairs included in the first subset and the second subset are partially or completely different;

[0023] Training the first model based on the first subset;

[0024] The trained first model is trained based on the second training set and the second subset.

[0025] In the above solution, before training the first model based on the first training set and the second training set, the method further includes:

[0026] The first model is incrementally pre-trained based on a sixth training set, where the sixth training set represents a first corpus sample related to a communication network, and the first model is pre-trained based on a second corpus sample in a general knowledge domain.

[0027] In the above solution, the incremental pre-training of the first model based on the sixth training set includes:

[0028] Call the first model to process the t tokens in the first corpus sample to obtain the predicted t+1th token and the corresponding probability, where t is a positive integer;

[0029] Calculate the loss value of the t+1th token based on the predicted t+1th token and the corresponding probability, and based on the actual t+1th token and probability;

[0030] Based on the sum of all loss values ​​of the first corpus sample, a weight parameter of the first model is adjusted.

[0031] In the above solution, the incremental pre-training of the first model based on the sixth training set includes:

[0032] Performing incremental pre-training on the first model based on the sixth training set to obtain at least two incrementally pre-trained first models;

[0033] Based on the first score and the second score of each incrementally pre-trained first model, the first model finally used is determined among the at least two incrementally pre-trained first models, the first score is the score obtained by evaluating the incrementally pre-trained first model using the Chinese large model evaluation dataset C-Eval, and the second score is the score obtained by evaluating the incrementally pre-trained first model using question-answer pairs related to communication networks.

[0034] In the above solution, the first score of the first model finally used is greater than or equal to the fourth threshold, and the second score of the first model finally used is greater than or equal to the fifth threshold; or

[0035] The first model that is finally used has the highest first score, and the first model that is finally used has the highest second score.

[0036] In the above scheme, the method further comprises:

[0037] Documents related to communication networks are preprocessed to obtain the sixth training set.

[0038] In the above solution, the first sample question-answer pair is obtained by screening from the first training set based on the similarity between the sample question-answer pairs, including:

[0039] Adding a fifth sample question-answer pair to the list, the fifth sample question-answer pair representing any sample question-answer pair in the first training set;

[0040] When the similarity between the sixth sample question and answer pair included in the first training set and each sample question and answer pair in the list is less than or equal to the first threshold, the sixth sample question and answer pair is added to the data table, and all the sample question and answer pairs in the list are first sample question and answer pairs.

[0041] In the above scheme, the similarity between the sample question-answer pairs represents the cosine similarity between the vector of the first text and the vector of the second text, and the first text and the second text are obtained by concatenating the questions and corresponding answers in different sample question-answer pairs.

[0042] The present application also provides an information processing method, the method comprising:

[0043] Receiving or obtaining first information, wherein the first information represents a problem related to the communication network;

[0044] Inputting the first information into a second model to obtain second information, where the second information represents an answer to the first information, and the second model is trained based on any one of the above model training methods;

[0045] The second information is output or displayed.

[0046] The present application also provides a model training device, including:

[0047] a filtering unit, configured to filter repeated sample question-answer pairs and / or filter sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set, to obtain a second training set, wherein the first training set and the second training set include sample question-answer pairs related to the communication network;

[0048] The first training unit is used to train the first model based on the second training set and the third training set, wherein the third training set includes sample question-answer pairs in a general knowledge field, and the first model is used to predict corresponding answers based on questions in the sample question-answer pairs.

[0049] The present application also provides a model training device, including:

[0050] An acquisition unit, configured to receive or acquire first information, wherein the first information represents a problem related to the communication network;

[0051] a processing unit, configured to input the first information into a second model to obtain second information, wherein the second information represents an answer to the first information, and the second model is trained based on any one of the above-mentioned model training methods;

[0052] An output unit is used to output or display the second information.

[0053] The embodiment of the present application further provides a first electronic device, comprising: a first processor and a first communication interface; wherein,

[0054] The first processor is used to filter repeated sample question and answer pairs and / or filter sample question and answer pairs that cannot be predicted to obtain a calibrated answer from the sample question and answer pairs included in the first training set to obtain a second training set, and to train the first model based on the second training set and the third training set, wherein the first training set and the second training set include sample question and answer pairs related to communication networks, the third training set includes sample question and answer pairs in the field of general knowledge, and the first model is used to predict corresponding answers based on questions in the sample question and answer pairs.

[0055] The embodiment of the present application further provides a second electronic device, including: a second processor and a second communication interface; wherein,

[0056] The second communication interface is used to receive or obtain first information, where the first information represents a problem related to the communication network;

[0057] The second processor is used to input the first information into a second model to obtain second information, and to output or display the second information, wherein the second information represents the answer to the first information, and the second model is trained based on any of the above-mentioned model training methods.

[0058] An embodiment of the present application further provides an electronic device, characterized in that it includes a processor and a memory for storing a computer program that can be run on the processor.

[0059] Wherein, when the processor is used to run the computer program, it executes the steps of any of the above-mentioned model training methods, or executes the steps of the above-mentioned information processing method.

[0060] An embodiment of the present application also provides a storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of any of the above-mentioned model training methods or the steps of the above-mentioned information processing method are implemented.

[0061] An embodiment of the present application also provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the steps of any of the above-mentioned model training methods or information processing methods are implemented.

[0062] In a model training method, information processing method, device, electronic device, storage medium and computer program product improved by an embodiment of the present application, repeated sample question and answer pairs and / or sample question and answer pairs that cannot be predicted to obtain a calibrated answer are filtered out from the sample question and answer pairs included in a first training set to obtain a second training set, and the first training set and the second training set include sample question and answer pairs related to communication networks; the first model is trained based on the second training set and the third training set, and the third training set includes sample question and answer pairs in a general knowledge field, and the first model is used to predict corresponding answers based on questions in the sample question and answer pairs; when the first model training is completed, first information is received or obtained, and the first question is input into the second model to obtain second information, and the first information represents questions related to communication networks, and the second information represents answers to the first information. It can be seen that in the embodiment of the present application, by filtering repeated sample question and answer pairs and / or filtering sample question and answer pairs that cannot be predicted to obtain calibrated answers from the first training set, low-quality sample question and answer pairs can be filtered out, and using the filtered training set to train the first model can prevent the first model from overfitting, improve the generalization ability of the trained first model, and improve the ability of the trained first model to understand the questions in the question and answer pairs in the test set and predict the corresponding answers; when using the trained first model to predict the answer corresponding to the question, the matching degree between the answer output by the first model and the corresponding question can be improved, that is, the accuracy of the predicted answer is improved; since the first model is trained based on sample question and answer pairs related to the communication network, the trained first model can quickly identify the root cause of the communication network failure and give accurate solutions accordingly to assist relevant personnel in maintaining the communication network, thereby improving the operation and maintenance efficiency of the communication network. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A schematic diagram of a model training method flow in an embodiment of the present application;

[0064] Figure 2A schematic diagram of a model training method flow in an embodiment of the present application;

[0065] Figure 3 A flow chart of a model training method according to an embodiment of the present application;

[0066] Figure 4 This is a flowchart of an information processing method according to an embodiment of the present application;

[0067] Figure 5 This is a schematic diagram of the structure of a model training device according to an embodiment of the present application;

[0068] Figure 6 This is a schematic diagram of the structure of an information processing device according to an embodiment of the present application;

[0069] Figure 7 This is a schematic diagram of the structure of a first electronic device according to an embodiment of the present application;

[0070] Figure 8 This is a schematic diagram of the structure of a second electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0071] With the rapid development of technologies such as cloud computing, big data, and artificial intelligence, the complexity of systems continues to increase, and the demand for intelligent network operation and maintenance is becoming increasingly urgent. Existing network operation and maintenance knowledge question-and-answer methods include the following:

[0072] 1. Retrieval-based models: This type of model answers questions by searching in large-scale documents or network operation and maintenance question and answer libraries. It uses information retrieval techniques, such as Term Frequency-Inverse Document Frequency (TF-IDF) and BM25 (Best Matching 25) algorithms, to find the document paragraphs most similar to the user's question as answers; BM25 is a classic information retrieval algorithm and an improved version of the TF-IDF algorithm.

[0073] 2. Models based on large model pre-training and fine-tuning: For example, the pre-trained language models of the GPT (Generative Pre-trained Transformer) series acquire general language knowledge through pre-training on large-scale text data, and then fine-tune the data in the field of network operation and maintenance to adapt to the question-answering needs of specific fields; large models refer to deep learning models with larger parameter scales.

[0074] 3. Methods based on big models and knowledge graphs: This type of method retrieves relevant knowledge in the knowledge graph based on user questions, integrates knowledge with questions, and guides the big model to make accurate answers.

[0075] The existing network operation and maintenance knowledge question-answering methods have the following shortcomings:

[0076] Retrieval-based methods can quickly search through large documents, but they cannot connect to contextual information and cannot focus on the really important words in the question, making it difficult to give users a relatively accurate answer.

[0077] Deep learning models are prone to the problem of overfitting in model training, which causes the model to perform well on the training set but poorly on the test set.

[0078] Based on this, in various embodiments of the present application, repeated sample question and answer pairs and / or sample question and answer pairs that cannot be predicted to obtain calibrated answers are filtered out from the sample question and answer pairs included in the first training set to obtain a second training set, and the first training set and the second training set include sample question and answer pairs related to communication networks; the first model is trained based on the second training set and the third training set, and the third training set includes sample question and answer pairs in the field of general knowledge, and the first model is used to predict corresponding answers based on questions in the sample question and answer pairs; when the training of the first model is completed, first information is received or acquired, and the first question is input into the second model to obtain second information, and the first information represents questions related to communication networks, and the second information represents answers to the first information. It can be seen that in the embodiment of the present application, by filtering repeated sample question and answer pairs and / or filtering sample question and answer pairs that cannot be predicted to obtain calibrated answers from the first training set, low-quality sample question and answer pairs can be filtered out, and using the filtered training set to train the first model can prevent the first model from overfitting, improve the generalization ability of the trained first model, and improve the ability of the trained first model to understand the questions in the question and answer pairs in the test set and predict the corresponding answers; when using the trained first model to predict the answer corresponding to the question, the matching degree between the answer output by the first model and the corresponding question can be improved, that is, the accuracy of the predicted answer is improved; since the first model is trained based on sample question and answer pairs related to the communication network, the trained first model can quickly identify the root cause of the communication network failure and give accurate solutions accordingly to assist relevant personnel in maintaining the communication network, thereby improving the operation and maintenance efficiency of the communication network.

[0079] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0080] The present application embodiment provides a model training method, which is applied to a first electronic device, the first electronic device includes a terminal and / or a server, and the server may include a cloud server and a local server. Figure 1 As shown, the method includes:

[0081] Step 101: Filter repeated sample question-answer pairs and / or filter sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set to obtain a second training set.

[0082] The first training set and the second training set include sample question-answer pairs related to communication networks.

[0083] Here, in the sample question and answer pairs included in the first training set, repeated sample question and answer pairs are determined, and all repeated sample question and answer pairs are deleted; and / or, in the sample question and answer pairs included in the first training set, sample question and answer pairs that cannot be predicted to obtain calibrated answers are determined, and all sample question and answer pairs that cannot be predicted to obtain calibrated answers are deleted, thereby obtaining a second training set. The calibrated answer is also called a given answer. The communication network includes but is not limited to one or more of the following: cellular mobile network, core network, access network, transmission network, network cloud, non-terrestrial network (NTN, Non-Terrestrial Network). The sample question and answer pairs contained in the first training set can be understood as network operation and maintenance intelligent question and answer pairs.

[0084] Since the sample question-answer pairs in the first training set may have similar questions and answers, it is difficult to remove all repeated sample question-answer pairs through simple rule screening, and repeated sample question-answer pairs will cause model overfitting; therefore, in actual application, repeated sample question-answer pairs can be identified by semantic analysis of the sample question-answer pairs. For example, an open source Chinese semantic vector model is used to concatenate the question and answer of each sample question-answer pair as a text and convert it into a high-dimensional vector. The generated vector can reflect the deep semantics of the text; repeated sample question-answer pairs can also be determined by the similarity between sample question-answer pairs. Similarity includes cosine similarity and / or the percentage of identical content; the percentage of identical content can be understood as the percentage of the number of identical words / sentences in different sample question-answer pairs to the total number of words in the sample question-answer pairs.

[0085] Based on the IFD and / or perplexity of the sample question-answer pairs included in the first training set, sample question-answer pairs that cannot be predicted to obtain calibrated answers can be determined. IFD is used to measure the difficulty of the model predicting the corresponding answer based on the question of the sample question-answer pair. IFD reflects the difficulty of the sample question-answer pair. The larger the value, the higher the difficulty of the sample question-answer pair. The lower the match between the answer predicted by the model based on the question in the sample question-answer pair and the corresponding calibrated answer, the more difficult it is for the model to align the question in the sample question-answer pair with the calibrated answer; the model can be the first model or other language models. For example, the model can be a pre-trained language model, such as a pre-trained language model of the Generative Pre-trained Transformer (GPT) series, a pre-trained language model based on a bidirectional encoder representation (BERT) from Transformers (Transformer), and the GPT series includes but is not limited to one or more of GPT-1, GPT-2, and GPT-3.

[0086] Among them, the IFD of the sample question-answer pair can be expressed as r θ (Q, A), IFD is also called IFD score, θ is the weight of the model, Q is the question in the sample question-answer pair, and A is the answer in the sample question-answer pair; S θ (A) is the direct answer score, which is used for the model's ability to generate the answer alone. represents the i-th token in answer A, N represents the total number of tokens contained in answer A; S θ (A|Q) is the calibrated answer score, which is used to measure the loss of calculating the sample question-answer pair by continuously predicting the next token based on Q. Token is a basic concept in natural language processing. It refers to the decomposition of text into the smallest unit with independent meaning. Tokens include but are not limited to characters, words, phrases, strings, etc. The higher the IFD score of the sample question-answer pair, the greater the IFD of the model for the sample question-answer pair, and the more difficult it is for the model to predict the corresponding calibrated answer based on the question in the sample question-answer pair, that is, the more difficult it is for the model to predict the calibrated answer to the question in the sample question-answer pair.

[0087] Perplexity is an indicator of how well the model predicts sample question-answer pairs. The performance of the model is evaluated by calculating the inverse probability of the model predicting the sample question-answer pairs and normalizing it. The essence of perplexity is also to calculate probability, which is the model's ability to "restore the input." The lower the perplexity, the stronger the model's ability to predict samples, that is, the smaller the uncertainty of the model, and the more accurately it can predict the next token. The model can be the first model, or the first model trained with the first sample question-answer pair or the third sample question-answer pair included in the first training set, or other language models; wherein the similarity between the first sample question-answer pairs is less than or equal to the first threshold, and the IFD of the third sample question-answer pair is greater than the second threshold. It can be calculated by the formula Calculate the perplexity of each sample question-answer pair contained in the first training set. W represents any sample question-answer pair contained in the first training set, N represents the number of tokens of any sample question-answer pair contained in the first training set, and P(wi) represents the probability of the model predicting the i-th token.

[0088] In order to accurately filter out low-quality sample question-answer pairs from the first training set, in one embodiment, filtering out repeated sample question-answer pairs and / or filtering out sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set includes one or more of the following:

[0089] Based on the similarity between the sample question-answer pairs, one or more first sample question-answer pairs are screened from the first training set, where the similarity between the first sample question-answer pairs is less than or equal to a first threshold;

[0090] Based on the similarity between the sample question-answer pairs, filtering repeated sample question-answer pairs from the sample question-answer pairs included in the first training set;

[0091] Based on the IFD of the sample question-answer pair, a second sample question-answer pair is obtained by screening from the first training set or the first sample question-answer pair, where the IFD of the second sample question-answer pair is less than or equal to a second threshold;

[0092] Based on the IFD of the sample question-answer pairs, filtering part or all of the third sample question-answer pairs from the sample question-answer pairs included in the first training set, where the IFD of the third sample question-answer pairs is greater than a second threshold;

[0093] Based on the IFD of the sample question-answer pair and the perplexity of the first model trained by using the first sample question-answer pair or the third sample question-answer pair in the test set, some third sample question-answer pairs are obtained by filtering or screening from the first training set, and the IFD of the third sample question-answer pair is greater than the second threshold;

[0094] Based on the perplexity of the first model trained with the first sample question-answer pair or the third sample question-answer pair in the test set, a portion of the fourth sample question-answer pairs is filtered from the first training set, and the perplexity of the portion of the fourth sample question-answer pairs is greater than a third threshold; wherein,

[0095] The IFD of the sample question-answer pair represents the difficulty of the first model predicting the corresponding calibrated answer based on the question in the sample question-answer pair; the test set includes the first sample question-answer pair in the first training set.

[0096] Here, the similarity between every two sample question-answer pairs included in the first training set is calculated; when the similarity between any two sample question-answer pairs is greater than the first threshold, it indicates that the two sample question-answer pairs are repeated, and any of the two sample question-answer pairs can be deleted to filter out repeated sample question-answer pairs; when the similarity between any two sample question-answer pairs is less than or equal to the first threshold, it indicates that the two sample question-answer pairs are not repeated, and the two sample question-answer pairs are retained in the first training set; and so on, until all sample question-answer pairs in the first training set are traversed, so that repeated sample question-answer pairs are filtered out from the first training set; the first threshold can be set according to actual conditions. Among them, the similarity between sample question-answer pairs represents the cosine similarity between the vector of the first text and the vector of the second text, and the first text and the second text are obtained by splicing the questions and corresponding answers in different sample question-answer pairs. In this way, repeated sample question-answer pairs can be accurately identified.

[0097] Determine the IFD of each sample question and answer pair in the first training set, and based on the IFD of each sample question and answer pair, determine the second sample question and answer pair and / or the third sample question and answer pair in the first training set; retain all the second sample question and answer pairs in the first training set, and / or delete some or all of the third sample question and answer pairs from the first training set. Wherein, when the IFD of any sample question and answer pair is less than or equal to the second threshold, the sample question and answer pair is the second sample question and answer pair; when the IFD of any sample question and answer pair is greater than the second threshold, the sample question and answer pair is the third sample question and answer pair, and the third sample question and answer pair can be understood as a sample question and answer pair whose calibrated answer cannot be predicted. The second threshold can be set according to actual conditions.

[0098] Since the sample question-answer pairs whose IFD is greater than the second threshold have a greater effect on fine-tuning the first model, a high IFD may be caused by the wrong answer, that is, the first model may not be able to accurately understand the problem of the sample question-answer pairs. If the sample question-answer pairs are simply screened according to IFD, the first model may be misled by low-quality data. Therefore, some of the third sample question-answer pairs can be retained. Specifically, the perplexity of the first model for the third sample question-answer pairs can be determined, so as to determine whether to retain the third sample question-answer pairs based on the perplexity of the third sample question-answer pairs. For example, if the perplexity of any third sample question-answer pair is less than the third threshold, then the first model has a strong understanding ability and prediction ability for the third sample question-answer pair, and the third sample question-answer pair is retained. If the perplexity of any third sample question-answer pair is greater than or equal to the third threshold, then the first model has a poor understanding ability and prediction ability for the third sample question-answer pair, and the third sample question-answer pair is a sample question-answer pair that cannot be predicted to obtain a calibrated answer, and the third sample question-answer pair is deleted. That is to say, the sample question-answer pairs in the first training set can be jointly screened based on the IFD and perplexity of the sample question-answer pairs to accurately filter out the sample question-answer pairs whose IFD is greater than the second threshold due to irrelevant answers, thereby improving the data quality of the screened sample question-answer pairs. The third threshold can be set according to actual conditions.

[0099] The first model can be trained multiple times using the first sample question-answer pair or the third sample question-answer pair to obtain a trained first model, i.e., a test model; the first sample question-answer pair is selected from the sample question-answer pairs included in the first training set, and part or all of the first sample question-answer pairs are used to form a test set; the perplexity of part or all of the first sample question-answer pairs included in the test set of the trained first model is determined; when the perplexity of any first sample question-answer pair is greater than a third threshold, the first sample question-answer pair is the fourth sample question-answer pair, and the fourth sample question-answer pair is deleted from the first training set, and the fourth sample question-answer pair can be understood as a sample question-answer pair that cannot be predicted to obtain a calibrated answer; when the perplexity of any first sample question-answer pair is less than or equal to the third threshold, the first sample question-answer pair is retained in the first training set. The first model is a pre-trained language model or a large model after pre-training, such as a pre-trained language model of the GTP series, a pre-trained language model based on Transformer BERT, and of course, other pre-trained language models.

[0100] Among them, the process of using the first sample question and answer pairs to conduct a round of training on the first model can be: inputting questions of one or more first sample question and answer pairs into the first model for processing, predicting the predicted answers to the questions of each first sample question and answer pair, calculating the loss value of each first sample question and answer pair based on the predicted answers and calibrated answers of each first sample question and answer pair, and updating the first model based on the sum of the loss values ​​of all first sample question and answer pairs until the sum of all calculated loss values ​​is less than a first set value.

[0101] The process of using the third sample question and answer pairs to conduct a round of training on the first model can be: inputting questions of one or more third sample question and answer pairs into the first model for processing, predicting the predicted answers to the questions of each third sample question and answer pair, calculating the loss value of each third sample question and answer pair based on the predicted answers and calibrated answers of each third sample question and answer pair, and updating the first model based on the sum of the loss values ​​of all third sample question and answer pairs until the sum of all calculated loss values ​​is less than a second set value.

[0102] In order to improve the efficiency of screening out all first sample question-answer pairs from the first training set, in one embodiment, screening out first sample question-answer pairs from the first training set based on the similarity between the sample question-answer pairs includes:

[0103] Adding a fifth sample question-answer pair to the list, the fifth sample question-answer pair representing any sample question-answer pair in the first training set;

[0104] When the similarity between the sixth sample question and answer pair included in the first training set and each sample question and answer pair in the list is less than or equal to the first threshold, the sixth sample question and answer pair is added to the data table, and all the sample question and answer pairs in the list are first sample question and answer pairs.

[0105] Here, a list is constructed, which does not contain sample question-answer pairs; any sample question-answer pair is selected from the first training set to obtain the fifth sample question-answer pair, and the fifth sample question-answer pair is added to the list; any sample question-answer pair is selected from the first training set to obtain the sixth sample question-answer pair, and the similarity between the sixth sample question-answer pair and the fifth sample question-answer pair is calculated. If the similarity is greater than a first threshold, the sixth sample question-answer pair is discarded, that is, the sixth sample question-answer pair is deleted from the first training set; if the similarity is less than or equal to the first threshold, the sixth sample question-answer pair is added to the list; and a sample question-answer pair is selected from the first training set again. The sample question and answer pair (the new sixth sample question and answer pair) is respectively calculated with the similarity between the sample question and answer pair and each sample question and answer pair in the list. When all the calculated similarities are less than or equal to the first threshold, the sample question and answer pair is added to the list. When any calculated similarity is greater than the first threshold, it indicates that the similarity between the sample question and answer pair and the sample question and answer pairs already added to the list is too high. The sample question and answer pair is discarded and deleted from the first training set. This process is repeated until all the sample question and answer pairs in the first training set are traversed and all the sample question and answer pairs in the list are determined as the first sample question and answer pairs.

[0106] In actual application, first, the question and answer of each sample question and answer pair in the first training set are concatenated into text, and all the texts are numbered, with each text having a different number. Then, a list is constructed, and the numbers are arranged from small to large. Each time the next text is selected, the similarity between the vector corresponding to the text and the vectors of all the texts in the list is calculated. If any similarity is greater than a first threshold, it is considered that the text is too similar to the text already added to the list, and the sample question and answer pair is repeated with the sample question and answer pair in the list, and the text is not added to the list. If all similarities are less than or equal to the first threshold, the text is added to the list.

[0107] In order to find low-quality sample question-answer pairs in the third sample question-answer pairs, so as to accurately filter out the low-quality third sample question-answer pairs from the first training set, in one embodiment, the IFD based on the sample question-answer pairs and the perplexity of the first model trained with the first sample question-answer pairs or the third sample question-answer pairs in the test set, filtering or screening some third sample question-answer pairs from the first training set, includes:

[0108] Based on the IFD of the sample question-answer pair, a third sample question-answer pair is obtained by screening in the first training set;

[0109] Divide the third sample question-answer pairs into N sets according to the arrangement order of the IFDs of the third sample question-answer pairs, each set contains the same number of third sample question-answer pairs, and N is an integer greater than or equal to 2;

[0110] When the first perplexity is greater than or equal to the second perplexity, the first set in the N sets is deleted; or, when the first perplexity is less than the second perplexity, the first set in the N sets is retained; wherein,

[0111] The first perplexity represents the perplexity of the first model trained with a fourth training set in a test set, and the fourth training set includes N-1 sets among the N sets; the second perplexity represents the perplexity of the first model trained with a fifth training set in the test set; the fifth training set is obtained by deleting the first set on the basis of the fourth training set and adding the second set among the N sets.

[0112] Here, according to the method of screening the third sample question and answer pairs based on the IFD of the sample question and answer pairs mentioned above, all the third sample question and answer pairs are screened in the first training set; all the screened third sample question and answer pairs are sorted in the order of IFD from small to large or from large to small to obtain the sorted third sample question and answer pairs; according to the arrangement order of IFD of the third sample question and answer pairs, the screened third sample questions and answers are divided into N sets, that is, the screened third sample question and answer pairs are divided into N equal parts.

[0113] Each time, N-1 sets out of N sets are taken to train the first model, and the perplexity of the trained first model on the test set is determined. Specifically, the fourth training set is used to train the first model for the jth time, and the first perplexity of the trained first model on the test set is determined; the j+1th time, a set (the first set) is deleted on the basis of the fourth training set, and the second set out of the N sets is added to obtain the fifth set, and the second set is different from the N-1 sets included in the fourth training set. The fifth training set is used to train the first model, and the second perplexity of the trained first model on the test set is determined; when the first perplexity is less than the second perplexity, the first set out of the N sets is retained; when the first perplexity is greater than or equal to the second perplexity, the first set out of the N sets is deleted. The first perplexity and the second perplexity are determined in the same test set or the same one or more sample question-answer pairs in the test set.

[0114] For example, {2,3,...,N} sets are taken for the first time to obtain the fourth training set; {1,3,...,N} sets are taken for the second time to obtain the fifth training set. At this time, the first set is set 2 and the second set is set 1; when the first perplexity is greater than or equal to the second perplexity, it is characterized that set 2 contains more low-quality third sample question-answer pairs, and set 2 is deleted; when the first perplexity is less than the second perplexity, set 2 is retained.

[0115] Step 102: Train the first model based on the second training set and the third training set, where the third training set includes sample question-answer pairs in the general knowledge domain.

[0116] The first model is used to predict the corresponding answer based on the question in the sample question-answer pair.

[0117] Here, the general knowledge field includes but is not limited to one or more of the fields of education, science and technology, e-commerce, finance, law, social sciences, humanities, etc. The third training set can be obtained by collecting and organizing massive question and answer data from channels such as the Internet and public data sets, and preprocessing the collected data, such as deduplication, format unification, data cleaning, etc.; the sample question and answer pairs in the third training set can be understood as general question and answer pairs. The third training set may include single-round sample question and answer pairs and / or multi-round sample question and answer pairs. The number of sample question and answer pairs contained in the second training set and the third training set is not limited and can be set according to actual conditions. For example, the number of sample question and answer pairs contained in the third training set can be 1 million. Since there are few open source communication network-related question and answer pairs on the Internet, the sample question and answer pairs contained in the first training set can be annotated by experienced experts related to communication networks. In the case where the styles of experts writing question and answer pairs are inconsistent, it is necessary to process the sample question and answer pairs annotated by the experts to unify the data format.

[0118] The first model is trained multiple times based on the second training set and the third training set to learn the language knowledge in the general knowledge field and the communication network language knowledge until the set first convergence condition is reached, for example, the loss value of the objective function is less than the third set value and / or the set number of training rounds is reached, thereby obtaining the trained first model; the objective function is also called the objective criterion or the loss function (Loss Function), which is a function used to quantify the performance of the model. The objective function can be selected or set according to the actual situation and is not limited here. Each round of training of the first model is as follows:

[0119] Input one or more seventh sample question-answer pairs into the first model for processing, and predict a first answer to each fourth sample question-answer pair, where the seventh sample question-answer pair is a sample question-answer pair in the second training set;

[0120] Input one or more eighth sample question-answer pairs into the first model for processing, and predict a second answer to each fifth sample question-answer pair, where the eighth sample question-answer pairs are sample question-answer pairs in the third training set;

[0121] Determine a first loss value for each seventh sample question-answer pair based on the calibrated answer and the corresponding first answer of each seventh sample question-answer pair;

[0122] Determine a second loss value for each eighth sample question-answer pair based on the calibrated answer and the corresponding second answer of each eighth sample question-answer pair;

[0123] Based on all the first loss values ​​and all the second loss values, the weight parameters of the first model are adjusted or updated. For example, all the first loss values ​​and the second loss values ​​are summed or weighted summed to obtain a calculation result, and the weight parameters of the first model are adjusted or updated according to the calculation result. Among them, weight parameters include but are not limited to one or more of the following: full parameter fine-tuning (finetuning_type full), overwrite cache (overwrite_cache), text truncation length / maximum length of input text (cutoff_len 4096), per device training batch size (per_device_train_batch_size 2), number of worker threads for data preprocessing (preprocessing_num_workers 8), gradient accumulation steps (gradient_accumulation_steps 1), gradient checkpoint (gradient_checkpointingTrue), learning rate scheduling type (lr_scheduler_type constant), logging step interval (logging_steps 1), model saving step interval (save_steps 20000), learning rate (learning_rate 2e-5), number of training rounds (epochs) (num_train_epochs 20.0), and saving strategy for each round (save_strategyepoch).

[0124] Considering that compared with sample question-answer pairs in the general knowledge field, the number of sample question-answer pairs related to communication networks that have been annotated by experts is small, if the second training set and the third training set are directly mixed and trained, the ability of the first model to identify communication network knowledge will be overwhelmed, and the first model's question-answering ability for communication networks will be difficult to improve. Therefore, the first model is trained in stages based on the second training set and the third training set to improve the first model's ability to identify communication network knowledge, thereby improving the first model's question-answering ability for communication networks. Based on this, in one embodiment, the training of the first model based on the second training set and the third training set includes:

[0125] Dividing the third training set into a first subset and a second subset, wherein the sample question-answer pairs included in the first subset and the second subset are partially or completely different;

[0126] Training the first model based on the first subset;

[0127] The trained first model is trained based on the second training set and the second subset.

[0128] Here, the training of the first model based on the second training set and the third training set can be divided into the first stage training and the second stage training. The first stage training refers to training the first model based on the first subset until the set second convergence condition is reached, for example, the loss value of the sample question-answer pairs in the first subset is less than the fourth set value and / or the set number of training rounds is reached, so that the first model has the ability to recognize general domain knowledge, and the first model that completes the first stage training can establish the ability to understand and respond to various topics, laying a solid foundation for the subsequent second stage training. The second stage training refers to training the trained first model based on the second training set and the second subset until the set first convergence condition is reached.

[0129] Each round of training in the first stage of training may be as follows: inputting one or more sample question-answer pairs in the first subset into the first model for processing, predicting the third answer to the question of each sample question-answer pair; determining the third loss value of each sample question-answer pair based on the calibrated answer and the corresponding third answer of each sample question-answer pair; adjusting or updating the weight parameters of the first model based on the sum of the third loss values ​​of all samples input into the first model. The third loss value may be calculated based on a set loss function, which may be selected or set according to actual needs and is not limited here.

[0130] The second stage of training is to further tune the first model that has completed the first stage of training. When the first model is trained in the second stage, in addition to using the second training set, the second subset is also used to ensure that the ability to recognize and understand knowledge in the general knowledge field is not lost while improving the ability of the first model to recognize and understand communication network knowledge.

[0131] Each round of training in the second stage of training is similar to each round of training of the first model based on the second training set and the third training set in the above text. Please refer to the relevant description above for details, which will not be repeated here.

[0132] It should be noted that the ratio of the sample question-answer pairs contained in the second training set and the second subset can be 1:1, or other values, which can be set according to actual needs; for example, the number of sample question-answer pairs contained in the second training set and the second subset is 10,000. In order to prevent the first model from overfitting during the second stage of training, the sample question-answer pairs contained in the second subset and the first subset are all different. The sample question-answer pairs in the second subset can include knowledge in the fields of science and technology, literature, and education. Although the sample question-answer pairs in the second subset and the second training set belong to different fields, there is knowledge overlap between science and technology, network security, and the communication network field (such as the network operation and maintenance field); and the diverse and multi-field sample question-answer pairs are used to fine-tune the first model, which can effectively improve the effect of the first model, so that the first model trained based on the second training set and the second subset can provide high-quality answers to questions related to the communication network, so as to assist operation and maintenance engineers in solving communication network failures and improve work efficiency.

[0133] Before training the first model based on the second training set and the third training set, the first model may be incrementally pre-trained to improve the ability of the first model to identify communication network knowledge, thereby improving the accuracy of the first model in predicting answers corresponding to questions in sample question-answer pairs related to communication networks. Based on this, in one embodiment, before training the first model based on the first training set and the second training set, the method further includes:

[0134] The first model is incrementally pre-trained based on a sixth training set, where the sixth training set represents a first corpus sample related to a communication network, and the first model is pre-trained based on a second corpus sample in a general knowledge domain.

[0135] Here, you can select a first model obtained by pre-training based on a second corpus sample in the general knowledge field, or pre-train the first model based on the second corpus sample in the general knowledge field; perform multiple rounds of incremental pre-training on the pre-trained first model based on the sixth training set until the set third convergence condition is reached, for example, the loss value of the first corpus sample is less than the fifth set value and / or the set number of training rounds is reached, thereby obtaining the first model that has completed incremental pre-training.

[0136] Incremental pre-training is also called domain-adapter-pretraining, which means continuing pre-training on data in the communication network field. The task of incremental pre-training is to predict the t+1th token based on the t tokens in the first corpus sample, which can be expressed as follows:

[0137] P(token t+1 |token1,token2,...,token t), where P represents probability and token t+1 It is the next token of t tokens predicted by the first model. The first model is based on the existing token1, token2, ..., token t To predict the next token. The process of each round of incremental pre-training of the first model is as follows:

[0138] One or more first corpus samples in the sixth training set are input into the first model to obtain multiple predicted tokens; based on each token in the multiple predicted tokens and the corresponding true token, the loss value of each predicted token is calculated; based on the sum of the loss values ​​of all predicted tokens of the first corpus samples, the weight parameters of the first model are adjusted.

[0139] Before performing incremental pre-training on the first model based on the sixth training set, it is necessary to first obtain the sixth training set. In one embodiment, the method further includes:

[0140] Documents related to communication networks are preprocessed to obtain the sixth training set.

[0141] Here, the documents related to the communication network are preprocessed, including but not limited to: data cleaning operations such as deduplication, desensitization, and text format unification. The documents related to the communication network include but are not limited to one or more of the following related to the communication network: product description documents, operation and maintenance cases, network management regulations, management specifications, examination materials, and training materials.

[0142] In order to improve the ability of the first model to identify communication network knowledge, in one embodiment, the incremental pre-training of the first model based on the sixth training set includes:

[0143] Call the first model to process the t tokens in the first corpus sample to obtain the predicted t+1th token and the corresponding probability, where t is a positive integer;

[0144] Calculate the loss value of the t+1th token based on the predicted t+1th token and the corresponding probability, and based on the actual t+1th token and probability;

[0145] Based on the sum of all loss values ​​of the first corpus sample, a weight parameter of the first model is adjusted.

[0146] Here, the process of each round of incremental pre-training of the first model is as follows:

[0147] Call the first model to process the t tokens in the first corpus sample to obtain the predicted t+1th token and the corresponding probability, where t is a positive integer; if there are multiple predicted t+1th tokens, then select the t+1th token with the largest probability as the final t+1th token;

[0148] As t increases, the first model is called again to process t tokens in the first corpus sample to obtain the predicted t+1th token and the corresponding probability, until the t+1th token is the last token of the first corpus sample;

[0149] Calculate the loss value of the t+1th token based on the predicted t+1th token and the corresponding probability, and based on the actual t+1th token and probability;

[0150] All calculated loss values ​​are accumulated to obtain a sum of all loss values ​​of the first corpus sample, and based on the sum of all loss values ​​of the first corpus sample, a weight parameter of the first model is adjusted.

[0151] The loss value of each t+1th token can be calculated based on the set loss function, and the loss function can be a cross entropy loss function (Cross Entropy Loss), for example y represents the probability of the true t+1th token, Characterizes the probability of the t+1th token predicted by the first model. The probability can also be described as confidence. It can be based on the loss function Calculate the loss value of any t+1th token. Since y is usually 1, can be simplified to Can be based on Calculate the sum of all loss values ​​of the first corpus sample. By minimizing the cross entropy loss L 总 , and obtain the first model after incremental pre-training.

[0152] Since multiple tuning (weight parameter adjustment) is performed during the incremental pre-training of the first model, the first model after each round of incremental pre-training can be scored using the Chinese large model evaluation dataset (C-Eval) and communication network-related question-answer pairs, so as to obtain the first model with the best performance in terms of communication network knowledge according to the score, so as to obtain the first model suitable for the communication network field. Based on this, in one embodiment, the incremental pre-training of the first model based on the sixth training set includes:

[0153] Performing incremental pre-training on the first model based on the sixth training set to obtain at least two incrementally pre-trained first models;

[0154] Based on the first score and the second score of each incrementally pre-trained first model, the first model finally used is determined among the at least two incrementally pre-trained first models, the first score is the score obtained by evaluating the incrementally pre-trained first model using the Chinese large model evaluation dataset C-Eval, and the second score is the score obtained by evaluating the incrementally pre-trained first model using question-answer pairs related to communication networks.

[0155] Here, based on the sixth training set, the first model is subjected to one round of incremental pre-training to obtain an incremental pre-trained first model; based on the sixth training set, the first model is subjected to at least two rounds of incremental pre-training to obtain at least two incremental pre-trained first models. For each incremental pre-trained first model, the incremental pre-trained first model is evaluated using C-Eval to obtain a first score, and the incremental pre-trained first model is evaluated using a communication network-related question-answer pair to obtain a second score; based on the first score and the second score of each incremental pre-trained first model, the final first model to be used is determined from the at least two incremental pre-trained first models obtained to select the first model with better comprehensive performance in various general scenarios and communication network scenarios of C-Eval. The first model finally used has the ability to recognize relatively complete knowledge in the field of communication networks, and can focus on important vocabulary in the field of communication networks through the attention mechanism. The memory ability of the first model can be linked to the context for reasoning, so it can accurately answer questions about various professional aspects of the communication network, so as to assist relevant personnel (communication network operation and maintenance personnel, network operation and maintenance engineers) in maintaining the communication network, solving network failures, and improving the work efficiency of relevant personnel.

[0156] Table 1 gives examples of question-answer pairs related to communication networks.

[0157] Table 1

[0158]

[0159]

[0160] Among them, 3GPP refers to the 3rd Generation Partnership Project, CSMF refers to the Communication Service Management Function, NSMF refers to the Network Slice Management Function, NSSMF refers to the Network Slice Subnet Management Function, and NSSF refers to the Network Slice Selection Function. NFS refers to the Network File System, infiniband refers to infinite bandwidth, which can be abbreviated as IB. iSCSI refers to the Internet Small Computer System Interface.

[0161] In order to accurately select the first model with better comprehensive performance in various general scenarios and communication network scenarios of C-Eval, in one embodiment, the first score of the first model finally used is greater than or equal to the fourth threshold, and the second score of the first model finally used is greater than or equal to the fifth threshold; or

[0162] The first model that is finally used has the highest first score, and the first model that is finally used has the highest second score.

[0163] It should be noted that C-Eval contains three sets of data, namely dev, val, and test. The data format of C-Eval is a single-choice question with 4 options, including questions, option values, answers, and explanations. The dev data has answers and explanations for the answers, and is used to construct few-shot prompts for the Chain of Thought (CoT). The val data set has answers, while the test data set does not. Use the few-shot of the dev data to do offline testing on the val data to obtain C-Eval scores, and submit the answers on the test data set to the C-Eval official website to obtain the final score.

[0164] In practical application, based on Figure 2 The first model is trained. The model training method of the present application is further described in detail below in conjunction with application examples.

[0165] like Figure 3 As shown, the model training method includes:

[0166] Step 301: Preprocess documents related to communication networks to obtain a sixth training set.

[0167] Step 302: Perform incremental pre-training on the first model based on the sixth training set to obtain at least two incremental pre-trained first models.

[0168] The sixth training set represents a first corpus sample related to a communication network, and the first model is obtained by pre-training based on a second corpus sample in a general knowledge domain.

[0169] A round of incremental pre-training is performed on the first model based on the sixth training set to obtain an incrementally pre-trained first model. The process of performing a round of incremental pre-training on the first model based on the sixth training set is as follows:

[0170] Call the first model to process t tokens in the first corpus sample to obtain the predicted t+1th token and the corresponding probability, where t is a positive integer;

[0171] Calculate the loss value of the t+1th token based on the predicted t+1th token and the corresponding probability, and based on the actual t+1th token and probability;

[0172] Based on the sum of all loss values ​​of the first corpus sample, a weight parameter of the first model is adjusted.

[0173] Step 303: Based on the first score and the second score of each incrementally pre-trained first model, determine the first model to be finally used among the at least two incrementally pre-trained first models.

[0174] The first score is the score obtained by evaluating the first model after incremental pre-training using C-Eval, and the second score is the score obtained by evaluating the first model after incremental pre-training using question-answer pairs related to the communication network.

[0175] The first score of the first model finally used is greater than or equal to the fourth threshold, and the second score of the first model finally used is greater than or equal to the fifth threshold; or

[0176] The first model that is finally used has the highest first score, and the first model that is finally used has the highest second score.

[0177] Step 304: Divide the third training set into a first subset and a second subset, wherein the sample question-answer pairs included in the first subset and the second subset are partially or completely different.

[0178] Step 305: Train a first model to be finally used based on the first subset.

[0179] Here, step 305 corresponds to Figure 2Steps 306 to 308 correspond to Figure 2 The second phase of training.

[0180] Step 306: Filter out repeated sample question-answer pairs and / or filter out sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set to obtain a second training set.

[0181] The first training set and the second training set include sample question-answer pairs related to communication networks.

[0182] The filtering of repeated sample question-answer pairs and / or filtering of sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set includes one or more of the following:

[0183] Based on the similarity between the sample question-answer pairs, one or more first sample question-answer pairs are screened from the first training set, where the similarity between the first sample question-answer pairs is less than or equal to a first threshold;

[0184] Based on the similarity between the sample question-answer pairs, filtering repeated sample question-answer pairs from the sample question-answer pairs included in the first training set;

[0185] Based on the IFD of the sample question-answer pair, a second sample question-answer pair is obtained by screening from the first training set or the first sample question-answer pair, where the IFD of the second sample question-answer pair is less than or equal to a second threshold;

[0186] Based on the IFD of the sample question-answer pairs, filtering part or all of the third sample question-answer pairs from the sample question-answer pairs included in the first training set, where the IFD of the third sample question-answer pairs is greater than a second threshold;

[0187] Based on the IFD of the sample question-answer pair and the perplexity of the first model trained by using the first sample question-answer pair or the third sample question-answer pair in the test set, some third sample question-answer pairs are obtained by filtering or screening from the first training set, and the IFD of the third sample question-answer pair is greater than the second threshold;

[0188] Based on the perplexity of the first model trained with the first sample question-answer pair or the third sample question-answer pair in the test set, a portion of the fourth sample question-answer pairs is filtered from the first training set, and the perplexity of the portion of the fourth sample question-answer pairs is greater than a third threshold; wherein,

[0189] The IFD of the sample question-answer pair represents the difficulty of the first model predicting the corresponding calibrated answer based on the question in the sample question-answer pair; the test set includes the first sample question-answer pair in the first training set.

[0190] The similarity between the sample question-answer pairs represents the cosine similarity between the vector of the first text and the vector of the second text. The first text and the second text are obtained by concatenating the questions and the corresponding answers in different sample question-answer pairs.

[0191] The IFD based on the sample question-answer pair and the perplexity of the first model trained with the first sample question-answer pair or the third sample question-answer pair in the test set, and filtering or screening some third sample question-answer pairs from the first training set, include:

[0192] Based on the IFD of the sample question-answer pair, a third sample question-answer pair is obtained by screening in the first training set;

[0193] Divide the third sample question-answer pairs into N sets according to the arrangement order of the IFDs of the third sample question-answer pairs, each set contains the same number of third sample question-answer pairs, and N is an integer greater than or equal to 2;

[0194] When the first perplexity is greater than or equal to the second perplexity, the first set in the N sets is deleted; or, when the first perplexity is less than the second perplexity, the first set in the N sets is retained; wherein,

[0195] The first perplexity represents the perplexity of the first model trained with a fourth training set in a test set, and the fourth training set includes N-1 sets among the N sets; the second perplexity represents the perplexity of the first model trained with a fifth training set in the test set; the fifth training set is obtained by deleting the first set on the basis of the fourth training set and adding the second set among the N sets.

[0196] Step 307: Train the trained first model based on the second training set and the second subset.

[0197] Here, the first model that has completed the first stage of training is trained based on the second training set and the second subset.

[0198] In this embodiment, the first model after incremental pre-training that performs well in the field of communication networks is selected by self-made communication network-related question-answer pairs, filling the gap in model evaluation in the field of communication networks; the first model after incremental pre-training is trained by a two-stage training strategy, which can take into account the general knowledge question-answering ability of the model and the question-answering ability in the field of communication networks, and reduce the impact of data imbalance on the model effect; the sample question-answering pairs with high similarity are selected by cosine similarity, which can prevent the model from overfitting, and the sample question-answering pairs are selected by IFD and perplexity, which can filter low-quality sample question-answering pairs and prevent the model from being misled by low-quality data. The first model trained by the above scheme has strong generalization ability and can have good effects in the fields of general knowledge and communication networks, solving the problem that it is difficult for operation and maintenance engineers in a single field to fully master all relevant knowledge. As a comprehensive assistant, it can comprehensively improve the work efficiency of network operation and maintenance engineers. For example, when a communication network fails or performance degrades, traditional methods often rely on the experience of operation and maintenance engineers and a series of manual inspection processes to locate the problem, and the whole process is time-consuming and error-prone. The first model trained in this application has the ability of logical reasoning and problem analysis for corpus or knowledge related to communication networks, and can quickly identify the root cause of network failures and provide corresponding solutions.

[0199] After the first model is trained, the trained first model can be used to predict answers to questions related to the communication network. Based on this, the embodiment of the present application also provides an information processing method, which is applied to a second electronic device, which can be the same as or different from the first electronic device; the second electronic device has a display screen or can be connected to a display device. Figure 4 As shown, the information processing method includes:

[0200] Step 401: Receive or obtain first information, where the first information represents a problem related to a communication network.

[0201] Step 402: Input the first information into a second model to obtain second information.

[0202] The second information represents the answer to the first information, and the second model is trained based on the above-mentioned model training method.

[0203] Here, the specific implementation process of step 402 is similar to the implementation process of the first model in the above text predicting the answer to the question based on the question in the sample question-answer pair. Please refer to the relevant description above for details, which will not be repeated here.

[0204] Step 403: Output or display the second information.

[0205] In order to implement the model training method of the embodiment of the present application, the embodiment of the present application also provides a model training device, which is arranged on a first electronic device, such as Figure 5 As shown, the device comprises:

[0206] A filtering unit 501 is used to filter repeated sample question-answer pairs and / or filter sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set to obtain a second training set, wherein the first training set and the second training set include sample question-answer pairs related to the communication network;

[0207] The first training unit 502 is used to train the first model based on the second training set and the third training set, the third training set includes sample question-answer pairs in the general knowledge field, and the first model is used to predict corresponding answers based on questions in the sample question-answer pairs.

[0208] In one embodiment, the filtering unit 501 is specifically used for one or more of the following:

[0209] Based on the similarity between the sample question-answer pairs, one or more first sample question-answer pairs are screened from the first training set, where the similarity between the first sample question-answer pairs is less than or equal to a first threshold;

[0210] Based on the similarity between the sample question-answer pairs, filtering repeated sample question-answer pairs from the sample question-answer pairs included in the first training set;

[0211] Based on the IFD of the sample question-answer pair, a second sample question-answer pair is obtained by screening from the first training set or the first sample question-answer pair, where the IFD of the second sample question-answer pair is less than or equal to a second threshold;

[0212] Based on the IFD of the sample question-answer pairs, filtering part or all of the third sample question-answer pairs from the sample question-answer pairs included in the first training set, where the IFD of the third sample question-answer pairs is greater than a second threshold;

[0213] Based on the IFD of the sample question-answer pair and the perplexity of the first model trained by using the first sample question-answer pair or the third sample question-answer pair in the test set, some third sample question-answer pairs are obtained by filtering or screening from the first training set, and the IFD of the third sample question-answer pair is greater than the second threshold;

[0214] Based on the perplexity of the first model trained with the first sample question-answer pair or the third sample question-answer pair in the test set, a portion of the fourth sample question-answer pairs is filtered from the first training set, and the perplexity of the portion of the fourth sample question-answer pairs is greater than a third threshold; wherein,

[0215] The IFD of the sample question-answer pair represents the difficulty of the first model predicting the corresponding calibrated answer based on the question in the sample question-answer pair; the test set includes the first sample question-answer pair in the first training set.

[0216] In one embodiment, the filtering unit 501 is specifically used for:

[0217] Based on the IFD of the sample question-answer pair, a third sample question-answer pair is obtained by screening in the first training set;

[0218] Divide the third sample question-answer pairs into N sets according to the arrangement order of the IFDs of the third sample question-answer pairs, each set contains the same number of third sample question-answer pairs, and N is an integer greater than or equal to 2;

[0219] When the first perplexity is greater than or equal to the second perplexity, the first set in the N sets is deleted; or, when the first perplexity is less than the second perplexity, the first set in the N sets is retained; wherein,

[0220] The first perplexity represents the perplexity of the first model trained with a fourth training set in a test set, and the fourth training set includes N-1 sets among the N sets; the second perplexity represents the perplexity of the first model trained with a fifth training set in the test set; the fifth training set is obtained by deleting the first set on the basis of the fourth training set and adding the second set among the N sets.

[0221] In one embodiment, the first training unit 502 is specifically configured to:

[0222] Dividing the third training set into a first subset and a second subset, wherein the sample question-answer pairs included in the first subset and the second subset are partially or completely different;

[0223] Training the first model based on the first subset;

[0224] The trained first model is trained based on the second training set and the second subset.

[0225] In one embodiment, the device further comprises:

[0226] The second training unit is used to perform incremental pre-training on the first model based on a sixth training set, where the sixth training set represents a first corpus sample related to a communication network, and the first model is pre-trained based on a second corpus sample in a general knowledge field.

[0227] In one embodiment, the second training unit is specifically used to:

[0228] Call the first model to process t tokens in the first corpus sample to obtain the predicted t+1th token and the corresponding probability, where t is a positive integer;

[0229] Calculate the loss value of the t+1th token based on the predicted t+1th token and the corresponding probability, and based on the actual t+1th token and probability;

[0230] Based on the sum of all loss values ​​of the first corpus sample, a weight parameter of the first model is adjusted.

[0231] In one embodiment, the second training unit is specifically used to:

[0232] Performing incremental pre-training on the first model based on the sixth training set to obtain at least two incrementally pre-trained first models;

[0233] Based on the first score and the second score of each incrementally pre-trained first model, the first model finally used is determined among the at least two incrementally pre-trained first models, the first score is the score obtained by evaluating the incrementally pre-trained first model using the Chinese large model evaluation dataset C-Eval, and the second score is the score obtained by evaluating the incrementally pre-trained first model using question-answer pairs related to communication networks.

[0234] In one embodiment, the first score of the first model finally used is greater than or equal to a fourth threshold, and the second score of the first model finally used is greater than or equal to a fifth threshold; or

[0235] The first model that is finally used has the highest first score, and the first model that is finally used has the highest second score.

[0236] In one embodiment, the device further comprises:

[0237] The preprocessing unit is used to preprocess the documents related to the communication network to obtain the sixth training set.

[0238] In one embodiment, the filtering unit 501 is specifically used for:

[0239] Adding a fifth sample question-answer pair to the list, the fifth sample question-answer pair representing any sample question-answer pair in the first training set;

[0240] When the similarity between the sixth sample question and answer pair included in the first training set and each sample question and answer pair in the list is less than or equal to the first threshold, the sixth sample question and answer pair is added to the data table, and all the sample question and answer pairs in the list are first sample question and answer pairs.

[0241] In one embodiment, the similarity between the sample question-answer pairs represents the cosine similarity between the vector of the first text and the vector of the second text, and the first text and the second text are obtained by concatenating the questions and the corresponding answers in different sample question-answer pairs.

[0242] In actual application, the filtering unit 501, the first training unit 502, the second training unit and the preprocessing unit can be implemented by a processor in a model training device.

[0243] It should be noted that: the model training device provided in the above embodiment only uses the division of the above program modules as an example when performing model training. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the model training device provided in the above embodiment belongs to the same concept as the model training method embodiment. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0244] In order to implement the information processing method of the embodiment of the present application, the embodiment of the present application also provides an information processing device, which is arranged on a second electronic device, such as Figure 6 As shown, the device comprises:

[0245] An acquiring unit 601 is configured to receive or acquire first information, where the first information represents a problem related to a communication network;

[0246] A processing unit 602 is configured to input the first information into a second model to obtain second information, where the second information represents an answer to the first information, and the second model is trained based on any one of the above-mentioned model training methods;

[0247] The output unit 603 is configured to output or display the second information.

[0248] In actual application, the processing unit 602 can be implemented by a processor in an information processing device, and the acquisition unit 601 and the output unit 603 can be implemented by a processor in the information processing device in combination with a communication interface.

[0249] It should be noted that: when the information processing device provided in the above embodiment performs model training, only the division of the above program modules is used as an example. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the information processing device provided in the above embodiment and the information processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0250] Based on the hardware implementation of the above program modules, and in order to implement the method of the first electronic device side of the embodiment of the present application, the embodiment of the present application also provides a first electronic device, such as Figure 7 As shown, the first electronic device 700 includes:

[0251] The first communication interface 701 is capable of exchanging information with other network nodes;

[0252] The first processor 702 is connected to the first communication interface 701 to implement information exchange with other network nodes, and is used to execute the model training method provided by one or more technical solutions when running a computer program. The computer program is stored in the first memory 703.

[0253] Specifically, the first processor 702 is used to filter repeated sample question and answer pairs and / or filter sample question and answer pairs that cannot be predicted to obtain a calibrated answer from the sample question and answer pairs included in the first training set to obtain a second training set, wherein the first training set and the second training set include sample question and answer pairs related to communication networks; and to train the first model based on the second training set and the third training set, wherein the third training set includes sample question and answer pairs in the field of general knowledge, and the first model is used to predict corresponding answers based on questions in the sample question and answer pairs.

[0254] In one embodiment, the first processor 702 is specifically configured to do one or more of the following:

[0255] Based on the similarity between the sample question-answer pairs, one or more first sample question-answer pairs are screened from the first training set, where the similarity between the first sample question-answer pairs is less than or equal to a first threshold;

[0256] Based on the similarity between the sample question-answer pairs, filtering repeated sample question-answer pairs from the sample question-answer pairs included in the first training set;

[0257] Based on the IFD of the sample question-answer pair, a second sample question-answer pair is obtained by screening from the first training set or the first sample question-answer pair, where the IFD of the second sample question-answer pair is less than or equal to a second threshold;

[0258] Based on the IFD of the sample question-answer pairs, filtering part or all of the third sample question-answer pairs from the sample question-answer pairs included in the first training set, where the IFD of the third sample question-answer pairs is greater than a second threshold;

[0259] Based on the IFD of the sample question-answer pair and the perplexity of the first model trained by using the first sample question-answer pair or the third sample question-answer pair in the test set, some third sample question-answer pairs are obtained by filtering or screening from the first training set, and the IFD of the third sample question-answer pair is greater than the second threshold;

[0260] Based on the perplexity of the first model trained with the first sample question-answer pair or the third sample question-answer pair in the test set, a portion of the fourth sample question-answer pairs is filtered from the first training set, and the perplexity of the portion of the fourth sample question-answer pairs is greater than a third threshold; wherein,

[0261] The IFD of the sample question-answer pair represents the difficulty of the first model predicting the corresponding calibrated answer based on the question in the sample question-answer pair; the test set includes the first sample question-answer pair in the first training set.

[0262] In one embodiment, the first processor 702 is specifically configured to:

[0263] Based on the IFD of the sample question-answer pair, a third sample question-answer pair is obtained by screening in the first training set;

[0264] Divide the third sample question-answer pairs into N sets according to the arrangement order of the IFDs of the third sample question-answer pairs, each set contains the same number of third sample question-answer pairs, and N is an integer greater than or equal to 2;

[0265] When the first perplexity is greater than or equal to the second perplexity, the first set in the N sets is deleted; or, when the first perplexity is less than the second perplexity, the first set in the N sets is retained; wherein,

[0266] The first perplexity represents the perplexity of the first model trained with a fourth training set in a test set, and the fourth training set includes N-1 sets among the N sets; the second perplexity represents the perplexity of the first model trained with a fifth training set in the test set; the fifth training set is obtained by deleting the first set on the basis of the fourth training set and adding the second set among the N sets.

[0267] In one embodiment, the first processor 702 is specifically configured to:

[0268] Dividing the third training set into a first subset and a second subset, wherein the sample question-answer pairs included in the first subset and the second subset are partially or completely different;

[0269] Training the first model based on the first subset;

[0270] The trained first model is trained based on the second training set and the second subset.

[0271] In one embodiment, the first processor 702 is further used to perform incremental pre-training on the first model based on a sixth training set, where the sixth training set represents a first corpus sample related to a communication network, and the first model is pre-trained based on a second corpus sample in a general knowledge domain.

[0272] In one embodiment, the first processor 702 is specifically configured to:

[0273] Call the first model to process t tokens in the first corpus sample to obtain the predicted t+1th token and the corresponding probability, where t is a positive integer;

[0274] Calculate the loss value of the t+1th token based on the predicted t+1th token and the corresponding probability, and based on the actual t+1th token and probability;

[0275] Based on the sum of all loss values ​​of the first corpus sample, a weight parameter of the first model is adjusted.

[0276] In one embodiment, the first processor 702 is specifically configured to:

[0277] Performing incremental pre-training on the first model based on the sixth training set to obtain at least two incrementally pre-trained first models;

[0278] Based on the first score and the second score of each incrementally pre-trained first model, the first model finally used is determined among the at least two incrementally pre-trained first models, the first score is the score obtained by evaluating the incrementally pre-trained first model using the Chinese large model evaluation dataset C-Eval, and the second score is the score obtained by evaluating the incrementally pre-trained first model using question-answer pairs related to communication networks.

[0279] In one embodiment, the first score of the first model finally used is greater than or equal to a fourth threshold, and the second score of the first model finally used is greater than or equal to a fifth threshold; or

[0280] The first model that is finally used has the highest first score, and the first model that is finally used has the highest second score.

[0281] In one embodiment, the first processor 702 is further configured to pre-process documents related to the communication network to obtain the sixth training set.

[0282] In one embodiment, the first processor 702 is configured to:

[0283] Adding a fifth sample question-answer pair to the list, the fifth sample question-answer pair representing any sample question-answer pair in the first training set;

[0284] When the similarity between the sixth sample question and answer pair included in the first training set and each sample question and answer pair in the list is less than or equal to the first threshold, the sixth sample question and answer pair is added to the data table, and all the sample question and answer pairs in the list are first sample question and answer pairs.

[0285] In one embodiment, the similarity between the sample question-answer pairs represents the cosine similarity between the vector of the first text and the vector of the second text, and the first text and the second text are obtained by concatenating the questions and the corresponding answers in different sample question-answer pairs.

[0286] It should be noted that the specific processing process of the first processor 702 and the first communication interface 701 can be understood by referring to the above method.

[0287] Of course, in actual application, the various components in the first electronic device 700 are coupled together through the bus system 704. It can be understood that the bus system 704 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 704 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 7 Various buses are labeled as bus system 704 .

[0288] The first memory 703 in the embodiment of the present application is used to store various types of data to support the operation of the first electronic device 700. Examples of such data include: any computer program used to operate on the first electronic device 700.

[0289] The method disclosed in the above embodiment of the present application can be applied to the first processor 702, or implemented by the first processor 702. The first processor 702 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the first processor 702. The above-mentioned first processor 702 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The first processor 702 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the first memory 703, and the first processor 702 reads the information in the first memory 703 and completes the steps of the above method in combination with its hardware.

[0290] In an exemplary embodiment, the first electronic device 700 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0291] Based on the hardware implementation of the above program module, and in order to implement the method of the second electronic device side of the embodiment of the present application, the embodiment of the present application also provides a second electronic device. Figure 8 As shown, the second electronic device 800 includes:

[0292] The second communication interface 801 is capable of exchanging information with other network nodes;

[0293] The second processor 802 is connected to the second communication interface 801 to implement information interaction with other network nodes, and is used to execute the information processing method provided by one or more technical solutions when running a computer program. The computer program is stored in the second memory 803.

[0294] Specifically, the second processor 802 is used to receive or obtain first information, where the first information represents a problem related to the communication network; and to input the first information into a second model to obtain second information, where the second information represents an answer to the first information, and the second model is trained based on any one of the above-mentioned model training methods;

[0295] The second communication interface 801 is used to output or display the second information.

[0296] It should be noted that the specific processing process of the second processor 802 and the second communication interface 801 can be understood by referring to the above method.

[0297] Of course, in actual application, the various components in the second electronic device 800 are coupled together through the bus system 804. It can be understood that the bus system 804 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 804 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 8Various buses are labeled as bus system 804 .

[0298] The second memory 803 in the embodiment of the present application is used to store various types of data to support the operation of the second electronic device 800. Examples of such data include: any computer program used to operate on the second electronic device 800.

[0299] The method disclosed in the above embodiment of the present application can be applied to the second processor 802, or implemented by the second processor 802. The second processor 802 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the second processor 802. The above-mentioned second processor 802 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The second processor 802 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the second memory 803. The second processor 802 reads the information in the second memory 803 and completes the steps of the above method in combination with its hardware.

[0300] In an exemplary embodiment, the second electronic device 800 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general purpose processors, controllers, MCUs, Microprocessors, or other electronic components to perform the aforementioned methods.

[0301] It can be understood that the memory (first memory 703 and second memory 803) of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0302] In an exemplary embodiment, the embodiment of the present application further provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 703 storing a computer program, and the computer program can be executed by the first processor 702 of the first electronic device 700 to complete the steps of the aforementioned model training method. For another example, a second memory 803 storing a computer program can be executed by the second processor 802 of the second electronic device 800 to complete the steps of the aforementioned information processing method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.

[0303] Exemplarily, the embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the first processor 702 of the first electronic device 700 to complete the steps of the aforementioned model training method. The computer program can be executed by the second processor 802 of the second electronic device 800 to complete the steps of the aforementioned information processing method.

[0304] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. Multi-items can be two or more items, and a plurality can be two or more. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "one or more" in this article means any combination of at least two of any one or more of a plurality. For example, including one or more of A, B, and C can mean including any one or at least two or more elements selected from the set consisting of A, B, and C.

[0305] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0306] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A model training method, characterized in that: include: Filtering repeated sample question-answer pairs and / or filtering sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set to obtain a second training set, wherein the first training set and the second training set include sample question-answer pairs related to the communication network; The first model is trained based on the second training set and the third training set, wherein the third training set includes sample question-answer pairs in a general knowledge domain, and the first model is used to predict corresponding answers based on questions in the sample question-answer pairs.

2. The method according to claim 1, characterized in that The filtering of repeated sample question-answer pairs and / or filtering of sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set may include one or more of the following: Based on the similarity between the sample question-answer pairs, one or more first sample question-answer pairs are screened from the first training set, where the similarity between the first sample question-answer pairs is less than or equal to a first threshold; Based on the similarity between the sample question-answer pairs, filtering repeated sample question-answer pairs from the sample question-answer pairs included in the first training set; Based on the instruction following difficulty IFD of the sample question and answer pair, a second sample question and answer pair is obtained by screening from the first training set or the first sample question and answer pair, and the IFD of the second sample question and answer pair is less than or equal to a second threshold; Based on the IFD of the sample question-answer pairs, filtering part or all of the third sample question-answer pairs from the sample question-answer pairs included in the first training set, where the IFD of the third sample question-answer pairs is greater than a second threshold; Based on the IFD of the sample question-answer pair and the perplexity of the first model trained by using the first sample question-answer pair or the third sample question-answer pair in the test set, some third sample question-answer pairs are obtained by filtering or screening from the first training set, and the IFD of the third sample question-answer pair is greater than the second threshold; Based on the perplexity of the first model trained with the first sample question-answer pair or the third sample question-answer pair in the test set, a portion of the fourth sample question-answer pairs is filtered from the first training set, and the perplexity of the portion of the fourth sample question-answer pairs is greater than a third threshold; wherein, The IFD of the sample question-answer pair represents the difficulty of the first model predicting the corresponding calibrated answer based on the question in the sample question-answer pair; the test set includes the first sample question-answer pair in the first training set.

3. The method according to claim 2, characterized in that The IFD based on the sample question-answer pair and the perplexity of the first model trained by the first sample question-answer pair or the third sample question-answer pair in the test set, filtering or screening some third sample question-answer pairs from the first training set, comprises: Based on the IFD of the sample question-answer pair, a third sample question-answer pair is obtained by screening in the first training set; Divide the third sample question-answer pairs into N sets according to the arrangement order of the IFDs of the third sample question-answer pairs, each set contains the same number of third sample question-answer pairs, and N is an integer greater than or equal to 2; When the first perplexity is greater than or equal to the second perplexity, the first set in the N sets is deleted; or, when the first perplexity is less than the second perplexity, the first set in the N sets is retained; wherein, The first perplexity represents the perplexity of the first model trained with a fourth training set in a test set, and the fourth training set includes N-1 sets among the N sets; the second perplexity represents the perplexity of the first model trained with a fifth training set in the test set; the fifth training set is obtained by deleting the first set on the basis of the fourth training set and adding the second set among the N sets.

4. The method according to any one of claims 1 to 3, characterized in that: The training of the first model based on the second training set and the third training set includes: Dividing the third training set into a first subset and a second subset, wherein the sample question-answer pairs included in the first subset and the second subset are partially or completely different; Training the first model based on the first subset; The trained first model is trained based on the second training set and the second subset.

5. The method according to any one of claims 1 to 3, characterized in that: Before training the first model based on the first training set and the second training set, the method further includes: The first model is incrementally pre-trained based on a sixth training set, where the sixth training set represents a first corpus sample related to a communication network, and the first model is pre-trained based on a second corpus sample in a general knowledge domain.

6. The method according to claim 5, characterized in that The incremental pre-training of the first model based on the sixth training set includes: Call the first model to process the t tokens in the first corpus sample to obtain the predicted t+1th token and the corresponding probability, where t is a positive integer; Calculate the loss value of the t+1th token based on the predicted t+1th token and the corresponding probability, and based on the actual t+1th token and probability; Based on the sum of all loss values ​​of the first corpus sample, a weight parameter of the first model is adjusted.

7. The method according to claim 5, characterized in that The incremental pre-training of the first model based on the sixth training set includes: Performing incremental pre-training on the first model based on the sixth training set to obtain at least two incrementally pre-trained first models; Based on the first score and the second score of each incrementally pre-trained first model, the first model finally used is determined among the at least two incrementally pre-trained first models, the first score is the score obtained by evaluating the incrementally pre-trained first model using the Chinese large model evaluation dataset C-Eval, and the second score is the score obtained by evaluating the incrementally pre-trained first model using question-answer pairs related to communication networks.

8. The method according to claim 7, characterized in that The first score of the first model finally used is greater than or equal to the fourth threshold, and the second score of the first model finally used is greater than or equal to the fifth threshold; or The first model that is finally used has the highest first score, and the first model that is finally used has the highest second score.

9. The method according to claim 5, characterized in that The method further comprises: Documents related to communication networks are preprocessed to obtain the sixth training set.

10. The method according to claim 2, characterized in that The step of selecting a first sample question-answer pair from the first training set based on the similarity between the sample question-answer pairs includes: Adding a fifth sample question-answer pair to the list, the fifth sample question-answer pair representing any sample question-answer pair in the first training set; When the similarity between the sixth sample question and answer pair included in the first training set and each sample question and answer pair in the list is less than or equal to the first threshold, the sixth sample question and answer pair is added to the data table, and all the sample question and answer pairs in the list are first sample question and answer pairs.

11. The method according to claim 2, characterized in that The similarity between the sample question-answer pairs represents the cosine similarity between the vector of the first text and the vector of the second text. The first text and the second text are obtained by concatenating the questions and the corresponding answers in different sample question-answer pairs.

12. An information processing method, characterized in that: The method comprises: Receiving or obtaining first information, wherein the first information represents a problem related to the communication network; Inputting the first information into a second model to obtain second information, wherein the second information represents an answer to the first information, and the second model is trained based on the method according to any one of claims 1 to 11; The second information is output or displayed.

13. A model training device, characterized in that: include: a filtering unit, configured to filter repeated sample question-answer pairs and / or filter sample question-answer pairs for which a calibrated answer cannot be predicted from the sample question-answer pairs included in the first training set, to obtain a second training set, wherein the first training set and the second training set include sample question-answer pairs related to the communication network; The first training unit is used to train the first model based on the second training set and the third training set, wherein the third training set includes sample question-answer pairs in a general knowledge field, and the first model is used to predict corresponding answers based on questions in the sample question-answer pairs.

14. A model training device, characterized in that: include: An acquisition unit, configured to receive or acquire first information, wherein the first information represents a problem related to the communication network; A processing unit, configured to input the first information into a second model to obtain second information, wherein the second information represents an answer to the first information, and the second model is trained based on the method according to any one of claims 1 to 11; An output unit is used to output or display the second information.

15. A first electronic device, characterized in that: include: A first processor and a first communication interface; wherein, The first processor is used to filter repeated sample question and answer pairs and / or filter sample question and answer pairs that cannot be predicted to obtain a calibrated answer from the sample question and answer pairs included in the first training set to obtain a second training set, and to train the first model based on the second training set and the third training set, wherein the first training set and the second training set include sample question and answer pairs related to communication networks, the third training set includes sample question and answer pairs in the field of general knowledge, and the first model is used to predict corresponding answers based on questions in the sample question and answer pairs.

16. A second electronic device, characterized in that: include: A second processor and a second communication interface; wherein, The second communication interface is used to receive or obtain first information, where the first information represents a problem related to the communication network; The second processor is used to input the first information into a second model to obtain second information, and to output or display the second information, wherein the second information represents the answer to the first information, and the second model is trained based on the method described in any one of claims 1 to 11.

17. An electronic device, characterized in that: comprising a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 11, or executes the steps of the method described in claim 12.

18. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented, or the steps of the method according to claim 12 are implemented.

19. A computer program product comprising a computer program, characterized in that The computer program implements the steps of the method according to any one of claims 1 to 12 when executed by a processor.

Citation Information

Cited By

  • Security threat mitigation

    US12664278B2

  • Security threat mitigation

    US20250131089A1