Natural language training model training method, device, computer equipment and medium

By adding functional modules that meet the stopping conditions to the blocking pool during the iteration period and training other modules simultaneously, the inefficiency problem caused by parameter differences during the training process is solved, and efficient natural language training model training is achieved.

CN116933865BActive Publication Date: 2025-08-26JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310948480.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2025-08-26
Estimated Expiration
2043-07-28

AI Technical Summary

Technical Problem

In the prior art, the control group and the training group have different randomly selected parameters during the training process, resulting in differences in processing speed and efficiency, which makes the training process take up too much time and low work efficiency.

Method used

During the iteration cycle, two natural language training models are used to train and test each functional module in the use case library. When the test of any model meets the preset stop condition, the functional module is added to the blocking pool, the other models stop training, and continue to train other modules until the iteration cycle ends or the blocking pool reaches the preset value.

Benefits of technology

Synchronous training of two natural language training models is implemented, avoiding the wasted time caused by out-of-synchronization during the training process, improving work efficiency, and ensuring that the use cases of all functional modules are fully trained in the next iteration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116933865B_ABST
    Figure CN116933865B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and discloses a natural language training model training method, device, computer equipment and medium, including: in this iteration cycle, using two natural language training models to train and test the test cases corresponding to each functional module in the use case library; when it is determined that the training and testing of the test cases corresponding to the first functional module by any natural language training model meets the preset stop condition, the first functional module is added to the blocking pool; the two natural language training models are controlled to stop training the test cases of the first functional module, and the two natural language training models are used to train other functional modules except the first functional module, until the current iteration cycle is the last iteration cycle in a preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value, the operation is terminated. In this way, the training process is prevented from taking up too much time, and work efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a natural language training model training method, apparatus, computer equipment, and medium. Background Art

[0002] Existing applications involving human-computer interaction are relatively limited in functionality. For example, they can only provide a predefined response to a user's question. Alternatively, when a user needs to use an application to create an operating system, they must follow the application's intelligent guidance and follow the steps. This entire process is cumbersome and prone to errors.

[0003] While some existing training methods can optimize application performance and enhance flexibility and usability by training with large amounts of sample data, existing training processes, for example, use a control group and a training group to train the neural network, and a control group to verify the training results. However, if the training and control groups use different randomly selected parameters during execution, this can easily lead to differences in processing speed and efficiency between the control and training groups, ultimately requiring one to wait for the other to complete before verifying the results. This results in a time-consuming training process and low efficiency. Summary of the Invention

[0004] In view of this, the present invention provides a natural language training model training method, device, computer equipment and medium to solve the problem in the prior art that the control group and the training group have different processing speeds and efficiencies due to different randomly selected parameters during the training process.

[0005] In a first aspect, the present invention provides a natural language training model training method, the method comprising:

[0006] During this iteration, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library. The use case library includes test cases corresponding to multiple functional modules, and each functional module includes at least one test case.

[0007] When it is determined that the training test of the test case corresponding to the first functional module by any natural language training model meets the preset stop condition, the first functional module is added to the blocking pool;

[0008] Control the two natural language training models to stop training the test cases of the first functional module, and use the two natural language training models to train other functional modules except the first functional module respectively, until the current iteration cycle is the last iteration cycle in the preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value, the operation is terminated.

[0009] The natural language training model training method provided by the present invention has the following advantages:

[0010] In this iteration cycle, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library. When it is determined that the training test of the test case corresponding to the first functional module by any natural language training model meets the preset stop condition, the first functional module is added to the blocking pool. In this iteration cycle, both natural language training models will stop training the test case of the first functional module. Instead, they continue to train the test case corresponding to the next functional module in the use case library. The operation ends until this iteration cycle is the last iteration cycle in the preset number of iteration cycles, or the number of functional modules in the blocking pool reaches a preset value. In this process, if the training test of the test case corresponding to the first functional module by any natural language training model meets the preset stop condition, if the other natural language training model continues to complete the test of the first functional module, it will inevitably lead to the two natural language training models being out of sync in testing the functional modules in the use case library, such as asynchrony in processing speed and efficiency. Using the method of the present application, the two natural language training models simultaneously stop training the first functional module, add it to the blocking pool, and continue to synchronously train the test cases corresponding to other functional modules in the use case library. This ensures that the training of the two natural language training models is synchronized, avoids the training process taking up too much time, and greatly improves work efficiency. In the next iteration, the use cases of all functional modules in the use case library are still trained. Therefore, under normal circumstances, the use cases of all functional modules in the use case library will be trained, and there will be no omissions.

[0011] In an optional embodiment, each functional module is configured with key test cases. During this iteration cycle, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library, specifically including:

