Model training method and device, medium, product and electronic equipment

CN122965649APending Publication Date: 2026-10-23HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510489421.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]但是,由于训练AI模型的训练数据的复杂度参差不齐,会导致AI模型训练效果不佳

Benefits of technology

[0018]在上述方案中,电子设备也可以根据第一数据节点组合生成用于训练的问题和预设答案,将问题输入至初始模型,通过初始模型输出的答案和预设答案的相似度来调整初始模型的参数。这样,对于任意数据节点组合,电子设备都可以确定出用于训练的问题对,提高了训练可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122965649A_ABST
    Figure CN122965649A_ABST
Patent Text Reader

Abstract

The application applies to the field of artificial intelligence, and provides a model training method and device, medium, product and electronic equipment. The method comprises the following steps: the electronic equipment extracts data content included in training data, obtains a plurality of data nodes, and establishes an association relationship between the data nodes. When the electronic equipment trains a to-be-trained model, the electronic equipment can first input a data node combination with less data nodes and / or shorter distance between data nodes into the to-be-trained model, and then continues to train the to-be-trained model by using a data node combination with more data nodes and / or greater data node span. In this way, the electronic equipment first trains the model by using simple data, so that the to-be-trained model has reasoning ability under the condition of less reasoning step and less cross between data. Then, the model is trained by using complex data, so that the model can gradually master the reasoning ability under the condition of more required reasoning steps and greater cross between data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence (AI), and more particularly to a model training method, apparatus, medium, product, and electronic device. Background Technology

[0002] With the continuous development of science and technology, AI models have been widely applied in fields such as intelligent question answering, image processing, and natural language processing. AI models typically require a large number of samples for training, and the trained model can then be used to perform corresponding functions. For example, intelligent question answering systems, as a form of information retrieval system, can process and understand data from different modalities, such as text, images, and audio, based on multimodal large models and retrieval-enhanced generative models. Furthermore, intelligent question answering systems can extract or generate accurate answers from this multimodal data based on the user's input question.

[0003] However, the varying complexity of training data for AI models can lead to poor training results. For example, simpler training data may not improve the accuracy of the AI ​​model, resulting in a well-trained model that cannot handle more complex inference. On the other hand, more complex training data may cause the AI ​​model to struggle to find suitable parameters to fit the training data, or it may overfit the training data, resulting in the AI ​​model failing to obtain accurate inference results even with data other than the training dataset. Summary of the Invention

[0004] In view of this, this application provides a model training method, apparatus, medium, product, and electronic device.

[0005] Firstly, a model training method is provided, comprising: acquiring training data, the training data including multiple data nodes and the relationships between the multiple data nodes; training an initial model based on a first data node combination to obtain an intermediate model, wherein the data nodes in the first data node combination belong to the multiple data nodes included in the training data, the first data node combination includes at least one data node, and, when the number of data nodes included in the first data node combination is greater than 1, any data node in the first data node combination has a related data node in the first data node combination. Training the intermediate model based on a second data node combination to obtain a target model, wherein the data nodes in the second data node combination belong to the multiple data nodes, at least one data node in the second data node combination has a related relationship with a data node in the first data node combination, any data node in the second data node combination has a related data node in the second data node combination; the number of data nodes in the second data node combination is greater than the number of data nodes in the first data node combination, and / or, the maximum value of the distance between data nodes in the second data node combination is greater than the maximum value of the distance between data nodes in the first data node combination.

[0006] In the above scheme, electronic devices can acquire knowledge graphs from existing knowledge bases (such as document databases like books and academic reports, or audio-visual databases like course teaching materials). Furthermore, different combinations of data nodes can be determined by the number of data nodes and the distance between them. Combinations with fewer data nodes and / or shorter distances between them have lower complexity. For example, the first data node combination can include only one data node, or it can include two or more data nodes. When the first data node combination includes two or more data nodes, there are relationships between the data nodes, meaning there are no isolated data nodes, and the knowledge points included in the first data node combination belong to similar domains. The second data node combination can have more data nodes than the first data node combination, or the maximum distance between data nodes (also called the span between data nodes) is greater than the span between data nodes in the first data node combination, meaning it has more knowledge points, or the scope of knowledge point coverage is wider. At least some data nodes in the second data node combination and the first data node combination are related, and there are also relationships between the data nodes in the second data node combination, meaning there are no isolated data nodes.

[0007] Therefore, when training the initial model with training data, we can first use relatively simple training data (e.g., combinations of data nodes with fewer data nodes and / or combinations of data nodes with small spans between them) to train the initial model, obtaining an intermediate model. This allows the intermediate model to reason about simple data. Then, we use complex training data (e.g., combinations of data nodes with more data nodes and / or combinations of data nodes with large spans between them) to train the intermediate model, obtaining the target model. This allows the target model to reason about complex data.

[0008] Therefore, this approach does not begin training the model with complex data, but rather with simple data. This allows the model to learn from simple data first, developing reasoning abilities with fewer inference steps and less overlap between data points. Then, complex data is used for training, enabling the model to gradually master reasoning abilities with more steps and greater overlap between data points. Ultimately, this results in higher accuracy of the inference results obtained by the target model.

[0009] In conjunction with the first aspect, in some implementations, multiple data nodes in the training data belong to multiple levels, and these multiple data nodes include child nodes and parent nodes, with relationships including parent-child relationships.

[0010] In the above scheme, the training data can be a tree-structured knowledge graph, where data nodes have parent-child relationships. Multiple data nodes in the training data include parent nodes and child nodes. The parent node's level is higher than the level of its corresponding child node, and the parent and child nodes belong to adjacent levels. Furthermore, electronic devices can use this tree-structured knowledge graph to add child or parent nodes corresponding to certain data nodes in the first data node combination, making the second data node combination include more knowledge points and / or a wider range of knowledge points. This allows the model to gradually master reasoning capabilities under conditions with more reasoning steps and greater overlap between data points. Ultimately, this results in higher accuracy of the inference results obtained by the target model.

[0011] In conjunction with the first aspect, in some implementations, the association relationship also includes the similarity relationship, which refers to the similarity between data nodes at the same level being greater than a first threshold.

[0012] In the above scheme, for a tree-structured knowledge graph, the electronic device can also identify the similarity between data nodes at the same level, determining data nodes with high similarity (i.e., greater than a first threshold). Furthermore, based on the first data node combination, data nodes with similar relationships at the same level as a data node in the first combination, or child or parent nodes of that data node, can be added. This results in a second data node combination containing more knowledge points and / or a wider range of knowledge points, allowing the model to gradually master reasoning capabilities under conditions of numerous reasoning steps and high data overlap. Ultimately, this leads to higher accuracy in the results obtained by the target model's reasoning.

[0013] In conjunction with the first aspect, in some implementations, multiple data nodes in the training data belong to the same level, and the association relationship includes similarity relationship, which means that the similarity between data nodes is greater than a second threshold.

[0014] In the above scheme, the training data can also be a network knowledge graph, where multiple data nodes belong to the same level. The similarity between data nodes with relationships exceeds a second threshold. Furthermore, based on the first data node combination, data nodes with similar relationships to a given data node in the first combination can be added, making the second data node combination include more knowledge points and / or a wider range of knowledge points. This allows the model to gradually master reasoning capabilities under conditions with more reasoning steps and greater overlap between data points. Ultimately, this results in higher accuracy of the inference results obtained by the target model.

