CN112328398A - Task processing method and device, electronic equipment and storage medium - Google Patents

Task processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112328398A
CN112328398A CN202011261159.0A CN202011261159A CN112328398A CN 112328398 A CN112328398 A CN 112328398A CN 202011261159 A CN202011261159 A CN 202011261159A CN 112328398 A CN112328398 A CN 112328398A
Authority
CN
China
Prior art keywords
task
training
network
information
modulation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011261159.0A
Other languages
Chinese (zh)
Inventor
施路平
赵蓉
吴郁杰
刘发强
杨哲宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN202011261159.0A priority Critical patent/CN112328398A/en
Publication of CN112328398A publication Critical patent/CN112328398A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5033Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering data affinity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The disclosure relates to a task processing method and device, an electronic device and a storage medium, wherein the method comprises the following steps: inputting information to be processed of a target task into a modulation network to obtain modulation information corresponding to the target task; according to the modulation information, determining a target network node for processing the information to be processed from a plurality of network nodes of the task network; and processing the information to be processed through the target network node to obtain a processing result of the target task. According to the task processing method disclosed by the embodiment of the disclosure, the network nodes used for processing the tasks in the task network can be selected through the modulation information generated by the modulation network, so that the mutual interference among the parameters can be reduced, the catastrophic forgetting can be relieved, the reuse rate of the network nodes in the similar tasks can be improved through the modulation information, the utilization efficiency of the network parameters is improved, and the training efficiency of the neural network is improved.

Description

