Method and apparatus for generating motion knowledge
By dynamically adjusting the amount of training data and based on model parameters and attribute information, the problem of inaccurate training data in motion knowledge generation models is solved, thereby improving training efficiency and output accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING CALORIE INFORMATION TECH CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-31
AI Technical Summary
Current motion knowledge generation models suffer from low training efficiency and accuracy when the amount of training data is insufficient or excessive, which in turn reduces the accuracy of the output results.
By dynamically determining the amount of data in the target training dataset, and using the first coefficient of the supervised training phase and the second coefficient of the reinforcement training phase based on the model parameter count and attribute information, training data is obtained from the sample database to ensure that the training data size matches the model capability.
It improves model training efficiency and output accuracy, avoids underfitting and overfitting problems caused by insufficient data, and improves training cycle and resource utilization efficiency.
Smart Images

Figure CN122491446A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and more specifically, to a method and apparatus for generating motion knowledge. Background Technology
[0002] Currently, when users acquire sports knowledge, they typically use sports-related applications or mini-programs, call the sports-related large language model configured in the application or mini-program, and interact with the large language model to obtain the corresponding sports knowledge.
[0003] However, when training large language models, it is necessary to obtain sample data from a sample database as a training set to train the model. However, when obtaining training data in the training set, usually only a certain number of sample data are obtained from the sample database based on experience.
[0004] However, this method of obtaining training data may result in insufficient or excessive data. Insufficient data will lead to underfitting and inadequate performance of the model, while excessive data will result in wasted resources, prolonged training cycles, and even overfitting, thereby affecting the model's training efficiency and accuracy. This will reduce the accuracy of the model's output results when the model is used to generate motion knowledge.
[0005] There is currently no effective solution to the problem that inaccurate training data in the training set leads to low training efficiency and accuracy of the model, which in turn reduces the accuracy of the model output. Summary of the Invention
[0006] The main objective of this application is to provide a method and apparatus for generating motion knowledge, in order to solve the problem in related technologies where the inaccuracy of the amount of training data in the training set leads to low training efficiency and accuracy of the model, thereby reducing the accuracy of the model output results.
[0007] To achieve the above objectives, according to one aspect of this application, a method for generating motion knowledge is provided. The method includes: receiving motion question information sent by a user terminal, parsing the motion question information to obtain question content; standardizing the question content to obtain a target question, inputting the target question into a motion knowledge question-answering model to obtain motion knowledge response information, and sending the motion knowledge response information to the user terminal. The motion knowledge question-answering model is obtained by training a model to be trained using a target training dataset, which is obtained from a sample database based on the model information of the model to be trained.
[0008] Optionally, the target training dataset is obtained as follows: The model parameter count and model attribute information of the model parameters included in the model to be trained are obtained from the model information, and the baseline data volume of the training data for the model to be trained is determined based on the model parameter count; First coefficients of the model to be trained in the supervised training phase are determined based on the model parameter count and model attribute information, and the first data volume of the training data for the model to be trained in the supervised training phase is determined based on the first coefficients and the baseline data volume, wherein the first coefficients are used to adjust the baseline data volume; Second coefficients of the model to be trained in the reinforcement training phase are obtained, and the second data volume of the training data for the model to be trained in the reinforcement training phase is determined based on the first data volume and the second coefficients, wherein the second coefficients are used to adjust the first data volume; The target training dataset of the model to be trained is obtained from the sample database based on the first data volume and the second data volume.
[0009] Optionally, determining the baseline data volume of the training data for the model to be trained based on the model parameter volume includes: obtaining the anchor parameter volume of the model parameters contained in the baseline model, and dividing the model parameter volume by the anchor parameter volume to obtain the first parameter; obtaining the anchor data volume of the training data of the baseline model, and determining the correction coefficient of the model to be trained based on the model parameter volume; and multiplying the anchor data volume, the first parameter, and the correction coefficient to obtain the baseline data volume.
[0010] Optionally, determining the first coefficient of the model to be trained during the supervised training phase based on the number of model parameters and model attribute information includes: determining the model size coefficient of the model to be trained based on the number of model parameters and a first lookup table, wherein the first lookup table includes multiple model parameter numbers and the coefficient value of the model size coefficient corresponding to each model parameter number; determining the model function of the model to be trained based on the model attribute information, and determining the functional complexity coefficient, scenario coefficient, and safety coefficient of the model to be trained based on the model function; determining the number of training parameters of the model to be trained based on the model attribute information, and determining the training method coefficient of the model to be trained based on the number of training parameters; obtaining the data quality of the sample database, and determining the data quality coefficient of the model to be trained based on the data quality; determining the performance requirements of the model to be trained based on the model attribute information, and determining the performance coefficient of the model to be trained based on the performance requirements; and multiplying the model size coefficient, functional complexity coefficient, scenario coefficient, safety coefficient, training method coefficient, data quality coefficient, and performance coefficient to obtain the first coefficient.
[0011] Optionally, determining the first data quantity of training data for the model to be trained during the supervised training phase based on the first coefficient and the baseline data quantity includes multiplying the first coefficient by the baseline data quantity to obtain the first data quantity.
[0012] Optionally, obtaining the second coefficient of the model to be trained during the reinforcement training phase includes: when the direct preference optimization algorithm is used during the reinforcement training phase, determining the model function of the model to be trained based on the model attribute information; determining the multi-turn dialogue coefficient and safety coefficient of the model to be trained based on the model function; obtaining the proportional coefficient of the direct preference optimization algorithm, and determining the third coefficient based on the proportional coefficient, multi-turn dialogue coefficient and safety coefficient; and determining the coefficient value of the third coefficient as the coefficient value of the second coefficient.
[0013] Optionally, obtaining the second coefficient of the model to be trained during the reinforcement training phase includes: when using the proximal policy optimization algorithm during the reinforcement training phase, obtaining the basic amplification coefficient, reward complexity coefficient, and interaction complexity coefficient of the proximal policy optimization algorithm; determining the fourth coefficient based on the third coefficient, basic amplification coefficient, reward complexity coefficient, interaction complexity coefficient, and multi-turn dialogue coefficient; and determining the coefficient value of the fourth coefficient as the coefficient value of the second coefficient.
[0014] Optionally, determining the second data quantity of the training data for the model to be trained during the reinforcement training phase based on the first data quantity and the second coefficient includes multiplying the first data quantity and the second coefficient to obtain the second data quantity.
[0015] Optionally, obtaining the target training data set for the model to be trained from the sample database based on the first data volume and the second data volume includes: determining the data types of the sample data stored in the sample database and determining the proportion of sample data under each data type; determining the first sub-data volume of each data type based on the proportion and the first data volume, and obtaining sample data from the sample database based on the first sub-data volume to obtain a first training data set, wherein the first training data set is used to train the model to be trained during the supervised training phase; determining the second sub-data volume of each data type based on the proportion and the second data volume, and obtaining sample data from the sample database based on the second sub-data volume to obtain a second training data set, wherein the second training data set is used to train the model to be trained during the reinforcement training phase; and combining the first training data set and the second training data set into a target training data set.
[0016] To achieve the above objectives, according to another aspect of this application, a motion knowledge generation apparatus is provided. The apparatus includes: a parsing unit, configured to receive motion question information sent by a user terminal and parse the motion question information to obtain question content; and a processing unit, configured to standardize the question content to obtain a target question, input the target question into a motion knowledge question-answering model to obtain motion knowledge response information, and send the motion knowledge response information to the user terminal. The motion knowledge question-answering model is obtained by training a model to be trained using a target training dataset, which is obtained from a sample database based on the model information of the model to be trained.
[0017] In this embodiment, the system receives motion-related question information sent by a user and parses it to obtain the question content. The question content is then standardized to obtain the target question, which is input into a motion knowledge question-answering model to obtain motion knowledge response information. This response information is then sent to the user. The motion knowledge question-answering model is obtained by training a target training dataset on a model to be trained. The target training dataset is obtained from a sample database based on the model information of the model to be trained. By dynamically determining the amount of data in the target training dataset according to the model information, the scale of the training data matches the model's capabilities. This achieves the technical effect of improving model training efficiency and the accuracy of output results. Furthermore, it solves the technical problem in related technologies where inaccurate training data in the training set leads to low model training efficiency and accuracy, thus reducing the accuracy of the model's output results. Attached Figure Description
[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0019] Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for generating motion knowledge is shown.
[0020] Figure 2 This is a flowchart of a method for generating motion knowledge according to Embodiment 1 of this application;
[0021] Figure 3 This is a schematic diagram of a motion knowledge generation device according to Embodiment 2 of this application;
[0022] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] It should be noted that the method and apparatus for generating motion knowledge as defined in this disclosure can be used in the field of artificial intelligence, or in any field other than artificial intelligence. The application fields of the method and apparatus for generating motion knowledge as defined in this disclosure are not limited.
[0027] It should be noted that all information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) used in this application are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with the relevant regulations and standards of the relevant regions, have taken necessary measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse use. If the user chooses to refuse, the process proceeds to the expert decision-making process. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface. After receiving consent from the aforementioned user or organization, the relevant information is obtained. Users can view the purpose of data use in real time through the authorization interface and have the right to withdraw authorization or delete data at any time. After authorization is withdrawn, the system will terminate the relevant data processing within 24 hours.
[0028] The embodiments or examples disclosed herein are not exhaustive, but merely illustrative of some embodiments or examples, and are not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment or example can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment or example can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment or example can be arbitrarily interchanged. Furthermore, optional methods or examples in a particular embodiment or example can be arbitrarily combined; moreover, embodiments or examples can be arbitrarily combined. For example, some or all steps of different embodiments or examples can be arbitrarily combined, and a particular embodiment or example can be arbitrarily combined with optional methods or examples of other embodiments or examples.
[0029] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0030] LLM: Large Language Model.
[0031] SFT: Supervised Fine-Tuning.
[0032] RL: Reinforcement Learning.
[0033] DPO: Direct Preference Optimization.
[0034] PPO: Proximal Policy Optimization.
[0035] Example 1
[0036] According to an embodiment of this application, an embodiment of a method for generating motion knowledge is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0037] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing a method for generating motion knowledge is shown. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, processing devices such as microprocessors or programmable logic devices), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface, a universal serial bus port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0038] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the motion knowledge generation method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned motion knowledge generation method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0040] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0041] The display may be, for example, a touchscreen LCD display that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0042] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for generating motion knowledge is shown. Figure 2 This is a flowchart of the motion knowledge generation method provided in Embodiment 1 of this application, as follows: Figure 2 As shown, the method includes:
[0043] Step S201: Receive motion problem information sent by the user terminal, and parse the motion problem information to obtain the problem content.
[0044] It should be noted that the executing entity in this embodiment can be a system that has deployed a motion knowledge question-answering model. After receiving motion question information, the system can use the motion knowledge question-answering model to generate the answer corresponding to the motion question information.
[0045] For example, after receiving the sports problem information input by the user through the user terminal device, the sports problem information first needs to be parsed to identify the specific problem content contained therein. The parsing process may include breaking down the sports problem information, identifying key sentences, translating the problem content, etc., to obtain the specific problem content. For example, the problem content may be: "How should I deal with a thigh strain while running?"
[0046] Step S202: Standardize the question content to obtain the target question, input the target question into the motion knowledge question answering model to obtain motion knowledge response information, and send the motion knowledge response information to the user terminal. The motion knowledge question answering model is obtained by training the model to be trained from the target training data set. The target training data set is obtained from the sample database according to the model information of the model to be trained.
[0047] For example, after obtaining specific problem content, such as "How to treat a thigh strain while running" or other sports-related problems described in natural language, the problem content can be identified to obtain identification results. For example, "running" can be identified as the type of exercise, "thigh" as the body part, "strain" as the type of injury, and "treat" as the intent keyword. Combined with the domain knowledge graph, it can be confirmed that it belongs to the sports injury response scenario. Non-core words such as "how" and "what" are removed to eliminate ambiguous expressions, and finally a structured semantic representation "type of exercise: running; injury part: thigh; nature of injury: strain; intent: treatment suggestion" is generated, forming standardized problem content, that is, the target problem.
[0048] Furthermore, after obtaining the target question, it can be directly input into the motion knowledge question-answering model, and the motion knowledge response information output by the model can be fed back to the user. It should be noted that when training the motion knowledge question-answering model, it is necessary to select training data in the training set. At this time, it is first necessary to determine the number of training data in the target training data set based on the model information, and then select a corresponding number of sample data from the sample database as training data in the training set. This improves the matching degree between the model and the number of training data in the training set, avoiding resource waste, prolonged training cycle, and overfitting problems caused by excessive data volume, while avoiding underfitting and insufficient capabilities caused by insufficient data volume. This improves the model training efficiency and accuracy, and thus improves the accuracy of the model output results.
[0049] It should be noted that when training a model, the number of training rounds can be determined based on the amount of training data in the target training dataset, thereby improving training efficiency and accuracy.
[0050] The method for generating motion knowledge provided in this application involves receiving motion question information sent by a user terminal, parsing the motion question information to obtain question content, standardizing the question content to obtain a target question, inputting the target question into a motion knowledge question-answering model to obtain motion knowledge response information, and sending the motion knowledge response information to the user terminal. The motion knowledge question-answering model is obtained by training a model to be trained using a target training dataset. The target training dataset is obtained from a sample database based on the model information of the model to be trained. By dynamically determining the amount of data in the target training dataset based on the model information, the scale of the training data is matched with the model's capabilities, thereby improving the model's training efficiency and the accuracy of the output results. This solves the technical problem in related technologies where inaccurate training data in the training set leads to low model training efficiency and accuracy, thus reducing the accuracy of the model's output results.
[0051] Optionally, in the motion knowledge generation method provided in this application embodiment, the target training data set is obtained in the following manner: obtaining the model parameter quantity and model attribute information of the model parameters included in the model to be trained from the model information, and determining the baseline data quantity of the training data of the model to be trained based on the model parameter quantity; determining the first coefficient of the model to be trained in the supervised training stage based on the model parameter quantity and model attribute information, and determining the first data quantity of the training data of the model to be trained in the supervised training stage based on the first coefficient and the baseline data quantity, wherein the first coefficient is used to adjust the baseline data quantity; obtaining the second coefficient of the model to be trained in the reinforcement training stage, and determining the second data quantity of the training data of the model to be trained in the reinforcement training stage based on the first data quantity and the second coefficient, wherein the second coefficient is used to adjust the first data quantity; and obtaining the target training data set of the model to be trained from the sample database based on the first data quantity and the second data quantity.
[0052] It should be noted that the model parameter count refers to the total number of learnable parameters in the model to be trained, measured in billions (B). Model attribute information refers to the multi-dimensional configuration features directly related to the training objective of the model to be trained, as well as the performance information of the model itself, including but not limited to the model parameter scale, model training method (such as full parameter fine-tuning, low-rank adaptive training), model business type (such as sports knowledge question answering, sports data interpretation, sports course generation), model safety constraint strength, and target performance requirements (such as accuracy of 80% or 95%). The baseline data volume is dynamically calculated based on the model parameter count and represents the minimum effective data volume required for the model to achieve basic convergence under standard conditions (such as medium-difficulty sports knowledge question answering, full parameter SFT training, manually calibrated data, 80% target accuracy, single-turn dialogue, 4-6 sports sub-scenes). Its core anchor point can be 5500-6500 data points for a 27B model, and the data volume for other scale models can be deduced from this. The first coefficient is a comprehensive adjustment factor for the supervised training phase. It is calculated based on the number of model parameters and model attribute information, and is used to amplify or compress the baseline data volume. It reflects the comprehensive impact of task difficulty, training method, data quality, sub-scene coverage, security constraints, and other dimensions on data requirements. The second coefficient is an adjustment factor for the reinforcement learning phase. It is determined based on parameters such as the algorithm characteristics of preference optimization or proximal policy optimization, dialogue rounds, reward function complexity, and interaction type. It is used to further adjust the data volume based on the supervised training data volume to adapt to the special requirements of the reinforcement learning phase for sample alignment efficiency and policy stability.
[0053] For example, when generating the target training dataset, the system first reads the model parameter count and model attribute information from the configuration file or metadata of the model to be trained. For instance, it determines that the model has a 27B parameter scale, uses a fully supervised fine-tuning method, its core capability is motion course generation, the number of sub-scenes is 12, the safety constraint strength is high, and the target accuracy is 80%. Based on this model parameter count, the system uses 5500-6500 data points from the 27B model as a baseline anchor point. Combining the relationship between the parameter count and the scale of this anchor point, the system calculates that the baseline data volume for this model under standard conditions is 6000 data points.
[0054] Furthermore, the system comprehensively considers the number of model parameters and model attribute information to calculate the first coefficient. For example, since generating sports courses is a high-difficulty task, the amount of data needs to be increased to support the generation of long texts and multiple constraints, so its task difficulty coefficient is 2.0; there are more than 10 factor scenarios, which need to cover diverse groups of people and sports types, so the sub-scenario coefficient is 1.5; due to the involvement of action specifications and injury avoidance, the safety correction coefficient is 2; the remaining attributes (training method is full parameters, data quality is manually labeled, and performance target is 80%) are all taken as the baseline value of 1.0, and the final first coefficient is 3.0.
[0055] Furthermore, this coefficient can be applied to the baseline data volume to arrive at a first data volume of 18,000 records for the supervised training phase.
[0056] Further, in the reinforcement training phase, the system obtains a second coefficient. For example, based on its data efficiency characteristics and combined with the single-turn dialogue setting, the system takes a proportional constant of 0.4 and combines it with a safety correction coefficient of 1.5 to calculate the second coefficient as 0.267. After multiplying it by the first data volume, the second data volume is 4800 pairs.
[0057] Ultimately, based on 18,000 pieces of supervised data and 4,800 pairs of reinforcement data, and according to the core capabilities of the model and business requirements, the system obtains sample data from the sample database and uses the obtained sample data as the target training data set to perform training operations on the model, thereby completing the construction of the training set and the training operation of the model.
[0058] This embodiment determines the number of model parameters, the amount of baseline data, the first coefficient, the first amount of data, the second coefficient, and the second amount of data, and selects the target training data set from the sample database according to the above quantities. This realizes a systematic shift in training data generation from experience-dependent to model-driven, so that the data supply in the supervised fine-tuning and reinforcement learning stages can be accurately adapted to the model size and task characteristics. It avoids underfitting and capability loss due to insufficient data, or resource waste and extended training cycle due to data redundancy, and significantly improves training efficiency and the accuracy, security and generalization ability of model output.
[0059] Optionally, in the motion knowledge generation method provided in this application embodiment, determining the baseline data quantity of the training data of the model to be trained based on the model parameter quantity includes: obtaining the anchor parameter quantity of the model parameters contained in the baseline model, and dividing the model parameter quantity by the anchor parameter quantity to obtain the first parameter; obtaining the anchor data quantity of the training data of the baseline model, and determining the correction coefficient of the model to be trained based on the model parameter quantity; and multiplying the anchor data quantity, the first parameter, and the correction coefficient to obtain the baseline data quantity.
[0060] It should be noted that the baseline model can be a model used as a control group, and the amount of training data for this model can be the amount of anchor data. For example, the baseline model can be a model with a size of 27 bytes. The anchor parameter values can be the number of parameters in the baseline model that need to be trained, i.e., the model size. For example, the anchor parameter values for the baseline model can be 27 bytes. The number of model parameters can be the model size of the model to be trained, such as 10 bytes. The amount of anchor data can be the amount of training data used in the training set when training the baseline model, such as 5500 to 6500 data points. The correction coefficient can be the model size correction coefficient, with a value ranging from 1.0 to 1.2. The smaller the model, the higher the value (smaller models have weaker fitting ability and require additional data compensation).
[0061] For example, when determining the baseline data volume of the training data for the model to be trained, it is first necessary to determine the baseline model and obtain the number of parameters of the baseline model, that is, the model size, for example, 27B, and determine the number of parameters of the model to be trained, for example, 10B, and divide the number of model parameters by the number of anchor parameters to obtain the first parameter, for example, 2.7.
[0062] Furthermore, the amount of anchor data obtained from the training data of the benchmark model. The correction coefficients are determined based on the size of the model to be trained, and then the amount of baseline data for the model to be trained can be calculated using the following formula. .
[0063]
[0064] in, As the baseline data volume, For anchor point data volume, Let M be the first parameter, and M be the number of parameters in the model to be trained. This is a correction factor.
[0065] This embodiment determines the amount of baseline data for the model to be trained by using the amount of anchor parameters and the amount of anchor data of the baseline model, thus achieving the technical effect of accurately determining the amount of baseline data.
[0066] Optionally, in the motion knowledge generation method provided in this application embodiment, determining the first coefficient of the model to be trained in the supervised training stage based on the number of model parameters and model attribute information includes: determining the model size coefficient of the model to be trained based on the number of model parameters and a first lookup table, wherein the first lookup table includes multiple model parameters and the coefficient value of the model size coefficient corresponding to each model parameter; determining the model function of the model to be trained based on the model attribute information, and determining the functional complexity coefficient, scene coefficient, and safety coefficient of the model to be trained based on the model function; determining the number of training parameters of the model to be trained based on the model attribute information, and determining the training method coefficient of the model to be trained based on the number of training parameters; obtaining the data quality of the sample database, and determining the data quality coefficient of the model to be trained based on the data quality; determining the performance requirements of the model to be trained based on the model attribute information, and determining the performance coefficient of the model to be trained based on the performance requirements; and multiplying the model size coefficient, functional complexity coefficient, scene coefficient, safety coefficient, training method coefficient, data quality coefficient, and performance coefficient to obtain the first coefficient.
[0067] It should be noted that the model size coefficient The number of model parameters is used to characterize the model's parameter count. The larger the parameter count, the stronger the fitting ability and the ability to learn from few samples, and the less data is required. Conversely, the smaller the parameter count, the more data is needed to compensate for insufficient fitting ability. The coefficients are negatively correlated with the number of model parameters.
[0068] Table 1 is an optional first lookup table. As shown in Table 1, the model scale coefficient can be determined based on the model parameters according to the correspondence recorded in Table 1.
[0069] Table 1
[0070]
[0071] It should be noted that the functional complexity coefficient The functional complexity coefficient of the model can be determined based on the model's functionality (or the business it handles), as shown in Table 2.
[0072] Table 2
[0073]
[0074] In other words, the higher the difficulty of executing the model's function, the more data is required. The difficulty mainly depends on the reasoning complexity, generation length, and constraints of the model's function. For example, if the model's functions are: sports course generation, sports data interpretation, sports knowledge Q&A, and model self-persona, the execution difficulty ranking is: sports course generation > sports data interpretation > sports knowledge Q&A > model self-persona.
[0075] It should be noted that the safety factor It can characterize the compliance and security requirements during model operation. The higher the security and compliance requirements of the model function, the greater the security factor. Table 3 is a comparison table of optional model function types and security factors.
[0076] Table 3
[0077]
[0078] It should be noted that the scene coefficient The more sub-scenes a model corresponds to, the more difficult it is to cover, requiring more data to ensure sufficient training across the entire scene, and the larger the corresponding coefficient. For example, if the number of sub-scenes is less than 3, the coefficient is 0.6 to 0.8; if the number of sub-scenes is 4 to 6, the coefficient is 1.0.
[0079] It should be noted that the training method coefficient The number of training parameters of the model can be used to determine the coefficients. The fewer the training parameters, the weaker the fitting ability and the larger the coefficients. The lower the LoRA rank, the larger the coefficients.
[0080] It should be noted that the data quality coefficient The quality of the sample data in the sample database used by the model can be determined. The lower the data quality, the more noise there is, and the more data is needed to offset the noise and increase the effective sample size.
[0081] It should be noted that the performance coefficient The performance requirements of the model can be determined. The higher the performance requirements, the more the amount of data increases exponentially. High-precision requirements require a significant increase in the amount of data to support them.
[0082] Table 4 can provide scene coefficients. Training method coefficient Data quality coefficient Coefficient of performance Parameter value reference table.
[0083] Table 4
[0084]
[0085] After obtaining the above coefficients, the first coefficient can be calculated using the following formula.
[0086]
[0087] in, As the first parameter, For model size coefficients, The functional complexity coefficient, For safety reasons, Scene coefficient, For training method coefficients, For data quality coefficient, This represents the performance coefficient.
[0088] This embodiment calculates the first coefficient by acquiring multiple coefficients related to the model, so that the baseline data can be processed based on the first coefficient, thereby improving the accuracy of the subsequent determination of the first data.
[0089] Optionally, in the motion knowledge generation method provided in the embodiments of this application, determining the first data quantity of the training data of the model to be trained in the supervised training stage based on the first coefficient and the reference data quantity includes: multiplying the first coefficient by the reference data quantity to obtain the first data quantity.
[0090] For example, after obtaining the first coefficient, the first coefficient can be multiplied by the amount of baseline data to obtain the first amount of training data for the model in the supervised training phase. Then, the corresponding number of sample data can be obtained from the sample database based on the first amount of data as the training set for the supervised training phase.
[0091] That is,
[0092] in, The first data volume, This is the baseline data volume.
[0093] This embodiment processes the baseline data using a first coefficient to obtain a first data volume that is compatible with the model, achieving the technical effect of accurately obtaining the training data of the model in the supervised training phase based on the first data volume.
[0094] Optionally, in the motion knowledge generation method provided in this application embodiment, obtaining the second coefficient of the model to be trained during the reinforcement training phase includes: when using the direct preference optimization algorithm during the reinforcement training phase, determining the model function of the model to be trained based on model attribute information; determining the multi-turn dialogue coefficient and safety coefficient of the model to be trained based on the model function; obtaining the proportional coefficient of the direct preference optimization algorithm, and determining the third coefficient based on the proportional coefficient, multi-turn dialogue coefficient, and safety coefficient; and determining the coefficient value of the third coefficient as the coefficient value of the second coefficient.
[0095] It should be noted that the Direct Preference Optimization (DPO) algorithm can be used for reinforcement learning during the model's reinforcement training phase. When using DPO, it is necessary to determine the number of models used in the reinforcement learning operation. This can be done by first determining the model's functionality, then determining the average number of dialogue rounds performed by the model based on its functionality, and finally determining the multi-turn dialogue coefficients of the model based on the average number of rounds. In other words, the more rounds of dialogue there are, the more contextual consistency needs to be maintained, and the more data is required.
[0096] Table 5 is a selection reference table for optional multi-turn dialogue coefficients. You can select the multi-turn dialogue coefficients according to Table 5.
[0097] Table 5
[0098]
[0099] Furthermore, it is necessary to determine the safety factor based on the model's functional requirements for safety and compliance. And determine the proportional coefficient of the preset direct preference optimization algorithm. For example, 0.4, and thus the third coefficient is determined according to the following formula:
[0100]
[0101] in, The third coefficient, This is the proportionality coefficient. For safety reasons, For multi-turn dialogue coefficients.
[0102] Finally, the third coefficient is determined as the second coefficient of the model to be trained in the reinforcement training stage, thus obtaining the second coefficient when the reinforcement learning algorithm is the direct preference optimization algorithm. Then, the amount of training data used when the reinforcement learning algorithm is the direct preference optimization algorithm can be determined based on the second coefficient, thereby achieving the technical effect of improving the accuracy of the number of training data selected.
[0103] It should be noted that DPO (Direct Preference Optimization) is trained on "selected / rejected" data pairs, and the information density of a single sample is 2 to 3 times that of a single sample in SFT. Furthermore, related research confirms that DPO only needs to cover 30% to 50% of the SFT data to achieve optimal alignment. Therefore, the scaling factor... The midpoint of the interval, 0.4, is taken as a general constant to balance the stability of the effect and data efficiency, and to avoid data waste or insufficient effect.
[0104] Optionally, in the method for generating motion knowledge provided in this application embodiment, obtaining the second coefficient of the model to be trained during the reinforcement training phase includes: when using a proximal policy optimization algorithm during the reinforcement training phase, obtaining the basic amplification coefficient, reward complexity coefficient, and interaction complexity coefficient of the proximal policy optimization algorithm; determining the fourth coefficient based on the third coefficient, the basic amplification coefficient, the reward complexity coefficient, the interaction complexity coefficient, and the multi-turn dialogue coefficient; and determining the coefficient value of the fourth coefficient as the coefficient value of the second coefficient.
[0105] It should be noted that the Proximal Policy Optimization (PPO) algorithm can also be used for reinforcement learning during the model's reinforcement training phase. When using PPO for reinforcement learning, it is necessary to obtain the reward complexity coefficient of PPO. and the interaction complexity coefficient of PPO The reward complexity coefficient is determined based on the complexity of the PPO reward function, and the interaction complexity coefficient is determined based on the interaction type of the PPO.
[0106] Table 6 is a reference table of optional reward complexity coefficients and interaction complexity coefficients. You can select the coefficients according to Table 6.
[0107] Table 6
[0108]
[0109] Furthermore, it is also necessary to first determine the model function of the model to be trained, and then determine the average number of dialogue rounds when the model is used based on the model function. Finally, the multi-turn dialogue coefficient of the model to be trained is determined based on the average number of dialogue rounds. In other words, the more dialogue rounds there are, the more context consistency needs to be maintained, the more data is required, and at the same time, it is also necessary to obtain the basic amplification factor of the preset near-end strategy optimization algorithm. The fixed value of the basic amplification factor can be 1.5, which can be determined based on actual measurement experience in the industry.
[0110] After obtaining the base amplification factor, reward complexity factor, and interaction complexity factor, the third factor of the Direct Preference Optimization (DPO) algorithm can be used. The fourth coefficient is obtained by multiplying it by the base amplification factor, the reward complexity factor, and the interaction complexity factor. It can be calculated using the following formula:
[0111]
[0112] in, It is the fourth coefficient. The third coefficient, Based on the magnification factor, To reward the complexity coefficient, The interaction complexity coefficient is... For multi-turn dialogue coefficients.
[0113] Finally, after obtaining the fourth coefficient, the value of the fourth coefficient can be determined as the value of the second coefficient, thus obtaining the second coefficient in the case of the direct preference optimization algorithm. Then, based on the second coefficient, the amount of training data used when the reinforcement learning algorithm is the proximal policy optimization algorithm can be determined, achieving the technical effect of improving the accuracy of the number of training data selected.
[0114] It should be noted that PPO (Proximal Policy Optimization) is a reinforcement learning phase, and the sample size needs to be increased based on the DPO preference data to stabilize the policy gradient and avoid training oscillations. Industry testing has verified that increasing the PPO data size by 1.2 to 1.8 times compared to the DPO dataset is optimal. Therefore, the basic amplification factor... We take the median value of 1.5 as the basic amplification constant to balance training stability and training cost, so that the strategy converges and we avoid resource waste caused by excessive data.
[0115] Optionally, in the motion knowledge generation method provided in this application embodiment, determining the second data quantity of the training data of the model to be trained in the reinforcement training stage based on the first data quantity and the second coefficient includes: multiplying the first data quantity and the second coefficient to obtain the second data quantity.
[0116] For example, in cases where different algorithms are used during the reinforcement training phase, a second coefficient can be obtained, and the second coefficient can be multiplied by the first data volume to obtain the second data volume used when selecting training data during the reinforcement training phase.
[0117] For example, when using the direct preference optimization algorithm during the reinforcement training phase, the formula for calculating the second data volume can be:
[0118]
[0119] in, This is the second amount of data used when employing the direct preference optimization algorithm during the reinforcement training phase. The first data volume, This refers to the second coefficient under the direct preference optimization algorithm.
[0120] Similarly, when using the proximal policy optimization algorithm during the reinforcement training phase, the formula for calculating the second data volume can be:
[0121]
[0122]
[0123] That is,
[0124] in, This is the second dataset used when employing a proximal policy optimization algorithm during the reinforcement training phase. Partial, i.e., the third coefficient , This part refers to the second coefficient in the near-end strategy optimization algorithm.
[0125] This embodiment determines the second data quantity of the training data in the reinforcement training phase by multiplying the first data quantity and the second coefficient of the training data in the supervised training phase, thus achieving the technical effect of accurately determining the second data quantity.
[0126] Optionally, in the motion knowledge generation method provided in this application embodiment, obtaining the target training data set of the model to be trained from the sample database according to the first data volume and the second data volume includes: determining the data type of the sample data stored in the sample database and determining the proportion of sample data under each data type; determining the first sub-data volume of each data type according to the proportion and the first data volume, and obtaining sample data from the sample database according to the first sub-data volume to obtain a first training data set, wherein the first training data set is used to train the model to be trained in the supervised training phase; determining the second sub-data volume of each data type according to the proportion and the second data volume, and obtaining sample data from the sample database according to the second sub-data volume to obtain a second training data set, wherein the second training data set is used to train the model to be trained in the reinforcement training phase; and combining the first training data set and the second training data set into a target training data set.
[0127] It should be noted that, since the first data volume and the second data volume are different, it is necessary to obtain the first training data set for the supervised training phase from the sample database based on the first data volume, and obtain the second training data set for the reinforcement training phase from the sample database based on the second data volume.
[0128] When obtaining the first training dataset, sample data of different types can be obtained according to the proportion of sample data required for model training, thereby forming the first training dataset.
[0129] For example, the sample data of course skeleton type accounts for 20%, the sample data of action detail type accounts for 30%, the sample data of safety constraint type accounts for 25%, and the sample data of personalized adaptation type accounts for 25%. The types and functions of each sample data can be seen in Table 7.
[0130] Table 7
[0131]
[0132] Similarly, for the reinforcement training phase, different quantities and types of data can be obtained from the sample database according to the preset proportions mentioned above, thereby completing the acquisition of training data in the second training data set.
[0133] This embodiment improves the quality of the training data set by acquiring different types of training data, thereby increasing the training efficiency of the model using the training data.
[0134] It should be noted that the training model described in Example 1 above can be any type of LLM large language model, and this example does not limit the specific structure of the model.
[0135] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0136] Example 2
[0137] This application also provides a motion knowledge generation apparatus. It should be noted that the motion knowledge generation apparatus of this application can be used to execute the motion knowledge generation method provided in the above embodiments. The motion knowledge generation apparatus provided in this application will be described below.
[0138] According to an embodiment of this application, an apparatus for implementing the above-described method for generating motion knowledge is also provided. Figure 3 This is a schematic diagram of a motion knowledge generation device according to Embodiment 2 of this application, as shown below. Figure 3 As shown, the device includes:
[0139] The parsing unit 31 is used to receive motion problem information sent by the user terminal and parse the motion problem information to obtain the problem content.
[0140] Processing unit 32 is used to standardize the question content to obtain the target question, input the target question into the motion knowledge question answering model, obtain motion knowledge response information, and send the motion knowledge response information to the user terminal. The motion knowledge question answering model is obtained by training the model to be trained from the target training data set. The target training data set is obtained from the sample database according to the model information of the model to be trained.
[0141] The motion knowledge generation device provided in this application embodiment receives motion question information sent by a user terminal through a parsing unit 31, parses the motion question information to obtain question content, and a processing unit 32 standardizes the question content to obtain a target question. The target question is then input into a motion knowledge question-answering model to obtain motion knowledge response information, which is then sent to the user terminal. The motion knowledge question-answering model is obtained by training a model to be trained using a target training dataset. The target training dataset is obtained from a sample database based on the model information of the model to be trained. By dynamically determining the amount of data in the target training dataset based on the model information, the scale of the training data is matched with the model's capabilities, thereby improving the model's training efficiency and the accuracy of the output results. This solves the technical problem in related technologies where inaccurate training data in the training set leads to low model training efficiency and accuracy, thus reducing the accuracy of the model's output results.
[0142] Optionally, in the motion knowledge generation apparatus provided in this application embodiment, the target training data set is obtained in the following manner: a first acquisition unit is used to acquire the model parameter quantity and model attribute information of the model parameters included in the model to be trained from the model information, and determine the baseline data quantity of the training data of the model to be trained based on the model parameter quantity; a determination unit is used to determine the first coefficient of the model to be trained in the supervised training stage based on the model parameter quantity and model attribute information, and determine the first data quantity of the training data of the model to be trained in the supervised training stage based on the first coefficient and the baseline data quantity, wherein the first coefficient is used to adjust the baseline data quantity; a second acquisition unit is used to acquire the second coefficient of the model to be trained in the reinforcement training stage, and determine the second data quantity of the training data of the model to be trained in the reinforcement training stage based on the first data quantity and the second coefficient, wherein the second coefficient is used to adjust the first data quantity; a third acquisition unit is used to acquire the target training data set of the model to be trained from the sample database based on the first data quantity and the second data quantity.
[0143] Optionally, in the motion knowledge generation apparatus provided in this application embodiment, the first acquisition unit includes: a first acquisition module, used to acquire the anchor parameter quantity of the model parameters included in the benchmark model, and divide the model parameter quantity by the anchor parameter quantity to obtain the first parameter; a second acquisition module, used to acquire the anchor data quantity of the training data of the benchmark model, and determine the correction coefficient of the model to be trained according to the model parameter quantity; and a first calculation module, used to multiply the anchor data quantity, the first parameter and the correction coefficient to obtain the benchmark data quantity.
[0144] Optionally, in the motion knowledge generation apparatus provided in this application embodiment, the determining unit includes: a first determining module, used to determine the model size coefficient of the model to be trained based on the number of model parameters and a first lookup table, wherein the first lookup table includes multiple model parameters and the coefficient value of the model size coefficient corresponding to each model parameter; a second determining module, used to determine the model function of the model to be trained based on model attribute information, and to determine the functional complexity coefficient, scene coefficient, and safety coefficient of the model to be trained based on the model function; a third determining module, used to determine the number of training parameters of the model to be trained based on model attribute information, and to determine the training method coefficient of the model to be trained based on the number of training parameters; a third acquiring module, used to acquire the data quality of the sample database, and to determine the data quality coefficient of the model to be trained based on the data quality; a fourth determining module, used to determine the performance requirements of the model to be trained based on model attribute information, and to determine the performance coefficient of the model to be trained based on the performance requirements; and a second calculation module, used to multiply the model size coefficient, functional complexity coefficient, scene coefficient, safety coefficient, training method coefficient, data quality coefficient, and performance coefficient to obtain a first coefficient.
[0145] Optionally, in the motion knowledge generation apparatus provided in the embodiments of this application, the determining unit includes: a third calculation module, used to multiply the first coefficient by the reference data amount to obtain the first data amount.
[0146] Optionally, in the motion knowledge generation apparatus provided in this application embodiment, the second acquisition unit includes: a fifth determining module, used to determine the model function of the model to be trained based on model attribute information when using the direct preference optimization algorithm during the reinforcement training phase; a sixth determining module, used to determine the multi-turn dialogue coefficient and safety coefficient of the model to be trained based on the model function; a fourth acquisition module, used to acquire the proportional coefficient of the direct preference optimization algorithm, and determine a third coefficient based on the proportional coefficient, the multi-turn dialogue coefficient, and the safety coefficient; and a seventh determining module, used to determine the coefficient value of the third coefficient as the coefficient value of the second coefficient.
[0147] Optionally, in the motion knowledge generation apparatus provided in this application embodiment, the second acquisition unit includes: a fifth acquisition module, used to acquire the basic amplification coefficient, reward complexity coefficient, and interaction complexity coefficient of the proximal policy optimization algorithm when the proximal policy optimization algorithm is used in the reinforcement training phase; an eighth determination module, used to determine a fourth coefficient based on the third coefficient, the basic amplification coefficient, the reward complexity coefficient, the interaction complexity coefficient, and the multi-turn dialogue coefficient; and a ninth determination module, used to determine the coefficient value of the fourth coefficient as the coefficient value of the second coefficient.
[0148] Optionally, in the motion knowledge generation apparatus provided in the embodiments of this application, the second acquisition unit includes: a fourth calculation module, used to multiply the first data quantity and the second coefficient to obtain the second data quantity.
[0149] Optionally, in the motion knowledge generation apparatus provided in this application embodiment, the third acquisition unit includes: a tenth determining module, used to determine the data type of the sample data stored in the sample database, and determine the proportion of sample data under each data type; an eleventh determining module, used to determine the first sub-data volume of each data type according to the proportion and the first data volume, and to obtain sample data from the sample database according to the first sub-data volume to obtain a first training data set, wherein the first training data set is used to train the model to be trained in the supervised training phase; a twelfth determining module, used to determine the second sub-data volume of each data type according to the proportion and the second data volume, and to obtain sample data from the sample database according to the second sub-data volume to obtain a second training data set, wherein the second training data set is used to train the model to be trained in the reinforcement training phase; and a combining module, used to combine the first training data set and the second training data set into a target training data set.
[0150] It should be noted that the parsing unit 31 and processing unit 32 mentioned above correspond to steps S201 to S202 in Embodiment 1. The instances and application scenarios implemented by each of the above units and the corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware components or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of the device and can run in the computer terminal 10 provided in Embodiment 1.
[0151] Example 3
[0152] Embodiments of this application may provide an electronic device. Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (Only one is shown) processor 1002, memory 1004, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0153] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0154] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.
[0155] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0156] Example 4
[0157] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the motion knowledge generation method provided in Embodiment 1.
[0158] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0159] Embodiments of this application also provide a computer program product, which, when executed on a data processing device, is adapted to perform the steps of a method for generating motion knowledge.
[0160] Embodiments of this application also provide a computer-readable storage medium, which includes a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to execute the above-described method for generating motion knowledge.
[0161] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0162] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0164] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0165] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0166] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0167] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method of generating motion knowledge, characterized by, include: Receive motion problem information sent by the user terminal, and parse the motion problem information to obtain the problem content; The question content is standardized to obtain the target question, which is then input into the motion knowledge question-answering model to obtain motion knowledge response information. The motion knowledge response information is then sent to the user terminal. The motion knowledge question-answering model is obtained by training the model to be trained using a target training dataset, which is obtained from a sample database based on the model information of the model to be trained.
2. The method of claim 1, wherein, The target training dataset is obtained in the following way: The model parameter quantity and model attribute information contained in the model to be trained are obtained from the model information, and the baseline data quantity of the training data of the model to be trained is determined based on the model parameter quantity. The first coefficient of the model to be trained in the supervised training phase is determined based on the model parameter quantity and the model attribute information, and the first data quantity of the training data of the model to be trained in the supervised training phase is determined based on the first coefficient and the baseline data quantity, wherein the first coefficient is used to adjust the baseline data quantity; Obtain the second coefficient of the model to be trained in the reinforcement training phase, and determine the second data volume of the training data of the model to be trained in the reinforcement training phase based on the first data volume and the second coefficient, wherein the second coefficient is used to adjust the first data volume; The target training data set of the model to be trained is obtained from the sample database based on the first data volume and the second data volume.
3. The method of claim 2, wherein, The baseline data volume for determining the training data of the model to be trained based on the model parameter quantity includes: Obtain the anchor parameter quantity of the model parameters contained in the baseline model, and divide the model parameter quantity by the anchor parameter quantity to obtain the first parameter; Obtain the anchor data volume of the training data of the benchmark model, and determine the correction coefficient of the model to be trained based on the model parameter volume; The anchor point data volume, the first parameter, and the correction coefficient are multiplied together to obtain the baseline data volume.
4. The method of claim 2, wherein, Determining the first coefficients of the model to be trained during the supervised training phase based on the model parameter count and the model attribute information includes: The model size coefficient of the model to be trained is determined according to the number of model parameters and the first lookup table, wherein the first lookup table includes multiple model parameters and the coefficient value of the model size coefficient corresponding to each model parameter. The model function of the model to be trained is determined based on the model attribute information, and the functional complexity coefficient, scenario coefficient, and safety coefficient of the model to be trained are determined based on the model function. The number of training parameters of the model to be trained is determined based on the model attribute information, and the training method coefficients of the model to be trained are determined based on the number of training parameters. Obtain the data quality of the sample database, and determine the data quality coefficient of the model to be trained based on the data quality; The performance requirements of the model to be trained are determined based on the model attribute information, and the performance coefficients of the model to be trained are determined based on the performance requirements. The first coefficient is obtained by multiplying the model size coefficient, the functional complexity coefficient, the scenario coefficient, the security coefficient, the training method coefficient, the data quality coefficient, and the performance coefficient.
5. The method of claim 2, wherein, The first data volume for determining the training data of the model to be trained in the supervised training phase based on the first coefficient and the baseline data volume includes: The first coefficient is multiplied by the reference data amount to obtain the first data amount.
6. The method of claim 2, wherein, Obtaining the second coefficients of the model to be trained during the reinforcement training phase includes: When the direct preference optimization algorithm is used in the reinforcement training phase, the model function of the model to be trained is determined based on the model attribute information. Determine the multi-turn dialogue coefficients and security coefficients of the model to be trained based on the model's functionality; Obtain the proportional coefficient of the direct preference optimization algorithm, and determine a third coefficient based on the proportional coefficient, the multi-turn dialogue coefficient, and the security coefficient; The value of the third coefficient is determined as the value of the second coefficient.
7. The method of claim 6, wherein, Obtaining the second coefficients of the model to be trained during the reinforcement training phase includes: When the proximal policy optimization algorithm is used in the reinforcement training phase, the basic amplification coefficient, reward complexity coefficient, and interaction complexity coefficient of the proximal policy optimization algorithm are obtained. The fourth coefficient is determined based on the third coefficient, the basic amplification coefficient, the reward complexity coefficient, the interaction complexity coefficient, and the multi-turn dialogue coefficient. The value of the fourth coefficient is determined as the value of the second coefficient.
8. The method of claim 2, wherein, The second data volume, determined based on the first data volume and the second coefficient, includes the following: Multiply the first data volume by the second coefficient to obtain the second data volume.
9. The method of claim 2, wherein, The target training data set for the model to be trained, obtained from the sample database based on the first data volume and the second data volume, includes: Determine the data types of the sample data stored in the sample database, and determine the proportion of sample data under each data type; Based on the proportion and the first data volume, a first sub-data volume for each data type is determined, and sample data is obtained from the sample database based on the first sub-data volume to obtain a first training data set, wherein the first training data set is used to train the model to be trained during the supervised training phase. The second sub-data volume of each data type is determined based on the proportion and the second data volume, and sample data is obtained from the sample database based on the second sub-data volume to obtain a second training data set, wherein the second training data set is used to train the model to be trained in the reinforcement training phase. The first training data set and the second training data set are combined to form the target training data set.
10. A motion knowledge generation apparatus characterized by comprising: include: The parsing unit is used to receive motion problem information sent by the user terminal and parse the motion problem information to obtain the problem content; The processing unit is used to standardize the question content to obtain the target question, input the target question into the motion knowledge question answering model to obtain motion knowledge response information, and send the motion knowledge response information to the user terminal. The motion knowledge question answering model is obtained by training the model to be trained from the target training data set, and the target training data set is obtained from the sample database according to the model information of the model to be trained.