[0015] In conjunction with the first aspect, in some implementations, the training data includes a first question and a first preset answer corresponding to the first question. The first question is related to the data nodes in the first data node combination. The method also includes: inputting the first question into the initial model to obtain the first answer; adjusting the parameters of the initial model according to the matching degree between the first answer and the first preset answer to obtain an intermediate model.

[0016] In the above approach, training data can include questions and corresponding preset answers, such as question-answer pairs from textbook exercises, and the initial model can be a question-answering model. Electronic devices can input questions into the initial model, and adjust the parameters of the initial model based on the similarity between the output answer and the preset answer. Thus, the initial model is trained using existing questions and preset answers, eliminating the need to generate additional questions and saving training time.

[0017] In conjunction with the first aspect, in some implementations, the method further includes: generating a second question based on the data nodes in the first data node combination; inputting the second question into the initial model to obtain a second answer; and adjusting the parameters of the initial model according to the matching degree between the second answer and the data nodes in the first data node combination to obtain an intermediate model.

[0018] In the above scheme, the electronic device can also generate training questions and preset answers based on the first data node combination, input the questions into the initial model, and adjust the parameters of the initial model by the similarity between the answer output by the initial model and the preset answer. In this way, for any combination of data nodes, the electronic device can determine the question pair for training, improving the reliability of training.

[0019] In conjunction with the first aspect, in some implementations, the training data includes a third question and a second preset answer corresponding to the third question. The data nodes in the combination of the third question and the second data node are related. The method also includes: inputting the third question into an intermediate model to obtain the third answer; and adjusting the model parameters of the intermediate model according to the matching degree between the third answer and the second preset answer to obtain the target model.

[0020] In conjunction with the first aspect, in some implementations, the method further includes: generating a fourth question based on the data nodes in the second data node combination; inputting the fourth question into an intermediate model to obtain a fourth answer; and adjusting the parameters of the intermediate model according to the matching degree between the fourth answer and the data nodes in the second data node combination to obtain the target model.

[0021] In conjunction with the first aspect, in some implementations, multiple data nodes in the training data are obtained based on data files, which include one or more of the following: text data, image data, audio data, and video data.

[0022] In the above scheme, the electronic device can obtain knowledge graphs from existing knowledge bases (such as document databases like books and academic reports, or audio and video databases like course teaching materials). Data types include text, audio, video, and images. For example, if the data file includes images, the electronic device can also recognize the image content and treat it as a data node, or it can determine the data content as the data node to which the most recent knowledge point belongs based on the image's position in the data file.

[0023] Secondly, this application provides a model training apparatus, comprising: an acquisition unit and a training unit. The acquisition unit is used to acquire training data, which includes multiple data nodes and the relationships between the multiple data nodes. The training unit is used to train an initial model based on a first data node combination to obtain an intermediate model. The data nodes in the first data node combination belong to multiple data nodes, and the first data node combination includes at least one data node. Furthermore, when the number of data nodes in the first data node combination is greater than one, any data node in the first data node combination has a related data node within the first data node combination. The training unit is also used to train the intermediate model based on a second data node combination to obtain a target model. The data nodes in the second data node combination belong to multiple data nodes, at least one data node in the second data node combination has a related relationship with a data node in the first data node combination, and any data node in the second data node combination has a related data node within the second data node combination. The number of data nodes in the second data node combination is greater than the number of data nodes in the first data node combination, and / or, the maximum distance between data nodes in the second data node combination is greater than the maximum distance between data nodes in the first data node combination.

[0024] In conjunction with the second aspect, in some implementations, multiple data nodes in the training data belong to multiple levels, and the relationship between multiple data nodes, including child nodes and parent nodes, includes parent-child relationships.

[0025] In conjunction with the second aspect, in some implementation methods, the association relationship also includes the similarity relationship, which refers to the similarity between data nodes at the same level being greater than a first threshold.

[0026] In conjunction with the second aspect, in some implementations, multiple data nodes in the training data belong to the same level, and the association relationship includes similarity relationship, which means that the similarity between data nodes is greater than a second threshold.

[0027] In conjunction with the second aspect, in some implementations, the training data includes a first question and a first preset answer corresponding to the first question. The first question is related to the data nodes in the first data node combination. The training unit is also used to input the first question into the initial model to obtain the first answer. The training unit is also used to adjust the parameters of the initial model according to the matching degree between the first answer and the first preset answer to obtain an intermediate model.

[0028] In conjunction with the second aspect, in some implementations, the training unit is also used to generate a second question based on the data nodes in the first data node combination; the training unit is also used to input the second question into the initial model to obtain a second answer; the training unit is also used to adjust the parameters of the initial model according to the matching degree between the second answer and the data nodes in the first data node combination to obtain an intermediate model.

[0029] In conjunction with the second aspect, in some implementations, the training data includes a third question and a second preset answer corresponding to the third question. The training unit is also used to input the third question into the intermediate model to obtain the third answer. The training unit is also used to adjust the model parameters of the intermediate model according to the matching degree between the third answer and the second preset answer to obtain the target model.

[0030] In conjunction with the second aspect, in some implementations, the training unit is also used to generate a fourth question based on the data nodes in the second data node combination; the training unit is also used to input the fourth question into the intermediate model to obtain a fourth answer; the training unit is also used to adjust the parameters of the intermediate model according to the matching degree between the fourth answer and the data nodes in the second data node combination to obtain the target model.

[0031] In conjunction with the second aspect, in some implementations, multiple data nodes in the training data are obtained based on data files, which include one or more of the following: text data, image data, audio data, and video data.

[0032] Thirdly, this application provides an electronic device including a processor and a memory, wherein the memory is used to store instructions and the processor is used to execute the instructions, and when the processor executes the instructions, it performs the method as described in the first aspect.

[0033] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on an electronic device, perform the method described in the first aspect.

[0034] Fifthly, this application provides a computer program product including computer instructions, which, when executed by an electronic device, cause the electronic device to perform the method described in the first aspect. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0036] Figure 1 This is a schematic diagram of the structure of an artificial intelligence system provided in an embodiment of this application;

[0037] Figure 2This is a schematic diagram of an interface for an inquiry-and-answer application provided in an embodiment of this application;

[0038] Figure 3 This is a schematic flowchart of a model training method provided in an embodiment of this application;

[0039] Figure 4A This is a schematic diagram of a tree-like knowledge graph structure provided in an embodiment of this application;

[0040] Figure 4B This is a schematic diagram of the structure of a graph-like knowledge graph provided in an embodiment of this application;

[0041] Figure 4C This is a schematic diagram of a data node combination generated based on a graph-like knowledge graph, provided in an embodiment of this application;

[0042] Figure 5 This is a schematic diagram illustrating an embodiment of this application for model training by increasing the number of data nodes;

[0043] Figure 6 This is a schematic diagram illustrating an embodiment of this application for model training by increasing the span of data nodes;

[0044] Figure 7 This is a schematic diagram illustrating an embodiment of the present application for model training by increasing the number and span of data nodes;

[0045] Figure 8 This is a schematic diagram of the structure of a model training device provided in an embodiment of this application;

[0046] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0047] The illustrative embodiments of this application include, but are not limited to, model training methods, apparatus, media, products, and electronic devices.

[0048] First, the application scenarios involved in the embodiments of this application will be introduced.

[0049] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or computing devices controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. AI has a wide range of applications, such as question-answering systems, facial recognition, and data processing applications.

