Search

CN-122019061-A - Task processing method and device, storage medium and electronic equipment

CN122019061ACN 122019061 ACN122019061 ACN 122019061ACN-122019061-A

Abstract

The application discloses a task processing method and device, a storage medium and electronic equipment. The method comprises the steps of obtaining tasks to be inferred and corresponding environment task joint perception information, analyzing the tasks to be inferred by utilizing a target small member model in a pre-trained family model under the condition that the environment task joint perception information meets preset conditions to obtain an intermediate handover packet output by a target key middle layer of the target small member model, analyzing the intermediate handover packet by utilizing a target large member model in the family model to obtain a first answer output by a task output head of the target large member model, and outputting the first answer as a target answer of the tasks to be inferred. The application solves the technical problems of low analysis efficiency and serious waste of computing resources when the related technology adopts the end-to-end cloud architecture to analyze the end-to-end reasoning task.

Inventors

  • LI XUELONG
  • AN HONGJUN
  • YUAN CHENG
  • SHAO JIAWEI
  • ZHANG CHI

Assignees

  • 中国电信股份有限公司

Dates

Publication Date
20260512
Application Date
20260414

Claims (10)

  1. 1. A method of task processing, comprising: Acquiring a task to be inferred and environment task joint perception information of the task to be inferred, wherein the environment task joint perception information comprises at least one of network state information, locally available computing resource information and task meta-information; Under the condition that the environment task joint perception information meets the preset condition, analyzing the task to be inferred by utilizing a target small member model in a pre-trained family model to obtain a middle handover packet of the target key middle layer output of the target small member model, wherein the middle handover packet at least comprises a middle hiding state of the target key middle layer output, a plurality of member models in the family model share the same task output head, the types of the member models at least comprise a large member model and a small member model, and the model parameter scale of the large member model is larger than that of the small member model; And analyzing the intermediate handover package by utilizing a target large member model in the family model to obtain a first answer output by a task output head of the target large member model, and outputting the first answer as a target answer of the task to be inferred, wherein a local network of the target small member model before the target key middle layer is the same as a local network of the target large member model before the target key middle layer.
  2. 2. The method of claim 1, wherein the training process of the family model comprises: Obtaining a plurality of groups of training sample data from a preset corpus, wherein each group of training sample data comprises an inference sample and standard answers of the inference sample; Constructing a basic model; Decomposing a plurality of intermediate networks in the basic model to obtain a plurality of extension branch networks corresponding to each intermediate network, and determining a plurality of homologous models by the plurality of extension branch networks corresponding to each intermediate network, wherein the intermediate network is a sub-network deployed between an exit point of a key middle layer of the basic model and the task output head; Determining a first predicted answer obtained by analyzing a plurality of reasoning samples by the basic model and a second predicted answer obtained by analyzing a plurality of reasoning samples by the homologous model respectively, and constructing a target loss function according to the standard answer, the corresponding first predicted answer and the second predicted answer of each of the reasoning samples; And carrying out parameter adjustment on the basic model and the homologous models by using the target loss function, and taking the trained homologous models and the trained basic model as member models to form the family model.
  3. 3. The method of claim 2, wherein decomposing the plurality of intermediate networks in the base model to obtain a plurality of extended branch networks corresponding to each of the intermediate networks comprises: For each intermediate network in the basic model, determining input feature vectors of inference samples in the key intermediate layers in each group of training sample data, and forming an input activation matrix of the intermediate network by the input feature vectors; Performing centering treatment and covariance whitening treatment on the input activation matrix, and performing linear regression treatment by combining an initial weight matrix of the intermediate network to obtain a regression matrix corresponding to the intermediate network; Singular value decomposition is carried out on the regression matrix to obtain a plurality of singular values, the singular values are ordered according to the order from big to small, the first r target singular values in the ordering result are determined, and a plurality of low-rank weight matrixes are formed by the r target singular values and feature vectors corresponding to the target singular values, wherein r is a positive integer greater than or equal to 1; And constructing a plurality of extended branch networks corresponding to the intermediate network according to the low-rank weight matrixes.
  4. 4. The method of claim 2, wherein constructing an objective loss function from the standard answer, the corresponding first predicted answer, and the second predicted answer for each of the plurality of inference samples comprises: Constructing a global loss function according to the standard answers, the corresponding first predicted answers and the second predicted answers of the plurality of reasoning samples; For each intermediate network, constructing a branch loss function corresponding to the intermediate network according to respective standard answers of a plurality of training samples and respective second prediction answers output by a plurality of homologous models obtained by decomposing the same intermediate network; And carrying out weighted summation on the global loss function and the branch loss functions to obtain the target loss function.
  5. 5. The method of claim 1, wherein the intermediate handover package further includes identification information of an exit point of the target key middle layer, wherein analyzing the intermediate handover package by using a target macro-member model in the family model to obtain a first answer output by a task output head of the target macro-member model includes: determining a target sub-model in the target large member model according to the identification information, wherein the target sub-model consists of a plurality of extended branch networks and the task output head, wherein the extended branch networks are directly connected with the exit points of the target key middle layer in the target large member model; and inputting the intermediate hidden state in the intermediate handover packet into the target sub-model to obtain a first answer output by a task output head of the target sub-model.
  6. 6. The method of claim 5, wherein inputting the intermediate hidden state in the intermediate handover packet into the target sub-model to obtain the first answer output by the task output head of the target sub-model comprises: And randomly inputting the intermediate hidden state in the intermediate handover packet to any expansion branch network directly connected with the exit point of the target key middle layer in the target submodel, and inputting the intermediate hidden state output by the expansion branch network to the task output head to obtain a first answer output by the task output head.
  7. 7. The method according to claim 1, wherein the method further comprises: And under the condition that the environment task joint perception information does not meet the preset condition, analyzing the task to be inferred by utilizing a target small member model in the family model to obtain a second answer output by a task output head of the target small member model, and outputting the second answer as a target answer of the task to be inferred.
  8. 8. A task processing device, comprising: The acquisition module is used for acquiring a task to be inferred and environment task joint perception information of the task to be inferred, wherein the environment task joint perception information comprises at least one of network state information, locally available computing resource information and task meta information; The first analysis module is used for analyzing the task to be inferred by utilizing a target small member model in a pre-trained family model under the condition that the joint perception information of the environmental task meets a preset condition, so as to obtain a middle handover packet of the target key middle layer output of the target small member model, wherein the middle handover packet at least comprises a middle hidden state of the target key middle layer output, a plurality of member models in the family model share the same task output head, the types of the member models at least comprise a large member model and a small member model, and the model parameter scale of the large member model is larger than that of the small member model; And the second analysis module is used for analyzing the intermediate handover package by utilizing the target large member model in the family model to obtain a first answer output by a task output head of the target large member model, and outputting the first answer as a target answer of the task to be inferred, wherein the local network of the target small member model before the target key middle layer is the same as the local network of the target large member model before the target key middle layer.
  9. 9. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and wherein a device in which the computer-readable storage medium is located performs the task processing method according to any one of claims 1 to 7 by running the computer program.
  10. 10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the memory has stored therein a computer program, the processor being configured to execute the task processing method according to any one of claims 1 to 7 by means of the computer program.