[0012] For each functional module, two natural language training models are used to test the key test cases corresponding to each functional module in the use case library;

[0013] When the key test cases are tested successfully, test the other test cases except the key test cases corresponding to the functional modules;

[0014] Alternatively, when a critical test case fails, the functional module is directly accelerated to the blocking pool.

[0015] Specifically, each functional module corresponds to at least one test case, and each test case plays a different role in the functional module. For example, each functional module may include a key test case. If the key test case fails, the other test cases will not be of much significance even if they pass. Therefore, for each functional module, it is necessary to first conduct training tests on the key test cases. Once the key test case fails during the training test, there is no need to test the subsequent test cases of the functional module. The training of the test cases for the functional module is directly stopped, and the functional module is added to the blocking pool, where the key test cases have a higher priority than other ordinary test cases. In this way, the training efficiency is improved.

[0016] In an optional embodiment, multiple functional modules in the use case library are configured with priorities;

[0017] The priority of a functional module determines the test order of the functional module, where the priority of a functional module is determined according to the number of test cases of the functional module.

[0018] Specifically, the more important the functional module is, the more it should be trained and tested first. The more important the functional module is, the more test cases it will have.

[0019] In an optional implementation, the preset value is zero, or a fixed value that is smaller than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library.

[0020] Specifically, when the preset value is zero, it means that there are no functional modules in the blocking pool, which is equivalent to saying that all functional modules in the entire use case library have been tested successfully. Alternatively, when the preset value is a fixed value that is a preset multiple of the total number of test cases corresponding to the highest-priority functional module in the use case library, it means that the most important functional module in the use case library has failed training and testing in multiple rounds of testing, which has caused the number of use cases in the blocking pool to reach the preset value. At this time, it is necessary to stop training and notify staff to check the functional modules in the blocking pool to see whether the most important functional module exists, and take effective measures.

[0021] In an optional implementation, the preset stop condition includes:

[0022] Determining that a training test of a first test case corresponding to the first functional module by a first natural language training model of the two natural language training models fails, wherein the first test case is any one of the at least one test case;

[0023] or,

[0024] Determine whether the difference between the cumulative time of testing the test case corresponding to the first functional module by the two natural language training models is greater than a preset time threshold.

[0025] Specifically, when it is determined that the first natural language training model in the two natural language training models fails the training test of any test case corresponding to the first functional module, it means that this functional module cannot be directly applied, so it needs to be added to the blocking pool; or, the difference between the cumulative time of the two natural language training models for the first functional module is greater than the preset time threshold, it means that the training of the two natural language training models for the first functional module is not synchronized, and there will be speed differences or efficiency differences. The functional module needs to be added to the blocking pool and training of other functional modules needs to be carried out.

[0026] In an optional embodiment, the method further includes:

[0027] When the current iteration cycle is not the last iteration cycle among the preset number of iteration cycles, the training process of the next iteration cycle is entered after the training of the current iteration cycle is completed;

[0028] In the training process of the next iteration cycle, if it is determined that all test cases of the second functional module are trained successfully, the test cases corresponding to the second functional module are removed from the blocking pool. The second functional module is any functional module in the blocking pool.

[0029] Specifically, when the current iteration cycle is not the last iteration cycle among the preset number of iteration cycles, the training process of the next iteration cycle is entered after the training of the current iteration cycle is completed. In the training process of the next iteration cycle, if all test cases of the second functional module are successfully trained, the second functional module is removed from the blocking pool. In this way, the number of test cases in the blocking pool is reduced.

[0030] In an optional embodiment, when the number of functional modules in the blocking pool reaches a preset value, the method further includes:

[0031] Generate a prompt message, wherein when the preset value is zero, the prompt message is used to indicate that all functional modules in the use case library have been trained;

[0032] Alternatively, when the preset value is a fixed value that is less than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library, the prompt information is used to indicate that at least one of the two natural language training models has failed.

[0033] Specifically, the prompt information is used to inform the staff that the current training has been completed, or to prompt a fault alarm.

[0034] In a second aspect, the present invention provides a natural language training model training device, the device comprising:

[0035] A training module is used to train and test the test cases corresponding to each functional module in the use case library using two natural language training models during this iteration cycle. The use case library includes test cases corresponding to multiple functional modules, and each functional module includes at least one test case.

[0036] A determination module, configured to add the first functional module to the blocking pool when it is determined that the training test of the test case corresponding to the first functional module by any natural language training model meets a preset stop condition;

[0037] The processing module controls the two natural language training models to stop training the test cases of the first functional module, and respectively uses the two natural language training models to train other functional modules except the first functional module, until the current iteration cycle is the last iteration cycle in the preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value, the operation is terminated.

[0038] The natural language training model training device provided by the present invention has the following advantages:

[0039] In this iteration cycle, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library. When it is determined that the training test of the test case corresponding to the first functional module by any natural language training model meets the preset stop condition, the first functional module is added to the blocking pool. In this iteration cycle, both natural language training models will stop training the test case of the first functional module. Instead, they continue to train the test case corresponding to the next functional module in the use case library. The operation ends until this iteration cycle is the last iteration cycle in the preset number of iteration cycles, or the number of functional modules in the blocking pool reaches a preset value. In this process, if the training test of the test case corresponding to the first functional module by any natural language training model meets the preset stop condition, if the other natural language training model continues to complete the test of the first functional module, it will inevitably lead to the two natural language training models being out of sync in testing the functional modules in the use case library, such as asynchrony in processing speed and efficiency. Using the method of the present application, the two natural language training models simultaneously stop training the first functional module, add it to the blocking pool, and continue to synchronously train the test cases corresponding to other functional modules in the use case library. This ensures that the training of the two natural language training models is synchronized, avoids the training process taking up too much time, and greatly improves work efficiency. In the next iteration, the use cases of all functional modules in the use case library are still trained. Therefore, under normal circumstances, the use cases of all functional modules in the use case library will be trained, and there will be no omissions.

[0040] In an optional embodiment, each functional module is configured with key test cases and training modules, specifically for:

[0041] For each functional module, two natural language training models are used to test the key test cases corresponding to each functional module in the use case library;

[0042] When the key test cases are tested successfully, test the other test cases except the key test cases corresponding to the functional modules;

[0043] Alternatively, when a critical test case fails, the functional module is directly accelerated to the blocking pool.

[0044] Specifically, each functional module corresponds to at least one test case, and each test case plays a different role in the functional module. For example, each functional module may include a key test case. If the key test case fails, the other test cases will not be of much significance even if they pass. Therefore, for each functional module, it is necessary to first conduct training tests on the key test cases. Once the key test case fails during the training test, there is no need to test the subsequent test cases of the functional module. The training of the test cases for the functional module is directly stopped, and the functional module is added to the blocking pool, where the key test cases have a higher priority than other ordinary test cases. In this way, the training efficiency is improved.

[0045] In an optional embodiment, multiple functional modules in the use case library are configured with priorities;

[0046] The priority of a functional module determines the test order of the functional module, where the priority of a functional module is determined according to the number of test cases of the functional module.

[0047] Specifically, the more important the functional module is, the more it should be trained and tested first. The more important the functional module is, the more test cases it will have.

[0048] In an optional implementation, the preset value is zero, or a fixed value that is smaller than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library.

[0049] Specifically, when the preset value is zero, it means that there are no functional modules in the blocking pool, which is equivalent to saying that all functional modules in the entire use case library have been tested successfully. Alternatively, when the preset value is a fixed value that is a preset multiple of the total number of test cases corresponding to the highest-priority functional module in the use case library, it means that the most important functional module in the use case library has failed training and testing in multiple rounds of testing, which has caused the number of use cases in the blocking pool to reach the preset value. At this time, it is necessary to stop training and notify staff to check the functional modules in the blocking pool to see whether the most important functional module exists, and take effective measures.

[0050] In an optional implementation, the preset stop condition includes:

[0051] Determining that a training test of a first test case corresponding to the first functional module by a first natural language training model of the two natural language training models fails, wherein the first test case is any one of the at least one test case;

[0052] or,

[0053] Determine whether the difference between the cumulative time of testing the test case corresponding to the first functional module by the two natural language training models is greater than a preset time threshold.

[0054] Specifically, when it is determined that the first natural language training model in the two natural language training models fails the training test of any test case corresponding to the first functional module, it means that this functional module cannot be directly applied, so it needs to be added to the blocking pool; or, the difference between the cumulative time of the two natural language training models for the first functional module is greater than the preset time threshold, it means that the training of the two natural language training models for the first functional module is not synchronized, and there will be speed differences or efficiency differences. The functional module needs to be added to the blocking pool and training of other functional modules needs to be carried out.

[0055] In an optional embodiment, the apparatus further includes a processing module configured to, when the current iteration cycle is not the last iteration cycle among the preset number of iteration cycles, enter the training process of the next iteration cycle after the training of the current iteration cycle is completed;

[0056] The processing module is used to remove the test cases corresponding to the second functional module from the blocking pool if it is determined that all test cases of the second functional module are successfully trained in the training process of the next iteration cycle. The second functional module is any functional module in the blocking pool.

[0057] Specifically, when the current iteration cycle is not the last iteration cycle among the preset number of iteration cycles, the training process of the next iteration cycle is entered after the training of the current iteration cycle is completed. In the training process of the next iteration cycle, if all test cases of the second functional module are successfully trained, the second functional module is removed from the blocking pool. In this way, the number of test cases in the blocking pool is reduced.