[0050] AI models are a set of mathematical methods for implementing AI. AI models can be trained using a large number of samples to acquire reasoning capabilities. For example, when training an AI model for a question-answering system, the training phase can provide the model with a wealth of knowledge and multiple unsolved questions with labeled correct answers as a sample set. The AI ​​model organizes this knowledge, infers answers to the unsolved questions, and adjusts and improves its network structure parameters based on the connections between these unsolved questions and the labeled correct answers, enabling it to deduce the correct answers based on the unsolved questions. Furthermore, in the inference phase, the AI ​​model can reason about unsolved questions without labeled answers. It should be understood that the above examples are for illustrative purposes and do not constitute specific limitations.

[0051] The structure of the AI ​​model's training and inference system is explained below. For example... Figure 1 As shown, Figure 1 This is an architecture diagram of an AI model training and inference system. The AI ​​system 100 uses a commonly used system architecture in the AI ​​field. The AI ​​system 100 includes: a data acquisition device 110, a database 120, a training device 130, an execution device 140, and a client device 150. The various components of the AI ​​system 100 can be interconnected via a network, which can be a wired network, a wireless network, or a hybrid of both.

[0052] The data acquisition device 110 and the training device 130 can be physical servers, such as x86 servers, ARM servers, etc., or virtual machines (VMs) implemented based on general physical servers combined with network functions virtualization (NFV) technology. A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment, such as a virtual machine in cloud data. This application does not make specific limitations.

[0053] The data acquisition device 110 is used to collect data for the training device 130. For example, in the aforementioned field of intelligent question answering, the training data can be knowledge data from various fields, such as multimodal data like text data, image data, video data, and audio data. The training data can also include unsolved questions and corresponding labeled answers.

[0054] The data acquisition device 110 can input training data into the database 120, so that the training device 130 can use the training data in the database 120 to train the initial model and obtain the target model. The training data obtained by the data acquisition device 110 can be obtained from the cloud or other third-party platforms. This application does not make any specific limitations.

[0055] Specifically, during training, the training device 130 compares the output data of the model to be trained with the labels in the training data, and continuously adjusts the structural parameters of the model to be trained based on the comparison results, until the difference between the output data of the training device 130 and the labels of the training data is less than a certain threshold, thereby completing the training of the model to be trained and obtaining the target model. Here, the model to be trained and the target model can be any type of AI model, such as the AI ​​model used in the question-answering system in the example above, or a multimodal large model, a retrieval enhancement generative model, etc., and this application does not impose any specific limitations.

[0056] The execution device 140 can be a terminal device, such as a mobile phone terminal, tablet computer, laptop computer, augmented reality / virtual reality, vehicle terminal, etc., or it can be a server or cloud device, etc. This application does not make specific limitations.

[0057] The execution device 140 is used to implement various functions based on the target model trained by the training device 130. Specifically, in Figure 1 In this process, the user can input data to the execution device 140 through the client device 150, use the target model to infer the input data, and obtain the output result. The execution device 140 can return the output result to the client device 150 so that the user can view the result output by the execution device 140. The specific presentation form can be display, sound, motion, or other specific methods.

[0058] The execution device 140 can also store the output results as new sample data in the database 120, so that the training device 130 can use the new samples to readjust the structural parameters of the target model and improve the performance of the target model.

[0059] For example, such as Figure 2 As shown, the client device 150 is a mobile phone 10, the execution device 140 is a cloud device, and the trained target model is a multimodal large model as an example. The user can input the problem to be solved through the input box 101 in the interface displayed on the mobile phone 10, such as "Which component affects the gradual decrease of current over time?" in the display box 102. The execution device 140 combines the knowledge information obtained by the multimodal large model to solve the problem and returns the answer to the mobile phone 10, so that the user can view the answer through the mobile phone 10, such as "This phenomenon may be caused by the charging and discharging of the capacitor..." etc., as shown in the display box 103.

[0060] It is worth noting that Figure 1 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 1In this context, the database 120 is an external storage device relative to the training device 130. In other cases, the database 120 may also be placed in the training device 130. This application does not make any specific limitations.

[0061] In summary, the implementation of various AI applications relies on AI models to achieve different functions. These models need to be pre-trained using training data before they can be used in execution devices. When training AI models with training data, large amounts of simple data are unlikely to significantly improve the model's inference accuracy. The trained AI model can only handle simple data, and its inference accuracy for difficult data is low. Training AI models with difficult samples can improve their inference accuracy for difficult samples. However, directly training AI models with difficult samples makes convergence difficult.

[0062] For example, in question-answering systems, if the training data only provides basic mathematical theories and problem-solving methods, such as questions that can be reasoned out in a few steps, the trained AI model will not be able to provide accurate answers to more difficult mathematical problems, such as those that require the cross-application of more mathematical theories and more steps to solve.

[0063] For example, if the training data is highly complex, such as difficult mathematical problems, the AI ​​model may be unable to understand and solve these complex problems based on existing, simple knowledge and theories. The AI ​​model may struggle to find suitable parameters to fit the training data, leading to difficulty in converging during training. Furthermore, highly complex training data may cause the AI ​​model to overfit the training data, resulting in poor performance when faced with new, unprocessed data and limiting the model's generalization ability.

[0064] In other words, the poor quality of the training data prevents the trained AI model from performing accurate reasoning, thus failing to meet the high-precision requirements of practical applications.

[0065] Therefore, to improve the reasoning ability of AI models, this application provides a model training method. For training data provided to the training device 130, the training device 130 can obtain multiple data nodes included in the training data, as well as the relationships between these data nodes. When training the model to be trained, the training device 130 can first input combinations of data nodes with fewer data nodes and / or shorter distances between them into the model to be trained. Then, it can gradually add more data nodes to the previous combinations, using combinations of data nodes with a larger number of data nodes and / or a wider range of data node distances to continue training the model to be trained.

[0066] In this way, when training the model to be trained, the training device 130 does not use complex data from the beginning, but instead uses simple data first. This allows the model to learn from simple data and develop reasoning ability under conditions with fewer reasoning steps and less overlap between data points. Then, it uses complex data for training, allowing the model to gradually master reasoning ability under conditions with more reasoning steps and greater overlap between data points. Ultimately, this enables the target model to obtain relatively accurate reasoning results under different conditions, improving the reasoning accuracy of the target model.

[0067] The following is combined Figure 3 This application describes the implementation process of a model training method. The electronic device used in this model training method can be the aforementioned training device 130. The electronic device can obtain training data from the database 120 and use the training data for model training. Figure 3 As shown, the method includes:

[0068] S310: Determine multiple data nodes based on the data file.

[0069] Data files can be obtained by electronic devices from existing knowledge bases, such as document databases like books and academic reports, or audio-visual databases like course materials. Data files include one or more of the following: text data, image data, video data, and audio data. Electronic devices can identify and summarize the content of each data section in a data file, representing the data file as multiple data nodes.

[0070] In some embodiments, the electronic device can identify the chapter structure of a data file based on its table of contents or headings, such as those of a book or academic paper. The electronic device can then divide the data file into multiple parts based on the chapter structure, and represent the data content of different knowledge points as a data node by identifying the knowledge points contained in each part. For example, the electronic device can identify the course type of the data file, and one or more of the following: unit, chapter, section, knowledge point, and sub-knowledge point, based on the data file's table of contents and / or chapter headings.

