A task information acquisition method and related device
Patent Information
- Application Number
- CN202311604028.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-27
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-11-27
AI Technical Summary
[0004]上述过程中,由于该任务的描述信息通常由人工编写,需要耗费大量的人力资源,导致模型训练的成本过高
[0033] A seventh aspect of this application provides a computer program product storing instructions that, when executed by a computer, cause the computer to perform the method as described in the first aspect or any possible implementation thereof.
Smart Images

Figure CN117852603B_ABST
Abstract
Description
Technical Field
[0001] This application relates to artificial intelligence (AI) technology, and more particularly to a method for acquiring task information and related equipment. Background Technology
[0002] Instruction tuning refers to constructing instructions in natural language form as training data to train a neural network model, thereby obtaining a trained neural network model. Instruction tuning helps the model better understand the content of the instructions and respond appropriately to them.
[0003] In related technologies, to obtain instructions for training data, it is often necessary to prepare task templates. A task template can be understood as a description of a task, typically presented as text describing the task and containing placeholders. After obtaining the task description, the corresponding data can be filled into the placeholders in the task description to form instructions. These instructions can then be used to complete model training.
[0004] In the above process, since the description information of the task is usually written manually, it requires a lot of human resources, resulting in excessively high model training costs. Summary of the Invention
[0005] This application provides a method and related equipment for acquiring task information, which can automatically acquire task description information and use it as training data for model training, thereby saving human resources and reducing the cost of model training.
[0006] A first aspect of this application provides a method for obtaining task information, the method comprising:
[0007] When training a model capable of performing a target task, one can first acquire the data associated with the target task, as well as the processing results obtained after processing the data based on the target task. It should be noted that the processing results obtained after processing the data based on the target task can also be understood as the processing results of the data associated with the target task.
[0008] After obtaining the data associated with the target task and the processing results of that data, further processing can be performed on the data associated with the target task and the processing results to obtain the first descriptive information of the target task. It should be noted that the first descriptive information of the target task typically does not include placeholders.
[0009] After obtaining the first description information of the target task, the data associated with the target task and the first description information of the target task can be processed to obtain multiple second description information of the target task. It should be noted that any one of the multiple second texts of the target task may contain placeholders to carry data associated with the target task.
[0010] After obtaining multiple second descriptive pieces of information about the target task, one or more of these second descriptive pieces can be selected as the third descriptive pieces of information for the target task. Then, data associated with the target task can be inserted into the selected third descriptive pieces of information, resulting in third descriptive information that carries data associated with the target task. In this way, model training can be performed using the third descriptive information carrying data associated with the target task, thereby obtaining a model capable of performing the target task.
[0011] As can be seen from the above method, this approach provides an automatic framework for generating task description information. This framework can automatically generate multiple descriptions of the task (i.e., multiple second descriptions of the target task) based on data associated with a specific task (i.e., the aforementioned target task) and the processing results of that data. It then selects the optimal description (i.e., the aforementioned third description) from these multiple descriptions and uses it as training data to complete model training. Since this framework does not involve excessive human intervention, it saves human resources and reduces the cost of model training.
[0012] In one possible implementation, the data includes at least one sub-data and at least one data category corresponding to the at least one sub-data. Each second descriptive information includes at least one placeholder corresponding to the at least one data category, and the at least one placeholder is used to carry at least one sub-data. In the aforementioned implementation, the data associated with the target task may include at least one sub-data and at least one data category corresponding to the at least one sub-data. Since the multiple second descriptive information of the target task is obtained based on the data associated with the target task and the first descriptive information of the target task, each second descriptive information may include at least one placeholder corresponding to at least one data category. This at least one placeholder can be used to carry at least one sub-data included in the data associated with the target task. Therefore, the multiple second descriptive information of the target task generated in this way can be directly used as candidate templates for the target task, and these candidate templates all include placeholders. Thus, the optimal template selected from these candidate templates (i.e., the third descriptive information) can be inserted into the data associated with the target task as training data for model training.
[0013] In one possible implementation, generating the first descriptive information of the target task based on data and processing results includes: processing the data and processing results using a first neural network model to obtain the first descriptive information of the target task. In the aforementioned implementation, after obtaining the data associated with the target task and the processing results of the data associated with the target task, the data associated with the target task can be used as the input of the target task, and the processing results of the data associated with the target task can be used as the output of the target task. Next, a first instruction can be constructed based on the input and output of the target task. Then, the first instruction can be processed using the first neural network model to obtain the first descriptive information of the target task. Therefore, the automatic generation framework for task descriptive information provided in this application embodiment can use a neural network model to complete the initial template of the target task (i.e., the aforementioned first descriptive information), which can comprehensively consider various factors, ensuring that the optimal template of the final selected target task has a certain quality. Therefore, the training data constructed based on the optimal template is beneficial to improving the model training effect.
[0014] In one possible implementation, generating multiple second descriptions of the target task based on data and the first description information of the target task includes: processing the data and the first description information of the target task using a second neural network model to obtain multiple second descriptions of the target task. In the aforementioned implementation, after obtaining the first description information of the target task, at least one data category contained in the data associated with the target task can be considered as a keyword of the target task. Next, a second instruction can be constructed based on the first description information and the keywords of the target task. Then, the second instruction can be input into the second neural network model to process the second instruction, thereby obtaining multiple second descriptions of the target task. Therefore, the automatic generation framework for task description information provided in this application embodiment can use a neural network model to complete the candidate templates (i.e., the aforementioned second description information) of the target task, comprehensively considering various factors, so that the optimal template of the target task selected ultimately has a certain quality. Therefore, the training data constructed based on the optimal template is beneficial to improving the model training effect.
[0015] In one possible implementation, there are multiple third descriptive information pieces. Selecting third descriptive information from multiple second descriptive information pieces includes: clustering the multiple second descriptive information pieces to obtain multiple information categories, where one of the information categories contains at least one second descriptive information piece; and selecting multiple third descriptive information pieces from the multiple information categories. In the aforementioned implementation, after obtaining multiple second descriptive information pieces for the target task, a certain clustering algorithm can be used to cluster the multiple second descriptive information pieces for the target task, thereby obtaining multiple information categories. It is understood that in the multiple information categories, any one information category can contain at least one second descriptive information piece for the target task. After obtaining multiple information categories, the optimal second descriptive information in each information category can be determined as the third descriptive information for the target task, thus ultimately obtaining multiple third descriptive information pieces for the target task. Therefore, the automatic generation framework for task description information provided in this application embodiment can select the optimal template for the target task through clustering, which can make the selected optimal templates diverse. Therefore, the training data constructed based on the optimal templates is beneficial to further improve the model training effect.
[0016] In one possible implementation, multiple second descriptive information pieces are presented in text form. Clustering these pieces of information to obtain multiple information categories includes: converting the text-based second descriptive information into vector-based second descriptive information; and clustering the vector-based second descriptive information to obtain multiple information categories. In the aforementioned implementation, the multiple second descriptive information pieces of the target task output by the second neural network model are usually presented in text form. Therefore, before clustering, the text-based second descriptive information can be calculated to obtain vector-based second descriptive information. Then, the vector-based second descriptive information can be clustered to obtain multiple information categories. Thus, by converting candidate templates from text to vector, the clustering efficiency for candidate templates can be improved.
[0017] In one possible implementation, the method further includes: processing multiple second descriptive information carrying data using a third neural network model to obtain multiple probabilities of the processing results; using the multiple probabilities as evaluation values of the multiple second descriptive information; and selecting multiple third descriptive information from multiple categories, including: selecting the second descriptive information with the highest evaluation value from any one of the multiple information categories as the third descriptive information. In the aforementioned implementation, after obtaining multiple second descriptive information of the target task, data associated with the target task can be inserted into the multiple second descriptive information to obtain multiple second descriptive information carrying data associated with the target task. For the multiple second descriptive information carrying data associated with the target task, they can be input into the third neural network model to predict multiple probabilities of the processing results of the data associated with the target task. Since these multiple probabilities correspond one-to-one with the multiple second descriptive information carrying data associated with the target task, these multiple probabilities can be used as evaluation values of the multiple second descriptive information of the target task. Therefore, after obtaining multiple information categories, the second descriptive information with the highest evaluation value from each information category can be used as the third descriptive information of the target task, thus ultimately obtaining multiple third descriptive information of the target task. Therefore, the automatic generation framework for task description information provided in this application embodiment can select the optimal template for the target task through clustering and evaluation. This allows the selected optimal template to have diversity and accuracy. Thus, the training data constructed based on the optimal template is beneficial to further improve the model training effect.
[0018] In one possible implementation, the model is trained on a fourth neural network model, while the model capable of completing the target task is a fifth neural network model.
[0019] A second aspect of this application provides a task information acquisition device, comprising: an acquisition module for acquiring data associated with a target task and processing results obtained after processing the data based on the target task; a first generation module for generating first description information of the target task based on the data and the processing results; a second generation module for generating multiple second description information of the target task based on the data and the first description information of the target task, wherein any one of the second description information contains a placeholder for carrying data; and a selection module for selecting a third description information from the multiple second description information, wherein the third description information carrying data is used for model training to obtain a model capable of completing the target task.
[0020] In one possible implementation, the data includes at least one sub-data and at least one data category corresponding to the at least one sub-data, and any second description information includes at least one placeholder corresponding to the at least one data category, the at least one placeholder being used to carry at least one sub-data.
[0021] In one possible implementation, a first generation module is used to process the data and processing results through a first neural network model to obtain first descriptive information of the target task.
[0022] In one possible implementation, the second generation module is used to process the data and the first description information of the target task through a second neural network model to obtain multiple second description information of the target task.
[0023] In one possible implementation, the selection module is used to: cluster multiple second descriptive information to obtain multiple information categories, one of the multiple information categories containing at least one second descriptive information; and select multiple third descriptive information from the multiple information categories.
[0024] In one possible implementation, multiple second descriptive information pieces are presented in text form, and a selection module is used to: convert the multiple second descriptive information pieces presented in text form into multiple second descriptive information pieces presented in vector form; and cluster the multiple second descriptive information pieces presented in vector form to obtain multiple information categories.
[0025] In one possible implementation, the device further includes: a processing module for processing multiple second descriptive information carrying data respectively through a third neural network model to obtain multiple probabilities of the processing results; an evaluation module for using the multiple probabilities as evaluation values of the multiple second descriptive information; and a selection module for selecting the second descriptive information with the highest evaluation value as the third descriptive information in any one of the multiple information categories.
[0026] In one possible implementation, the model is trained on a fourth neural network model, while the model capable of completing the target task is a fifth neural network model.
[0027] A third aspect of this application provides a task information acquisition device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the task information acquisition device performs the method described in the first aspect or any possible implementation thereof.
[0028] A fourth aspect of this application provides a circuit system including a processing circuit configured to perform the method as described in the first aspect or any possible implementation thereof.
[0029] A fifth aspect of this application provides a chip system including a processor for calling a computer program or computer instructions stored in a memory to cause the processor to perform the method as described in the first aspect or any possible implementation thereof.
[0030] In one possible implementation, the processor is coupled to the memory via an interface.
[0031] In one possible implementation, the chip system also includes a memory that stores computer programs or computer instructions.
[0032] A sixth aspect of this application provides a computer storage medium storing a computer program that, when executed by a computer, causes the computer to perform the method as described in the first aspect or any possible implementation thereof.
[0033] A seventh aspect of this application provides a computer program product storing instructions that, when executed by a computer, cause the computer to perform the method as described in the first aspect or any possible implementation thereof.
[0034] In this embodiment, when it is necessary to train a model capable of completing a target task, data associated with the target task and the processing results obtained after processing the data based on the target task can be acquired first. Next, the data associated with the target task and the processing results of this data can be used to generate first descriptive information of the target task. Then, multiple second descriptive information of the target task can be generated using the data associated with the target task and the first descriptive information of the target task, each of which contains a placeholder for carrying data associated with the target task. Finally, a third descriptive information of the target task can be selected from the multiple second descriptive information of the target task. Therefore, the third descriptive information carrying data associated with the target task can be used as training data to complete model training, thereby obtaining a model capable of completing the target task. Based on the foregoing process, this embodiment provides an automatic generation framework for task description information. This framework can automatically generate multiple descriptive information of a task (i.e., the aforementioned multiple second descriptive information of the target task) based on data associated with a task and the processing results of this data, and select the optimal descriptive information of the task (i.e., the aforementioned third descriptive information of the target task) from the multiple descriptive information of the task, using it as training data to complete model training. Since the framework does not involve much human intervention, it can save human resources and thus reduce the cost of model training. Attached Figure Description
[0035] Figure 1A structural diagram illustrating the main framework of artificial intelligence;
[0036] Figure 2a A schematic diagram of the structure of the task information acquisition system provided in the embodiments of this application;
[0037] Figure 2b Another schematic diagram of the task information acquisition system provided in the embodiments of this application;
[0038] Figure 2c A schematic diagram of the relevant device for acquiring task information provided in the embodiments of this application;
[0039] Figure 3 A schematic diagram of the system architecture provided in the embodiments of this application;
[0040] Figure 4 A flowchart illustrating the task information acquisition method provided in this application embodiment;
[0041] Figure 5 A schematic diagram illustrating the acquisition of task description information provided in an embodiment of this application;
[0042] Figure 6 This is another schematic diagram illustrating the acquisition of task description information provided in an embodiment of this application;
[0043] Figure 7 A schematic diagram illustrating the selection of task description information provided in an embodiment of this application;
[0044] Figure 8 A schematic diagram of the structure of the task information acquisition device provided in the embodiments of this application;
[0045] Figure 9 A schematic diagram of the structure of the execution device provided in the embodiments of this application;
[0046] Figure 10 A schematic diagram of the structure of the training device provided in the embodiments of this application;
[0047] Figure 11 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation
[0048] This application provides a method and related equipment for acquiring task information, which can automatically acquire task description information and use it as training data for model training, thereby saving human resources and reducing the cost of model training.
[0049] The terms "first," "second," etc., used 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 terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0050] Instruction fine-tuning refers to constructing instructions in natural language form as training data to train a neural network model, thereby obtaining a trained neural network model. Instruction fine-tuning helps the model better understand the content of the instructions and respond appropriately.
[0051] In related technologies, to obtain instructions for training data, task templates are often prepared. A task template can be understood as a description of a task, typically presented as text describing the task and containing placeholders. After obtaining the task description, corresponding data can be filled into the placeholders to form instructions. These instructions can then be used to train the model. For example, the description of a question-and-answer task is "Please answer the question based on the [article]". Since some data includes the article "[The Development History of XX Company]" and the question "[In what year was XX Company founded]", this data can be inserted into the question-and-answer task description to form the instruction "Please answer 'In what year was XX Company founded' based on the [The Development History of XX Company]". This instruction can then be used to train a neural network model capable of completing the question-and-answer task.
[0052] In the above process, since the description information of the task is usually written manually, the construction of training data requires a lot of human resources (for example, the description information of the task requires a lot of writing time and a certain number of staff to participate in the writing, etc.), resulting in excessively high model training costs.
[0053] Furthermore, since the task description information is usually written manually, the thinking of the writers is often limited, resulting in a lack of diversity in the task description information (for example, the staff cannot write a sufficient number of description information about a certain task, that is, a sufficient number of templates for the task, etc.), which in turn leads to poor model training results.
[0054] To address the aforementioned problems, this application provides a task information acquisition method that can be implemented in conjunction with artificial intelligence (AI) technology. AI technology is a discipline that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence. AI technology achieves optimal results by perceiving the environment, acquiring knowledge, and using that knowledge. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. Using artificial intelligence for data processing is a common application of AI.
[0055] First, the overall workflow of the artificial intelligence system is described; please refer to [link / reference]. Figure 1 , Figure 1 This is a structural diagram illustrating the main framework of artificial intelligence. The following explanation of the AI framework is based on two dimensions: the "Intelligent Information Chain" (horizontal axis) and the "IT Value Chain" (vertical axis). The "Intelligent Information Chain" reflects a series of processes from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. In this process, data undergoes a condensation process of "data—information—knowledge—wisdom." The "IT Value Chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence and information (provided and processed by technology) to the industrial ecosystem of the system.
[0056] (1) Infrastructure
[0057] Infrastructure provides computing power to support artificial intelligence systems, enabling communication with the external world and providing support through a basic platform. This communication occurs through sensors; computing power is provided by intelligent chips (hardware acceleration chips such as CPUs, NPUs, GPUs, ASICs, and FPGAs); and the basic platform includes distributed computing frameworks and related platform guarantees and support, which may include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to acquire data, and this data is provided to intelligent chips in the distributed computing system provided by the basic platform for computation.
[0058] (2) Data
[0059] The data at the next layer of infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data from traditional devices, including business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0060] (3) Data processing
[0061] Data processing typically includes methods such as data training, machine learning, deep learning, search, reasoning, and decision-making.
[0062] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training on data, including symbolization and formalization.
[0063] Reasoning refers to the process in which, in a computer or intelligent system, the machine thinks and solves problems by simulating human intelligent reasoning, based on reasoning control strategies and using formalized information. Typical functions include search and matching.
[0064] Decision-making refers to the process of making decisions based on intelligent information after reasoning, and it typically provides functions such as classification, sorting, and prediction.
[0065] (4) General ability
[0066] After the data processing mentioned above, the results of the data processing can be used to form some general capabilities, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0067] (5) Smart Products and Industry Applications
[0068] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Their application areas mainly include: intelligent terminals, intelligent transportation, intelligent healthcare, autonomous driving, smart cities, etc.
[0069] The hardware devices used to implement the methods provided in the embodiments of this application will be described below.
[0070] Figure 2a This is a schematic diagram of a task information acquisition system provided in an embodiment of this application. The task information acquisition system includes a user device and a data processing device. The user device includes smart terminals such as mobile phones, personal computers, or information processing centers. The user device is the initiator of the task information acquisition request; typically, the request is initiated by the user through the user device.
[0071] The aforementioned data processing equipment can be cloud servers, network servers, application servers, management servers, or other devices or servers with data processing capabilities. The data processing equipment receives task information retrieval requests from smart terminals through an interactive interface, and then processes the task information through a storage device and a processor. The storage device in the data processing equipment can be a general term, including local storage and a database storing historical data. The database can be located on the data processing equipment or on other network servers.
[0072] exist Figure 2a In the task information acquisition system shown, the user device can receive user instructions. For example, the user device can acquire a task input / selected by the user and then send a request to the data processing device. This causes the data processing device to execute a task information acquisition application based on the task received by the user device, thereby obtaining the task's description information. For instance, the user device can acquire the target task input by the user and then send a request to the data processing device (this request typically includes data associated with the target task, as well as the processing results obtained after processing the data based on the target task, etc.). Subsequently, the data processing device can perform a series of processes on the target task based on the request (e.g., information generation and information selection, etc.) to obtain the target task's description information.
[0073] exist Figure 2a In this context, the data processing device can execute the task information acquisition method of the embodiments of this application.
[0074] Figure 2b This is another structural diagram of the task information acquisition system provided in the embodiments of this application. Figure 2b In this context, the user equipment (UE) directly functions as a data processing device. This UE can directly acquire input from the user and process it directly through its own hardware. The specific process is similar to... Figure 2a Similar to the description above, it will not be repeated here.
[0075] exist Figure 2b In the task information acquisition system shown, the user equipment can receive user instructions. For example, the user equipment can acquire the target task input by the user. Then, based on the data associated with the target task and the processing results obtained after processing the data based on the target task, the user equipment can perform a series of processing on the target task (e.g., information generation and information selection) to obtain the description information of the target task.
[0076] exist Figure 2b In this context, the user equipment itself can execute the task information acquisition method of the embodiments of this application.
[0077] Figure 2c A schematic diagram of a device for acquiring task information provided in an embodiment of this application.
[0078] The above Figure 2a and Figure 2b The user equipment in the context can specifically be Figure 2c Local device 301 or local device 302 in the system. Figure 2a The data processing equipment in the middle can specifically be Figure 2c The execution device 210 in the process includes a data storage system 250 that can store the data to be processed by the execution device 210. The data storage system 250 can be integrated into the execution device 210 or set up in the cloud or on other network servers.
[0079] Figure 2a and Figure 2b The processor in the system can perform data training / machine learning / deep learning through neural network models or other models (e.g., support vector machine-based models), and use the data to finally train or learn the model to perform task information acquisition and application, thereby obtaining the corresponding processing results.
[0080] Figure 3 A schematic diagram of the system 100 architecture provided in this application embodiment, in Figure 3 In the process, the execution device 110 is configured with an input / output (I / O) interface 112 for data interaction with external devices. Users can input data to the I / O interface 112 through the client device 140. The input data in this embodiment may include various scheduled tasks, callable resources, and other parameters.
[0081] During the preprocessing of input data by the execution device 110, or during the calculation module 111 of the execution device 110 performing calculations and other related processes (e.g., using symbolic expressions to solve mixed integer programming equations), the execution device 110 can call data, code, etc. in the data storage system 150 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 150.
[0082] Finally, I / O interface 112 returns the processing result to client device 140, thereby providing it to the user.
[0083] It is worth noting that, for a specific target (e.g., the description information of the target task in the task information acquisition method provided in this application embodiment), the training device 120 generates corresponding target models (e.g., the first neural network model, the second neural network model, and the third neural network model in the task information acquisition method provided in this application embodiment) / rules based on different training data. These corresponding target models / rules can then be used to achieve the aforementioned target. The training data can be stored in the database 130 and originates from training samples collected by the data acquisition device 160.
[0084] exist Figure 3 In the scenario shown, the user can manually provide input data, which can be done through the interface provided by I / O interface 112. Alternatively, the client device 140 can automatically send input data to I / O interface 112. If user authorization is required for the client device 140 to automatically send input data, the user can set the corresponding permissions in the client device 140. The user can view the output results of the execution device 110 on the client device 140, which can be presented in various forms such as display, sound, or animation. The client device 140 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 112 as new sample data and storing them in the database 130. Alternatively, data can be collected directly from the I / O interface 112 without going through the client device 140, using the input data and output results of the input I / O interface 112 as new sample data and storing them in the database 130.
[0085] It is worth noting that, Figure 3 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 3 In this context, the data storage system 150 is an external memory relative to the execution device 110. However, in other cases, the data storage system 150 can also be placed within the execution device 110. For example... Figure 3 As shown, the target model can be obtained by training using training device 120.
[0086] This application also provides a chip including a neural network processor (NPU). This chip can be configured as follows: Figure 3 The execution device 110 shown is used to perform the calculations of the calculation module 111. This chip can also be located in, for example... Figure 3 The training device 120 shown is used to complete the training work of the training device 120 and output the target model / rules.
[0087] The Neural Processing Unit (NPU) is a coprocessor mounted on the main central processing unit (CPU) (host CPU), where tasks are assigned by the CPU. The core of the NPU is the computation circuitry, which is controlled by a controller to retrieve data from memory (weight memory or input memory) and perform calculations.
[0088] In some implementations, the arithmetic circuitry includes multiple process engines (PEs). In some implementations, the arithmetic circuitry is a two-dimensional pulsating array. The arithmetic circuitry can also be a one-dimensional pulsating array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuitry is a general-purpose matrix processor.
[0089] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory and caches it in each PE (Process Equipment) of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory and performs matrix operations with matrix B. The partial or final result of the obtained matrix is stored in the accumulator.
[0090] Vector computation units can further process the output of computational circuits, such as vector multiplication, vector addition, exponentiation, logarithmic operations, size comparisons, etc. For example, vector computation units can be used for computation in non-convolutional / non-FC layers of neural networks, such as pooling, batch normalization, and local response normalization.
[0091] In some implementations, the vector computation unit can store the processed output vector into a unified buffer. For example, the vector computation unit can apply a nonlinear function to the output of the arithmetic circuit, such as a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit generates normalized values, merged values, or both. In some implementations, the processed output vector can be used as activation input to the arithmetic circuit, for example, for use in subsequent layers of a neural network.
[0092] The unified memory is used to store input data and output data.
[0093] The weight data is directly transferred from the external memory to the input memory and / or unified memory, stored in the weight memory, and stored in the unified memory to the external memory through the direct memory access controller (DMAC).
[0094] The bus interface unit (BIU) is used to enable interaction between the main CPU, DMAC, and instruction fetch memory via a bus.
[0095] The instruction fetch buffer, connected to the controller, is used to store the instructions used by the controller.
[0096] The controller is used to invoke instructions cached in the memory to control the operation of the computing accelerator.
[0097] Generally, the unified memory, input memory, weight memory, and instruction fetch memory are all on-chip memories, while external memory is memory outside the NPU. This external memory can be double data rate synchronous dynamic random access memory (DDRSDRAM), high bandwidth memory (HBM), or other readable and writable memory.
[0098] Since the embodiments of this application involve a large number of neural network applications, for ease of understanding, the relevant terms and concepts such as neural networks involved in the embodiments of this application will be introduced below.
[0099] (1) Neural Network
[0100] A neural network can be composed of neural units, which can be operational units that take xs and an intercept of 1 as inputs, and whose output can be:
[0101]
[0102] Where s = 1, 2, ..., n, where n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of this activation function can be used as the input of the next convolutional layer. The activation function can be the sigmoid function. A neural network is a network formed by connecting many of the above-mentioned individual neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, which can be a region composed of several neural units.
[0103] The work of each layer in a neural network can be described by the mathematical expression y = a(Wx + b). From a physical perspective, the work of each layer in a neural network can be understood as transforming the input space (the set of input vectors) to the output space (i.e., from the row space to the column space of a matrix) through five operations on the input space. These five operations include: 1. Dimensionality increase / decrease; 2. Magnification / scaling; 3. Rotation; 4. Translation; 5. "Bending". Operations 1, 2, and 3 are performed by Wx, operation 4 by +b, and operation 5 by a(). The term "space" is used here because the objects being classified are not individual things, but a class of things, and space refers to the set of all individuals of this class of things. Here, W is the weight vector, and each value in this vector represents the weight value of a neuron in that layer of the neural network. This vector W determines the spatial transformation from the input space to the output space mentioned above; that is, the weights W of each layer control how the space is transformed. The purpose of training a neural network is to ultimately obtain the weight matrix of all layers of the trained neural network (a weight matrix formed by the vectors W of many layers). Therefore, the training process of a neural network is essentially about learning how to control the transformation space, and more specifically, learning the weight matrix.
[0104] Because we want the output of the neural network to be as close as possible to the actual predicted value, we can compare the current network's prediction with the desired target value, and then update the weight vector of each layer of the neural network based on the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring the parameters of each layer in the neural network). For example, if the network's prediction is too high, the weight vector is adjusted to make it predict lower, and this adjustment is continued until the neural network can predict the actual target value. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value," which is the loss function or objective function. These are important equations used to measure the difference between the predicted value and the target value. Taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so training the neural network becomes the process of minimizing this loss as much as possible.
[0105] (2) Backpropagation algorithm
[0106] Neural networks can employ backpropagation (BP) to correct the parameters of the initial neural network model during training, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates error loss; this error loss information is then propagated back to update the parameters of the initial neural network model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the neural network model, such as the weight matrix.
[0107] It is worth noting that the task information acquisition method provided in this application is mainly used to acquire task description information. The acquisition of task description information may involve the application of neural network models (e.g., using one or more trained neural network models to acquire task description information). After obtaining the task description information, it can be used in the subsequent training of neural network models (e.g., the task description information can be used as training data for a neural network model to be trained). To further understand this process, the following describes... Figure 4 To further explain this process, Figure 4 A flowchart illustrating the task information acquisition method provided in this application embodiment is shown below. Figure 4 As shown, the method includes:
[0108] 401. Obtain data associated with the target task, and the processing results obtained after processing the data based on the target task.
[0109] In this embodiment, when it is necessary to train a model that can complete the target task, data associated with the target task and the processing results obtained after processing the data based on the target task (hereinafter referred to as the processing results of the data associated with the target task) can be obtained from the data warehouse. It should be noted that the target task, the data associated with the target task, and the processing structure of the data associated with the target task are all stored in the data warehouse.
[0110] Specifically, a data warehouse can be built in the following ways:
[0111] (1) Suppose there are multiple tasks. For any one of the multiple tasks, the data associated with that task and the processing results of the data associated with that task can be collected in advance. Furthermore, the data associated with that task may include at least one sub-data and at least one data category corresponding to at least one sub-data.
[0112] It should be noted that the same operations performed on the other tasks in the multiple tasks can be performed on the task itself. Therefore, the data associated with multiple tasks and the processing results of the data associated with multiple tasks can be collected in the end.
[0113] For example, suppose there are N tasks T1, T2, ..., T N (N is an integer greater than or equal to 2), for task T t For (t = 1, ..., N), data can be collected with respect to T. t M related data (M is an integer greater than or equal to 1), and the processing results of these M data. Regarding T t The i-th data associated For (i = 1, ..., M), It can contain C sub-data points and the categories of these C sub-data points, i.e. (C is an integer greater than or equal to 1), It contains the j-th sub-data and the category of the j-th sub-data.
[0114] T t It can be used for a wide variety of tasks, and correspondingly, with T t The associated data will also be different. For example, when T t When performing a classification task, a specific piece of data associated with the text classification task. The content could be: "XXX's donut selfie, the angle is surprisingly good, beauty attracts everything." Processing results It can be categorized as "Entertainment News". Among them, It contains a subdata item titled "XXX's donut selfie, the angle is so beautiful, beauty attracts everything", and the category of this subdata item is "content".
[0115] For example, when T t When performing a question-answering task, a specific piece of data associated with the question-answering task. The article could be titled "Article: Development History of XX Enterprise: XX Enterprise is a technology company, founded in...; Question: In what year was XX Enterprise founded?" Processing results One possible answer is: "Company XX was founded in 1987." It contains two sub-data items: "XX Company Development History: XX Company is a technology company, founded in..." and "In which year was XX Company founded?". The categories of these two sub-data items are "Articles" and "Questions", etc.
[0116] (2) After collecting data associated with multiple tasks and the processing results of the data associated with multiple tasks, for any task, a dedicated storage area can be set up in the data warehouse to store the data associated with the task and the processing results of the data associated with the task in the storage area, and the task can be used as the index of the storage area.
[0117] It should be noted that the other tasks within the multiple tasks can also perform the same operations as those performed on the current task. Therefore, the data associated with multiple tasks, as well as the processing results of that data, can be stored in multiple storage areas of the data warehouse accordingly. In this way, the data warehouse is successfully constructed.
[0118] More specifically, data associated with the target task and the processing results of that data can be obtained from the data warehouse in the following ways:
[0119] After building a data warehouse, since multiple tasks serve as indexes for multiple storage areas of the data warehouse, if it is necessary to obtain data associated with a target task (which can be understood as a task among multiple tasks) and the processing results of the data associated with the target task, the corresponding storage area can be found directly in the data warehouse based on the target task, and the data associated with the target task and the processing results of the data associated with the target task can be read from that storage area.
[0120] 402. Based on the data and processing results, generate the first description information of the target task.
[0121] After obtaining the data associated with the target task and the processing results of that data, further processing can be performed on the data associated with the target task and the processing results to obtain the first descriptive information of the target task. It should be noted that the first descriptive information of the target task can be understood as the first text used to describe the target task, and this first text does not contain any placeholders.
[0122] Specifically, the first description information of the target task can be obtained in the following ways:
[0123] After obtaining the data associated with the target task and the processing results of that data, the data associated with the target task can be used as the input to the target task, and the processing results of that data can be used as the output of the target task. Next, a first instruction can be constructed based on the input and output of the target task. This first instruction instructs the generation of an initial description of the target task, using the input and output as references. Then, the first instruction can be input into a first neural network model (which can also be understood as a trained neural network model) to process the first instruction, thereby obtaining the first descriptive information of the target task.
[0124] As in the example above, such as Figure 5 As shown ( Figure 5 (This is a schematic diagram illustrating the acquisition of task description information provided in an embodiment of this application.) Suppose that it is necessary to acquire T. t Template (let T) t (For classification tasks), read data from the data warehouse related to T. t A related piece of data as well as Processing results After that, you can "Content: XXX's donut selfie, the angle is so strangely beautiful, beauty attracts everything" is taken as the input for the classification task, and will be... "Category: Entertainment News" is considered the output of the classification task. Next, an instruction can be constructed based on the input and output of the classification task: "Generating a description of the classification task that is as rich and detailed as possible, fluent and natural, and conforming to human writing habits, based on the input and output of the classification task." This instruction can then be input into a trained large language model, causing the model to output an initial description d for the classification task. t "Based on the given content, select the answer from multiple available options to determine and identify which category of news the content belongs to."
[0125] 403. Based on the data and the first description information of the target task, generate multiple second description information of the target task, wherein any second description information contains a placeholder for carrying the data.
[0126] After obtaining the first description information of the target task, the data associated with the target task and the first description information of the target task can be processed to obtain multiple second description information of the target task (also known as multiple templates of the target task). It should be noted that the multiple second description information of the target task can be understood as multiple second texts used to describe the target task (the content expressed by the second text and the first text is usually similar, but the way they are expressed is different), and any one of the multiple second texts can contain placeholders to carry the data associated with the target task.
[0127] Specifically, the second descriptive information of the target task can be presented in the following ways:
[0128] Based on the foregoing, the data associated with the target task may contain at least one sub-data and at least one data category corresponding to each sub-data. Therefore, correspondingly, among the multiple second descriptions of the target task obtained based on the data associated with the target task and the first description information of the target task, any one of the second descriptions may contain at least one placeholder corresponding to at least one data category. It is understood that among the multiple second descriptions of the target task, at least one placeholder contained in any one of the second descriptions can be used to respectively carry at least one sub-data contained in the data associated with the target task.
[0129] As in the example above, due to The included sub-data is "XXX's donut selfie, the angle is surprisingly good, beauty attracts everything," the category of this sub-data is "content," and the initial description of the classification task is d. t The task is defined as "Based on the given content, select the answer from multiple options to determine and identify which category of news the content belongs to." Therefore, the final description of the classification task can be "Please determine the category to which the article belongs based on the given article [content] and alternative category options 1, 2, and 3." Here, [content] is the placeholder included in the final description of the classification task, which can be used to fill in the subdata "XXX's donut selfie, the angle is so beautiful, beauty attracts everything."
[0130] More specifically, the second description information of the target task can be obtained in the following ways:
[0131] After obtaining the initial descriptive information of the target task, at least one data category contained in the data associated with the target task can be considered as the keywords of the target task. Next, a second instruction can be constructed based on the initial descriptive information and the keywords of the target task. This second instruction instructs the insertion of the keywords of the target task into the initial description of the target task to generate a final description for the target task. Then, the second instruction can be input into a second neural network model (which can also be understood as a trained neural network model) to process the second instruction, thereby obtaining multiple second descriptive information pieces for the target task.
[0132] As in the example above, such as Figure 6 As shown ( Figure 6 (This is another schematic diagram illustrating the acquisition of task description information provided in an embodiment of this application), resulting in d t After that, you can The category "content" of the included sub-data is considered as keywords for the classification task. Then, based on d... t The instruction for constructing keywords for classification tasks is as follows: "Based on the keywords of the classification task, rewrite the initial description of the classification task to diversify it, conform to human speaking and writing styles, and retain the keywords of the classification task." This instruction can then be input into a trained large language model, causing the model to output multiple final descriptions of the classification task. (That is, multiple templates for classification tasks), among which, the final description The final description is: "Based on the article's content and the given options 1, 2, and 3, determine which one best represents the concept or event described in the article." The prompt is: "Given the article's content and the three alternative category options (Option 1, Option 2, and Option 3), determine the category to which the article belongs." The prompt is: "Based on the given article [content], correctly determine which category the article belongs to from the three answer choices (option 1, option 2, and option 3)." Examples include "Please select the topic most relevant to the article's content from options 1, 2, and 3."
[0133] 404. Select a third description from multiple second description information. The third description information carrying data is used for model training to obtain a model that can complete the target task.
[0134] After obtaining multiple second descriptive pieces of information about the target task, one or more of these can be selected as the third descriptive pieces of information. Then, data associated with the target task can be inserted into the selected third descriptive pieces of information, resulting in third descriptive information carrying data associated with the target task (which can also be understood as a third instruction, used to instruct on target task-based processing of the data associated with the target task). In this way, model training can be completed using the third descriptive information carrying data associated with the target task, thereby obtaining a model capable of performing the target task.
[0135] Specifically, the third description information of the target task can be obtained in the following ways:
[0136] (1) After obtaining multiple second descriptive information of the target task, a clustering algorithm (e.g., K-means algorithm, etc.) can be used to cluster the multiple second descriptive information of the target task, thereby obtaining multiple information categories. It can be understood that in the multiple information categories, any information category can contain at least one second descriptive information of the target task.
[0137] Generally, the secondary descriptive information of the target task output by the second neural network model is usually presented in text form. Therefore, in order to improve the efficiency of clustering, the secondary descriptive information presented in text form can be calculated before clustering to obtain secondary descriptive information presented in vector (embedding) form. Then, the secondary descriptive information presented in vector form can be clustered to obtain multiple information categories.
[0138] As in the example above, we obtain multiple final descriptions for the classification task. Later, due to These are multiple final descriptions in text form. These final descriptions can first be converted into vector form. And use the K-means algorithm to... Clustering is performed to obtain P categories (P is an integer greater than or equal to 2), each category containing at least one final description in vector form.
[0139] (2) After obtaining multiple information categories, for any one of the multiple information categories, the optimal second description information can be determined as the third description information of the target task from at least one second description information contained in that information category. For the remaining information categories, the same operation as that performed on that information category can be performed, so that multiple third description information of the target task can be obtained in the end.
[0140] More specifically, multiple third-party descriptive information about the target task can be obtained from multiple information categories in the following ways:
[0141] (1) After obtaining multiple second description information of the target task, data associated with the target task can be inserted into the multiple second description information to obtain multiple second description information carrying data associated with the target task (which can also be understood as multiple fourth instructions, all of which are used to instruct the processing of the data associated with the target task based on the target task). For any second description information carrying data associated with the target task, it can be input into the third neural network model (a trained neural network model) to process the second description information carrying data associated with the target task through the third neural network model, thereby predicting a probability of obtaining the processing result of the data associated with the target task.
[0142] It should be noted that a similar operation can be performed on the remaining second descriptive information that carries data associated with the target task. Therefore, multiple probabilities of the processing results of the data associated with the target task can be obtained. Since these multiple probabilities correspond one-to-one with the multiple second descriptive information that carries data associated with the target task, these multiple probabilities can be used as the evaluation values of the multiple second descriptive information of the target task.
[0143] As in the example above, such as Figure 7 As shown ( Figure 7 (A schematic diagram of selecting task description information provided in an embodiment of this application) is obtained. After that, you can Fill in In this way, the instruction set is obtained. Any instruction in the instruction set can be used. (u = 1, ..., K) are input into a large language model to predict... probability Can be used directly as the final description The evaluation value. In this way, the final result can be obtained. All evaluation values
[0144] (2) After obtaining multiple information categories, for any one of the multiple information categories, the second description information with the highest evaluation value can be selected from at least one second description information contained in that information category as the third description information of the target task. For the remaining information categories, the same operation as that performed on the information category can be performed, so that multiple third description information of the target task can be obtained in the end.
[0145] Continuing with the example above, after obtaining P categories, the final description with the highest evaluation value in any category can be determined as the usable final description. Therefore, the classification task T can be obtained. t P available final descriptions, that is, T t P available templates.
[0146] It should be understood that in this embodiment, Figures 5 to 7 In the example shown, only data is read from the data warehouse and related to T. t A related piece of data This is an illustrative example and does not limit the amount of data that can be read. In practical applications, data can also be read from a data warehouse that corresponds to T. t Several related data Wait, in the following sections, the process of processing multiple data points is similar to that of processing a single data point, so it will not be repeated here.
[0147] It should also be understood that in this embodiment, the first neural network model, the second neural network model, and the third neural network model can be the same model. Of course, the first neural network model, the second neural network model, and the third neural network model can also be different models, for example, Figures 5 to 7 In the example shown, all three belong to the same large language model.
[0148] It should also be understood that after selecting the third descriptive information of the target task, the third descriptive information of the target task can be used for model training. The object of model training is the fourth neural network model (the neural network model to be trained), and the result of model training is the fifth neural network model (the trained neural network model, which comes from the fourth neural network model, that is, the model that can complete the target task). The fifth neural network model is usually different from the first neural network model. Similarly, the fifth neural network model is usually different from the second neural network model, and the fifth neural network model is usually different from the third neural network model.
[0149] In this embodiment, when it is necessary to train a model capable of completing a target task, data associated with the target task and the processing results obtained after processing the data based on the target task can be acquired first. Next, the data associated with the target task and the processing results of this data can be used to generate first descriptive information of the target task. Then, multiple second descriptive information of the target task can be generated using the data associated with the target task and the first descriptive information of the target task, each of which contains a placeholder for carrying data associated with the target task. Finally, a third descriptive information of the target task can be selected from the multiple second descriptive information of the target task. Therefore, the third descriptive information carrying data associated with the target task can be used as training data to complete model training, thereby obtaining a model capable of completing the target task. Based on the foregoing process, this embodiment provides an automatic generation framework for task description information. This framework can automatically generate multiple descriptive information of a task (i.e., the aforementioned multiple second descriptive information of the target task) based on data associated with a task and the processing results of this data, and select the optimal descriptive information of the task (i.e., the aforementioned third descriptive information of the target task) from the multiple descriptive information of the task, using it as training data to complete model training. Since the framework does not involve much human intervention, it can save human resources and thus reduce the cost of model training.
[0150] Furthermore, the automatic generation framework for task description information provided in this application embodiment can use a neural network model to generate task description information during its operation. It can also use two-stage processing (clustering and evaluation) to select task description information, which can comprehensively consider various factors, so that the final selected description information has accuracy and diversity, which is conducive to improving the model training effect.
[0151] The above is a detailed description of the task information acquisition method provided in the embodiments of this application. The task information acquisition device provided in the embodiments of this application will be described below. Figure 8 A schematic diagram of the task information acquisition device provided in the embodiments of this application is shown below. Figure 8 As shown, the device includes:
[0152] The acquisition module 801 is used to acquire data associated with the target task, as well as the processing results obtained after processing the data based on the target task.
[0153] The first generation module 802 is used to generate first description information of the target task based on the data and processing results.
[0154] The second generation module 803 is used to generate multiple second description information of the target task based on the data and the first description information of the target task, wherein any second description information contains a placeholder for carrying the data.
[0155] The selection module 804 is used to select a third description from multiple second description information. The third description information carrying data is used for model training to obtain a model that can complete the target task.
[0156] In this embodiment, when it is necessary to train a model capable of completing a target task, data associated with the target task and the processing results obtained after processing the data based on the target task can be acquired first. Next, the data associated with the target task and the processing results of this data can be used to generate first descriptive information of the target task. Then, multiple second descriptive information of the target task can be generated using the data associated with the target task and the first descriptive information of the target task, each of which contains a placeholder for carrying data associated with the target task. Finally, a third descriptive information of the target task can be selected from the multiple second descriptive information of the target task. Therefore, the third descriptive information carrying data associated with the target task can be used as training data to complete model training, thereby obtaining a model capable of completing the target task. Based on the foregoing process, this embodiment provides an automatic generation framework for task description information. This framework can automatically generate multiple descriptive information of a task (i.e., the aforementioned multiple second descriptive information of the target task) based on data associated with a task and the processing results of this data, and select the optimal descriptive information of the task (i.e., the aforementioned third descriptive information of the target task) from the multiple descriptive information of the task, using it as training data to complete model training. Since the framework does not involve much human intervention, it can save human resources and thus reduce the cost of model training.
[0157] In one possible implementation, the data includes at least one sub-data and at least one data category corresponding to the at least one sub-data, and any second description information includes at least one placeholder corresponding to the at least one data category, the at least one placeholder being used to carry at least one sub-data.
[0158] In one possible implementation, the first generation module 802 is used to process the data and processing results through a first neural network model to obtain the first description information of the target task.
[0159] In one possible implementation, the second generation module 803 is used to process the data and the first description information of the target task through a second neural network model to obtain multiple second description information of the target task.
[0160] In one possible implementation, the selection module 804 is used to: cluster multiple second descriptive information to obtain multiple information categories, one of the multiple information categories containing at least one second descriptive information; and select multiple third descriptive information from the multiple information categories.
[0161] In one possible implementation, multiple second descriptive information pieces are presented in text form. The selection module 804 is used to: convert the multiple second descriptive information pieces presented in text form into multiple second descriptive information pieces presented in vector form; and cluster the multiple second descriptive information pieces presented in vector form to obtain multiple information categories.
[0162] In one possible implementation, the device further includes: a processing module for processing multiple second descriptive information carrying data respectively through a third neural network model to obtain multiple probabilities of the processing results; an evaluation module for using the multiple probabilities as evaluation values of the multiple second descriptive information; and a selection module 804 for selecting the second descriptive information with the highest evaluation value as the third descriptive information in any one of the multiple information categories.
[0163] In one possible implementation, the model is trained on a fourth neural network model, while the model capable of completing the target task is a fifth neural network model.
[0164] It should be noted that the information interaction and execution process between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of this application, and the resulting technical effects are the same as those of the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in the embodiment of this application, and it will not be repeated here.
[0165] This application also relates to an execution device. Figure 9 This is a schematic diagram of the execution device provided in an embodiment of this application. Figure 9 As shown, the execution device 900 can specifically manifest as a mobile phone, tablet, laptop, smart wearable device, server, etc., and is not limited here. Among them, the execution device 900 may deploy... Figure 8 The task information acquisition device described in the corresponding embodiment is used to implement Figure 4 This corresponds to the task information acquisition function in the embodiment. Specifically, the execution device 900 includes: a receiver 901, a transmitter 902, a processor 903, and a memory 904 (wherein the execution device 900 may have one or more processors 903). Figure 9 (Taking a processor as an example), processor 903 may include application processor 9031 and communication processor 9032. In some embodiments of this application, receiver 901, transmitter 902, processor 903 and memory 904 may be connected via a bus or other means.
[0166] Memory 904 may include read-only memory and random access memory, and provides instructions and data to processor 903. A portion of memory 904 may also include non-volatile random access memory (NVRAM). Memory 904 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0167] Processor 903 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus, but also power buses, control buses, and status signal buses. However, for clarity, all buses are referred to as the bus system in the diagram.
[0168] The methods disclosed in the embodiments of this application can be applied to or implemented by the processor 903. The processor 903 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 903 or by instructions in software form. The processor 903 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 903 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 904, and processor 903 reads the information from memory 904 and, in conjunction with its hardware, completes the steps of the above method.
[0169] Receiver 901 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 902 can be used to output digital or character information through the first interface; transmitter 902 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 902 may also include a display device such as a display screen.
[0170] In one embodiment of this application, the processor 903 is used to... Figure 4 The first neural network model, the second neural network model, and the third neural network model in the corresponding embodiments are used to obtain the optimal description information of the target task (i.e., the aforementioned third description information).
[0171] This application also relates to a training device. Figure 10 This is a schematic diagram of the structure of a training device provided in an embodiment of this application. Figure 10 As shown, the training device 1000 is implemented by one or more servers. The training device 1000 can vary significantly due to differences in configuration or performance, and may include one or more central processing units (CPUs) 1010 (e.g., one or more processors) and memory 1032, and one or more storage media 1030 (e.g., one or more mass storage devices) for storing application programs 1042 or data 1044. The memory 1032 and storage media 1030 can be temporary or persistent storage. The program stored in the storage media 1030 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the training device. Furthermore, the CPU 1010 may be configured to communicate with the storage media 1030 and execute the series of instruction operations in the storage media 1030 on the training device 1000.
[0172] The training device 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input / output interfaces 1058; or one or more operating systems 1041, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0173] Specifically, the training equipment can receive... Figure 9 The execution device shown sends the optimal description information of the target task, and uses the optimal description information of the target task as training data to train the fourth neural network model, thereby obtaining a fifth neural network model that can complete the target task.
[0174] This application also relates to a computer storage medium storing a program for signal processing, which, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.
[0175] This application also relates to a computer program product that stores instructions that, when executed by a computer, cause the computer to perform steps as performed by the aforementioned execution device, or to perform steps as performed by the aforementioned training device.
[0176] The execution device, training device, or terminal device provided in this application embodiment can specifically be a chip. The chip includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip within the execution device to execute the data processing method described in the above embodiments, or to cause the chip within the training device to execute the data processing method described in the above embodiments. Optionally, the storage unit can be a storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).
[0177] For details, please refer to Figure 11 , Figure 11 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. The chip can be represented as a neural network processor (NPU) 1100. The NPU 1100 is mounted as a coprocessor on the host CPU, and tasks are assigned by the host CPU. The core part of the NPU is the arithmetic circuit 1103, which is controlled by the controller 1104 to extract matrix data from the memory and perform multiplication operations.
[0178] In some implementations, the arithmetic circuit 1103 internally includes multiple processing engines (PEs). In some implementations, the arithmetic circuit 1103 is a two-dimensional pulsating array. The arithmetic circuit 1103 can also be a one-dimensional pulsating array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1103 is a general-purpose matrix processor.
[0179] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1102 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1101 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is stored in the accumulator 1108.
[0180] Unified memory 1106 is used to store input and output data. Weight data is directly transferred to weight memory 1102 via Direct Memory Access Controller (DMAC) 1105. Input data is also transferred to unified memory 1106 via DMAC.
[0181] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1109.
[0182] The Bus Interface Unit (BIU) 1111 is used by the instruction fetch memory 1109 to fetch instructions from external memory, and also by the memory access controller 1105 to fetch the original data of the input matrix A or the weight matrix B from external memory.
[0183] The DMAC is mainly used to move input data from external memory DDR to unified memory 1106, or to weight data to weight memory 1102, or to input data to input memory 1101.
[0184] The vector computation unit 1107 includes multiple processing units that, when needed, further process the output of the computation circuit 1103, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as Batch Normalization, pixel-level summation, and upsampling of the predicted label plane.
[0185] In some implementations, vector computation unit 1107 can store the processed output vector in unified memory 1106. For example, vector computation unit 1107 can apply a linear function, or a nonlinear function, to the output of computation circuit 1103, such as linear interpolating the predicted label plane extracted from a convolutional layer, or, for example, accumulating a vector of values to generate activation values. In some implementations, vector computation unit 1107 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as activation input to computation circuit 1103, for example, for use in subsequent layers of the neural network.
[0186] The instruction fetch buffer 1109 connected to the controller 1104 is used to store the instructions used by the controller 1104;
[0187] Unified memory 1106, input memory 1101, weight memory 1102, and instruction fetch memory 1109 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.
[0188] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.
[0189] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0190] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0191] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0192] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for acquiring task information, characterized in that, The method includes: Acquire data associated with a target task, and obtain the processing result after processing the data based on the target task; Based on the data and the processing results, a first description of the target task is generated; Based on the data and the first description information of the target task, a plurality of second description information of the target task is generated, and any second description information contains a placeholder for carrying the data; A third description is selected from the plurality of second description information, and the third description information carrying the data is used for model training to obtain a model that can complete the target task.
2. The method according to claim 1, characterized in that, The data includes at least one sub-data and at least one data category corresponding to the at least one sub-data. Each of the second description information includes at least one placeholder corresponding to the at least one data category. The at least one placeholder is used to carry the at least one sub-data.
3. The method according to claim 1 or 2, characterized in that, The generation of the first description information of the target task based on the data and the processing result includes: The data and the processing results are processed by a first neural network model to obtain the first descriptive information of the target task.
4. The method according to any one of claims 1 to 3, characterized in that, The step of generating multiple second descriptions of the target task based on the data and the first description information of the target task includes: The data and the first description information of the target task are processed by a second neural network model to obtain multiple second description information of the target task.
5. The method according to any one of claims 1 to 4, characterized in that, The number of third descriptive information is multiple, and selecting third descriptive information from the multiple second descriptive information includes: Clustering the plurality of second descriptive information to obtain a plurality of information categories, wherein one of the plurality of information categories contains at least one second descriptive information; Select multiple third-description information from the multiple information categories.
6. The method according to claim 5, characterized in that, The plurality of second descriptive information is presented in text form, and the clustering of the plurality of second descriptive information to obtain multiple information categories includes: The multiple second description information presented in text form is converted into multiple second description information presented in vector form; Clustering multiple second-description information presented in vector form yields multiple information categories.
7. The method according to claim 5 or 6, characterized in that, The method further includes: The third neural network model processes multiple second descriptive information items carrying the data to obtain multiple probabilities of the processing results. The plurality of probabilities are used as evaluation values for the plurality of second descriptive information; The selection of multiple third descriptive information from the multiple information categories includes: In any one of the multiple information categories, the second descriptive information with the highest evaluation value is selected as the third descriptive information.
8. The method according to any one of claims 1 to 7, characterized in that, The object of the model training is the fourth neural network model, and the model that can complete the target task is the fifth neural network model.
9. A task information acquisition device, characterized in that, The device includes: The acquisition module is used to acquire data associated with the target task, and the processing result obtained after processing the data based on the target task; The first generation module is used to generate first description information of the target task based on the data and the processing result; The second generation module is used to generate multiple second description information of the target task based on the data and the first description information of the target task, wherein any second description information contains a placeholder for carrying the data. The selection module is used to select a third description from the plurality of second description information. The third description information carrying the data is used for model training to obtain a model that can complete the target task.
10. The apparatus according to claim 9, characterized in that, The data includes at least one sub-data and at least one data category corresponding to the at least one sub-data. Each of the second description information includes at least one placeholder corresponding to the at least one data category. The at least one placeholder is used to carry the at least one sub-data.
11. The apparatus according to claim 9 or 10, characterized in that, The first generation module is used to process the data and the processing results through a first neural network model to obtain the first description information of the target task.
12. The apparatus according to any one of claims 9 to 11, characterized in that, The second generation module is used to process the data and the first description information of the target task through a second neural network model to obtain multiple second description information of the target task.
13. The apparatus according to any one of claims 9 to 12, characterized in that, The selection module is used for: Clustering the plurality of second descriptive information to obtain a plurality of information categories, wherein one of the plurality of information categories contains at least one second descriptive information; Select multiple third-description information from the multiple information categories.
14. The apparatus according to claim 13, characterized in that, The plurality of second descriptive information are presented in text form, and the selection module is used for: The multiple second description information presented in text form is converted into multiple second description information presented in vector form; Clustering multiple second-description information presented in vector form yields multiple information categories.
15. The apparatus according to claim 13 or 14, characterized in that, The device further includes: The processing module is used to process multiple second descriptive information carrying the data through a third neural network model to obtain multiple probabilities of the processing results. An evaluation module is used to use the plurality of probabilities as evaluation values for the plurality of second descriptive information; The selection module is used to select the second descriptive information with the highest evaluation value as the third descriptive information in any one of the multiple information categories.
16. The apparatus according to any one of claims 9 to 15, characterized in that, The object of the model training is the fourth neural network model, and the model that can complete the target task is the fifth neural network model.
17. A task information acquisition device, characterized in that, The device includes a memory and a processor; the memory stores code, and the processor is configured to execute the code, wherein when the code is executed, the task information acquisition device performs the method as described in any one of claims 1 to 8.
18. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions that, when executed by one or more computers, cause the one or more computers to perform the method of any one of claims 1 to 8.
19. A computer program product, characterized in that, The computer program product stores instructions that, when executed by a computer, cause the computer to perform the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Data processing method and system
CN113568735A
Model training method and related equipment thereof
CN116945201A