[0058] In some optional embodiments, the device further comprises:

[0059] Generate module, when the number of functional modules in the blocking pool reaches a preset value, generate prompt information, wherein, when the preset value is zero, the prompt information is used to indicate that all functional modules in the use case library have been trained;

[0060] Alternatively, when the preset value is a fixed value that is less than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library, the prompt information is used to indicate that at least one of the two natural language training models has failed.

[0061] Specifically, the prompt information is used to inform the staff that the current training has been completed, or to prompt a fault alarm.

[0062] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the natural language training model training method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0063] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the natural language training model training method of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0065] Figure 1 is a flow chart of a natural language training model training method provided by an embodiment of the present invention;

[0066] Figure 2 This is a schematic diagram of the structure of the cloud computing virtualization platform provided by the present invention;

[0067] Figure 3 This is a schematic diagram of the cloud platform layer structure provided by the present invention;

[0068] Figure 4 1 is a flow chart of another natural language training model training method provided by an embodiment of the present invention;

[0069] Figure 5 This is a flowchart of another natural language training model training method provided by an embodiment of the present invention;

[0070] Figure 6 This is a structural block diagram of a natural language training model training device according to an embodiment of the present invention;

[0071] Figure 7 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0072] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0073] There are many uncertainties in the automated training process. Differences in environment, configuration, and selected parameters may affect the automated training process. For example, when training the accuracy of generated JSON statements, using a synchronous training method, due to different random parameter selections, the following situations may occur:

[0074] 1. The accumulation of running time differences between the two sides leads to a decrease in training efficiency;

[0075] For example, the control group's command parameters have more digits, while the training group's parameters have only single digits. This leads to differences in processing speed and efficiency between the two groups. As this difference accumulates, one group may need to stop training and wait for the other group to catch up before continuing.

[0076] 2. Due to the influence of environment and configuration, although we try to select the same environment and configuration as much as possible, in actual daily work, different environments and / or configurations still occur, and the frequency is probably not low. This can cause automation process errors on one or both sides of the training.

[0077] For example, you need to test the functionality of a virtual switch, but in reality, the configuration in a certain model fails to create the virtual switch successfully, causing subsequent tests related to the virtual switch in the model to be incorrectly trained.

[0078] To solve the above problems, an embodiment of the present invention provides a natural language training model training embodiment. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system (computer device) including, for example, a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0079] In this embodiment, a natural language training model training method is provided, which can be used for the above-mentioned terminal devices, such as mobile phones, tablet computers, etc. Figure 1 is a flow chart of the natural language training model training method provided by an embodiment of the present invention, such as Figure 1 As shown, the process includes the following steps.

[0080] Before introducing the method steps of the embodiment of the present invention, the specific application scenario of the embodiment of the present invention is first introduced.

[0081] The present invention is mainly used for the natural language processing model training of cloud computing virtualization platforms. Through this method, a dedicated and efficient natural language processing tool can be trained for the cloud computing virtualization platform to better help users use the virtualization platform. Compared with the traditional user manual, the natural language training model trained by this solution can provide customers with services such as basic computer command prompts and basic network fault location on the basis of understanding the functions of this product. Compared with other traditional web-based artificial intelligence dialogue robots, the natural language training model trained by this solution can not only guide customers to perform system operations, but also complete the relevant commands specified by the customer through the statements entered by the customer (such as: creating a virtual switch, adding a virtual disk, etc.).

[0082] Cloud computing virtualization platform generally consists of three parts: front-end, platform, and bottom layer (business layer). Figure 2 , where the front end is the user interface, which helps users to issue commands conveniently and quickly through graphical and text interfaces. The role of the platform is to receive commands issued by the front end and transmit them to the bottom layer. The bottom layer is used to receive commands issued by the platform layer and complete actual needs. It should be noted that the platform layer is mostly divided into the control layer, service layer and persistence layer. Among them, see Figure 3 As shown, Figure 3 The cloud platform layer structure is defined. The control layer receives and encapsulates JSON statements sent from the front end. The service layer checks the encapsulated data and invokes relevant business logic to send the data to the underlying layer. Upon receiving feedback from the underlying layer confirming the successful execution of the command, the relevant data is stored in the persistence layer to ensure consistency between the platform layer and the underlying layer.

[0083] The method steps of the embodiment of the present invention are as follows, including:

[0084] Step S101: In this iteration cycle, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library.

[0085] Specifically, the use case library includes multiple functional modules, and each functional module is configured with at least one test case.