[0071] In other embodiments, if the data file also includes image data, such as illustrations in a book, the nearest knowledge point can be identified based on the image data's location within the data file. The electronic device can recognize the text content contained in the image data and determine that the data node corresponding to the knowledge point may also include the content of the image data. Alternatively, the electronic device can match the extracted image data with various knowledge points, determine the knowledge point with the highest content similarity as the knowledge point to which the image data belongs, and determine that the data node corresponding to that knowledge point may also include the content of the image data.

[0072] It should be understood that electronic devices can determine the data content included in a data node based on the hierarchical structure of the data file itself. For example, if the data file is divided into chapters by unit-chapter-knowledge point, the electronic device can determine that a data node includes the content corresponding to a single knowledge point. As another example, if the data file is divided into chapters by unit-chapter-section-knowledge point-sub-knowledge point, the electronic device can determine that a data node includes the content corresponding to a single sub-knowledge point. This application does not impose specific restrictions on the type of chapter structure of the data file itself.

[0073] In some embodiments, the electronic device can also identify the feature vector corresponding to the data node through technologies such as word segmentation and semantic recognition based on the data content corresponding to the data node. The data node includes the feature vector corresponding to that part of the data content.

[0074] In other embodiments, the electronic device can also represent the data file as multiple data nodes by combining the chapter structure of the data file and identifying the data content included in the data file. For example, the electronic device can first divide the data file into multiple data parts according to the chapter structure, and then divide a single data part into multiple sub-parts by identifying the content of each data part. Furthermore, the identified sub-parts are represented as a data node. For example, for a chapter structure divided into unit-chapter-knowledge point, the electronic device can also semantically segment the identified knowledge points into multiple sub-knowledge points, and the electronic device can determine that the data node also includes the content corresponding to the segmented sub-knowledge points.

[0075] In other embodiments, the electronic device can also determine summary information of courses, units, and / or chapters based on the chapter structure, and determine the obtained summary information as data nodes in the knowledge graph. For example, if a chapter includes multiple knowledge points, the electronic device can summarize the chapter information based on the data content of the multiple knowledge points and determine the chapter information as a new data node. Alternatively, if a unit includes multiple chapters, the electronic device can summarize the unit information based on the chapter information of the multiple chapters included in the unit and determine the unit information as a new data node.

[0076] In other words, data nodes in a knowledge graph can include various types of data nodes, such as those corresponding to knowledge points, chapter information, and unit information. The type of data node can be determined based on the hierarchy of the chapter structure. For example, for a data file with a chapter structure of unit-chapter-section-knowledge point, the knowledge graph can also include data nodes corresponding to sections.

[0077] Knowledge points can be derived from data file segmentation. The data nodes corresponding to each knowledge point include its data content, such as textual descriptions, formulas, or descriptive information from image data. Chapter information is a summary of at least one knowledge point within that chapter, and the data nodes corresponding to chapter information can include a summary of at least one knowledge point within that chapter. Similarly, unit information is a summary of chapter information from at least one chapter within that unit, and the data nodes corresponding to unit information can include a summary of at least one chapter.

[0078] In other embodiments, the electronic device can also directly identify course names, unit names, or chapter names in the data file, using the identified course names as course information, unit names as unit information, and chapter names as chapter information. Some data files directly include summary information for each course, unit, and / or chapter, such as "chapter subsections" or "chapter prefaces." The electronic device can directly obtain the data nodes corresponding to the courses, units, and / or chapters based on the existing summary information.

[0079] S320: Determine the association between multiple data nodes.

[0080] Electronic devices can determine the relationships between data nodes based on the data content corresponding to each data node. For example, data nodes belonging to similar disciplines or similar knowledge points are related. Furthermore, electronic devices can obtain a knowledge graph corresponding to the data file, which includes multiple data nodes and the relationships between them.

[0081] In some embodiments, the relationships between data nodes may include parent-child relationships. Specifically, the electronic device can establish a tree-like relationship between data nodes according to a chapter structure, thereby dividing the data nodes into different levels, with each data node belonging to one of these levels. Each data node can have a corresponding parent node and / or child node, with the parent and child nodes connected. The parent node's level is higher than the child node's, and the levels to which the parent node and child node belong are adjacent. A parent node can have at least one child node, and each child node has only one corresponding parent node. The relationships between data nodes include the relationships between parent nodes and their corresponding child nodes, i.e., parent-child relationships.

[0082] For example, in a chapter structure of unit-chapter-knowledge point, the data node corresponding to the unit information can be the parent node of the data node corresponding to the chapter information of the chapters included in that unit; that is, the data node corresponding to the chapter information is the child node of the data node corresponding to the unit information of the unit to which that chapter belongs. Similarly, if the chapter to which a certain knowledge point belongs can be determined based on the chapter structure, then the data node corresponding to that knowledge point can be the child node of the data node corresponding to the chapter; that is, the data node corresponding to the chapter information is the parent node of the data node corresponding to the knowledge points included in that chapter.

[0083] For example, such as Figure 4A As shown, the unit information of the "Cell Biology" unit corresponds to data node G0. The "Cell Biology" unit includes the chapters "Molecules that Make Up Cells" and "Cell Diversity and Unity". Furthermore, data node G0 is the parent node of data node G1, which corresponds to the chapter information of the "Molecules that Make Up Cells" chapter, and data node G2, which corresponds to the chapter information of the "Cell Diversity and Unity" chapter.

[0084] The "Molecules that Make Up Cells" section includes the knowledge points "Amino Acid Dehydration Condensation Reaction and Peptide Bond Formation" (corresponding to data node G3), "Examples of Protein Function" (corresponding to data node G4), and "Adipocytes" (corresponding to data node G5). The "Diversity and Unity of Cells" section includes the knowledge points "Schematic Diagram of Endocytosis and Exocytosis in Amoebas" (corresponding to data node G6), "Schematic Diagram of Mycoplasma Structure" (corresponding to data node G7), and "Atlas of Common Single-Cell Organisms" (corresponding to data node G8). Furthermore, data node G1 is the parent node of data nodes G3, G4, and G5, and data node G2 is the parent node of data nodes G6, G7, and G8.

[0085] In some embodiments, the electronic device may first establish a tree-like relationship between data nodes based on the chapter structure, and then further enhance the association between data nodes by using the similarity between them, thereby determining the similarity relationship between data nodes. For example, the electronic device may calculate the similarity between child nodes belonging to the same parent node, and thus determine whether there is a direct association between the child nodes. Alternatively, the electronic device may calculate the similarity between data nodes corresponding to each knowledge point, the similarity between data nodes corresponding to each chapter information, etc., and thus determine whether there is an association between data nodes corresponding to each knowledge point, or between data nodes corresponding to each chapter information. The association between data nodes also includes the association between data nodes belonging to the same level with a similarity greater than a first threshold.

[0086] like Figure 4B As shown, the electronic device can also calculate the similarity between G1 and G2 based on the feature vectors corresponding to G1 and G2, which are both child nodes of G0. For example, if the similarity between G1 and G2 is greater than a preset value A1 (as an example of the first threshold), it can be said that there is a correlation between G1 and G2.

[0087] Similarly, the electronic device can also calculate the similarity between G3 and G4 based on the feature vectors corresponding to G3 and G4, which are both child nodes of G1. For example, if the similarity between G3 and G4 is greater than a preset value A2 (another instance of the first threshold), then there is a relationship between G3 and G4. It can also calculate the similarity between G3 and G5, and the similarity between G4 and G5. For example, if the similarity between G3 and G5 is less than or equal to the preset value A2, then there is no relationship between G3 and G5. If the similarity between G4 and G5 is greater than the preset value A2, then there is a relationship between G4 and G5.