Description

Task processing method and device, storage medium and electronic equipment Technical Field The application relates to the technical field of artificial intelligence, in particular to a task processing method and device, a storage medium and electronic equipment. Background In the existing cloud-side-end three-section architecture, a lightweight model such as a lightweight convolutional neural network is usually deployed at the end side for quick preliminary judgment of real-time video frames or sensor data, and a high-performance model such as a large-scale language model or a residual neural network is usually deployed at the edge side or the cloud side for high-precision reinspection. However, the architecture has the following core technical problems in the practical application process (such as old people fall detection and the like): (1) The end side model has high false alarm rate due to too few model parameters, so that to realize high-precision cloud reinspection, the end side must completely upload the original video frames, sensor time sequence data (such as acceleration, attitude angle, body temperature and the like) or high-dimensional characteristic representation thereof to the edge side or cloud side model. On one hand, because the data contain highly sensitive personal physiological states, behavior tracks and living scene information, serious privacy leakage risks exist in the transmission process, and even if encryption transmission or differential privacy technology is adopted, potential unauthorized access to the edge side or cloud end, data abuse or leakage risks are difficult to avoid, especially in scenes involving vulnerable groups such as home security, old care and the like. On the other hand, after the edge side or cloud model receives the original video frame, the sensor time sequence data or the high-dimensional feature representation thereof, the space-time feature extracted by the end side is repeatedly calculated, so that bandwidth waste and response delay are caused; (2) The end side model and the edge side/cloud model are not consistent in structure fracture and feature space, so that an end side output result cannot be directly reused by the edge side/cloud model and has to be recoded, and the cooperative processing efficiency is low. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the application provides a task processing method and device, a storage medium and electronic equipment, which at least solve the technical problems of low analysis efficiency and serious waste of computing resources when an end-side cloud architecture is adopted for analyzing an end-side reasoning task in the related technology. According to one aspect of the embodiment of the application, a task processing method is provided, which comprises the steps of obtaining a task to be inferred and environment task joint perception information of the task to be inferred, wherein the environment task joint perception information comprises at least one of network state information, locally available computing resource information and task meta information; under the condition that the combined perception information of the environmental task meets the preset condition, analyzing a task to be inferred by utilizing a target small member model in a pre-trained family model to obtain a middle handover packet of the target key middle layer output of the target small member model, wherein the middle handover packet at least comprises a middle hidden state of the target key middle layer output, a plurality of member models in the family model share the same task output head, the types of the member models at least comprise a large member model and a small member model, the model parameter scale of the large member model is larger than the model parameter scale of the small member model, analyzing the middle handover packet by utilizing the target large member model in the family model to obtain a first answer output by the task output head of the target large member model, and outputting the first answer as the target answer of the task to be inferred, wherein the local network of the target small member model before the target key middle layer is the same as the local network of the target large member model before the target key middle layer. According to another aspect of the embodiment of the application, the application also provides a task processing device, which comprises an acquisition module, a task processing module and a task processing module, wherein the acquisition module is used for acquiring the task to be inferred and the environment task joint perception information of the task to be inferred, wherein the environment task joint perception information comprises at least one of network state information, locally available computing resource information and task meta information; the system comprises a first analysis mo