Model-tailored processing methods, devices, equipment and media for tasks
By decomposing tasks into subtasks and customizing processing, the problem of complex deep learning model parameters and memory usage caused by large tasks and high complexity is solved, and task processing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202310572668.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-05-19
AI Technical Summary
When the task volume is large and the task complexity is high, the neural network parameters of the deep learning model are complex, the training sample size is large, and it takes up a lot of memory, resulting in low task processing efficiency.
The task to be processed is decomposed into multiple subtasks through the pre-built intent understanding integrated model, and timing coding is performed based on the correlation between the subtasks to determine the execution order of the subtasks. For each subtask, the corresponding matching is searched in the model library. model, and customize the subtask model to form a customized model to handle the tasks to be processed.
It reduces task processing complexity, simplifies neural network parameters, reduces training sample requirements, improves task processing efficiency, reduces memory consumption during calculation, and improves task processing accuracy.
Smart Images

Figure CN116594748B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of task processing, and in particular to a method, device, equipment and medium for model customization processing of tasks. Background Art
[0002] With the development from informatization to intelligence, and the rapid advancement of information technologies such as cloud computing, big data, and artificial intelligence, different tasks require the use of multiple models and analysis and processing based on a variety of knowledge data. In related technologies, the orchestration method based on manual processes often requires the construction of corresponding models for specific tasks. When there are many tasks to be processed in the system and the task complexity is high, the neural network parameters are complex when processed through deep learning models, the training sample volume is large, a large amount of memory consumption is occupied, and the efficiency of task processing is low. Summary of the invention
[0003] The purpose of this application is to provide a model customization processing method, device, equipment and medium for tasks, so as to alleviate the technical problems in the prior art when the task volume is large and the task complexity is high, such as complex neural network parameters, large training sample volume requirements, large memory consumption, and low task processing efficiency.
[0004] In the first aspect, the present invention provides a model customization processing method for tasks, comprising: decomposing the task to be processed into multiple subtasks based on a pre-built intent understanding integrated model, and performing time encoding based on the correlation between different subtasks to determine the execution order of the subtasks; for each subtask, searching for a corresponding subtask model in the model library according to the model granularity; in response to a parameter adjustment request for the subtask model, customizing the subtask model to obtain a customized model for the task to be processed, so as to process the task to be processed according to the execution order of the subtasks through the customized model.
[0005] In an optional embodiment, the pre-built intent understanding integrated model includes: a model enhancement module built based on word vector features, a basic classifier built based on a deep bidirectional recurrent neural network of long short-term memory networks and gated recurrent units, and a combined output module built based on a multi-layer perceptron framework, which are connected in sequence.
[0006] In an optional implementation, the task to be processed is decomposed into multiple subtasks based on a pre-built intent understanding integration model, including: decomposing the task to be processed into multiple subtasks based on a pre-built intent understanding integration model, a target knowledge graph and preset hierarchical rules; wherein the target knowledge graph includes a knowledge graph of a field corresponding to the task to be processed and a knowledge graph of a field related to the task to be processed.
[0007] In an optional embodiment, when at least two subtasks among multiple subtasks include sub-requirements of the same type, the method further includes: performing fine-grained task extraction on the subtasks including sub-requirements of the same type based on the model granularity to obtain fine-grained tasks; and uniformly processing the fine-grained tasks corresponding to the subtasks including sub-requirements of the same type based on the fine-grained model corresponding to the sub-requirements.
[0008] In an optional embodiment, for each subtask, a corresponding subtask model is searched for and matched in the model library according to the model granularity, including: for each subtask, a corresponding subtask model is searched for and matched in the model library according to the model granularity through a network architecture search module; wherein the network architecture search module includes a first search unit and a second search unit, the first search unit being used to directly merge the input feature graphs through permutations and combinations and then search, and the second search unit being used to use a parameterized search method to determine the feature graphs as corresponding candidate operations to be automatically selected by the network; wherein the feature graphs are the feature graphs corresponding to the subtasks input into the network architecture search module.
[0009] In an optional embodiment, the method also includes: if no matching model is found in the model library, training a new algorithm model based on a cross-modal data sample library through knowledge matching sample selection, neural network structure search, and hyperparameter adjustment to achieve online updating of the model library; and searching and matching the model based on the updated model library.
[0010] In an optional implementation, the processing task is processed according to the execution order of the subtasks through the customized model, including: querying the target computing resources based on the permutation and combination results of the target parallel strategy; the target parallel strategy includes at least operator-level model parallelism, pipeline model parallelism, recalculation model parallelism or data parallelism; allocating different layers of the customized model to different target computing resources, and processing the processing task in the execution order of the subtasks, or allocating different parameters of the same customized layer to different target computing resources, and processing the processing task in the execution order of the subtasks.
[0011] In the second aspect, the present invention provides a model customization processing device for tasks, including: a task decomposition module, which is used to decompose the task to be processed into multiple sub-tasks based on a pre-built intent understanding integrated model, and perform time encoding based on the correlation between different sub-tasks to determine the execution order of the sub-tasks; a model search module, which is used to search for and match the corresponding sub-task model in the model library according to the model granularity for each sub-task; a model customization processing module, which is used to respond to parameter adjustment requests for the sub-task model, customize the sub-task model, and obtain a customized model for the task to be processed, so as to process the task to be processed according to the execution order of the sub-tasks through the customized model.
[0012] In a third aspect, the present invention provides an electronic device including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the model customization processing method for a task according to any of the aforementioned embodiments.
[0013] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement any one of the aforementioned implementation methods for model customization processing for tasks.
[0014] The present application provides a method, device, equipment and medium for model customization processing for tasks. The method first decomposes the task to be processed into multiple subtasks based on a pre-built intention understanding integrated model, and performs time series encoding based on the correlation between different subtasks to determine the execution order of the subtasks. For each subtask, the corresponding subtask model is searched and matched in the model library according to the model granularity, and the parameter adjustment request for the subtask model is responded to. The subtask model is customized to obtain a customized model for the task to be processed, so that the task to be processed can be processed according to the execution order of the subtasks through the customized model. In this way, the task can be refined and divided according to the intention requirements in the task, and the corresponding subtask model can be used for processing the divided subtasks, so that when the task volume is large and the task types are many, the task processing complexity is reduced, the neural network parameters are simplified, the training sample requirements are reduced, the efficiency of task processing is improved, and the memory consumption during calculation is reduced; by customizing the subtask model, more accurate task processing can be performed through the customized model after parameter adjustment, thereby improving the accuracy of task processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 A flowchart of a model customization processing method for a task provided in an embodiment of the present application;
[0017] Figure 2 A structural diagram of an intention understanding integrated model provided in an embodiment of the present application;
[0018] Figure 3 A structural diagram of a convolutional neural network used for searching for matches provided in an embodiment of the present application;
[0019] Figure 4 A structural diagram of a network architecture search module provided in an embodiment of the present application;
[0020] Figure 5 A schematic diagram of parallel training of models on multiple GPUs provided in an embodiment of the present application;
[0021] Figure 6 A schematic diagram of heterogeneous model aggregation provided in an embodiment of the present application;
[0022] Figure 7 The deep learning algorithm provided in the embodiment of the present application runs the process in the resource orchestration container;
[0023] Figure 8 A specific process diagram of transfer learning provided in an embodiment of the present application;
[0024] Fig. 9 A schematic diagram of a model iterative optimization closed loop provided in an embodiment of the present application;
[0025] Fig.10 An overall solution roadmap provided for the embodiments of the present application;
[0026] Fig.11 A structural diagram of a model customization processing device for tasks provided in an embodiment of the present application;
[0027] Fig.12 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0029] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0030] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0031] With the development from informatization to intelligence, and the rapid advancement of information technologies such as cloud computing, big data, and artificial intelligence, different tasks require the invocation of multiple models and analysis and processing based on a variety of knowledge data. The traditional orchestration method based on manual processes can no longer meet the requirements of highly autonomous and timely environmental data processing. It is necessary to focus on solving the problems of autonomous understanding of intent, automatic decomposition of tasks, matching and tuning of models, and efficient execution of calculations, so as to achieve fast, autonomous, and intelligent business response of the system to meet the business processing requirements of different scenarios and different processing tasks.
[0032] Deep learning algorithm models have been widely used in various business scenarios. Due to the complex parameters of deep learning neural networks, large training sample volume requirements, and high computing resource requirements, the production of a high-quality professional model takes a long time, the model optimization and iteration labor costs are high, and the model generalization ability is weak, which is a common problem in current model production.
[0033] Based on this, the embodiments of the present application provide a model customization processing method, device, equipment and medium for tasks, which can reduce the complexity of task processing, simplify neural network parameters, reduce the demand for training samples, improve the efficiency of task processing, and reduce memory consumption during calculation when processing large tasks and many types of tasks, thereby improving the accuracy of task processing.
[0034] The present application embodiment provides a model customization processing method for a task, see Figure 1 As shown, the method mainly includes the following steps:
[0035] Step S110, decomposing the task to be processed into multiple subtasks based on the pre-built intention understanding integrated model, and performing time sequence coding based on the correlation between different subtasks to determine the execution order of the subtasks;
[0036] Step S120, for each subtask, searching for a matching subtask model in the model library according to the model granularity;
[0037] Step S130, in response to the parameter adjustment request for the subtask model, customize the subtask model to obtain a customized model for the task to be processed, so as to process the task to be processed according to the execution order of the subtasks through the customized model.
[0038] The following is a detailed description of the task-specific model customization processing method provided in the embodiments of the present application.
[0039] In an optional embodiment, the above-mentioned pre-built intent understanding integrated model includes the following connected in sequence: ① a model enhancement module constructed based on word vector features, ② a basic classifier constructed based on a deep bidirectional recurrent neural network of long short-term memory networks and gated recurrent units, and ③ a combined output module constructed based on a multi-layer perceptron framework.
[0040] In one example, see Figure 2 As shown in the figure, the model structure is used to first understand the intent when receiving an input task, and then identify the purpose elements through natural language understanding to guide the background system to generate responses or execute corresponding measures to meet user needs. Intent understanding uses a deep bidirectional recurrent neural network with a long short-term memory (LSTM) structure and a gated recurrent unit (GRU) as the basic classifier, a multi-layer perceptron (MLP) framework is used to combine outputs, and the model is enhanced based on word vector features.
[0041] In an optional implementation, the pre-built intent understanding integrated model decomposes the task to be processed into multiple subtasks, including:
[0042] Decompose the task to be processed into multiple subtasks based on the pre-built intent understanding integrated model, target knowledge graph and preset hierarchical rules;
[0043] The target knowledge graph includes the knowledge graph in the field corresponding to the task to be processed and the knowledge graph in the field related to the task to be processed. In addition, the knowledge graph in other unrelated fields can also be adaptively selected. In practical applications, the selection and processing can be carried out according to actual needs.
[0044] That is, when the original text for the task is obtained, the pre-built intention understanding integrated model can extract word vectors and magnetic features from the original text, classify the word vectors through bidirectional LSTM and bidirectional GRU, and input the classification results and the extracted magnetic features into two multi-layer perceptrons for output to understand the intention. The two multi-layer perceptrons respectively input the bidirectional LSTM output and part-of-speech features into the first multi-layer perceptron, and input the part-of-speech features and bidirectional GRU output into the second multi-layer perceptron.
[0045] Through the above intention understanding process, the system can automatically classify and hierarchically process business requirements, and decompose high-level tasks into a series of low-level subtasks that can be executed by the model through hierarchical task decomposition. For example, when the task to be processed is an environmental protection task, the decomposition process is based on the environmental protection domain knowledge graph and the corresponding rule knowledge.
[0046] After the task to be processed is divided into multiple subtasks, each subtask after the intelligent task decomposition can be automatically searched and matched from the model library for execution. Based on the matched subtasks, it will be adaptively split into model granularity for intelligent processing. Different models are adaptively combined into different subtasks to reduce the demand for hardware. Breaking up the subtasks into adaptive models and matching the models by subtasks can help to combine more complex task processing capabilities to reduce coupling and quickly combine the required subtasks for new needs in the environment. The adaptive model is applied to actual tasks. For sudden emergencies, it can also achieve rapid matching of a subtask without affecting the global strategy.
[0047] In one embodiment, when at least two subtasks among multiple subtasks include sub-requirements of the same type, fine-grained task extraction can be performed on the subtasks including sub-requirements of the same type based on the model granularity to obtain fine-grained tasks; and the fine-grained tasks corresponding to the subtasks including sub-requirements of the same type can be uniformly processed based on the fine-grained model corresponding to the sub-requirements.
[0048] For example, taking the subtask of target detection as an example, the detection targets of different subtasks for target detection are different (for example, some detect sensitive words on billboards through remote sensing images, and some detect the driving status of vehicles through remote sensing images), but the common point of target detection is that they all require model methods such as intelligent denoising to enhance the signal-to-noise ratio and improve the success rate of subtasks. Therefore, the sub-requirement at this time is intelligent denoising, and fine-grained tasks (i.e., intelligent denoising) are further extracted from the subtasks of detecting sensitive words and the subtasks of detecting the driving status of vehicles, and the fine-grained tasks (intelligent denoising) corresponding to the subtasks (detecting sensitive words, vehicle status) of the requirement are uniformly processed through the fine-grained model (i.e., intelligent denoising model) corresponding to the fine-grained task.
[0049] After splitting the task into adaptive models in this way, when multiple subtasks have the same smaller-granularity processing requirements, they are run according to the model granularity to avoid repeatedly running the entire subtask, thereby reducing hardware requirements.
[0050] In one embodiment, a convolutional neural network is used as an example for explanation. When performing model search and matching, the overall architecture of the algorithm automatic matching model based on the convolutional neural network consists of 6 convolutional layers, 6 normalization layers, 1 pooling layer, 1 output layer (Dropout) and 1 fully connected layer. The overall framework is shown in FIG. Figure 3 shown.
[0051] First, ReLU is added as an activation function after each convolution operation, and batch normalization (BN) is used after each convolution layer. Batch normalization normalizes the mean and variance of the network input data of each layer to a certain range, allowing each layer to learn independently and improving the learning speed of the entire neural network. When the learning rate parameter is updated too large, batch normalization will not be affected by the size of the parameter value. It can also effectively alleviate problems such as gradient disappearance.
[0052] Secondly, the Dropout layer, L2 normalization method and maximum pooling layer are added. The pooling layer is used to reduce the size of the output feature map and speed up the model training, while the Dropout layer can prevent the one-dimensional convolutional neural network model from overfitting.
[0053] Finally, the classification problem is output using the Softmax function. The number of outputs of the Softmax layer is equal to the number of classifications. For example, if a suitable algorithm is recommended for a given problem from a set of 3 algorithms, then the number of outputs of the Softmax layer in this task should be 3. The Softmax layer uses cross entropy loss to evaluate the classification error. The cross entropy loss formula is:
[0054]
[0055] Among them, p i is the actual probability distribution of the ith instance, is the predicted probability distribution of the i-th instance, N is the number of instances used in each training step, and the CNN architecture is used to minimize the loss value.
[0056] Furthermore, if no matching model is found in the model library, a new algorithm model is trained based on the cross-modal data sample library through knowledge matching sample selection, neural architecture search (NAS), and hyperparameter adjustment to achieve online update of the model library; the model search and matching is performed based on the updated model library. In this way, the algorithm model matching of each subtask can be completed efficiently.
[0057] Optionally, for each subtask, the model library is searched for a corresponding subtask model according to the model granularity, and the model library is searched for a corresponding subtask model according to the model granularity through a network architecture search module; wherein the network architecture search module includes a first search unit and a second search unit, the first search unit is used to directly merge the input feature graphs through permutations and combinations and then search, and the second search unit is used to use a parameterized search method to determine the feature graph as a corresponding candidate operation to be automatically selected by the network; wherein the feature graph is a feature graph corresponding to the subtask input to the network architecture search module.
[0058] Figure 4 The structure of the network architecture search module is shown, and the arrows represent the candidate operation groups, where the dotted lines represent size change operations, including pooling, convolution with a sliding step size of 2, transposed convolution, etc.; solid lines represent operations without size change, including regular convolution, hole convolution, jump connection, etc. The search for convolutional layers generally includes two variables: the number of channels and the size of the convolution kernel. When any of the variables changes, a new candidate unit will appear, which will result in the occupation of a large amount of storage resources. The design adopts a combination of multi-channel and single-channel processing, that is, multi-channel convolution layer candidate operations with different numbers of channels and convolution kernel sizes are merged into a single channel as much as possible, and the number of channels and convolution kernel size are parameterized during the search.
[0059] The network architecture search module is divided into two parts (i.e., the first search unit and the second search unit). The main difference between the two parts is the way the feature map is processed: the left half (the first search unit) uses a permutation and combination method, that is, directly merging the input feature map; the right half (the second search unit) uses a parameterized search method, that is, treating it as a candidate operation and automatically selecting it by the network. This ensures that features of different scales can be effectively integrated and the simplicity of the network structure can be guaranteed. In addition to performance, real-time performance is also a very important indicator.
[0060] Furthermore, after the model is adaptively split, the model will be sent to the computing device for parallel computing. Parallel computing can improve the operating efficiency after the sub-task model is divided, and can parallelize the computing workload across different nodes to expand the scale of participating computing resources.
[0061] In one embodiment, the above-mentioned customized model is used to process the pending tasks in the execution order of subtasks. The target computing resources can be queried based on the permutation and combination results of the target parallel strategy (at least including operator-level model parallelism, pipeline model parallelism, recalculation model parallelism or data parallelism), and then different layers of the customized model are allocated to different target computing resources, and the pending tasks are processed in the execution order of subtasks. Alternatively, different parameters of the same customized layer can be allocated to different target computing resources, and the pending tasks are processed in the execution order of subtasks.
[0062] The above-mentioned method explores the permutations and combinations of operator-level model parallelism, pipeline model parallelism, recalculation model parallelism, data parallelism, etc. to find the optimal server computing resources, thereby reducing task latency and improving the resource utilization efficiency of the system.
[0063] Model parallelism is manifested in that different machines in a distributed system (or different GPUs on the same machine) are responsible for different parts of the network model. That is, the complex neural network is split and distributed in computing units or GPUs for calculation, so that each GPU can perform calculations in parallel. This method is usually used when the model is relatively complex. For example, different network layers of a neural network model are assigned to different machines, or different parameters within the same layer are assigned to different machines.
[0064] In one example, take the Piplelined BP algorithm used in a neural network as an example. The Piplelined BP algorithm is mainly based on the division of training layers. In this algorithm, the GPU defines three cache spaces: prebuf, curbef, and resbuf. Among them, curbuf mainly stores the data required for the current training in the network layer, and prebuf stores the input required for the next iteration of the network layer. After the previous iteration calculation layer is calculated by the GPU, its calculation result will be stored in resbuf, and its calculation result will be passed to the next adjacent device. Therefore, large models can be split here and stored on multiple GPUs respectively, so that these models can be trained in parallel. From single GPU to multi-GPU, the biggest difference in the training process is that the model on a single GPU cannot be split and can only be trained as a computing whole. However, on multiple GPUs, the model can be split and then stored separately for training. For parallel training of models on multiple GPUs, see Figure 5 shown.
[0065] Furthermore, in order to return results efficiently and quickly, when performing model inference calculations, model lightweight processing and heterogeneous model aggregation processing can be performed, thereby realizing the dynamic segmentation and aggregation capabilities of the model, so as to continuously optimize tasks with strict latency requirements. Model aggregation refers to combining multiple different models to obtain better generalization performance. This method mainly uses the bagging idea to aggregate the pruned model weights to generate a collective predictor, which is better than the single predictor generated on the original data. Model aggregation is mainly divided into two steps: first, each group of samples is passed to the basic model for training and model lightweight processing, and secondly, multiple model weights are aggregated to generate a collective predictor. The inference results of the model predictors may vary, and finally a majority voting strategy is used to generate the results of aggregated inference. Figure 6An example of heterogeneous model aggregation is shown.
[0066] The embodiments of the present application can solve the bottlenecks of long iteration cycle and insufficient model generalization ability of intelligent algorithm models based on deep learning through the rapid construction and iterative optimization technology of intelligent algorithm models based on lifelong learning. Based on mainstream deep learning frameworks such as Tensorflow, Pytorch, and PaddlePaddle, an integrated autonomous training and interpretation cloud service platform from samples to training and automatic model publishing is established. Through autonomous selection of sample data, automatic configuration of training environment, intelligent adaptation of model parameters, autonomous training of network models, and continuous iterative optimization of training results, functions such as automatic algorithm parameter optimization, autonomous model training and iterative feedback are realized, and different data sources are supported to obtain customized models suitable for different scenarios through parameter adjustment.
[0067] The embodiments of the present application are aimed at autonomous training of deep learning services in containers throughout the life cycle, including autonomous training of AutoDL interactive deep learning models and containerized management of deep learning services throughout the life cycle:
[0068] (1)AutoDL interactive deep learning model autonomous training
[0069] According to the model requirements, set the training parameters in the graphical front-end interface. The parameter configuration is shown in Table 1. The platform can automatically pull the deep learning framework and dependent environment, without having to pay attention to the underlying implementation details. The algorithm module is highly encapsulated and integrated, and deep learning training can be started with one click. The underlying development of deep learning is hidden, and the focus is on business logic application. Through the parameter panel, the entire deep learning training task is completed interactively by humans and machines.
[0070] Table 1 Interface setting training parameters
[0071]
[0072]
[0073] (2) Containerized management of deep learning services throughout the entire life cycle
[0074] Supports installation of container environment images and model publishing. Model training enables free selection of environment versions and one-click image calling. Supports cross-platform migration and rapid deployment. Supports users to upload their own images, image generation and packaging. You can directly upload this image to the cloud and run it with one click. The local and cloud environments are completely consistent, so you can develop once and run anywhere.
[0075] Through containerized business management, the deep learning environment is deployed with one click, shortening the deployment time of the deep learning environment. The overall platform automatically trains and the model training effect is significant. The user starts a Pytorch training task and runs it in the container orchestrated by the cluster manager. Figure 7 shown.
[0076] When responding to the parameter adjustment request for the subtask model and customizing the subtask model, the algorithm can be automatically optimized according to the user feedback information, which may include: 1) hyperparameter optimization; 2) network architecture optimization. The automatic parameter adjustment optimization simplifies and improves the process of hyperparameter selection and adjustment, and automatically obtains a network architecture with strong generalization ability and high efficiency. The entire process can be completed by user operation, which can greatly improve the update and optimization efficiency of the algorithm model.
[0077] In one implementation, a hyperparameter automatic optimization method based on Bayesian optimization can be used to use existing prior information to find hyperparameters that make the objective function reach the global optimum:
[0078] Bayesian optimization finds the value that maximizes the objective function by establishing a substitute function based on the past evaluation results of the objective function, and uses a continuously updated probability model to "focus" the desired hyperparameters by inferring past results. In specific implementation, Bayesian parameter adjustment includes constructing a black box function, determining the domain space, instantiating objects, determining the number of iterations, and searching for the optimal result.
[0079] Furthermore, the embodiments of the present application can also be based on the iterative feedback of the transfer learning model, by transferring known valuable knowledge to unknown target tasks, so that the network model can be widely used in different target domains, solving the problem of small sample data sets. The transfer learning solution includes using a pre-trained network and using the training set to infer the parameters of the last classification layer from scratch. The main process of transfer learning is described as follows:
[0080] First, the base network needs to be determined. The network weights (w1, w2, ..., wn) are assigned using a pre-trained CNN model that is trained on a large labeled dataset such as ImageNet. A new neural network is built by replacing layers, inserting layers, and removing layers from the underlying network. The network can be modified to generate a new network architecture for achieving a specific task or goal. Model training or fine-tuning of deep neural networks is usually based on training to minimize prediction loss. [4] For the target dataset X and the corresponding label Y, the goal of model training is to iteratively minimize the average loss E defined in the following formula:
[0081]
[0082] N represents the number of data instances in each iteration, W represents the weight matrix of the neural network, L() represents the loss function, f() represents the output of the predicted neural network, and R() represents the regularization term or the reduction of the weights along with the Lagrange multiplier λ.
[0083] Typically, the stochastic gradient descent (SGD) algorithm calculates the optimal W by minimizing the loss function E on the target dataset, as follows:
[0084]
[0085] Where a is the learning rate and k is the classification index.
[0086] Instead of training from scratch by randomly initializing weights, transfer learning can use a pre-trained network or apply fine-tuning methods to initialize weights. Figure 8 The specific process of transfer learning is described.
[0087] Transfer learning based on pre-trained models, pre-training is a process of extracting general feature parameters, and target training is a process specialized for road extraction tasks. This system provides pre-trained models such as VGG16, ResNet18, ResNet34, RseNet50 on the million-level large database Imagenet, as well as pre-trained models of the public large database VOC for target recognition.
[0088] Instance-based transfer learning is not limited to the original network structure, and data utilization is sustainable. The amount of remote sensing satellite data received is large. In order to adapt to different scenarios, the existing data model parameters are fully utilized, computing resources are saved, and the support platform provides iterative training capabilities.
[0089] Optionally, an intelligent feedback mechanism can be used to form a closed loop of model iterative optimization. The entire iterative optimization process consists of 6 steps: When the model is first trained, the default number of dataset imports is equal to 1. In step 2, according to the engineering task, manually set the hyperparameters to enable the model to automatically start training with one click. Steps 3-4, based on the visual training, determine whether the loss function of each batch of training has not decreased. The results are compared with the algorithm library by stack, and the one with the lowest comprehensive performance is shipped out. Steps 5-6 are the model release and application stage. Business personnel can feed back model application information to the sample library, trigger the system model intelligent optimization mechanism, and continue to update the sample library. At this time, the number of imports is accumulated, and the model training parameters are recommended to start model training. The intelligent feedback mechanism will automatically launch the pre-trained model and trigger the model to perform iterative optimization training. This forms a closed loop of iterative optimization of the entire model and solves the problem of continuous iterative optimization of updating the model based on the sample feedback mechanism. See Fig. 9 shown.
[0090] In summary, the embodiments of this application are aimed at complex environments and the security needs of different businesses, and propose environmental business intelligent analysis and automatic task orchestration technology based on knowledge + model dual drive. Based on cross-modal knowledge and model rules such as domain knowledge, rule knowledge, model adaptive rule knowledge, etc., through technologies such as task intelligent decomposition, algorithm automatic matching, model dynamic segmentation and aggregation, and cloud native task process orchestration and scheduling engine, rapid intelligent analysis and automatic orchestration of environmental services are achieved. For the overall solution roadmap, please refer to Fig.10 shown.
[0091] Based on the above method embodiment, the present application embodiment also provides a model customization processing device for tasks, Fig.11 As shown, the device mainly includes the following parts:
[0092] A task decomposition module 112 is used to decompose the task to be processed into multiple subtasks based on the pre-built intention understanding integrated model, and perform time sequence coding based on the correlation between different subtasks to determine the execution order of the subtasks;
[0093] A model search module 114 is used to search for a corresponding subtask model in the model library according to the model granularity for each subtask;
[0094] The model customization processing module 116 is used to respond to the parameter adjustment request for the subtask model, customize the subtask model, and obtain a customized model for the task to be processed, so as to process the task to be processed according to the execution order of the subtasks through the customized model.
[0095] In a feasible embodiment, the pre-built intent understanding integrated model includes: a model enhancement module built based on word vector features, a basic classifier built based on a deep bidirectional recurrent neural network of long short-term memory networks and gated recurrent units, and a combined output module built based on a multi-layer perceptron framework, which are connected in sequence.
[0096] In a feasible implementation manner, the task decomposition module 112 is further used to:
[0097] Decompose the task to be processed into multiple subtasks based on the pre-built intent understanding integrated model, target knowledge graph and preset hierarchical rules;
[0098] Among them, the target knowledge graph includes the knowledge graph of the field corresponding to the task to be processed and the knowledge graph of the field related to the task to be processed.
[0099] In a feasible implementation manner, when at least two subtasks among the multiple subtasks include sub-requirements of the same type, the above-mentioned device further includes a fine-grained division module, which is used to:
[0100] Extracting fine-grained tasks from subtasks that include sub-requirements of the same type based on the model granularity to obtain fine-grained tasks;
[0101] Fine-grained tasks corresponding to subtasks including sub-demands of the same type are uniformly processed based on the fine-grained models corresponding to the sub-demands.
[0102] In a feasible implementation manner, the model search module 114 is further used to:
[0103] For each subtask, the network architecture search module searches for the corresponding subtask model in the model library according to the model granularity;
[0104] Among them, the network architecture search module includes a first search unit and a second search unit. The first search unit is used to directly merge the input feature maps through permutations and combinations and then search, and the second search unit is used to use a parameterized search method to determine the feature maps as corresponding candidate operations to be automatically selected by the network; wherein, the feature map is the feature map corresponding to the subtask input into the network architecture search module.
[0105] In a feasible implementation manner, the above device further includes a model library updating module, which is used to:
[0106] If no matching model is found in the model library, a new algorithm model is trained based on the cross-modal data sample library through knowledge matching sample selection, neural network structure search, and hyperparameter adjustment to achieve online update of the model library.
[0107] Search and match models based on the updated model library.
[0108] In a feasible implementation manner, the model customization processing module 116 is further used to:
[0109] Query the target computing resources based on the permutation and combination results of the target parallel strategy; the target parallel strategy includes at least operator level model parallelism, pipeline model parallelism, recalculation model parallelism or data parallelism;
[0110] Different layers of the customized model are assigned to different target computing resources, and the pending tasks are processed according to the execution order of the subtasks; or different parameters of the same customized layer are assigned to different target computing resources, and the pending tasks are processed according to the execution order of the subtasks.
[0111] The present application also provides an electronic device, such as Fig.12As shown, it is a structural diagram of the electronic device, wherein the electronic device 100 includes a processor 121 and a memory 120, the memory 120 stores computer executable instructions that can be executed by the processor 121, and the processor 121 executes the computer executable instructions to implement any of the above-mentioned model customization processing methods for tasks.
[0112] exist Fig.12 In the illustrated embodiment, the electronic device further includes a bus 122 and a communication interface 123 , wherein the processor 121 , the communication interface 123 and the memory 120 are connected via the bus 122 .
[0113] Among them, the memory 120 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 123 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 122 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 122 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0114] The processor 121 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 121. The above processor 121 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 121 reads the information in the memory and completes the steps of the model customization processing method for the task in the aforementioned embodiment in combination with its hardware.
[0115] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned model customization processing method for the task. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.
[0116] The computer program product of the task-oriented model customization processing method, apparatus, device and medium provided in the embodiments of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0117] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0118] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0119] In the description of the present application, it should be noted that the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0120] In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A model customization processing method for complex tasks, characterized in that: include: Based on a pre-built intention understanding integrated model, the task to be processed is decomposed into multiple subtasks, and temporal encoding is performed based on the correlation between different subtasks to determine the execution order of the subtasks; the pre-built intention understanding integrated model includes: a model enhancement module built based on word vector features, a basic classifier built based on a deep bidirectional recurrent neural network of a long short-term memory network and a gated recurrent unit, and a combined output module built based on a multi-layer perceptron framework, which are connected in sequence; For each subtask, search the model library for the corresponding subtask model according to the model granularity; In response to a parameter adjustment request for a subtask model, the subtask model is customized to generate a customized model for the task to be processed, so as to process the task to be processed according to the execution order of the subtasks through the customized model; Based on the pre-built intent understanding integrated model, the task to be processed is decomposed into multiple subtasks, including: Decomposing the task to be processed into multiple subtasks based on the pre-built intention understanding integrated model, the target knowledge graph and the preset hierarchical rules; wherein the target knowledge graph includes the knowledge graph of the field corresponding to the task to be processed and the knowledge graph of the field related to the task to be processed; Specifically, when the original text for the task is obtained, the pre-built intention understanding integrated model extracts word vectors and magnetic features from the original text, classifies the word vectors through bidirectional LSTM and bidirectional GRU, and inputs the classification results and the magnetic features extracted above into two multi-layer perceptrons for output, so as to understand the intention; wherein the two multi-layer perceptrons respectively input the bidirectional LSTM output and the part-of-speech features into the first multi-layer perceptron, and input the part-of-speech features and the bidirectional GRU output into the second multi-layer perceptron; Through the above intention understanding process, the system automatically classifies and hierarchically processes business requirements, and decomposes high-level tasks into a series of low-level subtasks executed by the model through hierarchical task decomposition.
2. The model customization processing method for complex tasks according to claim 1, characterized in that: When at least two of the multiple subtasks include sub-requirements of the same type, the method further includes: Extracting fine-grained tasks from subtasks that include sub-requirements of the same type based on the model granularity to obtain fine-grained tasks; Fine-grained tasks corresponding to subtasks including sub-demands of the same type are uniformly processed based on the fine-grained models corresponding to the sub-demands.
3. The model customization processing method for complex tasks according to claim 1, characterized in that: For each subtask, search for the corresponding subtask model in the model library according to the model granularity, including: For each subtask, the network architecture search module searches for the corresponding subtask model in the model library according to the model granularity; Among them, the network architecture search module includes a first search unit and a second search unit, the first search unit is used to directly merge the input feature maps through permutations and combinations and then search, and the second search unit is used to use a parameterized search method to determine the feature map as the corresponding candidate operation to be automatically selected by the network; wherein, the feature map is the feature map corresponding to the subtask input into the network architecture search module.
4. The model customization processing method for complex tasks according to claim 1 or 3, characterized in that: The method further comprises: If no matching model is found in the model library, a new algorithm model is trained based on the cross-modal data sample library through knowledge matching sample selection, neural network structure search, and hyperparameter adjustment to achieve online update of the model library. Search and match models based on the updated model library.
5. The model customization processing method for complex tasks according to claim 1, characterized in that: Processing the task to be processed according to the execution order of the subtasks by using the customized model includes: Query the target computing resources based on the permutation and combination results of the target parallel strategy; the target parallel strategy includes at least operator level model parallelism, pipeline model parallelism, recalculation model parallelism or data parallelism; Different layers of the customized model are assigned to different target computing resources, and the pending tasks are processed according to the execution order of the subtasks; or different parameters of the same customized layer are assigned to different target computing resources, and the pending tasks are processed according to the execution order of the subtasks.
6. A model customization processing device for complex tasks, characterized in that: The device is used to implement the model customization processing method for complex tasks as described in any one of claims 1 to 5, comprising: The task decomposition module is used to decompose the task to be processed into multiple subtasks based on the pre-built intention understanding integrated model, and to perform temporal coding based on the correlation between different subtasks to determine the execution order of the subtasks; The model search module is used to search for the corresponding subtask model in the model library according to the model granularity for each subtask; The model customization processing module is used to respond to the parameter adjustment request for the subtask model, customize the subtask model, and obtain a customized model for the task to be processed, so as to process the task to be processed according to the execution order of the subtasks through the customized model.
7. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the model customization processing method for complex tasks as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the model customization processing method for complex tasks as described in any one of claims 1 to 5.