[0088] The electronic device can also calculate the similarity between G6, G7, and G8 based on the feature vectors corresponding to G6, G7, and G8, which are all child nodes of G2. For example, if the similarity between G6 and G7 is greater than a preset value A2, then there is a correlation between G6 and G7.

[0089] In other embodiments, the same similarity threshold can be used for data nodes at different levels, or different similarity thresholds can be used to determine whether there is a relationship between data nodes. That is to say, A2 and A3 mentioned above can be the same or different.

[0090] In other embodiments, the knowledge graph determined by the electronic device can also be a network knowledge graph, meaning that all data nodes belong to the same level, and the relationships between data nodes include similarity relationships. For example, if the similarity between data nodes is greater than a second threshold, then the data nodes are associated. The electronic device can also segment the data file into multiple knowledge points based on S310. For example, the electronic device can determine the feature vector corresponding to a data node based on its data content using a term frequency-inverse document frequency (TF-IDF) algorithm. Then, by calculating the similarity between the feature vectors of the data nodes, such as cosine similarity or Eulerian distance, if the similarity between data nodes is greater than a preset value A3 (as an example of the second threshold), it indicates that there is a relationship between the two data nodes. If the similarity between data nodes is less than or equal to the preset value A3, it indicates that there is no relationship between the two data nodes. In other words, all multiple data nodes belong to the same level, and the relationships between data nodes include relationships between data nodes with similarity greater than the second threshold.

[0091] The data file determines the relationships based solely on the similarity between knowledge points, which may result in multiple knowledge graphs. For example, knowledge points belonging to the same chapter have high similarity, and these knowledge points can be represented by a single knowledge graph.

[0092] For example, such as Figure 4C As shown, nodes G3, G4, and G5 corresponding to knowledge points are related and belong to one knowledge graph. Nodes G6 and G7 corresponding to knowledge points are also related and belong to one knowledge graph. G8 has no connection with other data nodes and is an isolated data node. Optionally, in subsequent model training, the electronic device can perform multiple rounds of training on the model based on the knowledge graphs of G3, G4, and G5 or G6 and G7. The number and / or span of data nodes used in each round of training will vary, as described below. For the isolated G8 node, the electronic device can directly use the data content corresponding to the G8 node to train the model.

[0093] Furthermore, for the same data file, if the data nodes corresponding to knowledge points, chapters, and units are identified based on the chapter structure, and the parent-child relationships between data nodes are determined based on the chapter structure, then the data file can be represented as a knowledge graph. However, if only the data file containing knowledge points is identified, and the relationships between the data nodes corresponding to those knowledge points are determined, multiple knowledge graphs may be obtained.

[0094] S330: Train the initial model based on the combination of the first data nodes to obtain the intermediate model.

[0095] The electronic device will acquire a knowledge graph determined based on the knowledge data, and use the knowledge graph as training data to train an initial model. The training data may include multiple data nodes identified through the knowledge data and the relationships between these data nodes. For details, please refer to the descriptions in S310 and S320 above.

[0096] Electronic devices can first select multiple related data nodes (i.e., a first data node combination) from a set of data nodes according to preset requirements to train an initial model, thus obtaining an intermediate model. The first data node combination includes a small number of nodes and a narrow range between them. The data nodes in the first data node combination can include one or more of the following: data nodes corresponding to knowledge points, chapter information, unit information, course information, etc. When the first data node combination includes one or more data nodes, each data node in the first data node combination has related data nodes within that combination. This ensures that the data content corresponding to the data nodes in the first data node combination is related, for example, belonging to the same subject or field.

[0097] Optionally, there may be direct relationships between multiple data nodes in the first data node combination. For example, in a tree structure, the relationship between a parent node and its child node is a direct relationship. Figure 4B As shown, the first data node combination may include G1 and G3, where G1 is the parent node of G3. Alternatively, the association between multiple data nodes in the first data node combination may also include data nodes belonging to the same level with a similarity greater than a threshold. For example, for... Figure 4B The knowledge graph shown can include nodes G3, G4, and G5 as the first data node combination. Nodes G3 and G4 have a direct relationship, and nodes G4 and G5 also have a direct relationship.

[0098] Optionally, there may be indirect relationships between multiple data nodes in the first data node combination, for example, for... Figure 4AThe knowledge graph shown can include nodes G3, G4, and G5 as the first data node combination. There are no direct relationships between nodes G3, G4, and G5, but they are all directly related to G1. This means there are indirect relationships between nodes G3, G4, and G5, indicating that the data content corresponding to nodes G3, G4, and G5 belongs to the same domain (within the domain of node G1). Alternatively, the first data node combination may also include... Figure 4A The knowledge graph shown contains nodes G3, G6, and G7, which are indirectly related to nodes G1, G0, and G2.

[0099] The span between the aforementioned data nodes represents the shortest path length between data nodes in the knowledge graph, or the number of data nodes included in the shortest path connecting the data nodes. For example, for Figure 4B In the knowledge graph shown, the shortest path between G3 and G4 is 1, which can be denoted as a span of 1. Alternatively, since G3 and G4 contain 2 data nodes, this can also be denoted as a span of 2 between G3 and G4. The shortest path between G3 and G5 is 2 (G3-G1-G5), which can also be denoted as a span of 2. Alternatively, since G3 and G5 together contain three data nodes (G3, G1, and G5), this can also be denoted as a span of 3. For a single data node, its data node span can be 0 or 1. It should be understood that this application does not impose specific restrictions on the representation of data node span.

[0100] The number of data nodes in the first data node combination can be preset by the electronic device or preset by the user. For example, the initial model can be trained starting with a single data node, such as training the initial model with the knowledge points contained in data node G3, or training the model with a combination of data nodes G3 and G4. Alternatively, the number of data nodes in the first data node combination can be calculated by the electronic device based on parameters such as the size of the knowledge graph and the performance of the electronic device. For example, if the total number of data nodes in the knowledge graph is small, the electronic device can start training the initial model with a single data node. If the total number of data nodes in the knowledge graph is large, the electronic device can start training the initial model with two or three data nodes to reduce the number of training iterations.

[0101] Training the initial model involves inputting the data content corresponding to each data node in the first data node combination into the initial model, allowing the initial model to learn the data content corresponding to the first data node combination. For example, for a data node corresponding to a knowledge point, the data content of the data node is the content of the knowledge point, such as the text description, image summary information, formula, etc., of that knowledge point. For a data node corresponding to chapter information, the data content of the data node can be the summary information of that chapter, etc. For further details, please refer to the relevant description in S310 above.

[0102] Alternatively, the electronic device can also input the data content corresponding to the data node of the knowledge point in the first data node combination into the initial model, so that the initial model can learn the data content corresponding to the knowledge point.

[0103] Optionally, if the initial model is a model applied to a question-answering system, the electronic device can also train the model based on existing questions, generate at least one question (e.g., a second question) based on the data content of the first data node combination, and then input the at least one question into the initial model to obtain the answers corresponding to each question output by the initial model (e.g., the second answer). The electronic device can also match the answers output by the initial model with the data content corresponding to the first data node combination, and adjust the model parameters of the initial model according to the matching degree to obtain an intermediate model. If the matching degree between the answer output by the initial model and the data content corresponding to the first data node combination is high, such as higher than a set threshold, it indicates that the initial model outputs a relatively correct result. Conversely, if the matching degree between the answer output by the initial model and the data content corresponding to the first data node combination is low, such as lower than the set threshold, it indicates that the initial model outputs a relatively incorrect result.