[0086] Therefore, during the current iteration, two natural language training models are required to train and test all test cases corresponding to each functional module in the use case library. The test cases tested by one natural language training model can be considered the training group, while the test cases tested by the other natural language training model can be considered the control group. The test results obtained from the control group are used to verify the training results of the training group.

[0087] Step S102: When it is determined that the training test of the test case corresponding to the first functional module by any natural language training model meets the preset stop condition, the first functional module is added to the blocking pool.

[0088] Step S103, control the two natural language training models to stop training the test cases of the first functional module, and use the two natural language training models to train other functional modules except the first functional module respectively, until the current iteration cycle is the last iteration cycle in the preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value, the operation is terminated.

[0089] Specifically, when any natural language training model, usually referring to the natural language model of the training group, meets the preset stop conditions for the training test of the test case corresponding to the first functional module, both natural language training models will stop testing the test case of the functional module, and add all test cases corresponding to the first functional module to the blocking pool.

[0090] Adding a function module to the blocking pool does not mean that it will no longer be trained and tested; it only means that it will no longer be trained and tested during the current iteration. Training and testing will resume in the next iteration. Adding a function module to the blocking pool prevents delays in training and testing of the function module, which could prevent the natural language training model from continuing to train and test other function modules, or require a significant delay before training and testing other function modules can be performed. This would cause the testing progress of the other natural language training model to far exceed that of the current one, making comparison between the two less meaningful. By adding the function module that has been failing to test successfully to the blocking pool, it proceeds directly to the next testing phase. This means that both natural language training models simultaneously train the test case for the next function module. The processes remain synchronized, making comparison and verification of the two sets of results more meaningful.

[0091] The natural language training model training method provided in this embodiment uses two natural language training models to train and test the test cases corresponding to each functional module in the use case library during this iteration cycle. When it is determined that the training and testing of the test cases corresponding to the first functional module by any natural language training model meets the preset stop condition, the first functional module is added to the blocking pool. During this iteration cycle, both natural language training models will stop training the test cases of the first functional module. Instead, they will continue to train the test cases corresponding to the next functional module in the use case library. The operation ends until this iteration cycle is the last iteration cycle in a preset number of iteration cycles, or the number of functional modules in the blocking pool reaches a preset value. In this process, if the training and testing of the test cases corresponding to the first functional module by any natural language training model meets the preset stop condition, if the other natural language training model continues to complete the testing of the first functional module, it will inevitably lead to asynchrony in the testing of the functional modules in the use case library by the two natural language training models, for example, asynchrony in processing speed and efficiency. Using the method of the present application, the two natural language training models simultaneously stop training the first functional module, add it to the blocking pool, and continue to synchronously train the test cases corresponding to other functional modules in the use case library. This ensures that the training of the two natural language training models is synchronized, avoids the training process taking up too much time, and greatly improves work efficiency. In the next iteration, the use cases of all functional modules in the use case library are still trained. Therefore, under normal circumstances, the use cases of all functional modules in the use case library will be trained, and there will be no omissions.

[0092] In this embodiment, a natural language training model training method is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 4 is a flowchart of another natural language training model training method provided by an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0093] Step S401: In this iteration cycle, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library.

[0094] Specifically, the use case library includes test cases corresponding to multiple functional modules, and each functional module includes at least one test case. Moreover, each functional module is configured with a key test case.

[0095] Therefore, in an optional embodiment, during this iteration cycle, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library, specifically including:

[0096] In step S4011, for each functional module, two natural language training models are used to test the key test cases corresponding to each functional module in the use case library.

[0097] Step S4012: When the key test case is successfully tested, other test cases corresponding to the functional module except the key test case are tested.

[0098] Step S4013, or, when a key test case fails, directly accelerate the function module to block the pool.

[0099] Specifically, key test cases are the primary test cases supporting the functionality of a functional module. If a key test case, serving as the foundational functional test for that module, fails, then testing other test cases becomes irrelevant. Therefore, for each functional module, two natural language training models must be used to test the key test cases corresponding to each functional module in the test case library. Only when the key test case succeeds should the remaining test cases corresponding to the functional module be tested. Otherwise, if the key test case fails, the functional module is simply accelerated out of the blocking pool.

[0100] Step S402: When it is determined that the training test of the test case corresponding to the first functional module by any natural language training model meets the preset stop condition, the first functional module is added to the blocking pool.

[0101] Step S403, control the two natural language training models to stop training the test cases of the first functional module, and use the two natural language training models to train other functional modules except the first functional module respectively, until the current iteration cycle is the last iteration cycle in the preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value, the operation is terminated.

[0102] For details on steps S402 and S403, see Figure 1 Step S102 and step S103 of the illustrated embodiment will not be described in detail here.

[0103] An embodiment of the present invention provides a natural language training model training method, in which each functional module corresponds to at least one test case, and each test case plays a different role in the functional module. For example, each functional module may include a key test case. If the key test case fails, the other test cases are not very meaningful even if they pass. Therefore, it is necessary to first perform training tests on the key test cases for each functional module. Once the key test case fails during the training test, there is no need to test the subsequent test cases of the functional module. The training of the test cases for the functional module is directly stopped, and the functional module is added to the blocking pool, wherein the key test cases have a higher priority than other ordinary test cases. In this way, the training efficiency is improved.

[0104] In an optional implementation, based on any of the aforementioned embodiments, multiple functional modules in the use case library are configured with priorities;

[0105] The priority of a functional module determines the test order of the functional module, where the priority of a functional module is determined according to the number of test cases of the functional module.

[0106] In other words, before training and testing the test cases for a functional module, the functional modules must first be sorted according to their priority. Then, the functional model is tested in this sorted order. The priority of a functional module is determined based on the data in the test cases corresponding to the functional module. The more important the functional module, the higher its priority should be in training and testing. Furthermore, the more important the functional module, the greater the number of test cases it will correspond to.

[0107] In an optional implementation, based on any of the foregoing embodiments, the preset value is zero, or a fixed value that is less than a preset multiple of the total number of test cases corresponding to the highest priority functional module in the use case library.

[0108] Specifically, when the preset value is zero, it means that there are no functional modules in the blocking pool, which is equivalent to saying that all functional modules in the entire use case library have been tested successfully. Alternatively, when the preset value is a fixed value that is a preset multiple of the total number of test cases corresponding to the highest-priority functional module in the use case library, it means that the most important functional module in the use case library has failed training and testing in multiple rounds of testing, which has caused the number of use cases in the blocking pool to reach the preset value. At this time, it is necessary to stop training and notify staff to check the functional modules in the blocking pool to see if the most important functional module exists, and take effective measures.

[0109] In an optional embodiment, the preset stop condition includes:

[0110] Determining that a training test of a first test case corresponding to the first functional module by a first natural language training model of the two natural language training models fails, wherein the first test case is any one of the at least one test case;

[0111] or,

[0112] Determine whether the difference between the cumulative time of testing the test case corresponding to the first functional module by the two natural language training models is greater than a preset time threshold.

[0113] Specifically, when it is determined that the training test of the first natural language training model in the two natural language training models for any test case corresponding to the first functional module fails, it means that this functional module cannot be directly applied, so it needs to be added to the blocking pool; or, the difference between the cumulative time of the two natural language training models for the first functional module is greater than the preset time threshold, it means that the training of the two natural language training models for the first functional module is not synchronized, and there will be speed differences or efficiency differences. The functional module needs to be added to the blocking pool and training of other functional modules needs to be carried out.

[0114] In this embodiment, a natural language training model training method is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 5 This is a flow chart of another natural language training model training method provided by an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0115] Step S501: During this iteration cycle, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library.

[0116] Step S502: When it is determined that the training test of the test case corresponding to the first functional module by any natural language training model meets the preset stop condition, the first functional module is added to the blocking pool.

[0117] Step S503, control the two natural language training models to stop training the test cases of the first functional module, and use the two natural language training models to train other functional modules except the first functional module respectively, until the current iteration cycle is the last iteration cycle in the preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value, the operation is terminated.

[0118] For the introduction of steps S502 to S503 , please refer to steps S101 to S103 of the aforementioned embodiment 1, which will not be repeated here.

[0119] Step S504: When the current iteration cycle is not the last iteration cycle among the preset number of iteration cycles, the training process of the next iteration cycle is entered after the training of the current iteration cycle is completed.

[0120] Step S505, in the training process of the next iteration cycle, if it is determined that all test cases of the second functional module are trained successfully, the test cases corresponding to the second functional module are removed from the blocking pool, and the second functional module is any functional module in the blocking pool.

[0121] The second functional module is any functional module in the blocking pool.

[0122] Specifically, when the current iteration cycle is not the last iteration cycle among the preset number of iteration cycles, it is naturally necessary to enter the training process of the next iteration cycle after the training of the current iteration cycle is completed. Moreover, in the training process of the next iteration cycle, if it is determined that all test cases of the second functional module have been trained successfully, it means that storing the test cases corresponding to the second functional module in the blocking pool is meaningless and will also occupy storage space. Therefore, the test cases corresponding to the second functional module can be removed from the blocking pool, and the number of test cases in the blocking pool can also be reduced to prevent the training test from being stopped.

[0123] In any of the aforementioned optional implementations, when the number of functional modules in the blocking pool reaches a preset value, the method further includes:

[0124] Generate a prompt message, wherein when the preset value is zero, the prompt message is used to indicate that all functional modules in the use case library have been trained;

[0125] Alternatively, when the preset value is a fixed value that is less than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library, the prompt information is used to indicate that at least one of the two natural language training models has failed.

[0126] Specifically, the prompt information is used to inform the staff that the current training has been completed, or to prompt a fault alarm.

[0127] In any of the aforementioned optional implementations, in the natural language training model, different functional modules may require different data sets and training methods. Therefore, in the embodiment of the present application, the training tasks of these functional modules can be parallelized to improve training efficiency.

[0128] First, we need to prepare the use cases for different functional modules and divide them into appropriate training and validation sets. Each functional module's use case may include input text, expected output, and corresponding labels. Then, within each natural language training model, we set an appropriate number of threads. Each thread is responsible for executing the training task for a functional module. Within each thread, we can load the corresponding training dataset and train the model using an appropriate training method. The training method can be selected based on the specific functional module and task requirements, such as using a deep learning model for sequence labeling, classification, or generation tasks.

[0129] During training, we can regularly monitor the training progress of each functional module and record the model's performance metrics on the validation set. This allows us to evaluate the training effectiveness of different functional modules and make corresponding adjustments and optimizations. Simultaneously training multiple functional modules fully utilizes the system's computing resources and improves training efficiency. Furthermore, we can limit the number of concurrent tasks to avoid system overload and performance degradation.

[0130] In a specific application example, a natural language processing model and training scheme are applied to a cloud computing virtualization platform.

[0131] First, we introduce the required components: the original natural language processing model, two cloud computing virtualization hosts of the same version, the virtualization platform, and the cloud computing virtualization platform automated testing tool.

[0132] There are many choices for original natural language processing models. When choosing an open source model, you should try to choose a model that can be deployed locally and has fewer parameters.

[0133] Cloud computing virtualization host and virtualization platform. Currently, most cloud computing virtualization platform architectures are basically deployed in a front-end + platform + underlying layer. Therefore, when choosing, you can choose a front-end + platform + underlying layer architecture, such as the open source openstack. This invention uses InCloud Sphere as an example.

[0134] The automated testing tool for cloud computing virtualization platforms is designed to simulate user operations, automatically execute all use case operations, and output test results based on feedback from the underlying system. The automated testing tool includes a use case library (which records use case numbers and content, for example, using a use case to create a virtual machine uplink), a compilation module (a manually created JSON statement library that compiles each use case in the library into a JSON statement acceptable to the platform control layer), a verification module (which verifies and analyzes the execution results of the current use case), and a result output module (which receives and summarizes the execution results of the verification module, summarizing the results of each use case and outputting a report).

[0135] The object that needs to be trained in this application document is the cloud computing virtualization platform automation testing tool. The cloud computing virtualization platform automation testing tool is tested using the above method to finally obtain a better virtualization platform automation testing tool.

[0136] In this embodiment, a natural language training model training device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0137] This embodiment provides a natural language training model training device, such as Figure 6 As shown, it includes: a training module 601, a determination module 602, and a processing module 603.

[0138] A training module 601 is configured to train and test the test cases corresponding to each functional module in the use case library using two natural language training models during this iteration. The use case library includes test cases corresponding to multiple functional modules, and each functional module includes at least one test case.

[0139] A determination module 602 is configured to add the first functional module to a blocking pool when it is determined that the training test of the test case corresponding to the first functional module by any natural language training model meets a preset stop condition;

[0140] Processing module 603 controls the two natural language training models to stop training the test cases of the first functional module, and respectively uses the two natural language training models to train other functional modules except the first functional module, until the current iteration cycle is the last iteration cycle in the preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value.

[0141] Optionally, each functional module is configured with key test cases, and the training module 601 is specifically used to:

[0142] For each functional module, two natural language training models are used to test the key test cases corresponding to each functional module in the use case library;

[0143] When the key test cases are tested successfully, test the other test cases except the key test cases corresponding to the functional modules;

[0144] Alternatively, when a critical test case fails, the functional module is directly accelerated to the blocking pool.

[0145] Optionally, multiple functional modules in the use case library are configured with priorities;

[0146] The priority of a functional module determines the test order of the functional module, where the priority of a functional module is determined according to the number of test cases of the functional module.

[0147] Optionally, the preset value is zero, or a fixed value that is smaller than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library.

[0148] Optionally, the preset stop conditions include:

[0149] Determining that a training test of a first test case corresponding to the first functional module by a first natural language training model of the two natural language training models fails, wherein the first test case is any one of the at least one test case;

[0150] or,

[0151] Determine whether the difference between the cumulative time of testing the test case corresponding to the first functional module by the two natural language training models is greater than a preset time threshold.