Task processing method and device, electronic equipment and storage medium
The present disclosure relates to the field of computer technologies, and in particular, to a task processing method and apparatus, an electronic device, and a storage medium.
Background
Continuous learning refers to a series of tasks that an artificial intelligence model or system (e.g., a neural network) sequentially learns, and data of the learned tasks cannot be used when learning new tasks. The learning paradigm is suitable for practical application scenarios in which data is continuously input, and is a basic requirement of general artificial intelligence. The key to realizing continuous learning is that the learned new knowledge cannot cover the learned old knowledge, so as to avoid catastrophic forgetting (catastrophic learning).
In the related art, as for a continuous learning algorithm of a neural network, one method is to constrain parameters of the network by a certain regularization term, so that the neural network can keep good performance on a learned task while learning the task. The elastic weight consolidation (elastic weight consolidation) algorithm is representative of this approach, which overcomes catastrophic forgetfulness by selectively reducing the learning rate of weights important to learned tasks. And the other method is to dynamically allocate different parameters for different tasks through a certain mechanism, so that the coupling of the parameters of different tasks is reduced, and the important parameters are prevented from being covered in the learning process. A context-dependent gating (context-dependent gating) algorithm is a representative of the method, and alleviates the forgetting by randomly masking part of neurons when processing different tasks to relieve the interference on network parameters when learning a new task. The scene dependent gating algorithm distributes a random binary masking vector to different tasks to control the activation state of hidden layer neurons. When a specific task is learned, part of the neurons of the network are closed according to the masking vector corresponding to the task, so that parameters related to the neurons are prevented from being modified when the task is learned. This is equivalent to handling different tasks with disjoint sets of parameters, reducing the mutual interference between parameters and alleviating catastrophic forgetfulness. However, the method only relieves the parameter interference among irrelevant tasks, and does not multiplex the network parameters by utilizing the task relevance, thereby improving the utilization efficiency of the network parameters.
Disclosure of Invention
The disclosure provides a task processing method and device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided a task processing method including: inputting information to be processed of a target task into a modulation network to obtain modulation information corresponding to the target task, wherein the target task is any one of a plurality of preset tasks; according to the modulation information, determining a target network node for processing the information to be processed from a plurality of network nodes of a task network; and processing the information to be processed through the target network node to obtain a processing result of the target task.
In a possible implementation manner, the preset task includes a first task and a second task, and the information similarity between the modulation information corresponding to the first task and the modulation information corresponding to the second task is positively correlated to the task similarity between the first task and the second task.
In a possible implementation manner, the preset task includes a first task and a second task, where information similarity between modulation information corresponding to the first task and modulation information corresponding to the second task is positively correlated with a repetition rate of a network node in a first network node and a second network node in the task network, where the first network node is a target network node in the task network for processing information to be processed of the first task, and the second network node is a target network node in the task network for processing information to be processed of the second task.
In one possible implementation, the modulation network includes any one of an artificial neural network and a spiking neural network, and the task network includes any one of a spiking neural network and an artificial neural network.
In one possible implementation, the method further includes: inputting a training sample of a training task into the modulation network to obtain first training modulation information of the training sample, wherein the training task is any one of a plurality of tasks; obtaining second training modulation information of the training task according to first training modulation information of a plurality of training samples of the training task; and training the modulation network according to the first training modulation information and the second training modulation information.
In one possible implementation manner, obtaining second training modulation information of the training task according to first training modulation information of a plurality of training samples of the training task includes: obtaining average training modulation information of first training modulation information of the plurality of training samples; and carrying out thresholding processing on the average training modulation information to obtain the second training modulation information.
In one possible implementation, training the modulation network according to the first training modulation information and the second training modulation information includes: acquiring similarity constraint information according to the first training modulation information and the second training modulation information; obtaining regularization information according to the second training modulation information; determining a first network loss of the modulation network according to the similarity constraint information and the regularization information; training the modulation network according to the first network loss.
In one possible implementation, the method further includes: obtaining third training modulation information of a training task according to a training sample of the training task and a trained modulation network, wherein the training task is any one of a plurality of tasks; determining a target network node of a training sample for processing the training task in the task network according to the third training modulation information; processing the training sample of the training task through the target network node to obtain a training result; determining a second network loss of the task network according to the training result and the labeling information of the training sample; and training the task network according to the second network loss.
In one possible implementation manner, obtaining third training modulation information of a training task according to a training sample of the training task and a trained modulation network includes: and under the condition that the task network is a single hidden layer neural network, determining third training modulation information of the current training task according to fourth training modulation information of the current training task and fifth training modulation information of the trained historical training task, which are obtained by the modulation network.
In a possible implementation manner, the plurality of preset tasks include at least one of an image processing task, a voice processing task, a word processing task, and a vector processing task, and the information to be processed includes at least one of image information, voice information, word information, and vector information.
According to an aspect of the present disclosure, there is provided a task processing apparatus including: the modulation information module is used for inputting information to be processed of a target task into a modulation network to obtain modulation information corresponding to the target task, wherein the target task is any one of a plurality of preset tasks; the target node module is used for determining a target network node for processing the information to be processed from a plurality of network nodes of the task network according to the modulation information; and the processing module is used for processing the information to be processed through the target network node to obtain a processing result of the target task.
In a possible implementation manner, the preset task includes a first task and a second task, and the information similarity between the modulation information corresponding to the first task and the modulation information corresponding to the second task is positively correlated to the task similarity between the first task and the second task.
In a possible implementation manner, the preset task includes a first task and a second task, where information similarity between modulation information corresponding to the first task and modulation information corresponding to the second task is positively correlated with a repetition rate of a network node in a first network node and a second network node in the task network, where the first network node is a target network node in the task network for processing information to be processed of the first task, and the second network node is a target network node in the task network for processing information to be processed of the second task.
In one possible implementation, the modulation network includes any one of an artificial neural network and a spiking neural network, and the task network includes any one of a spiking neural network and an artificial neural network.
In one possible implementation manner, the apparatus further includes a modulation network training module, where the modulation network training module is configured to: inputting a training sample of a training task into the modulation network to obtain first training modulation information of the training sample, wherein the training task is any one of a plurality of tasks; obtaining second training modulation information of the training task according to first training modulation information of a plurality of training samples of the training task; and training the modulation network according to the first training modulation information and the second training modulation information.
In one possible implementation, the modulation network training module is further configured to: obtaining average training modulation information of first training modulation information of the plurality of training samples; and carrying out thresholding processing on the average training modulation information to obtain the second training modulation information.
In one possible implementation, the modulation network training module is further configured to: acquiring similarity constraint information according to the first training modulation information and the second training modulation information; obtaining regularization information according to the second training modulation information; determining a first network loss of the modulation network according to the similarity constraint information and the regularization information; training the modulation network according to the first network loss.
In one possible implementation manner, the apparatus further includes a task network training module, and the task network training module is configured to: obtaining third training modulation information of a training task according to a training sample of the training task and a trained modulation network, wherein the training task is any one of a plurality of tasks; determining a target network node of a training sample for processing the training task in the task network according to the third training modulation information; processing the training sample of the training task through the target network node to obtain a training result; determining a second network loss of the task network according to the training result and the labeling information of the training sample; and training the task network according to the second network loss.
In one possible implementation, the task network training module is further configured to: and under the condition that the task network is a single hidden layer neural network, determining third training modulation information of the current training task according to fourth training modulation information of the current training task and fifth training modulation information of the trained historical training task, which are obtained by the modulation network.
In a possible implementation manner, the plurality of preset tasks include at least one of an image processing task, a voice processing task, a word processing task, and a vector processing task, and the information to be processed includes at least one of image information, voice information, word information, and vector information.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: the above task processing method is executed.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described task processing method.
According to the task processing method disclosed by the embodiment of the disclosure, the network nodes used for processing tasks in the task network can be selected through the modulation information generated by the modulation network, so that the mutual interference among the parameters can be reduced, the catastrophic forgetting can be relieved, the reuse rate of the network nodes in similar tasks can be improved through the modulation information, and the utilization efficiency of the network parameters can be improved. In addition, the pulse neural network can be used as a task network to process complex time sequence tasks, so that the pulse neural network can train or execute a plurality of continuous tasks under the action of a modulation signal, and the training and executing efficiency of the neural network is improved. Furthermore, in the process of training the modulation network, the modulation information of the same task output by the modulation network has higher similarity and is more concentrated in the feature space by the similarity constraint information, and the modulation information of different tasks output by the modulation network has low similarity and is far away from each other in the feature space. When the task network selects the target network node through the modulation information output by the modulation network, the repetition rate of the target network node selected for the similar task is higher, and the repetition rate of the target network node selected for the dissimilar task is lower, so that the utilization efficiency of network parameters can be improved, the training efficiency of the task network can be improved, and the parameter interference among different tasks can be reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 shows a flow diagram of a task processing method according to an embodiment of the present disclosure;
FIG. 2 shows an application diagram of a task processing method according to an embodiment of the present disclosure;
FIG. 3 shows a block diagram of a task processing device according to an embodiment of the present disclosure;
FIG. 4 shows a block diagram of a task processing device according to an embodiment of the present disclosure;
fig. 5 illustrates a block diagram of a task processing device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flowchart of a task processing method according to an embodiment of the present disclosure, as shown in fig. 1, the method includes:
in step S11, inputting information to be processed of a target task into a modulation network, and obtaining modulation information corresponding to the target task, where the target task is any one of a plurality of preset tasks;
in step S12, according to the modulation information, a target network node for processing the information to be processed is determined from a plurality of network nodes of the task network;
in step S13, the target network node processes the to-be-processed information to obtain a processing result of the target task.
According to the task processing method disclosed by the embodiment of the disclosure, the network nodes used for processing the tasks in the task network can be selected through the modulation information generated by the modulation network, so that the mutual interference among the parameters can be reduced, the catastrophic forgetting can be relieved, the reuse rate of the network nodes in the similar tasks can be improved through the modulation information, the utilization efficiency of the network parameters is improved, and the training efficiency of the neural network is improved.
In one possible implementation, the task processing method may be performed by a terminal device or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. The other processing devices may be servers or cloud servers, etc. In some possible implementations, the task processing method may be implemented by a processor calling computer readable instructions stored in a memory.
In one possible implementation, the neural network may perform a specific function through a specific training, for example, the neural network may be trained through a sample image with a position label, so that the neural network obtains the capability of determining the position of the target object in the image, or the neural network may be trained through a sample image with a contour label, so that the neural network obtains the capability of recognizing the contour of the target object in the image. In a more complex scenario, the neural network is required to have multiple capabilities and perform multiple tasks, for example, in a monitoring scenario, the neural network is required to detect the position of a target object in a monitoring video and identify the identity of the target object, and the architecture and parameters of two or more neural networks stored in the processor may cause problems of waste of storage resources and low processing efficiency, and thus, the neural network may be required to be capable of performing multiple tasks.
In one possible implementation manner, in the related art, when the neural network performs different tasks or trains for different tasks, a part of the network nodes may be randomly masked, that is, parameters of the masked network nodes are not updated during training, and the masked network nodes are not used during performing the tasks. In this way, the neural network can be trained or trained to perform different tasks by different nodes. For example, for task a, a portion of the nodes may be randomly masked and trained or performed using an unmasked set of network nodes (e.g., node set a), and for task B, a portion of the network nodes may be randomly masked and trained or performed using an unmasked set of network nodes (e.g., node set B). However, since the shielded network nodes are randomly selected, different network nodes may be selected for similar tasks to be trained and executed during the neural network training process, resulting in low training efficiency and low parameter utilization efficiency of the network nodes.
In one possible implementation, to address the above problem, a modulation signal may be generated by modulating characteristics of a network for a task, and part of network nodes in the task network may be specifically shielded by the modulation signal, and may be trained and executed by using the unshielded network nodes. Because the modulation signals are generated according to the characteristics of the tasks, the similarity of the modulation signals is higher for similar tasks, and the repetition rate of the network nodes which are selected based on the modulation signals and used for training or executing the tasks is also higher, so that the training efficiency of the neural network and the parameter utilization rate of the network nodes can be improved for similar tasks.
In a possible implementation manner, the plurality of preset tasks include at least one of an image processing task, a voice processing task, a word processing task, and a vector processing task, and the information to be processed includes at least one of image information, voice information, word information, and vector information. In an example, the task may be an image processing task, e.g., a task of identifying a position of an object in an image, and the information to be processed may be image information. For another example, the task may be a word processing task, e.g., recognizing the semantics of a word, and the information to be processed may be word information (e.g., a word, a phrase, a sentence, a paragraph of words, etc.). The present disclosure does not limit the categories of the preset tasks and the information to be processed.
In one possible implementation, in step S11, the target task may be any one of a plurality of preset tasks, and the information to be processed may be information corresponding to the target task, for example, if the target task is an image processing task, the information to be processed may be image information. The information to be processed of the target task can be input into the modulation network, and the modulation network can output the modulation information corresponding to the target task. The modulation information is used for shielding part of network nodes in the task network.
In an example, the target task may be a task of detecting a position of a target object in an image, the information to be processed may be image information, and the modulation network may generate modulation information of the task based on the input image information. For another example, the target task may be a task for recognizing semantics of a text, the information to be processed may be text information, and the modulation network may generate modulation information for the task based on the input text information. If the target tasks are different, the modulation information generated by the modulation network is different.
In a possible implementation manner, the preset task includes a first task and a second task, and the information similarity between the modulation information corresponding to the first task and the modulation information corresponding to the second task is positively correlated to the task similarity between the first task and the second task.
In an example, since the modulation information is generated based on the target tasks, if the similarity of the two target tasks is high, the generated modulation information is high, whereas if the similarity of the two target tasks is low, the generated modulation information is low. For example, the first task and the second task are both image processing tasks, the first task is a task for identifying the position of the target object in the image, the second task is a task for identifying the contour of the target object in the image, and if the similarity between the first task and the second task is high, the similarity between the modulation information corresponding to the first task and the modulation information corresponding to the second task is high. For example, the first task is a task of recognizing a position of a target object in an image, the second task is a task of recognizing a semantic meaning of a character, and if the similarity between the first task and the second task is low, the similarity between modulation information corresponding to the first task and modulation information corresponding to the second task is low.
In an example, the modulation information may be information (e.g., modulation vector) in a vector form, and when the task similarity between the first task and the second task is high, the similarity between the modulation vector corresponding to the first task and the modulation vector corresponding to the second task is high, e.g., the cosine similarity is high. Conversely, when the task similarity between the first task and the second task is low, the similarity between the modulation vector corresponding to the first task and the modulation vector corresponding to the second task is low, for example, the cosine similarity is low. The present disclosure does not limit the data type of the modulation information.
In one possible implementation, the modulation network includes any one of an artificial neural network and a spiking neural network, and the task network includes any one of a spiking neural network and an artificial neural network. In the example, the artificial neural network is mainly characterized by time dispersion and continuous output, and is suitable for a high-precision numerical approximation task. The impulse neural network is mainly characterized by time continuity and output dispersion, and is suitable for complex time sequence information processing tasks. The artificial neural network and the impulse neural network can be combined into a heterogeneous neural network, and continuous learning and task execution can be completed cooperatively.
In an example, an artificial neural network with strong fitting ability can be used as a modulation network to generate modulation information based on similarity of tasks, and a pulse neural network suitable for a complex time sequence information processing task can be used as a task network to train multiple continuous tasks or execute multiple tasks under the action of the modulation information of the modulation network. The present disclosure does not limit the type of modulation network and task network. For example, the modulation network may be a spiking neural network and the task network may be an artificial neural network. Alternatively, both the modulation network and the task network may be impulse neural networks, or both the modulation network and the task network may be artificial neural networks.
By the method, complex time sequence tasks can be processed through the pulse neural network, the pulse neural network can carry out continuous training of multiple tasks or execute multiple tasks under the action of the modulation signal, and the training and executing efficiency of the neural network is improved.
In one possible implementation manner, in step S12, the modulation information may act on the task network, control the task network to mask a specific network node, and process the to-be-processed information through the unmasked network node, that is, use the unmasked network node as a target network node for processing the to-be-processed information.
In a possible implementation manner, the preset task includes a first task and a second task, where information similarity between modulation information corresponding to the first task and modulation information corresponding to the second task is positively correlated with a repetition rate of a network node in a first network node and a second network node in the task network, where the first network node is a target network node in the task network for processing information to be processed of the first task, and the second network node is a target network node in the task network for processing information to be processed of the second task.
In a possible implementation manner, if the task similarity between the first task and the second task is high, the information similarity between the modulation information corresponding to the first task and the modulation information corresponding to the second task is also high, and further, the repetition rate of the network node selected by the modulation information with the high similarity is high. That is, when the task similarity is high, a part of the network nodes and the parameters of the network nodes may be taken when executing the task or performing the training, so as to improve the training efficiency and the parameter utilization rate. For example, the first task and the second task are both image processing tasks, the first task is a task for identifying the position of a target object in an image, the second task is a task for identifying the contour of the target object in the image, the similarity between the first task and the second task is high, the repetition rate of the first network node and the second network node is high, that is, the number of repeated network nodes in the network nodes used for executing the first task and the second task is large, and the parameter utilization rate of the network nodes can be improved.
For another example, the first task is a task for identifying a position of a target object in an image, the second task is a task for identifying a semantic meaning of a character, and the similarity between the first task and the second task is low, so that the repetition rate of the first network node and the second network node is low, that is, the number of repeated network nodes in the network nodes used for executing the first task and the second task is small, and parameter interference between different tasks can be reduced.
In one possible implementation manner, in step S13, the information to be processed may be processed by the target network node, and a processing result of the target task is obtained. For example, information to be processed of a first task may be processed by a first network node and a processing result of the first task is obtained, and information to be processed of a second task may be processed by a second network node and a processing result of the second task is obtained. That is, the target network node corresponding to each task can be selected through the modulation information of the multiple tasks, and the target network node corresponding to each task is used to process the information to be processed of each task, so as to obtain the processing result of each task.
In an example, the task a is an image processing task, the information to be processed is image information, the task B is a word processing task, the information to be processed is word information, the task C is a voice processing task, and the information to be processed is voice information. The modulation network can generate modulation information A of task A for image information, modulation information B of task B for text information, and modulation information C of task C for voice information. When the task is executed, the task network can determine a network node group A for executing the task A according to the modulation information A, process the image information through the network node group A, obtain the processing result of the task A, determine a network node group B for executing the task B according to the modulation information B, process the text information through the network node group B, obtain the processing result of the task B, determine a network node group C for executing the task C according to the modulation information C, and process the voice information through the network node group C, and obtain the processing result of the task C.
In a possible implementation manner, the task network and the modulation network may be trained, so that the modulation network obtains the capability of obtaining modulation information corresponding to the preset task according to the to-be-processed information of the preset task, and the task network obtains the capability of processing the task.
In one possible implementation manner, the modulation network may be trained first, and the modulation information is generated through the trained modulation network, so as to select a target network node in the task network for executing a specific task according to the modulation information, and then train a network parameter of the target network node in the task network by using sample information of the specific task.
In one possible implementation, the step of training the modulation network may include: inputting a training sample of a training task into the modulation network to obtain first training modulation information of the training sample, wherein the training task is any one of a plurality of tasks; obtaining second training modulation information of the training task according to first training modulation information of a plurality of training samples of the training task; and training the modulation network according to the first training modulation information and the second training modulation information.
In one possible implementation manner, the training task may be any kind of task, for example, an image processing task, a voice processing task, a word processing task, a vector processing task, and the like, and the training sample of the training task may be image information, voice information, word information, vector information, and the like, and the present disclosure does not limit the training task and the training sample.
In one possible implementation, the modulation network may output first training modulation information according to an input training sample, and in an example, the first training modulation information may be output information in a vector form, and the vector may include a plurality of elements, and the elements in the vector may be used to determine the network nodes masked in the task network. The present disclosure does not limit the data type of the first training modulation information.
In one possible implementation, each training task may include a plurality of training samples, and the second training modulation information of the training task may be determined according to the first training modulation information of the plurality of training samples of the training task, which is output by the modulation network. For example, the first training modulation information of a plurality of training samples may be weighted and averaged, or the maximum value of the corresponding element in each first training modulation information may be taken, and the present disclosure does not limit the manner in which the second training modulation information of the training task is obtained from the first training modulation information.
In one possible implementation manner, obtaining second training modulation information of the training task according to first training modulation information of a plurality of training samples of the training task includes: obtaining average training modulation information of first training modulation information of the plurality of training samples; and carrying out thresholding processing on the average training modulation information to obtain the second training modulation information.
In one possible implementation manner, the first training modulation information of the plurality of training samples may be subjected to weighted average processing to obtain average training modulation information. In an example, weighted averaging may be performed on corresponding elements in the plurality of first training modulation information, for example, weighted averaging may be performed on the ith (i is a positive integer) element in each first training modulation information (for example, the weight of each first training modulation information is equal), the ith element in the average training modulation information is obtained, and in this way, each element in the average training modulation information may be determined, that is, the average training modulation information is obtained.
In one possible implementation, each element in the average training modulation information may be thresholded, for example, each element may be compared with a threshold (e.g., 0), if the element is greater than 0, the element is retained, and if the element is less than 0, the element is replaced by 0, and each element of the second training modulation information may be obtained in this way, that is, the second training modulation information is obtained. In another example, 1/2 may be used as the threshold, for example, after subtracting 1/2 from the ith element of the average training modulation information, the comparison may be made with 0, if the subtraction of 1/2 from the ith element is still greater than 0, the element may be retained, otherwise, the element may be replaced with 0, and the elements of the second training modulation information may be obtained in this way, that is, the second training modulation information is obtained. The present disclosure does not limit the threshold at which the comparison is made.
In one possible implementation, the modulation network may be trained based on the second training modulation information for the training task and the first training modulation information for the plurality of training samples for the training task. For example, if the tasks corresponding to the training samples are all the same training task, the first training modulation information corresponding to the training samples should be the same. In an example, a similarity constraint may be imposed on each of the first training modulation information, e.g., each of the first training modulation information of the output of the modulation network may be made similar to the second training modulation information of the training task, e.g., each of the first training modulation information may be approximated to the second training modulation information by training such that the modulation information (i.e., the first training modulation information) output by the modulation network for multiple training samples of the same training task is the same.
In one possible implementation, training the modulation network according to the first training modulation information and the second training modulation information includes: acquiring similarity constraint information according to the first training modulation information and the second training modulation information; obtaining regularization information according to the second training modulation information; determining a first network loss of the modulation network according to the similarity constraint information and the regularization information; training the modulation network according to the first network loss.
In a possible implementation manner, similarity constraint information is obtained according to the first training modulation information and the second training modulation information, that is, the similarity of each first training modulation information is constrained by making each first training modulation information approach to the second training modulation information of a training task. In an example, the similarity constraint information may include a second norm of a vector obtained by the first training modulation information and the second training modulation information, the second norm being minimized by training so that the first training modulation information of each training sample output by the modulation network approximates the second training modulation information of the training task.
In a possible implementation manner, the similarity of the modulation information of the same or similar tasks output by the modulation network can be made higher by the similarity constraint information, and the modulation network is not constrained to output the modulation information of different tasks. The similarity of the modulation information of the same task output by the modulation network is higher and more concentrated in the characteristic space, and the similarity of the modulation information of different tasks output by the modulation network is not high and is far away from each other in the characteristic space.
In a possible implementation manner, the network loss of the modulation network is a positive value through the regularization information, so that the modulation network can be trained for multiple times, and situations such as gradient disappearance are avoided. In an example, the regularization information may be determined by a norm of second training modulation information of the training task, and the present disclosure does not limit the specific form of the regularization information, and only needs to make the network loss of the modulation network a positive value.
In one possible implementation, the first network loss of the modulation network may be determined according to the similarity constraint information and the regularization information, for example, the similarity constraint information and the regularization information may be added to obtain the first network loss. Further, the modulation network may be trained by the first network loss, for example, the first network loss may be propagated backward, and the network parameters of the modulation network may be adjusted by a gradient descent method. A plurality of training samples of a plurality of training tasks may be input to iteratively perform the training steps until a training condition of the modulation network is satisfied, for example, the training time reaches a predetermined time, the first network loss is less than a preset threshold or converges to a preset interval, and the like.
In this way, the information can be constrained by the similarity, so that the modulation information of the same task output by the modulation network has higher similarity and is more concentrated in the feature space, and the modulation information of different tasks output by the modulation network has low similarity and is far away from each other in the feature space. When the task network selects the target network node through the modulation information output by the modulation network, the repetition rate of the target network node selected for the similar task is higher, and the repetition rate of the target network node selected for the dissimilar task is lower, so that the utilization efficiency of network parameters can be improved, the training efficiency of the task network can be improved, and the parameter interference among different tasks can be reduced.
In one possible implementation, after the training of the modulation network is completed, the trained modulation network may be used to generate modulation information to train the task network. For example, the target network node may be selected by using the modulation information, and the network parameter of the target network node may be adjusted, so that the task network may be trained for a plurality of training tasks, and the trained task network may be obtained. The step of training the task network may comprise: obtaining third training modulation information of a training task according to a training sample of the training task and a trained modulation network, wherein the training task is any one of a plurality of tasks; determining a target network node of a training sample for processing the training task in the task network according to the third training modulation information; processing the training sample of the training task through the target network node to obtain a training result; determining a second network loss of the task network according to the training result and the labeling information of the training sample; and training the task network according to the second network loss.
In one possible implementation, the training samples of the training task may be input to the trained modulation network to obtain third training modulation information. In an example, if the network hierarchy of the task network is more and the network nodes are also more, the selection space for selecting the target network node is larger, the possibility of parameter interference between different tasks is smaller, and the modulation information output by the trained modulation network can be directly determined as the third training modulation information.
In a possible implementation manner, if the network level of the task network is less, for example, the task network is a single hidden layer neural network, the selection space for selecting the target network node is smaller, the possibility of parameter interference between different tasks is higher, and the third training modulation information can be determined according to the modulation information of the current training task and the modulation information of the historical training task, so as to determine the untrained network node as the target network node, so as to reduce the parameter interference between different tasks.
In one possible implementation manner, obtaining third training modulation information of a training task according to a training sample of the training task and a trained modulation network includes: and under the condition that the task network is a single hidden layer neural network, determining third training modulation information of the current training task according to fourth training modulation information of the current training task and fifth training modulation information of the trained historical training task, which are obtained by the modulation network.
In an example, if the current training task is the first training task, there is no trained historical training task, and the target network node may be selected by modulating information output by the network, without parameter interference between different tasks. If the current training task is not the first training task, the third training modulation information may be determined by equation (1) below to select a network node that is different from the network node trained by the historical training task (i.e., an untrained network node) for training, thereby reducing parameter interference between different tasks.
Figure BDA0002774666810000111
Wherein, maskkFourth training modulation information, mask, output for the modulation network for the current training task (kth training task)iFifth training modulation information, mask ', output for the modulation network for the historical training task (ith training task)'kInformation is modulated for the third training.
In a possible implementation manner, the task network may shield the network node that is not trained in the current training task through the third training modulation information, and select the target network node that is trained. Further, the training samples may be processed by the target network node to obtain a training result, to determine a second network loss of the task network according to an error between the training result and the labeling information of the training samples, and to train the task network through the second network loss.
In one possible implementation, the second network loss may be propagated backwards and the network parameters of the target network node of the mission network may be adjusted by a gradient descent method. A plurality of training samples of a plurality of training tasks may be input to iteratively perform the training steps until a training condition of the task network is satisfied, for example, the number of training times reaches a predetermined number, the second network loss is less than a predetermined threshold or converges to a predetermined interval, all network nodes in the task network have been trained for a predetermined number of times, and the like.
In a possible implementation manner, after training of both the modulation network and the task network is completed, the two networks can be tested, and if the accuracy of executing the task in the test is higher than the accuracy threshold, the modulation network and the task network can be used for actually executing the task. Otherwise, training of both networks may continue.
According to the task processing method disclosed by the embodiment of the disclosure, the network nodes used for processing tasks in the task network can be selected through the modulation information generated by the modulation network, so that the mutual interference among the parameters can be reduced, the catastrophic forgetting can be relieved, the reuse rate of the network nodes in similar tasks can be improved through the modulation information, and the utilization efficiency of the network parameters can be improved. In addition, the pulse neural network can be used as a task network to process complex time sequence tasks, so that the pulse neural network can train or execute a plurality of continuous tasks under the action of a modulation signal, and the training and executing efficiency of the neural network is improved. Furthermore, in the process of training the modulation network, the modulation information of the same task output by the modulation network has higher similarity and is more concentrated in the feature space by the similarity constraint information, and the modulation information of different tasks output by the modulation network has low similarity and is far away from each other in the feature space. When the task network selects the target network node through the modulation information output by the modulation network, the repetition rate of the target network node selected for the similar task is higher, and the repetition rate of the target network node selected for the dissimilar task is lower, so that the utilization efficiency of network parameters can be improved, the training efficiency of the task network can be improved, and the parameter interference among different tasks can be reduced.
Fig. 2 is a schematic diagram illustrating an application of a task processing method according to an embodiment of the present disclosure, and as shown in fig. 2, a task network may select different nodes by modulating information to perform three tasks (i.e., task 1, task 2, and task 3).
In one possible implementation manner, the modulation network may output modulation information of each task for the to-be-processed information of each task, for example, modulation information 1 of task 1 may be output for the to-be-processed information of task 1, modulation information 2 of task 2 may be output for the to-be-processed information of task 2, and modulation information 3 of task 3 may be output for the to-be-processed information of task 3.
In one possible implementation manner, the task network may shield a part of the network nodes according to the modulation information, that is, the shielded network nodes do not participate in the execution of the current task, and the unshielded network nodes are target network nodes for executing the current task. In an example, as shown in fig. 2, in performing task 2, the 1 st and 4 th network nodes in a first hidden layer may be masked, and the 2 nd and 3 rd network nodes in a second hidden layer may be masked. That is, the 2 nd and 3 rd network nodes in the first hidden layer and the 1 st and 4 th network nodes in the second hidden layer are target network nodes for performing task 2.
In a possible implementation manner, the task network may process the information to be processed of the task 2 through the target network node, and obtain a processing result of the task 2. Similarly, the task network can select a target network node of the task 1 by modulating the information 1, and process the information to be processed of the task 1 by the target network node to obtain a processing result of the task 1. And selecting a target network node of the task 3 through the modulation information 3, and processing the information to be processed of the task 3 through the target network node to obtain a processing result of the task 3.
In one possible implementation, the task processing method can be used for enabling the neural network to process a scene of various tasks, for example, in the monitoring field, the position of a target object can be determined, and the identity of the target object can be identified. In the field of smart home, the identity of a user can be identified, and a voice command of the user can be identified. The application field of the task processing method is not limited by the disclosure.
Fig. 3 shows a block diagram of a task processing device according to an embodiment of the present disclosure, which, as shown in fig. 3, includes: the modulation information module 11 is configured to input information to be processed of a target task to a modulation network, and obtain modulation information corresponding to the target task, where the target task is any one of a plurality of preset tasks; a target node module 12, configured to determine, according to the modulation information, a target network node for processing the to-be-processed information from multiple network nodes of the task network; and the processing module 13 is configured to process the information to be processed through the target network node to obtain a processing result of the target task.
In a possible implementation manner, the preset task includes a first task and a second task, and the information similarity between the modulation information corresponding to the first task and the modulation information corresponding to the second task is positively correlated to the task similarity between the first task and the second task.
In a possible implementation manner, the preset task includes a first task and a second task, where information similarity between modulation information corresponding to the first task and modulation information corresponding to the second task is positively correlated with a repetition rate of a network node in a first network node and a second network node in the task network, where the first network node is a target network node in the task network for processing information to be processed of the first task, and the second network node is a target network node in the task network for processing information to be processed of the second task.
In one possible implementation, the modulation network includes any one of an artificial neural network and a spiking neural network, and the task network includes any one of a spiking neural network and an artificial neural network. In one possible implementation manner, the apparatus further includes a modulation network training module, where the modulation network training module is configured to: inputting a training sample of a training task into the modulation network to obtain first training modulation information of the training sample, wherein the training task is any one of a plurality of tasks; obtaining second training modulation information of the training task according to first training modulation information of a plurality of training samples of the training task; and training the modulation network according to the first training modulation information and the second training modulation information.
In one possible implementation, the modulation network training module is further configured to: obtaining average training modulation information of first training modulation information of the plurality of training samples; and carrying out thresholding processing on the average training modulation information to obtain the second training modulation information.
In one possible implementation, the modulation network training module is further configured to: acquiring similarity constraint information according to the first training modulation information and the second training modulation information; obtaining regularization information according to the second training modulation information; determining a first network loss of the modulation network according to the similarity constraint information and the regularization information; training the modulation network according to the first network loss.
In one possible implementation manner, the apparatus further includes a task network training module, and the task network training module is configured to: obtaining third training modulation information of a training task according to a training sample of the training task and a trained modulation network, wherein the training task is any one of a plurality of tasks; determining a target network node of a training sample for processing the training task in the task network according to the third training modulation information; processing the training sample of the training task through the target network node to obtain a training result; determining a second network loss of the task network according to the training result and the labeling information of the training sample; and training the task network according to the second network loss.
In one possible implementation, the task network training module is further configured to: and under the condition that the task network is a single hidden layer neural network, determining third training modulation information of the current training task according to fourth training modulation information of the current training task and fifth training modulation information of the trained historical training task, which are obtained by the modulation network.
In a possible implementation manner, the plurality of preset tasks include at least one of an image processing task, a voice processing task, a word processing task, and a vector processing task, and the information to be processed includes at least one of image information, voice information, word information, and vector information.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted.
In addition, the present disclosure also provides a task processing device, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the task processing methods provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method sections are not repeated.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and for specific implementation, reference may be made to the description of the above method embodiments, and for brevity, details are not described here again
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the above method.
In an example, the memory may store instructions (e.g., instructions for invoking data or information, or processing instructions for a neural network) and may also store information to be processed for a plurality of tasks, and the processor may invoke the instructions to perform the steps of the task processing method when executing the task processing method. For example, instructions may be invoked to perform instructions to input information to be processed into a modulation network, and processing instructions of the modulation network may be invoked to obtain modulated information through the modulation network. For example, the instructions may be invoked to execute instructions for determining a target network node in the task network by modulating information, and for example, the processing instructions of the task network may be invoked to process information to be processed by the target network node of the task network to obtain a processing result.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 4 is a block diagram illustrating a task processing device 800 according to an example embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 4, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 5 is a block diagram illustrating a task processing device 1900 according to an example embodiment. For example, the electronic device 1900 may be provided as a server. Referring to fig. 5, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium herein is not to be interpreted as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (13)