[0104] In some embodiments, the training data may also directly include some unsolved problems and corresponding preset answers, such as textbook exercises and their answers. The electronic device can also identify the data nodes involved in these unsolved problems and can use the unsolved problem corresponding to the first data node combination (e.g., the first question) to train the initial model. The electronic device can match the answer (e.g., the first answer) output by the initial model based on the unsolved problem corresponding to the first data node combination with the first answer corresponding to that unsolved problem, and adjust the model parameters of the initial model according to the matching degree to obtain an intermediate model.

[0105] It should be understood that, regarding the method by which electronic devices are trained on the initial model, the aforementioned methods can also be referenced. Figure 1 The relevant descriptions of training equipment 130 in the text will not be repeated here.

[0106] S340: Train the intermediate model based on the combination of the second data nodes to obtain the target model.

[0107] After training an intermediate model, the electronic device can continue training the intermediate model using a second data node combination. The number of data nodes in the second data node combination is greater than the number of data nodes in the first data node combination, and / or the maximum distance between data nodes in the second data node combination is greater than the maximum distance between data nodes in the first data node combination. This maximum distance between data nodes can also be called the span. In other words, the second data node combination includes more data nodes and a more complex data node structure than the first data node combination, corresponding to more training data content or greater overlap between data content. Furthermore, there are also connections between the data nodes in the second data node combination; the second and first data node combinations belong to the same knowledge graph, meaning at least one data node in the second data node combination is associated with at least one data node in the first data node combination.

[0108] For example, compared to the first data node combination, the second data node combination can add at least one knowledge node that is related to one of the data nodes in the first data node combination. That is, based on a certain data node in the first data node combination, a data node with a parent-child relationship or similar relationship with that data node can be added. For example, the parent node, child node, or related child nodes belonging to the same parent node can be added to a certain data node in the first data node combination.

[0109] For example, for Figure 4A or Figure 4B The tree-like knowledge graph shown can have the following configurations: First data node combination may include G3, and second data node combination may include G1 and G3. Alternatively, first data node combination may include G1, and second data node combination may include G1 and G3. Or, first data node combination may include G1 and G3, and second data node combination may include G1, G3, and G4.

[0110] For example, regarding Figure 4B The knowledge graph shown may include G3 and G4 in the second data node combination if the first data node combination includes G3. Alternatively, if the first data node combination includes G1, the second data node combination may include G1 and G2.

[0111] Optionally, the multiple data nodes in the second data node combination can have direct or indirect relationships. For example, such as... Figure 4A In the knowledge graph shown, if the first data node combination includes nodes G3, G4 and G5, the first data node combination may include nodes G3, G4, G5, G6 and G7. Nodes G3, G4, G5, G6 and G7 are indirectly related through nodes G1, G0 and G2.

[0112] Similarly, the electronic device can train the intermediate model based on the second data node combination, or it can input the data content corresponding to each data node in the second data node combination into the intermediate model, allowing the intermediate model to learn the data content corresponding to the second data node combination. Optionally, the electronic device can also input the data content corresponding to the data nodes corresponding to knowledge points in the second data node combination into the intermediate model, allowing the intermediate model to learn the data content corresponding to the knowledge points.

[0113] Alternatively, for a model to be trained that is applied to a question-answering system, the electronic device can also generate at least one question (e.g., the fourth question) based on an existing question generation model, according to the data content of the second data node combination, and adjust the model parameters of the intermediate model according to the matching degree between the answer output by the intermediate model (e.g., the fourth answer) and the data content corresponding to the second data node combination, to obtain the target model.

[0114] Alternatively, the electronic device can use the unsolved problem (e.g., the third problem) corresponding to the second data node combination included in the training data to train the intermediate model. The electronic device matches the answer (e.g., the third answer) output by the intermediate model based on the unsolved problem corresponding to the second data node combination with the second preset answer corresponding to the unsolved problem, and adjusts the model parameters of the intermediate model according to the matching degree to obtain the target model.

[0115] It should be understood that the methods by which electronic devices train intermediate models can also be referred to the aforementioned [reference needed]. Figure 1 The relevant descriptions of training equipment 130 and the aforementioned S330 will not be repeated here.

[0116] In some embodiments, the electronic device can also directly acquire an existing knowledge graph as training data. The knowledge graph includes multiple data nodes and the relationships between these data nodes. The electronic device can first select a first data node from the knowledge graph to combine with an initial model for training, obtaining an intermediate model. Then, the electronic device can select a second data node from the knowledge graph to combine with the intermediate model for training, obtaining the target model. For details, please refer to the descriptions of S310 and S340 above.

[0117] It should be understood that electronic devices can also perform more rounds of iterative training on the model, and each round of training uses a combination of data nodes with more data nodes than the previous round, and / or a wider range of data nodes.

[0118] Alternatively, the electronic device can continuously increase the number of data nodes or the span of data nodes until all data nodes in the knowledge graph have been traversed, so that the electronic device has used all data nodes to train the model.

[0119] In this way, when training a model, electronic devices do not start with complex data, but rather with simple data. This allows the model to learn from simple data and develop reasoning abilities with fewer inference steps and less overlap between data points. Then, complex data is used for training, allowing the model to gradually master reasoning abilities with more inference steps and greater overlap between data points. Ultimately, this enables the target model to obtain relatively accurate inference results under different conditions, improving the inference accuracy of the target model.

[0120] The following examples illustrate the first data node combination and the second data node combination in S330 and S340 above, using different knowledge graphs.

[0121] For example, such as Figure 5 As shown, the electronic device can be generated according to the aforementioned S310 and S320, such as Figure 5 The knowledge graph 50 shown above was obtained by identifying knowledge points included in the training data and based on the similarity between these knowledge points. Knowledge graph 50 includes the knowledge points "Expansion of Ancient Civilizations" (data node B1), "Alexander's Empire" (data node B2), "Roman Empire" (data node B3), and "Persian Empire" (data node B4). Relationships exist between B1 and B2, B1 and B3, B1 and B4, B2 and B3, B3 and B4, and B2 and B4.

[0122] Taking the gradual increase of data nodes in an electronic device as an example, the electronic device can first use data node B1 to train an initial model, obtaining an intermediate model. Then, it can continue training the intermediate model using combinations of data nodes B2 and B3, and combinations of data nodes B1, B3, and B4. Finally, it can train the intermediate model using combinations of data nodes B1 to B4, ultimately obtaining the target model. For data node combinations with more than one data node, each data node in the combination has at least one associated data node within that combination, and the number of data nodes increases with the number of model training iterations.

[0123] Optionally, the electronic device can also generate corresponding questions based on the combination of data nodes to train the model. For example, for data nodes B2 and B3 involving "Alexander's Empire" and "Roman Empire", questions that can be generated include "How did Alexander's Empire and the Roman Empire influence each other?" The electronic device can train the initial model based on the generated questions, as detailed in the descriptions of S330 and S340 above, which will not be repeated here.