[0152] Optionally, the apparatus further includes a processing module 603 configured to, when the current iteration cycle is not the last iteration cycle among a preset number of iteration cycles, enter the training process of the next iteration cycle after the training of the current iteration cycle is completed;

[0153] Processing module 603 is used to remove the test cases corresponding to the second functional module from the blocking pool if it is determined that all test cases of the second functional module are successfully trained in the training process of the next iteration cycle. The second functional module is any functional module in the blocking pool.

[0154] Optionally, the apparatus further includes a generating module 604;

[0155] A generating module 604 is configured to generate a prompt message when the number of function modules in the blocking pool reaches a preset value, wherein when the preset value is zero, the prompt message is used to indicate that all function modules in the use case library have been trained;

[0156] Alternatively, when the preset value is a fixed value that is less than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library, the prompt information is used to indicate that at least one of the two natural language training models has failed.

[0157] The natural language training model training device in this embodiment is presented in the form of a functional module, where the module refers to an application-specific integrated circuit (ASIC), a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0158] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0159] An embodiment of the present invention provides a natural language training model training device.

[0160] The embodiment of the present invention also provides a computer device having the above Figure 6 The natural language training model training device shown.

[0161] See also Figure 7 , Figure 7 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0162] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0163] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.

[0164] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of a computer device for displaying a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0165] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0166] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The bus connection is taken as an example.

[0167] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0168] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0169] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A natural language training model training method, characterized in that: The method comprises: During this iteration, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library, wherein the use case library includes test cases corresponding to multiple functional modules, and each functional module includes at least one test case. When it is determined that the training test of the test case corresponding to the first functional module by any of the natural language training models meets the preset stop condition, the first functional module is added to the blocking pool; Control the two natural language training models to stop training the test cases of the first functional module, and use the two natural language training models to train other functional modules except the first functional module respectively, until the current iteration cycle is the last iteration cycle in the preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value, the operation is terminated.

2. The method according to claim 1, characterized in that Each functional module is configured with key test cases. During this iteration cycle, two natural language training models are used to train and test the test cases corresponding to each functional module in the use case library, specifically including: For each functional module, two natural language training models are used to test the key test cases corresponding to each functional module in the use case library; When the key test case is tested successfully, other test cases corresponding to the functional module except the key test case are tested; Alternatively, when the key test case fails, the functional module is directly accelerated to the blocking pool.

3. The method according to claim 1, characterized in that Priorities are configured for the multiple functional modules in the use case library; The priority of the functional module determines the test order of the functional module, wherein the priority of the functional module is determined according to the number of test cases of the functional module.

4. The method according to any one of claims 1 to 3, characterized in that The preset value is zero, or a fixed value that is smaller than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library.

5. The method according to any one of claims 1 to 3, characterized in that The preset stop conditions include: Determining that a first natural language training model of the two natural language training models fails a training test on a first test case corresponding to the first functional module, wherein the first test case is any one of the at least one test case; or, Determine whether the difference between the cumulative time of testing the test cases corresponding to the first functional module by the two natural language training models is greater than a preset time threshold.

6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the current iteration cycle is not the last iteration cycle among the preset number of iteration cycles, the training process of the next iteration cycle is entered after the training of the current iteration cycle is completed; In the training process of the next iteration cycle, if it is determined that all test cases of the second functional module are trained successfully, the test cases corresponding to the second functional module are removed from the blocking pool. The second functional module is any functional module in the blocking pool.

7. The method according to claim 4, characterized in that When the number of functional modules in the blocking pool reaches a preset value, the method further includes: Generate prompt information, wherein when the preset value is zero, the prompt information is used to indicate that all functional modules in the use case library have been trained; Alternatively, when the preset value is a fixed value that is less than a preset multiple of the total number of test cases corresponding to the functional module with the highest priority in the use case library, the prompt information is used to indicate that at least one of the two natural language training models has failed.

8. A natural language training model training device, characterized in that: The device comprises: A training module is configured to, during this iteration cycle, respectively train and test the test cases corresponding to each functional module in the use case library using two natural language training models, wherein the use case library includes test cases corresponding to multiple functional modules, and each functional module includes at least one test case; A determination module, configured to add the first functional module to a blocking pool when it is determined that the training test of the test case corresponding to the first functional module by any of the natural language training models meets a preset stop condition; The processing module controls the two natural language training models to stop training the test cases of the first functional module, and respectively uses the two natural language training models to train other functional modules except the first functional module, until the current iteration cycle is the last iteration cycle in the preset number of iteration cycles, or when the number of test cases in the blocking pool reaches a preset value, the operation is terminated.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the natural language training model training method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the natural language training model training method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Synchronous training method and device, computer device and storage medium

    CN110688230A

  • Natural language processing model training method and device

    CN111931520A