1. A task processing method, comprising:
inputting information to be processed of a target task into a modulation network to obtain modulation information corresponding to the target task, wherein the target task is any one of a plurality of preset tasks;
according to the modulation information, determining a target network node for processing the information to be processed from a plurality of network nodes of a task network;
and processing the information to be processed through the target network node to obtain a processing result of the target task.
2. The method according to claim 1, wherein the preset task includes a first task and a second task, and the information similarity between the modulation information corresponding to the first task and the modulation information corresponding to the second task is positively correlated to the task similarity between the first task and the second task.
3. The method of claim 1, wherein the pre-set tasks include a first task and a second task,
the information similarity between the modulation information corresponding to the first task and the modulation information corresponding to the second task is positively correlated with the repetition rate of a first network node and a second network node in the task network, wherein the first network node is a target network node used for processing the information to be processed of the first task in the task network, and the second network node is a target network node used for processing the information to be processed of the second task in the task network.
4. The method of claim 1, wherein the modulation network comprises any one of an artificial neural network and a spiking neural network, and wherein the task network comprises any one of a spiking neural network and an artificial neural network.
5. The method of claim 1, further comprising:
inputting a training sample of a training task into the modulation network to obtain first training modulation information of the training sample, wherein the training task is any one of a plurality of tasks;
obtaining second training modulation information of the training task according to first training modulation information of a plurality of training samples of the training task;
and training the modulation network according to the first training modulation information and the second training modulation information.
6. The method of claim 5, wherein obtaining second training modulation information for the training task based on first training modulation information for a plurality of training samples for the training task comprises:
obtaining average training modulation information of first training modulation information of the plurality of training samples;
and carrying out thresholding processing on the average training modulation information to obtain the second training modulation information.
7. The method of claim 5, wherein training the modulation network based on the first training modulation information and the second training modulation information comprises:
acquiring similarity constraint information according to the first training modulation information and the second training modulation information;
obtaining regularization information according to the second training modulation information;
determining a first network loss of the modulation network according to the similarity constraint information and the regularization information;
training the modulation network according to the first network loss.
8. The method of claim 1, further comprising:
obtaining third training modulation information of a training task according to a training sample of the training task and a trained modulation network, wherein the training task is any one of a plurality of tasks;
determining a target network node of a training sample for processing the training task in the task network according to the third training modulation information;
processing the training sample of the training task through the target network node to obtain a training result;
determining a second network loss of the task network according to the training result and the labeling information of the training sample;
and training the task network according to the second network loss.
9. The method of claim 8, wherein obtaining third training modulation information for a training task based on training samples for the training task and a trained modulation network comprises:
and under the condition that the task network is a single hidden layer neural network, determining third training modulation information of the current training task according to fourth training modulation information of the current training task and fifth training modulation information of the trained historical training task, which are obtained by the modulation network.
10. The method according to claim 1, wherein the plurality of preset tasks include at least one of an image processing task, a voice processing task, a word processing task, and a vector processing task, and the information to be processed includes at least one of image information, voice information, word information, and vector information.
11. A task processing apparatus, comprising:
the modulation information module is used for inputting information to be processed of a target task into a modulation network to obtain modulation information corresponding to the target task, wherein the target task is any one of a plurality of preset tasks;
the target node module is used for determining a target network node for processing the information to be processed from a plurality of network nodes of the task network according to the modulation information;
and the processing module is used for processing the information to be processed through the target network node to obtain a processing result of the target task.
12. A task processing apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the method of any one of claims 1 to 10.
13. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 10.
CN202011261159.0A 2020-11-12 2020-11-12 Task processing method and device, electronic equipment and storage medium Pending CN112328398A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011261159.0A CN112328398A (en) 2020-11-12 2020-11-12 Task processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011261159.0A CN112328398A (en) 2020-11-12 2020-11-12 Task processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112328398A true CN112328398A (en) 2021-02-05