[0124] For example, such as Figure 6 As shown, the electronic device can be generated according to the aforementioned S310 and S320, such as Figure 6 The knowledge graph 60 shown above contains a data node C1 corresponding to the unit information "Electricity". Data node C1 has two sub-nodes: data node C2 corresponding to the chapter information "Electrostatic Field and Its Applications" and data node C3 corresponding to the chapter information "Electromagnetic Induction and Photoelectric Effect". Data node C2 further contains sub-nodes corresponding to five knowledge points: "Current Variation over Time" (C4), "Relationship between Electric Potential Energy and Electric Potential" (C5), "Demonstration of Electrostatic Effects" (C6), "Schematic Diagram of Current Equipotential Problems" (C7), and "Experimental Circuit Diagram of Metal Wire Resistivity Measurement" (C8). "Electromagnetic Induction and Photoelectric Effect" (C3) contains the sub-node "Atomic Spectral Distribution" (C9). There are also connections between C4 and C5, and between C2 and C3.

[0125] Taking the example of electronic devices gradually increasing the span between data nodes, the electronic device can first train the initial model using data node C4 (span of 1). Then, it can continue to train the intermediate model using a combination of data nodes including C4 and C5 (span of 2), and a combination of data nodes including C2, C7, and C8 (span of 3). Finally, it can train the intermediate model using a combination of data nodes including C2, C3, C6, and C9 (span of 4) to obtain the target model.

[0126] Optionally, the electronic device can also generate corresponding questions based on the combination of data nodes to train the model. For example, for data nodes C4 and C5 involving "current versus time graph" and "relationship between electric potential energy and electric potential", the generated questions could be "how to explain the charging process of a capacitor through the change of electric potential energy in an electric field", etc. The electronic device can train the initial model based on the generated questions, as detailed in the descriptions of S330 and S340 above, which will not be repeated here.

[0127] For example, such as Figure 7 As shown, the electronic device can be generated according to the aforementioned S310 and S320, such as Figure 7 The knowledge graph 70 shown above. The data nodes and their relationships within the knowledge graph 70 can be found in the previously mentioned section. Figure 4B The description.

[0128] Taking the example of an electronic device gradually increasing the number of data nodes and the span between data nodes, the electronic device can first train the initial model using data node G8. Then, it can train the intermediate model sequentially using combinations of data nodes G3 and G4, and combinations of data nodes G1, G3, G4, and G5. Finally, it can train the intermediate model using combinations of data nodes G1, G2, G3, G5, G6, and G7 to obtain the target model. It should be understood that the electronic device can also use more data nodes to perform more rounds of model training on the model to be trained, which will not be elaborated here.

[0129] This application also provides a model training device 800, such as Figure 8 As shown, the model training device 800 may include an acquisition unit 810 and a training unit 820.

[0130] The acquisition unit 810 is used to acquire training data, which includes multiple data nodes and the relationships between them. The training unit 820 is used to train the initial model based on a first data node combination to obtain an intermediate model. The data nodes in the first data node combination belong to multiple data nodes, and the first data node combination includes at least one data node. Furthermore, if the number of data nodes in the first data node combination is greater than one, any data node in the first data node combination has a related data node within that combination. The training unit 820 is also used to train the intermediate model based on a second data node combination to obtain a target model. The data nodes in the second data node combination belong to multiple data nodes, at least one data node in the second data node combination is related to a data node in the first data node combination, any data node in the second data node combination has a related data node within that combination, the number of data nodes in the second data node combination is greater than the number of data nodes in the first data node combination, and / or, the maximum distance between data nodes in the second data node combination is greater than the maximum distance between data nodes in the first data node combination.

[0131] In some embodiments, multiple data nodes in the training data belong to multiple levels, and the relationship between multiple data nodes includes child nodes and parent nodes, including parent-child relationships.

[0132] In other embodiments, the association relationship also includes a similarity relationship, which means that the similarity between data nodes in the same level is greater than a first threshold.

[0133] In other embodiments, multiple data nodes in the training data belong to the same level, and the association relationship includes a similarity relationship, which means that the similarity between data nodes is greater than a second threshold.

[0134] In other embodiments, the training data includes a first question and a first preset answer corresponding to the first question. The first question is related to the data nodes in the first data node combination. The training unit 820 is also used to input the first question into the initial model to obtain the first answer. The training unit 820 is also used to adjust the parameters of the initial model according to the matching degree between the first answer and the first preset answer to obtain an intermediate model.

[0135] In other embodiments, the training unit 820 is further configured to generate a second question based on the data nodes in the first data node combination; the training unit 820 is further configured to input the second question into the initial model to obtain a second answer; the training unit 820 is further configured to adjust the parameters of the initial model according to the matching degree between the second answer and the data nodes in the first data node combination to obtain an intermediate model.

[0136] In other embodiments, the training data includes a third question and a second preset answer corresponding to the third question. The training unit 820 is further configured to input the third question into the intermediate model to obtain the third answer. The training unit 820 is further configured to adjust the model parameters of the intermediate model according to the matching degree between the third answer and the second preset answer to obtain the target model.

[0137] In other embodiments, the training unit 820 is further configured to generate a fourth question based on the data nodes in the second data node combination; the training unit 820 is further configured to input the fourth question into the intermediate model to obtain a fourth answer; the training unit 820 is further configured to adjust the parameters of the intermediate model according to the matching degree between the fourth answer and the data nodes in the second data node combination to obtain the target model.

[0138] In other embodiments, multiple data nodes in the training data are obtained based on data files, which include one or more of text data, image data, audio data, and video data.

[0139] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above-described solutions of the embodiments of this application, relevant equipment for cooperating in implementing the above solutions is also provided below.

[0140] Figure 9 This is a structural schematic diagram of an electronic device 900 provided in this application. (See attached diagram.) Figure 9As shown, the electronic device 900 includes a processor 910, a communication interface 920, and a memory 930. The processor 910, communication interface 920, and memory 930 can be interconnected via an internal bus 940, or they can communicate via wireless transmission or other means. This embodiment uses a connection via bus 940 as an example. Bus 940 can be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. Bus 940 can be divided into address bus, data bus, control bus, etc. In addition to the data bus, bus 940 can also include a power bus, control bus, and status signal bus. However, for clarity, all buses are labeled as bus 940 in the figure.

[0141] Processor 910 may consist of at least one general-purpose processor, such as a central processing unit (CPU), or a combination of a CPU and hardware chips. The aforementioned hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The aforementioned PLDs may be complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof. Processor 910 executes various types of digital storage instructions, such as digital storage instructions in software or firmware stored in memory 930, enabling electronic device 900 to provide a variety of services.

[0142] The memory 930 stores program code, which is executed by the processor 910 to perform the processing steps of the occlusion recognition method in the above embodiments. The program code may include one or more software modules, which can be... Figure 8The software modules provided in the embodiments include the acquisition unit 810 and the training unit 820.

[0143] The memory 930 may include volatile memory, such as random access memory (RAM); the memory 930 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); the memory 930 may also include combinations of the above types. The memory 930 may store program code for execution. Figure 3 Steps S310-S340 and their optional steps in the embodiment will not be described again here.

[0144] The communication interface 920 can be an internal interface (such as a high-speed serial computer expansion bus), a wired interface (such as an Ethernet interface), or a wireless interface (such as a cellular network interface or a wireless LAN interface) for communicating with other devices or modules.

[0145] It needs to be explained that, Figure 9 This is merely one possible implementation of an embodiment of this application. In practical applications, the electronic device 900 may include more or fewer components, and this is not a limitation. For content not shown or described in the embodiments of this application, please refer to the foregoing. Figure 3 The relevant descriptions in the embodiments will not be repeated here.

[0146] It should be understood that this embodiment can be implemented using a general-purpose physical server, such as an ARM server or an x86 server, or it can be implemented using a virtual machine based on a general-purpose physical server combined with NFV technology. A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. This application does not make any specific limitations.

[0147] Figure 9 The electronic device 900 shown can also be a computer cluster consisting of at least one server, which is not specifically limited in this application.

[0148] This application also provides a computer-readable storage medium storing instructions that, when executed on a processor. Figure 3The illustrated method flow is thus implemented. In some embodiments, the computer-readable storage medium may be a non-transitory computer-readable storage medium, which may include non-volatile media such as ROM, or some volatile media such as some RAM.

[0149] This application also provides a computer program product that, when run on a processor, provides a solution for... Figure 3 The method and flow shown are thus implemented.

[0150] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that contains one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tape), optical media (e.g., digital video discs (DVDs)), or semiconductor media. Semiconductor media can be SSDs.

[0151] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the scope of the technology disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application.

Claims

1. A model training method, characterized in that, The method includes: Acquire training data, which includes multiple data nodes and the relationships between the multiple data nodes; The initial model is trained based on the first data node combination to obtain an intermediate model. The data nodes in the first data node combination belong to the plurality of data nodes. The first data node combination includes at least one data node. Furthermore, when the number of data nodes included in the first data node combination is greater than 1, any data node in the first data node combination has a related data node in the first data node combination. The intermediate model is trained based on the second data node combination to obtain the target model. The data nodes in the second data node combination belong to the plurality of data nodes. At least one data node in the second data node combination is associated with a data node in the first data node combination. Any data node in the second data node combination has an associated data node in the second data node combination. The number of data nodes in the second data node combination is greater than the number of data nodes in the first data node combination, and / or, The maximum distance between data nodes in the second data node combination is greater than the maximum distance between data nodes in the first data node combination.

2. The method according to claim 1, characterized in that, The multiple data nodes in the training data belong to multiple levels, and the relationship includes parent-child relationships.

3. The method according to claim 2, characterized in that, The association relationship also includes the similarity relationship, which refers to the similarity between data nodes at the same level being greater than a first threshold.

4. The method according to claim 1, characterized in that, The multiple data nodes in the training data belong to the same level, and the association relationship includes a similarity relationship, which means that the similarity between the data nodes is greater than a second threshold.

5. The method according to any one of claims 1 to 4, characterized in that, The training data includes a first question and a first preset answer corresponding to the first question. The first question is related to data nodes in the first data node combination. The step of training the initial model based on the first data node combination to obtain an intermediate model includes: Input the first question into the initial model to obtain the first answer; Based on the matching degree between the first answer and the first preset answer, the parameters of the initial model are adjusted to obtain the intermediate model.

6. The method according to any one of claims 1 to 5, characterized in that, The process of training the initial model based on the first data node combination to obtain the intermediate model includes: Based on the data nodes in the first data node combination, a second question is generated; Input the second question into the initial model to obtain the second answer; Based on the matching degree between the second answer and the data nodes in the first data node combination, the parameters of the initial model are adjusted to obtain the intermediate model.

7. The method according to any one of claims 1 to 6, characterized in that, The training data includes a third question and a second preset answer corresponding to the third question. The third question and the data nodes in the second data node combination are related. The step of training the intermediate model based on the second data node combination to obtain the target model includes: Input the third question into the intermediate model to obtain the third answer; Based on the matching degree between the third answer and the second preset answer, the model parameters of the intermediate model are adjusted to obtain the target model.

8. The method according to any one of claims 1 to 7, characterized in that, The step of training the intermediate model based on the combination of second data nodes to obtain the target model includes: Based on the data nodes in the second data node combination, a fourth question is generated; Inputting the fourth question into the intermediate model yields the fourth answer; Based on the matching degree between the fourth answer and the data nodes in the second data node combination, the parameters of the intermediate model are adjusted to obtain the target model.

9. The method according to any one of claims 1 to 8, characterized in that, The multiple data nodes in the training data are obtained based on data files, which include one or more of the following: text data, image data, audio data, and video data.

10. A model training device, characterized in that, The device includes: an acquisition unit and a training unit. The acquisition unit is used to acquire training data, which includes multiple data nodes and the relationships between the multiple data nodes; The training unit is used to train the initial model based on the first data node combination to obtain an intermediate model. The data nodes in the first data node combination belong to the plurality of data nodes. The first data node combination includes at least one data node. Furthermore, when the number of data nodes included in the first data node combination is greater than 1, any data node in the first data node combination has a related data node in the first data node combination. The training unit is also used to train the intermediate model based on the second data node combination to obtain the target model, wherein the data nodes in the second data node combination belong to the plurality of data nodes, at least one data node in the second data node combination has an association relationship with the data nodes in the first data node combination, and any data node in the second data node combination has an associated data node in the second data node combination. The number of data nodes in the second data node combination is greater than the number of data nodes in the first data node combination, and / or, The maximum distance between data nodes in the second data node combination is greater than the maximum distance between data nodes in the first data node combination.

11. The apparatus according to claim 10, characterized in that, The multiple data nodes in the training data belong to multiple levels, and the multiple data nodes include child nodes and parent nodes. The relationship includes parent-child relationship.

12. The apparatus according to claim 11, characterized in that, The association relationship also includes the similarity relationship, which refers to the similarity between data nodes at the same level being greater than a first threshold.

13. The apparatus according to claim 10, characterized in that, The multiple data nodes in the training data belong to the same level, and the association relationship includes a similarity relationship, which means that the similarity between the data nodes is greater than a second threshold.

14. The apparatus according to any one of claims 10 to 13, characterized in that, The training data includes a first question and a first preset answer corresponding to the first question. The first question is related to the data nodes in the first data node combination. The training unit is also used to input the first question into the initial model to obtain a first answer; The training unit is also used to adjust the parameters of the initial model based on the matching degree between the first answer and the first preset answer to obtain the intermediate model.

15. The apparatus according to any one of claims 10 to 14, characterized in that, The training unit is also used to generate a second question based on the data nodes in the first data node combination; The training unit is also used to input the second question into the initial model to obtain a second answer; The training unit is also used to adjust the parameters of the initial model based on the matching degree between the second answer and the data nodes in the first data node combination, so as to obtain the intermediate model.

16. The apparatus according to any one of claims 10 to 15, characterized in that, The training data includes a third question and a second preset answer corresponding to the third question. The training unit is also used to input the third question into the intermediate model to obtain a third answer; The training unit is also used to adjust the model parameters of the intermediate model based on the matching degree between the third answer and the second preset answer, so as to obtain the target model.

17. The apparatus according to any one of claims 10 to 16, characterized in that, The training unit is also used to generate a fourth question based on the data nodes in the second data node combination; The training unit is also used to input the fourth question into the intermediate model to obtain the fourth answer; The training unit is also used to adjust the parameters of the intermediate model based on the matching degree between the fourth answer and the data nodes in the second data node combination, so as to obtain the target model.

18. The apparatus according to any one of claims 10 to 17, characterized in that, The multiple data nodes in the training data are obtained based on data files, which include one or more of the following: text data, image data, audio data, and video data.

19. An electronic device, characterized in that, It includes a processor and a memory, the memory being used to store instructions, the processor being used to execute the instructions, and when the processor executes the instructions, it performs the method as described in any one of claims 1 to 9.

20. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 9.

21. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by an electronic device, enable the electronic device to perform the method as described in any one of claims 1 to 9.