Family

ID=74317270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011261159.0A Pending CN112328398A (en) 2020-11-12 2020-11-12 Task processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112328398A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255905A (en) * 2021-07-16 2021-08-13 成都时识科技有限公司 Signal processing method of neurons in impulse neural network and network training method
CN114781633A (en) * 2022-06-17 2022-07-22 电子科技大学 Processor fusing artificial neural network and pulse neural network
JP2023046213A (en) * 2021-09-22 2023-04-03 株式会社Kddi総合研究所 Method, information processing device and program for performing transfer learning while suppressing occurrence of catastrophic forgetting
CN116663631A (en) * 2023-07-28 2023-08-29 之江实验室 Task execution method and device, storage medium and electronic equipment
WO2023185776A1 (en) * 2022-03-31 2023-10-05 华为技术有限公司 Data processing method, apparatus and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255905A (en) * 2021-07-16 2021-08-13 成都时识科技有限公司 Signal processing method of neurons in impulse neural network and network training method
CN113255905B (en) * 2021-07-16 2021-11-02 成都时识科技有限公司 Signal processing method of neurons in impulse neural network and network training method
JP2023046213A (en) * 2021-09-22 2023-04-03 株式会社Kddi総合研究所 Method, information processing device and program for performing transfer learning while suppressing occurrence of catastrophic forgetting
JP7279225B2 (en) 2021-09-22 2023-05-22 株式会社Kddi総合研究所 METHOD, INFORMATION PROCESSING DEVICE, AND PROGRAM FOR TRANSFER LEARNING WHILE SUPPRESSING CATASTIC FORGETTING
WO2023185776A1 (en) * 2022-03-31 2023-10-05 华为技术有限公司 Data processing method, apparatus and system
CN114781633A (en) * 2022-06-17 2022-07-22 电子科技大学 Processor fusing artificial neural network and pulse neural network
CN116663631A (en) * 2023-07-28 2023-08-29 之江实验室 Task execution method and device, storage medium and electronic equipment
CN116663631B (en) * 2023-07-28 2024-05-14 之江实验室 Task execution method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN110889469B (en) Image processing method and device, electronic equipment and storage medium
CN112328398A (en) Task processing method and device, electronic equipment and storage medium
CN109919300B (en) Neural network training method and device and image processing method and device
CN109165738B (en) Neural network model optimization method and device, electronic device and storage medium
CN109615006B (en) Character recognition method and device, electronic equipment and storage medium
CN111931844B (en) Image processing method and device, electronic equipment and storage medium
CN111222637A (en) Neural network model deployment method and device, electronic equipment and storage medium
CN109858614B (en) Neural network training method and device, electronic equipment and storage medium
CN113065591B (en) Target detection method and device, electronic equipment and storage medium
CN109934240B (en) Feature updating method and device, electronic equipment and storage medium
CN109685041B (en) Image analysis method and device, electronic equipment and storage medium
CN114338083A (en) Controller local area network bus abnormality detection method and device and electronic equipment
CN110633470A (en) Named entity recognition method, device and storage medium
CN110633715B (en) Image processing method, network training method and device and electronic equipment
CN109447258B (en) Neural network model optimization method and device, electronic device and storage medium
CN112559673A (en) Language processing model training method and device, electronic equipment and storage medium
CN113065361B (en) Method and device for determining user intimacy, electronic equipment and storage medium
CN109165722B (en) Model expansion method and device, electronic equipment and storage medium
CN110955800A (en) Video retrieval method and device
CN110163372B (en) Operation method, device and related product
CN111694571B (en) Compiling method and device
CN112102300A (en) Counting method and device, electronic equipment and storage medium
CN110659625A (en) Training method and device of object recognition network, electronic equipment and storage medium
CN109189822B (en) Data processing method and device
CN110750448B (en) Test case generation method and device based on symbol execution

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination